mirage 2.4.2 → 3.0.0.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. data/.simplecov +6 -0
  2. data/Gemfile +11 -3
  3. data/Gemfile.lock +41 -14
  4. data/VERSION +1 -1
  5. data/features/client/clear.feature +41 -50
  6. data/features/client/configure.feature +2 -2
  7. data/features/client/put.feature +17 -6
  8. data/features/client/requests.feature +5 -9
  9. data/features/client/start.feature +19 -11
  10. data/features/client/stop.feature +10 -44
  11. data/features/server/commandline_interface/start.feature +2 -14
  12. data/features/server/commandline_interface/stop.feature +6 -4
  13. data/features/server/logging.feature +2 -2
  14. data/features/server/prime.feature +11 -66
  15. data/features/server/requests/delete.feature +34 -33
  16. data/features/server/requests/get.feature +21 -18
  17. data/features/server/save_and_revert.feature +24 -11
  18. data/features/server/templates/delete.feature +29 -32
  19. data/features/server/templates/get.feature +44 -25
  20. data/features/server/templates/put/put.feature +55 -78
  21. data/features/server/templates/put/put_with_substitutions.feature +12 -32
  22. data/features/server/templates/put/required_content.feature +118 -0
  23. data/features/step_definitions/my_steps.rb +51 -6
  24. data/features/support/env.rb +1 -1
  25. data/features/support/hooks.rb +2 -5
  26. data/{lib/mirage/client → features/support}/web.rb +14 -3
  27. data/lib/mirage/client.rb +5 -2
  28. data/lib/mirage/client/client.rb +22 -129
  29. data/lib/mirage/client/request.rb +25 -0
  30. data/lib/mirage/client/requests.rb +13 -0
  31. data/lib/mirage/client/runner.rb +4 -4
  32. data/lib/mirage/client/template.rb +108 -0
  33. data/lib/mirage/client/template_configuration.rb +22 -0
  34. data/lib/mirage/client/templates.rb +26 -0
  35. data/mirage.gemspec +42 -22
  36. data/mirage_server.rb +1 -135
  37. data/rakefile +22 -7
  38. data/server/app.rb +4 -0
  39. data/server/binary_data_checker.rb +15 -0
  40. data/server/helpers.rb +28 -0
  41. data/server/mock_response.rb +140 -58
  42. data/server/server.rb +167 -0
  43. data/spec/{cli_bridge_spec.rb → client/cli_bridge_spec.rb} +15 -11
  44. data/spec/client/client_spec.rb +139 -0
  45. data/spec/client/request_spec.rb +52 -0
  46. data/spec/client/requests_spec.rb +10 -0
  47. data/spec/{runner_spec.rb → client/runner_spec.rb} +3 -3
  48. data/spec/client/template_configuration_spec.rb +32 -0
  49. data/spec/client/template_spec.rb +241 -0
  50. data/spec/client/templates_spec.rb +79 -0
  51. data/spec/resources/binary.file +0 -0
  52. data/spec/server/binary_data_checker_spec.rb +22 -0
  53. data/spec/server/helpers_spec.rb +34 -0
  54. data/spec/server/mock_response_spec.rb +526 -0
  55. data/spec/server/server_spec.rb +132 -0
  56. data/spec/spec_helper.rb +61 -2
  57. data/test.html +12 -0
  58. data/test.rb +20 -17
  59. data/todo.lst +2 -0
  60. data/views/index.haml +22 -0
  61. data/views/response.haml +24 -0
  62. metadata +134 -49
  63. data/features/server/templates/put/put_as_default.feature +0 -42
  64. data/features/server/templates/put/put_with_delay.feature +0 -8
  65. data/features/server/templates/put/put_with_pattern.feature +0 -80
  66. data/lib/mirage/client/response.rb +0 -29
  67. data/spec/client_spec.rb +0 -38
  68. data/views/index.erb +0 -28
