Skip to content

Commit

Permalink
begin implementing backend encrypted message storage
Browse files Browse the repository at this point in the history
Signed-off-by: Emily Gordon <[email protected]>
  • Loading branch information
alidaka authored and Emily Gordon committed Mar 14, 2017
1 parent bc7446f commit e158a86
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@ source 'https://rubygems.org'
ruby '2.3.3'

gem 'sinatra'
gem 'jasmine'
gem 'haml'
gem 'rake'

group :development do
gem 'rerun'
gem 'travis'
end

group :test do
gem 'jasmine'
gem 'rspec'
gem 'rack-test'
end
18 changes: 18 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ GEM
specs:
addressable (2.4.0)
backports (3.6.8)
diff-lcs (1.3)
ethon (0.10.1)
ffi (>= 1.3.0)
faraday (0.11.0)
Expand Down Expand Up @@ -44,12 +45,27 @@ GEM
rack (1.6.5)
rack-protection (1.5.3)
rack
rack-test (0.6.3)
rack (>= 1.0)
rake (12.0.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
rerun (0.11.0)
listen (~> 3.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
ruby_dep (1.5.0)
sinatra (1.4.8)
rack (~> 1.5)
Expand All @@ -75,8 +91,10 @@ PLATFORMS
DEPENDENCIES
haml
jasmine
rack-test
rake
rerun
rspec
sinatra
travis

Expand Down
3 changes: 3 additions & 0 deletions app/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@
@title = 'encrypt message';
haml :encryptMessage
end

post '/message' do
end
11 changes: 11 additions & 0 deletions spec/server/server_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require File.expand_path '../spec_helper.rb', __FILE__
require './app/server'

RSpec.describe 'Server' do
context 'saving a message' do
it 'exposes a POST route' do
post '/message'
expect(last_response).to be_ok
end
end
end
13 changes: 13 additions & 0 deletions spec/server/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
require 'rack/test'
require 'rspec'

ENV['RACK_ENV'] = 'test'

require File.expand_path '../../../app/server.rb', __FILE__

module RSpecMixin
include Rack::Test::Methods
def app() Sinatra::Application end
end

RSpec.configure { |c| c.include RSpecMixin }

0 comments on commit e158a86

Please sign in to comment.