@@ -0,0 +1,132 @@
1
+ require 'spec_helper'
2
+ require 'json'
3
+ require 'base64'
4
+
5
+ describe "Mirage Server" do
6
+ include_context :rack_test, :disable_sinatra_error_handling => true
7
+
8
+ describe "when adding responses" do
9
+ before :each do
10
+ Mirage::MockResponse.delete_all
11
+ @mock_response = Mirage::MockResponse.new('endpoint','value')
12
+ end
13
+
14
+ it 'should create a mock response with the supplied template spec' do
15
+ endpoint = 'greeting'
16
+ spec = {"somekeys" => 'some_values'}
17
+
18
+ Mirage::MockResponse.should_receive(:new).with(endpoint, spec).and_return(@mock_response)
19
+ put('/mirage/templates/greeting', spec.to_json)
20
+ end
21
+
22
+ it 'should set the requests url against the template that is created' do
23
+ method = 'post'
24
+ response_id = 1
25
+ Mirage::MockResponse.should_receive(:new).and_return(@mock_response)
26
+ put('/mirage/templates/greeting', {:request => {:http_method => method}}.to_json)
27
+ @mock_response.requests_url.should == "http://example.org/mirage/requests/#{response_id}"
28
+ end
29
+
30
+ end
31
+
32
+
33
+ describe 'matching templates' do
34
+ before :each do
35
+ @endpoint = "greeting"
36
+ @options = {:body => anything, :params => anything, :endpoint => @endpoint, :headers => anything, :http_method => anything}
37
+ end
38
+
39
+ it 'should use request parameters' do
40
+ parameters = {"key" => 'value'}
41
+
42
+ Mirage::MockResponse.should_receive(:find).with(@options.merge(:params => parameters)).and_return(Mirage::MockResponse.new(@endpoint, {:response => {:body => "hello"}}))
43
+ get("/mirage/responses/#{@endpoint}", parameters)
44
+ end
45
+
46
+ it 'should use the request body' do
47
+ body = 'body'
48
+
49
+ Mirage::MockResponse.should_receive(:find).with(@options.merge(:body => body)).and_return(Mirage::MockResponse.new(@endpoint, {:response => {:body => "hello"}}))
50
+ post("/mirage/responses/#{@endpoint}", body)
51
+ end
52
+
53
+ it 'should use headers' do
54
+ headers = {"HEADER" => 'VALUE'}
55
+ application_expectations do |app|
56
+ app.should_receive(:env).any_number_of_times.and_return(headers)
57
+ app.should_receive(:extract_http_headers).with(headers).and_return(headers)
58
+ end
59
+
60
+ Mirage::MockResponse.should_receive(:find).with(@options.merge(:headers => headers)).and_return(Mirage::MockResponse.new(@endpoint, {:response => {:body => "hello"}}))
61
+ get("/mirage/responses/#{@endpoint}")
62
+ end
63
+
64
+ it 'should return the default response if a specific match is not found' do
65
+ Mirage::MockResponse.should_receive(:find_default).with(@options.merge(:http_method =>"post")).and_return(Mirage::MockResponse.new("greeting", {:response => {:body => "hello"}}))
66
+
67
+ response_template = {
68
+ :request => {
69
+ :body_content => %w(leon),
70
+ :content_type => "post"
71
+ },
72
+ :response => {
73
+ :body => "hello leon"
74
+ }
75
+ }
76
+ put("/mirage/templates/#{@endpoint}", response_template.to_json)
77
+ post("/mirage/responses/#{@endpoint}")
78
+ end
79
+ end
80
+
81
+
82
+
83
+ describe "operations" do
84
+ describe 'resolving responses' do
85
+ it 'should return the default response' do
86
+ put('/mirage/templates/level1', {:response => {:body => Base64.encode64("level1")}}.to_json)
87
+ put('/mirage/templates/level1/level2', {:response => {:body => Base64.encode64("level2"), :default => true}}.to_json)
88
+ get('/mirage/responses/level1/level2/level3').body.should == "level2"
89
+ end
90
+ end
91
+
92
+ describe 'checking templates' do
93
+ it 'should return the descriptor for a template' do
94
+ response_body = "hello"
95
+ response_id = JSON.parse(put('/mirage/templates/greeting', {:response => {:body => Base64.encode64(response_body)}}.to_json).body)['id']
96
+ template = JSON.parse(get("/mirage/templates/#{response_id}").body)
97
+ template.should == JSON.parse({:endpoint => "greeting",
98
+ :id => response_id,
99
+ :requests_url => "http://example.org/mirage/requests/#{response_id}",
100
+ :request => {:parameters => {}, :http_method => "get", :body_content => [], :headers => {}},
101
+ :response => {:default => false,
102
+ :body => Base64.encode64(response_body),
103
+ :delay => 0,
104
+ :content_type => "text/plain",
105
+ :status => 200}
106
+ }.to_json)
107
+ end
108
+ end
109
+
110
+ it 'should return tracked request data' do
111
+ response_id = JSON.parse(put('/mirage/templates/greeting', {:request => {:http_method => :post}, :response => {:body => Base64.encode64("hello")}}.to_json).body)['id']
112
+
113
+
114
+ header "MYHEADER", "my_header_value"
115
+ post("/mirage/responses/greeting?param=value", 'body')
116
+ request_data = JSON.parse(get("/mirage/requests/#{response_id}").body)
117
+
118
+ request_data['parameters'].should == {'param' => 'value'}
119
+ request_data['headers']["MYHEADER"].should == "my_header_value"
120
+ request_data['body'].should == "body"
121
+ request_data['request_url'].should == "http://example.org/mirage/requests/#{response_id}"
122
+
123
+ end
124
+
125
+
126
+ it 'should delete a template' do
127
+ response_id = JSON.parse(put('/mirage/templates/greeting', {:response => {:body => Base64.encode64("hello")}}.to_json).body)['id']
128
+ delete("/mirage/templates/#{response_id}")
129
+ expect { get("/mirage/templates/#{response_id}") }.to raise_error(Mirage::ServerResponseNotFound)
130
+ end
131
+ end
132
+ end
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,21 @@
1
- $LOAD_PATH.unshift "../lib"
1
+ ROOT_DIR = "#{File.dirname(__FILE__)}/.."
2
+ $LOAD_PATH.unshift "#{ROOT_DIR}/lib"
3
+ $LOAD_PATH.unshift "#{ROOT_DIR}/server"
4
+
5
+ require 'simplecov' if ENV['coverage']
2
6
  require 'rspec'
7
+ require 'json'
8
+ require 'base64'
9
+
10
+ module JsonHelpers
11
+ def convert_keys_to_strings hash
12
+ JSON.parse(hash.to_json)
13
+ end
14
+ end
15
+
16
+ RSpec.configure do |config|
17
+ config.include JsonHelpers
18
+ end
3
19
 
4
20
  shared_context :windows do
5
21
  def process_string_for_mirage(mirage_port, pid)
@@ -12,7 +28,6 @@ shared_context :windows do
12
28
  end
13
29
 
14
30
  shared_context :linux do
15
-
16
31
  def process_string_for_mirage(mirage_port, pid)
17
32
  "team #{pid} 6.2 0.4 84328 20760 pts/1 Sl 22:15 0:00 Mirage Server port #{mirage_port}"
18
33
  end
@@ -21,3 +36,47 @@ shared_context :linux do
21
36
  ChildProcess.should_receive(:windows?).any_number_of_times.and_return(false)
22
37
  end
23
38
  end
39
+ shared_context :resources do
40
+ let(:resources_dir){"#{File.dirname(__FILE__)}/resources"}
41
+ end
42
+
43
+ shared_context :rack_test do |options|
44
+ options = {:disable_sinatra_error_handling => false}.merge(options||{})
45
+ require 'sinatra'
46
+ require 'app'
47
+ require 'rack/test'
48
+ include Rack::Test::Methods
49
+
50
+ def app
51
+ @app_expectations ||= proc{}
52
+ Mirage::Server.new do |app|
53
+ @app_expectations.call app
54
+ end
55
+ end
56
+
57
+ def application_expectations &block
58
+ @app_expectations = proc do |app|
59
+ app.stub(:dup).and_return(app)
60
+ block.call app
61
+ end
62
+ end
63
+
64
+ if options[:disable_sinatra_error_handling]
65
+ module Mirage
66
+ class Server < Sinatra::Base
67
+ configure do
68
+ set :show_exceptions, false
69
+ end
70
+ end
71
+ end
72
+
73
+ module Sinatra
74
+ class Base
75
+ def handle_exception! boom
76
+ raise boom
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
82
+
data/test.html ADDED
@@ -0,0 +1,12 @@
1
+ <HTML>
2
+ <HEAD><TITLE>Internal Server Error</TITLE></HEAD>
3
+ <BODY>
4
+ <H1>Internal Server Error</H1>
5
+ invalid %-encoding (\n&quot;,&quot;status&quot;:200,&quot;default&quot;:false,&quot;content_type&quot;:&quot;text/plain&quot;},&quot;request&quot;:{&quot;parameters&quot;:{},&quot;headers&quot;:{&quot;custom-header&quot;:&quot;%r{.eon}&quot;},&quot;body_content&quot;:[],&quot;http_method&quot;:&quot;get&quot;},&quot;delay&quot;:0})
6
+ <HR>
7
+ <ADDRESS>
8
+ WEBrick/1.3.1 (Ruby/1.9.2/2012-04-20) at
9
+ localhost:7001
10
+ </ADDRESS>
11
+ </BODY>
12
+ </HTML>
data/test.rb CHANGED
@@ -1,23 +1,26 @@
1
- require 'sinatra'
2
- require 'async_sinatra'
1
+ require './lib/mirage/client'
3
2
 
4
- #class App < Sinatra::Base
3
+ Mirage.stop
4
+ client = Mirage.start
5
5
 
6
- #class App < Sinatra::Base
7
- configure do |config|
8
- config.register Sinatra::Async
9
- #alias :get :aget
10
-
11
- end
12
6
 
7
+ client.put "greeting", 'hello' do |response|
8
+ response.http_method = :post
9
+ response.delay = 1.2
10
+ response.required_parameters = {:name => 'leon'}
11
+ response.required_body_content = %w(profile)
12
+ response.required_headers = {:header => 'value'}
13
+ end
13
14
 
14
15
 
15
- aget '/' do
16
- #EM.add_timer(5) do
17
- # body "hello"
18
- #end
19
- status 201
20
- body "hello"
16
+ client.put "greeting/something/hello", 'hello' do |response|
17
+ response.http_method = :post
18
+ response.delay = 1.2
19
+ response.required_parameters = {:name => 'leon'}
20
+ response.required_body_content = %w(profile)
21
+ response.required_headers = {:header => 'value'}
21
22
  end
22
- #end
23
- #run App
23
+
24
+ Mirage.stop
25
+
26
+
data/todo.lst ADDED
@@ -0,0 +1,2 @@
1
+ TODO - Get cucumber suite passing again
2
+ TODO - make all request data come back when checking a request, e.g. headers etc...
data/views/index.haml ADDED
@@ -0,0 +1,22 @@
1
+ %html
2
+ %head
3
+ %body
4
+ %h1 Welcome to Mirage
5
+
6
+ %p
7
+ Below are any responses you are currently hosting. Click the response itself to peek at it and click 'track' to view the last request that triggered it.
8
+ %br
9
+ %br
10
+ Patterns and delays are shown for responses that have them.
11
+ %br
12
+ %br
13
+ Responses with '*' at the end are default responses. I.e. they will be returned, where appropriate, for requests to a sub endpoint if a response is not found at that level.
14
+ %br
15
+ %br
16
+ %strong Note:
17
+ if requests or responses contain xml, you will need to view page source to see it properly.
18
+ %br
19
+
20
+ %h2 Responses
21
+ - ::Mirage::MockResponse.all.each do |mock_response|
22
+ #{haml :response, :locals => {:mock_response => mock_response}}
@@ -0,0 +1,24 @@
1
+ - response = locals[:mock_response]
2
+
3
+ %div
4
+ %label{:style => 'font-weight: bold'}
5
+ endpoint:
6
+ #{response.name}
7
+ %br
8
+ %label{:style => 'font-weight: bold'}
9
+ required http method:
10
+ #{response.request_spec.http_method}
11
+ %br
12
+ %label{:style => 'font-weight: bold'}
13
+ required headers:
14
+ #{response.request_spec.headers.to_hash}
15
+ %br
16
+ %label{:style => 'font-weight: bold'}
17
+ required parameters:
18
+ #{response.request_spec.parameters.to_hash}
19
+ %br
20
+ %label{:style => 'font-weight: bold'}
21
+ required body content:
22
+ #{response.request_spec.body_content}
23
+ %br
24
+ %br
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mirage
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
5
- prerelease:
4
+ version: 3.0.0.alpha.1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Leon Davis
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-20 00:00:00.000000000Z
12
+ date: 2013-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
16
- requirement: &25392540 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *25392540
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: childprocess
27
- requirement: &25391440 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *25391440
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: waitforit
38
- requirement: &25390580 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '0'
44
54
  type: :runtime
45
55
  prerelease: false
46
- version_requirements: *25390580
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: thor
49
- requirement: &25389580 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,43 +69,63 @@ dependencies:
54
69
  version: '0'
55
70
  type: :runtime
56
71
  prerelease: false
57
- version_requirements: *25389580
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  - !ruby/object:Gem::Dependency
59
- name: thin
60
- requirement: &25384880 !ruby/object:Gem::Requirement
79
+ name: ptools
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
64
84
  - !ruby/object:Gem::Version
65
85
  version: '0'
66
- type: :development
86
+ type: :runtime
67
87
  prerelease: false
68
- version_requirements: *25384880
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
69
94
  - !ruby/object:Gem::Dependency
70
- name: rake
71
- requirement: &25383820 !ruby/object:Gem::Requirement
95
+ name: httparty
96
+ requirement: !ruby/object:Gem::Requirement
72
97
  none: false
73
98
  requirements:
74
99
  - - ! '>='
75
100
  - !ruby/object:Gem::Version
76
101
  version: '0'
77
- type: :development
102
+ type: :runtime
78
103
  prerelease: false
79
- version_requirements: *25383820
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
80
110
  - !ruby/object:Gem::Dependency
81
- name: cucumber
82
- requirement: &25382520 !ruby/object:Gem::Requirement
111
+ name: haml
112
+ requirement: !ruby/object:Gem::Requirement
83
113
  none: false
84
114
  requirements:
85
115
  - - ! '>='
86
116
  - !ruby/object:Gem::Version
87
117
  version: '0'
88
- type: :development
118
+ type: :runtime
89
119
  prerelease: false
90
- version_requirements: *25382520
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
91
126
  - !ruby/object:Gem::Dependency
92
- name: rspec
93
- requirement: &25381620 !ruby/object:Gem::Requirement
127
+ name: rake
128
+ requirement: !ruby/object:Gem::Requirement
94
129
  none: false
95
130
  requirements:
96
131
  - - ! '>='
@@ -98,10 +133,15 @@ dependencies:
98
133
  version: '0'
99
134
  type: :development
100
135
  prerelease: false
101
- version_requirements: *25381620
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
102
142
  - !ruby/object:Gem::Dependency
103
143
  name: jeweler
104
- requirement: &25380220 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
105
145
  none: false
106
146
  requirements:
107
147
  - - ! '>='
@@ -109,10 +149,15 @@ dependencies:
109
149
  version: '0'
110
150
  type: :development
111
151
  prerelease: false
112
- version_requirements: *25380220
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
113
158
  - !ruby/object:Gem::Dependency
114
159
  name: sinatra-contrib
115
- requirement: &25379320 !ruby/object:Gem::Requirement
160
+ requirement: !ruby/object:Gem::Requirement
116
161
  none: false
117
162
  requirements:
118
163
  - - ! '>='
@@ -120,10 +165,15 @@ dependencies:
120
165
  version: '0'
121
166
  type: :development
122
167
  prerelease: false
123
- version_requirements: *25379320
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
124
174
  - !ruby/object:Gem::Dependency
125
175
  name: mechanize
126
- requirement: &25378420 !ruby/object:Gem::Requirement
176
+ requirement: !ruby/object:Gem::Requirement
127
177
  none: false
128
178
  requirements:
129
179
  - - ! '>='
@@ -131,10 +181,15 @@ dependencies:
131
181
  version: '0'
132
182
  type: :development
133
183
  prerelease: false
134
- version_requirements: *25378420
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
135
190
  - !ruby/object:Gem::Dependency
136
191
  name: nokogiri
137
- requirement: &25377700 !ruby/object:Gem::Requirement
192
+ requirement: !ruby/object:Gem::Requirement
138
193
  none: false
139
194
  requirements:
140
195
  - - ! '>='
@@ -142,10 +197,15 @@ dependencies:
142
197
  version: '0'
143
198
  type: :development
144
199
  prerelease: false
145
- version_requirements: *25377700
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
146
206
  - !ruby/object:Gem::Dependency
147
207
  name: jruby-openssl
148
- requirement: &25375700 !ruby/object:Gem::Requirement
208
+ requirement: !ruby/object:Gem::Requirement
149
209
  none: false
150
210
  requirements:
151
211
  - - ! '>='
@@ -153,7 +213,12 @@ dependencies:
153
213
  version: '0'
154
214
  type: :development
155
215
  prerelease: false
156
- version_requirements: *25375700
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
157
222
  description: Mirage aids testing of your applications by hosting mock responses so
158
223
  that your applications do not have to talk to real endpoints. Its accessible via
159
224
  HTTP and has a RESTful interface.
@@ -165,6 +230,7 @@ extra_rdoc_files:
165
230
  - README.md
166
231
  files:
167
232
  - .rvmrc
233
+ - .simplecov
168
234
  - Gemfile
169
235
  - Gemfile.lock
170
236
  - HISTORY
@@ -191,37 +257,56 @@ files:
191
257
  - features/server/templates/delete.feature
192
258
  - features/server/templates/get.feature
193
259
  - features/server/templates/put/put.feature
194
- - features/server/templates/put/put_as_default.feature
195
- - features/server/templates/put/put_with_delay.feature
196
- - features/server/templates/put/put_with_pattern.feature
197
260
  - features/server/templates/put/put_with_substitutions.feature
261
+ - features/server/templates/put/required_content.feature
198
262
  - features/server/web_user_interface.feature
199
263
  - features/step_definitions/my_steps.rb
200
264
  - features/support/command_line.rb
201
265
  - features/support/env.rb
202
266
  - features/support/hooks.rb
203
267
  - features/support/mirage.rb
268
+ - features/support/web.rb
204
269
  - full_build.sh
205
270
  - lib/mirage/client.rb
206
271
  - lib/mirage/client/cli_bridge.rb
207
272
  - lib/mirage/client/client.rb
208
273
  - lib/mirage/client/error.rb
209
- - lib/mirage/client/response.rb
274
+ - lib/mirage/client/request.rb
275
+ - lib/mirage/client/requests.rb
210
276
  - lib/mirage/client/runner.rb
211
- - lib/mirage/client/web.rb
277
+ - lib/mirage/client/template.rb
278
+ - lib/mirage/client/template_configuration.rb
279
+ - lib/mirage/client/templates.rb
212
280
  - mirage.gemspec
213
281
  - mirage_server.rb
214
282
  - rakefile
215
283
  - responses/default_responses.rb
284
+ - server/app.rb
285
+ - server/binary_data_checker.rb
216
286
  - server/extensions/hash.rb
217
287
  - server/extensions/object.rb
288
+ - server/helpers.rb
218
289
  - server/mock_response.rb
219
- - spec/cli_bridge_spec.rb
220
- - spec/client_spec.rb
221
- - spec/runner_spec.rb
290
+ - server/server.rb
291
+ - spec/client/cli_bridge_spec.rb
292
+ - spec/client/client_spec.rb
293
+ - spec/client/request_spec.rb
294
+ - spec/client/requests_spec.rb
295
+ - spec/client/runner_spec.rb
296
+ - spec/client/template_configuration_spec.rb
297
+ - spec/client/template_spec.rb
298
+ - spec/client/templates_spec.rb
299
+ - spec/resources/binary.file
300
+ - spec/server/binary_data_checker_spec.rb
301
+ - spec/server/helpers_spec.rb
302
+ - spec/server/mock_response_spec.rb
303
+ - spec/server/server_spec.rb
222
304
  - spec/spec_helper.rb
305
+ - test.html
223
306
  - test.rb
224
- - views/index.erb
307
+ - todo.lst
308
+ - views/index.haml
309
+ - views/response.haml
225
310
  homepage: https://github.com/lashd/mirage
226
311
  licenses:
227
312
  - MIT
@@ -239,16 +324,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
239
324
  version: '0'
240
325
  segments:
241
326
  - 0
242
- hash: -1894067030623386639
327
+ hash: 1408219703297469637
243
328
  required_rubygems_version: !ruby/object:Gem::Requirement
244
329
  none: false
245
330
  requirements:
246
- - - ! '>='
331
+ - - ! '>'
247
332
  - !ruby/object:Gem::Version
248
- version: '0'
333
+ version: 1.3.1
249
334
  requirements: []
250
335
  rubyforge_project:
251
- rubygems_version: 1.8.17
336
+ rubygems_version: 1.8.24
252
337
  signing_key:
253
338
  specification_version: 3
254
339
  summary: Mirage is a easy mock server for testing your applications