http_stub 0.25.1 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. checksums.yaml +4 -4
  2. data/lib/http_stub.rb +32 -9
  3. data/lib/http_stub/configurer.rb +2 -10
  4. data/lib/http_stub/configurer/dsl/scenario_builder.rb +13 -11
  5. data/lib/http_stub/configurer/dsl/server.rb +32 -43
  6. data/lib/http_stub/configurer/dsl/server_endpoint_template.rb +23 -0
  7. data/lib/http_stub/configurer/dsl/session.rb +55 -0
  8. data/lib/http_stub/configurer/dsl/session_endpoint_template.rb +22 -0
  9. data/lib/http_stub/configurer/dsl/session_factory.rb +34 -0
  10. data/lib/http_stub/configurer/dsl/stub_builder.rb +18 -8
  11. data/lib/http_stub/configurer/dsl/stub_builder_template.rb +26 -0
  12. data/lib/http_stub/configurer/request/http/basic.rb +9 -3
  13. data/lib/http_stub/configurer/request/http/factory.rb +7 -16
  14. data/lib/http_stub/configurer/request/http/multipart.rb +5 -7
  15. data/lib/http_stub/configurer/request/stub.rb +3 -3
  16. data/lib/http_stub/configurer/request/triggers.rb +25 -0
  17. data/lib/http_stub/configurer/server/command_processor.rb +8 -10
  18. data/lib/http_stub/configurer/server/configuration.rb +33 -0
  19. data/lib/http_stub/configurer/server/facade.rb +21 -43
  20. data/lib/http_stub/configurer/server/request_processor.rb +2 -2
  21. data/lib/http_stub/configurer/server/session_facade.rb +64 -0
  22. data/lib/http_stub/extensions/core/uri.rb +28 -0
  23. data/lib/http_stub/extensions/rack/handler.rb +1 -0
  24. data/lib/http_stub/extensions/sinatra/namespace.rb +9 -0
  25. data/lib/http_stub/rake/server_tasks.rb +1 -4
  26. data/lib/http_stub/server/application/application.rb +17 -98
  27. data/lib/http_stub/server/application/configuration.rb +38 -0
  28. data/lib/http_stub/server/application/cross_origin_support.rb +7 -5
  29. data/lib/http_stub/server/application/request_support.rb +38 -0
  30. data/lib/http_stub/server/application/response_support.rb +19 -0
  31. data/lib/http_stub/server/application/routes/memory.rb +37 -0
  32. data/lib/http_stub/server/application/routes/resource.rb +23 -0
  33. data/lib/http_stub/server/application/routes/scenario.rb +52 -0
  34. data/lib/http_stub/server/application/routes/session.rb +65 -0
  35. data/lib/http_stub/server/application/routes/stub.rb +75 -0
  36. data/lib/http_stub/server/application/session_uri_support.rb +15 -0
  37. data/lib/http_stub/server/memory/controller.rb +25 -0
  38. data/lib/http_stub/server/memory/memory.rb +32 -0
  39. data/lib/http_stub/server/registry.rb +25 -8
  40. data/lib/http_stub/server/request/factory.rb +23 -0
  41. data/lib/http_stub/server/request/parameters.rb +2 -2
  42. data/lib/http_stub/server/request/request.rb +6 -11
  43. data/lib/http_stub/server/request/sinatra_request.rb +26 -0
  44. data/lib/http_stub/server/scenario/controller.rb +16 -11
  45. data/lib/http_stub/server/scenario/not_found_error.rb +15 -0
  46. data/lib/http_stub/server/session.rb +14 -0
  47. data/lib/http_stub/server/session/configuration.rb +32 -0
  48. data/lib/http_stub/server/session/controller.rb +40 -0
  49. data/lib/http_stub/server/session/empty.rb +15 -0
  50. data/lib/http_stub/server/session/identifier_strategy.rb +24 -0
  51. data/lib/http_stub/server/session/registry.rb +38 -0
  52. data/lib/http_stub/server/session/session.rb +80 -0
  53. data/lib/http_stub/server/stub/controller.rb +18 -12
  54. data/lib/http_stub/server/stub/empty.rb +1 -1
  55. data/lib/http_stub/server/stub/match/controller.rb +9 -5
  56. data/lib/http_stub/server/stub/payload/response_body_modifier.rb +3 -1
  57. data/lib/http_stub/server/stub/registry.rb +6 -13
  58. data/lib/http_stub/server/stub/triggers.rb +11 -9
  59. data/lib/http_stub/server/views/_home.haml +2 -0
  60. data/lib/http_stub/server/views/_post_link_function.haml +26 -0
  61. data/lib/http_stub/server/views/_session.haml +16 -0
  62. data/lib/http_stub/server/views/_stub.haml +8 -2
  63. data/lib/http_stub/server/views/_stubs.haml +4 -0
  64. data/lib/http_stub/server/views/application.sass +4 -1
  65. data/lib/http_stub/server/views/layout.haml +1 -0
  66. data/lib/http_stub/server/views/scenario.haml +4 -3
  67. data/lib/http_stub/server/views/scenarios.haml +7 -6
  68. data/lib/http_stub/server/views/session.haml +3 -0
  69. data/lib/http_stub/server/views/sessions.haml +6 -0
  70. data/lib/http_stub/server/views/stubs.haml +1 -4
  71. data/lib/http_stub/server/views/transactional_session.haml +2 -0
  72. data/lib/http_stub/version.rb +1 -1
  73. data/spec/acceptance/configurer_initialization_spec.rb +40 -51
  74. data/spec/acceptance/configurer_part_spec.rb +5 -7
  75. data/spec/acceptance/cross_origin_support_spec.rb +7 -13
  76. data/spec/acceptance/endpoint_template_spec.rb +2 -4
  77. data/spec/acceptance/request_reference_spec.rb +1 -3
  78. data/spec/acceptance/scenario_spec.rb +7 -9
  79. data/spec/acceptance/server_defaults_spec.rb +2 -4
  80. data/spec/acceptance/server_memory_spec.rb +20 -0
  81. data/spec/acceptance/session_spec.rb +125 -0
  82. data/spec/acceptance/stub_body_request_matching_spec.rb +2 -4
  83. data/spec/acceptance/stub_control_values_spec.rb +19 -18
  84. data/spec/acceptance/stub_match_last_spec.rb +0 -4
  85. data/spec/acceptance/stub_match_list_spec.rb +0 -4
  86. data/spec/acceptance/stub_miss_list_spec.rb +0 -4
  87. data/spec/acceptance/stub_spec.rb +11 -11
  88. data/spec/acceptance/stub_trigger_spec.rb +60 -13
  89. data/spec/lib/http_stub/configurer/dsl/scenario_builder_spec.rb +83 -30
  90. data/spec/lib/http_stub/configurer/dsl/server_endpoint_template_spec.rb +167 -0
  91. data/spec/lib/http_stub/configurer/dsl/server_spec.rb +306 -176
  92. data/spec/lib/http_stub/configurer/dsl/session_endpoint_template_spec.rb +150 -0
  93. data/spec/lib/http_stub/configurer/dsl/session_factory_spec.rb +97 -0
  94. data/spec/lib/http_stub/configurer/dsl/session_spec.rb +222 -0
  95. data/spec/lib/http_stub/configurer/dsl/stub_builder_spec.rb +209 -48
  96. data/spec/lib/http_stub/configurer/dsl/stub_builder_template_spec.rb +203 -0
  97. data/spec/lib/http_stub/configurer/request/http/basic_spec.rb +80 -4
  98. data/spec/lib/http_stub/configurer/request/http/factory_spec.rb +115 -56
  99. data/spec/lib/http_stub/configurer/request/http/multipart_spec.rb +39 -6
  100. data/spec/lib/http_stub/configurer/request/stub_spec.rb +50 -108
  101. data/spec/lib/http_stub/configurer/request/triggers_spec.rb +101 -0
  102. data/spec/lib/http_stub/configurer/server/command_processor_integration_spec.rb +11 -10
  103. data/spec/lib/http_stub/configurer/server/configuration_spec.rb +139 -0
  104. data/spec/lib/http_stub/configurer/server/facade_spec.rb +65 -142
  105. data/spec/lib/http_stub/configurer/server/request_processor_spec.rb +7 -6
  106. data/spec/lib/http_stub/configurer/server/session_facade_spec.rb +336 -0
  107. data/spec/lib/http_stub/configurer_spec.rb +105 -0
  108. data/spec/lib/http_stub/extensions/core/uri_spec.rb +75 -0
  109. data/spec/lib/http_stub/extensions/rack/handler_spec.rb +1 -1
  110. data/spec/lib/http_stub/extensions/sinatra/namespace_spec.rb +36 -0
  111. data/spec/lib/http_stub/rake/server_tasks_smoke_spec.rb +4 -3
  112. data/spec/lib/http_stub/rake/server_tasks_spec.rb +47 -10
  113. data/spec/lib/http_stub/server/application/application_spec.rb +44 -301
  114. data/spec/lib/http_stub/server/application/configuration_spec.rb +59 -0
  115. data/spec/lib/http_stub/server/application/cross_origin_support_spec.rb +23 -20
  116. data/spec/lib/http_stub/server/application/request_support_integration_spec.rb +93 -0
  117. data/spec/lib/http_stub/server/application/request_support_spec.rb +61 -0
  118. data/spec/lib/http_stub/server/application/response_support_spec.rb +30 -0
  119. data/spec/lib/http_stub/server/application/routes/memory_spec.rb +41 -0
  120. data/spec/lib/http_stub/server/application/routes/resource_spec.rb +16 -0
  121. data/spec/lib/http_stub/server/application/routes/scenario_spec.rb +117 -0
  122. data/spec/lib/http_stub/server/application/routes/session_integration_spec.rb +46 -0
  123. data/spec/lib/http_stub/server/application/routes/session_spec.rb +186 -0
  124. data/spec/lib/http_stub/server/application/{application_integration_spec.rb → routes/stub_integration_spec.rb} +16 -38
  125. data/spec/lib/http_stub/server/application/routes/stub_spec.rb +202 -0
  126. data/spec/lib/http_stub/server/application/session_uri_support_spec.rb +48 -0
  127. data/spec/lib/http_stub/server/application/text_formatting_support_spec.rb +3 -3
  128. data/spec/lib/http_stub/server/memory/controller_spec.rb +47 -0
  129. data/spec/lib/http_stub/server/memory/memory_spec.rb +122 -0
  130. data/spec/lib/http_stub/server/registry_spec.rb +153 -34
  131. data/spec/lib/http_stub/server/request/factory_spec.rb +74 -0
  132. data/spec/lib/http_stub/server/request/parameters_spec.rb +5 -8
  133. data/spec/lib/http_stub/server/request/request_spec.rb +52 -52
  134. data/spec/lib/http_stub/server/request/sinatra_request_spec.rb +132 -0
  135. data/spec/lib/http_stub/server/scenario/controller_spec.rb +121 -35
  136. data/spec/lib/http_stub/server/scenario/not_found_error_spec.rb +25 -0
  137. data/spec/lib/http_stub/server/session/configuration_spec.rb +94 -0
  138. data/spec/lib/http_stub/server/session/controller_spec.rb +106 -0
  139. data/spec/lib/http_stub/server/session/empty_spec.rb +13 -0
  140. data/spec/lib/http_stub/server/session/identifier_strategy_spec.rb +126 -0
  141. data/spec/lib/http_stub/server/session/registry_spec.rb +214 -0
  142. data/spec/lib/http_stub/server/session/session_spec.rb +444 -0
  143. data/spec/lib/http_stub/server/stub/controller_spec.rb +89 -37
  144. data/spec/lib/http_stub/server/stub/empty_spec.rb +2 -2
  145. data/spec/lib/http_stub/server/stub/match/controller_spec.rb +59 -16
  146. data/spec/lib/http_stub/server/stub/payload/response_body_modifier_spec.rb +7 -8
  147. data/spec/lib/http_stub/server/stub/registry_integration_spec.rb +42 -15
  148. data/spec/lib/http_stub/server/stub/registry_spec.rb +38 -59
  149. data/spec/lib/http_stub/server/stub/triggers_spec.rb +93 -34
  150. data/spec/spec_helper.rb +13 -1
  151. data/spec/support/contain_file.rb +23 -0
  152. data/spec/support/cross_origin_server/application.rb +1 -1
  153. data/spec/support/cross_origin_server/index_page.rb +2 -2
  154. data/spec/support/cross_origin_server/integration.rb +3 -2
  155. data/spec/support/cross_origin_server/public/index.html +2 -1
  156. data/spec/support/http_stub/configurer_integration.rb +12 -14
  157. data/spec/support/http_stub/server/application/http_stub_rack_application_test.rb +47 -0
  158. data/spec/support/http_stub/server/driver.rb +56 -0
  159. data/spec/support/http_stub/server/memory_fixture.rb +17 -0
  160. data/spec/support/http_stub/server/request_fixture.rb +7 -6
  161. data/spec/support/http_stub/server/scenario_fixture.rb +13 -0
  162. data/spec/support/http_stub/server/session_fixture.rb +27 -0
  163. data/spec/support/http_stub/server_integration.rb +12 -17
  164. data/spec/support/http_stub/stub_fixture.rb +19 -6
  165. data/spec/support/include_in_json.rb +4 -4
  166. data/spec/support/rack/rack_application_test.rb +9 -0
  167. data/spec/support/rack/request_fixture.rb +13 -0
  168. data/spec/support/surpressed_output.rb +10 -0
  169. metadata +149 -36
  170. data/lib/http_stub/configurer/dsl/deprecated.rb +0 -60
  171. data/lib/http_stub/configurer/dsl/endpoint_template.rb +0 -38
  172. data/lib/http_stub/configurer/dsl/scenario_activator.rb +0 -15
  173. data/lib/http_stub/configurer/dsl/stub_activator_builder.rb +0 -24
  174. data/lib/http_stub/configurer/dsl/stub_builder_producer.rb +0 -21
  175. data/lib/http_stub/server/request.rb +0 -12
  176. data/lib/http_stub/server/scenario/activator.rb +0 -25
  177. data/lib/http_stub/server/views/_activate_scenario.haml +0 -23
  178. data/lib/http_stub/server/views/index.haml +0 -8
  179. data/spec/acceptance/activator_spec.rb +0 -81
  180. data/spec/lib/http_stub/configurer/dsl/deprecated_spec.rb +0 -240
  181. data/spec/lib/http_stub/configurer/dsl/endpoint_template_spec.rb +0 -255
  182. data/spec/lib/http_stub/configurer/dsl/scenario_activator_spec.rb +0 -62
  183. data/spec/lib/http_stub/configurer/dsl/stub_activator_builder_spec.rb +0 -120
  184. data/spec/lib/http_stub/configurer/dsl/stub_builder_producer_spec.rb +0 -85
  185. data/spec/lib/http_stub/server/request_spec.rb +0 -24
  186. data/spec/lib/http_stub/server/scenario/activator_spec.rb +0 -111
  187. data/spec/support/http_stub/server/scenario/scenario_fixture.rb +0 -15
@@ -0,0 +1,9 @@
1
+ shared_context "rack application test" do
2
+ include Rack::Test::Methods
3
+
4
+ let(:response) { last_response }
5
+ let(:response_body) { response.body.to_s }
6
+
7
+ let(:app) { app_class.new! }
8
+
9
+ end
@@ -0,0 +1,13 @@
1
+ module Rack
2
+
3
+ class RequestFixture
4
+
5
+ def self.create
6
+ Rack::Request.new("PATH_INFO" => "/some/path/info",
7
+ "REQUEST_METHOD" => "GET",
8
+ "rack.input" => StringIO.new)
9
+ end
10
+
11
+ end
12
+
13
+ end
@@ -0,0 +1,10 @@
1
+ shared_context "surpressed output" do
2
+
3
+ before(:example) do
4
+ @original_stderr = $stderr
5
+ $stderr = StringIO.new
6
+ end
7
+
8
+ after(:example) { $stderr = @original_stderr }
9
+
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_stub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.1
4
+ version: 0.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - dueckes
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2016-08-12 00:00:00.000000000 Z
15
+ date: 2016-10-15 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rake
@@ -42,6 +42,20 @@ dependencies:
42
42
  - - "~>"
43
43
  - !ruby/object:Gem::Version
44
44
  version: '1.4'
45
+ - !ruby/object:Gem::Dependency
46
+ name: sinatra-contrib
47
+ requirement: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - "~>"
50
+ - !ruby/object:Gem::Version
51
+ version: '1.4'
52
+ type: :runtime
53
+ prerelease: false
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - "~>"
57
+ - !ruby/object:Gem::Version
58
+ version: '1.4'
45
59
  - !ruby/object:Gem::Dependency
46
60
  name: sinatra-partial
47
61
  requirement: !ruby/object:Gem::Requirement
@@ -90,14 +104,14 @@ dependencies:
90
104
  requirements:
91
105
  - - "~>"
92
106
  - !ruby/object:Gem::Version
93
- version: '2.6'
107
+ version: '2.7'
94
108
  type: :runtime
95
109
  prerelease: false
96
110
  version_requirements: !ruby/object:Gem::Requirement
97
111
  requirements:
98
112
  - - "~>"
99
113
  - !ruby/object:Gem::Version
100
- version: '2.6'
114
+ version: '2.7'
101
115
  - !ruby/object:Gem::Dependency
102
116
  name: activesupport
103
117
  requirement: !ruby/object:Gem::Requirement
@@ -146,14 +160,14 @@ dependencies:
146
160
  requirements:
147
161
  - - "~>"
148
162
  - !ruby/object:Gem::Version
149
- version: '0.42'
163
+ version: '0.44'
150
164
  type: :development
151
165
  prerelease: false
152
166
  version_requirements: !ruby/object:Gem::Requirement
153
167
  requirements:
154
168
  - - "~>"
155
169
  - !ruby/object:Gem::Version
156
- version: '0.42'
170
+ version: '0.44'
157
171
  - !ruby/object:Gem::Dependency
158
172
  name: rspec
159
173
  requirement: !ruby/object:Gem::Requirement
@@ -288,16 +302,16 @@ extra_rdoc_files: []
288
302
  files:
289
303
  - "./lib/http_stub.rb"
290
304
  - "./lib/http_stub/configurer.rb"
291
- - "./lib/http_stub/configurer/dsl/deprecated.rb"
292
- - "./lib/http_stub/configurer/dsl/endpoint_template.rb"
293
305
  - "./lib/http_stub/configurer/dsl/request_attribute_referencer.rb"
294
306
  - "./lib/http_stub/configurer/dsl/request_referencer.rb"
295
- - "./lib/http_stub/configurer/dsl/scenario_activator.rb"
296
307
  - "./lib/http_stub/configurer/dsl/scenario_builder.rb"
297
308
  - "./lib/http_stub/configurer/dsl/server.rb"
298
- - "./lib/http_stub/configurer/dsl/stub_activator_builder.rb"
309
+ - "./lib/http_stub/configurer/dsl/server_endpoint_template.rb"
310
+ - "./lib/http_stub/configurer/dsl/session.rb"
311
+ - "./lib/http_stub/configurer/dsl/session_endpoint_template.rb"
312
+ - "./lib/http_stub/configurer/dsl/session_factory.rb"
299
313
  - "./lib/http_stub/configurer/dsl/stub_builder.rb"
300
- - "./lib/http_stub/configurer/dsl/stub_builder_producer.rb"
314
+ - "./lib/http_stub/configurer/dsl/stub_builder_template.rb"
301
315
  - "./lib/http_stub/configurer/part.rb"
302
316
  - "./lib/http_stub/configurer/request/controllable_value.rb"
303
317
  - "./lib/http_stub/configurer/request/http/basic.rb"
@@ -309,39 +323,63 @@ files:
309
323
  - "./lib/http_stub/configurer/request/stub.rb"
310
324
  - "./lib/http_stub/configurer/request/stub_response.rb"
311
325
  - "./lib/http_stub/configurer/request/stub_response_file.rb"
326
+ - "./lib/http_stub/configurer/request/triggers.rb"
312
327
  - "./lib/http_stub/configurer/server/buffered_command_processor.rb"
313
328
  - "./lib/http_stub/configurer/server/command.rb"
314
329
  - "./lib/http_stub/configurer/server/command_processor.rb"
330
+ - "./lib/http_stub/configurer/server/configuration.rb"
315
331
  - "./lib/http_stub/configurer/server/facade.rb"
316
332
  - "./lib/http_stub/configurer/server/request_processor.rb"
333
+ - "./lib/http_stub/configurer/server/session_facade.rb"
317
334
  - "./lib/http_stub/extensions/core/hash.rb"
318
335
  - "./lib/http_stub/extensions/core/hash/formatted.rb"
319
336
  - "./lib/http_stub/extensions/core/hash/indifferent_and_insensitive_access.rb"
320
337
  - "./lib/http_stub/extensions/core/hash/with_indifferent_and_insensitive_access.rb"
338
+ - "./lib/http_stub/extensions/core/uri.rb"
321
339
  - "./lib/http_stub/extensions/rack/handler.rb"
340
+ - "./lib/http_stub/extensions/sinatra/namespace.rb"
322
341
  - "./lib/http_stub/rake/server_daemon_tasks.rb"
323
342
  - "./lib/http_stub/rake/server_tasks.rb"
324
343
  - "./lib/http_stub/rake/task_generators.rb"
325
344
  - "./lib/http_stub/server/application/application.rb"
345
+ - "./lib/http_stub/server/application/configuration.rb"
326
346
  - "./lib/http_stub/server/application/cross_origin_support.rb"
347
+ - "./lib/http_stub/server/application/request_support.rb"
327
348
  - "./lib/http_stub/server/application/response_pipeline.rb"
349
+ - "./lib/http_stub/server/application/response_support.rb"
350
+ - "./lib/http_stub/server/application/routes/memory.rb"
351
+ - "./lib/http_stub/server/application/routes/resource.rb"
352
+ - "./lib/http_stub/server/application/routes/scenario.rb"
353
+ - "./lib/http_stub/server/application/routes/session.rb"
354
+ - "./lib/http_stub/server/application/routes/stub.rb"
355
+ - "./lib/http_stub/server/application/session_uri_support.rb"
328
356
  - "./lib/http_stub/server/application/text_formatting_support.rb"
329
357
  - "./lib/http_stub/server/daemon.rb"
358
+ - "./lib/http_stub/server/memory/controller.rb"
359
+ - "./lib/http_stub/server/memory/memory.rb"
330
360
  - "./lib/http_stub/server/public/favicon.ico"
331
361
  - "./lib/http_stub/server/public/jquery-2.2.4.min.js"
332
362
  - "./lib/http_stub/server/registry.rb"
333
- - "./lib/http_stub/server/request.rb"
363
+ - "./lib/http_stub/server/request/factory.rb"
334
364
  - "./lib/http_stub/server/request/headers.rb"
335
365
  - "./lib/http_stub/server/request/parameters.rb"
336
366
  - "./lib/http_stub/server/request/request.rb"
367
+ - "./lib/http_stub/server/request/sinatra_request.rb"
337
368
  - "./lib/http_stub/server/response.rb"
338
369
  - "./lib/http_stub/server/scenario.rb"
339
- - "./lib/http_stub/server/scenario/activator.rb"
340
370
  - "./lib/http_stub/server/scenario/controller.rb"
341
371
  - "./lib/http_stub/server/scenario/links.rb"
372
+ - "./lib/http_stub/server/scenario/not_found_error.rb"
342
373
  - "./lib/http_stub/server/scenario/parser.rb"
343
374
  - "./lib/http_stub/server/scenario/scenario.rb"
344
375
  - "./lib/http_stub/server/scenario/trigger.rb"
376
+ - "./lib/http_stub/server/session.rb"
377
+ - "./lib/http_stub/server/session/configuration.rb"
378
+ - "./lib/http_stub/server/session/controller.rb"
379
+ - "./lib/http_stub/server/session/empty.rb"
380
+ - "./lib/http_stub/server/session/identifier_strategy.rb"
381
+ - "./lib/http_stub/server/session/registry.rb"
382
+ - "./lib/http_stub/server/session/session.rb"
345
383
  - "./lib/http_stub/server/stub.rb"
346
384
  - "./lib/http_stub/server/stub/controller.rb"
347
385
  - "./lib/http_stub/server/stub/empty.rb"
@@ -378,26 +416,30 @@ files:
378
416
  - "./lib/http_stub/server/stub/response/text.rb"
379
417
  - "./lib/http_stub/server/stub/stub.rb"
380
418
  - "./lib/http_stub/server/stub/triggers.rb"
381
- - "./lib/http_stub/server/views/_activate_scenario.haml"
382
419
  - "./lib/http_stub/server/views/_file_response.haml"
420
+ - "./lib/http_stub/server/views/_home.haml"
421
+ - "./lib/http_stub/server/views/_post_link_function.haml"
383
422
  - "./lib/http_stub/server/views/_request.haml"
384
423
  - "./lib/http_stub/server/views/_response.haml"
424
+ - "./lib/http_stub/server/views/_session.haml"
385
425
  - "./lib/http_stub/server/views/_stub.haml"
386
426
  - "./lib/http_stub/server/views/_stub_match.haml"
387
427
  - "./lib/http_stub/server/views/_stub_miss.haml"
428
+ - "./lib/http_stub/server/views/_stubs.haml"
388
429
  - "./lib/http_stub/server/views/_text_response.haml"
389
430
  - "./lib/http_stub/server/views/application.sass"
390
- - "./lib/http_stub/server/views/index.haml"
391
431
  - "./lib/http_stub/server/views/layout.haml"
392
432
  - "./lib/http_stub/server/views/matches.haml"
393
433
  - "./lib/http_stub/server/views/scenario.haml"
394
434
  - "./lib/http_stub/server/views/scenarios.haml"
435
+ - "./lib/http_stub/server/views/session.haml"
436
+ - "./lib/http_stub/server/views/sessions.haml"
395
437
  - "./lib/http_stub/server/views/stub.haml"
396
438
  - "./lib/http_stub/server/views/stub_matches.haml"
397
439
  - "./lib/http_stub/server/views/stub_misses.haml"
398
440
  - "./lib/http_stub/server/views/stubs.haml"
441
+ - "./lib/http_stub/server/views/transactional_session.haml"
399
442
  - "./lib/http_stub/version.rb"
400
- - "./spec/acceptance/activator_spec.rb"
401
443
  - "./spec/acceptance/configurer_initialization_spec.rb"
402
444
  - "./spec/acceptance/configurer_part_spec.rb"
403
445
  - "./spec/acceptance/cross_origin_support_spec.rb"
@@ -405,6 +447,8 @@ files:
405
447
  - "./spec/acceptance/request_reference_spec.rb"
406
448
  - "./spec/acceptance/scenario_spec.rb"
407
449
  - "./spec/acceptance/server_defaults_spec.rb"
450
+ - "./spec/acceptance/server_memory_spec.rb"
451
+ - "./spec/acceptance/session_spec.rb"
408
452
  - "./spec/acceptance/stub_body_request_matching_spec.rb"
409
453
  - "./spec/acceptance/stub_control_values_spec.rb"
410
454
  - "./spec/acceptance/stub_match_last_spec.rb"
@@ -413,16 +457,16 @@ files:
413
457
  - "./spec/acceptance/stub_spec.rb"
414
458
  - "./spec/acceptance/stub_trigger_spec.rb"
415
459
  - "./spec/curl_samples.txt"
416
- - "./spec/lib/http_stub/configurer/dsl/deprecated_spec.rb"
417
- - "./spec/lib/http_stub/configurer/dsl/endpoint_template_spec.rb"
418
460
  - "./spec/lib/http_stub/configurer/dsl/request_attribute_referencer_spec.rb"
419
461
  - "./spec/lib/http_stub/configurer/dsl/request_referencer_spec.rb"
420
- - "./spec/lib/http_stub/configurer/dsl/scenario_activator_spec.rb"
421
462
  - "./spec/lib/http_stub/configurer/dsl/scenario_builder_spec.rb"
463
+ - "./spec/lib/http_stub/configurer/dsl/server_endpoint_template_spec.rb"
422
464
  - "./spec/lib/http_stub/configurer/dsl/server_spec.rb"
423
- - "./spec/lib/http_stub/configurer/dsl/stub_activator_builder_spec.rb"
424
- - "./spec/lib/http_stub/configurer/dsl/stub_builder_producer_spec.rb"
465
+ - "./spec/lib/http_stub/configurer/dsl/session_endpoint_template_spec.rb"
466
+ - "./spec/lib/http_stub/configurer/dsl/session_factory_spec.rb"
467
+ - "./spec/lib/http_stub/configurer/dsl/session_spec.rb"
425
468
  - "./spec/lib/http_stub/configurer/dsl/stub_builder_spec.rb"
469
+ - "./spec/lib/http_stub/configurer/dsl/stub_builder_template_spec.rb"
426
470
  - "./spec/lib/http_stub/configurer/part_spec.rb"
427
471
  - "./spec/lib/http_stub/configurer/request/controllable_value_spec.rb"
428
472
  - "./spec/lib/http_stub/configurer/request/http/basic_spec.rb"
@@ -433,40 +477,66 @@ files:
433
477
  - "./spec/lib/http_stub/configurer/request/scenario_spec.rb"
434
478
  - "./spec/lib/http_stub/configurer/request/stub_response_spec.rb"
435
479
  - "./spec/lib/http_stub/configurer/request/stub_spec.rb"
480
+ - "./spec/lib/http_stub/configurer/request/triggers_spec.rb"
436
481
  - "./spec/lib/http_stub/configurer/server/buffered_command_processor_spec.rb"
437
482
  - "./spec/lib/http_stub/configurer/server/command_processor_integration_spec.rb"
438
483
  - "./spec/lib/http_stub/configurer/server/command_spec.rb"
484
+ - "./spec/lib/http_stub/configurer/server/configuration_spec.rb"
439
485
  - "./spec/lib/http_stub/configurer/server/facade_spec.rb"
440
486
  - "./spec/lib/http_stub/configurer/server/request_processor_spec.rb"
487
+ - "./spec/lib/http_stub/configurer/server/session_facade_spec.rb"
488
+ - "./spec/lib/http_stub/configurer_spec.rb"
441
489
  - "./spec/lib/http_stub/extensions/core/hash/formatted_spec.rb"
442
490
  - "./spec/lib/http_stub/extensions/core/hash/indifferent_and_insensitive_access_spec.rb"
443
491
  - "./spec/lib/http_stub/extensions/core/hash/with_indifferent_and_insensitive_access_spec.rb"
444
492
  - "./spec/lib/http_stub/extensions/core/hash_spec.rb"
493
+ - "./spec/lib/http_stub/extensions/core/uri_spec.rb"
445
494
  - "./spec/lib/http_stub/extensions/rack/handler_spec.rb"
495
+ - "./spec/lib/http_stub/extensions/sinatra/namespace_spec.rb"
446
496
  - "./spec/lib/http_stub/json_spec.rb"
447
497
  - "./spec/lib/http_stub/rake/server_daemon_tasks_smoke_spec.rb"
448
498
  - "./spec/lib/http_stub/rake/server_tasks_smoke_spec.rb"
449
499
  - "./spec/lib/http_stub/rake/server_tasks_spec.rb"
450
- - "./spec/lib/http_stub/server/application/application_integration_spec.rb"
451
500
  - "./spec/lib/http_stub/server/application/application_spec.rb"
501
+ - "./spec/lib/http_stub/server/application/configuration_spec.rb"
452
502
  - "./spec/lib/http_stub/server/application/cross_origin_support_spec.rb"
503
+ - "./spec/lib/http_stub/server/application/request_support_integration_spec.rb"
504
+ - "./spec/lib/http_stub/server/application/request_support_spec.rb"
453
505
  - "./spec/lib/http_stub/server/application/response_pipeline_spec.rb"
506
+ - "./spec/lib/http_stub/server/application/response_support_spec.rb"
507
+ - "./spec/lib/http_stub/server/application/routes/memory_spec.rb"
508
+ - "./spec/lib/http_stub/server/application/routes/resource_spec.rb"
509
+ - "./spec/lib/http_stub/server/application/routes/scenario_spec.rb"
510
+ - "./spec/lib/http_stub/server/application/routes/session_integration_spec.rb"
511
+ - "./spec/lib/http_stub/server/application/routes/session_spec.rb"
512
+ - "./spec/lib/http_stub/server/application/routes/stub_integration_spec.rb"
513
+ - "./spec/lib/http_stub/server/application/routes/stub_spec.rb"
514
+ - "./spec/lib/http_stub/server/application/session_uri_support_spec.rb"
454
515
  - "./spec/lib/http_stub/server/application/text_formatting_support_spec.rb"
455
516
  - "./spec/lib/http_stub/server/daemon_integration_spec.rb"
456
517
  - "./spec/lib/http_stub/server/daemon_spec.rb"
518
+ - "./spec/lib/http_stub/server/memory/controller_spec.rb"
519
+ - "./spec/lib/http_stub/server/memory/memory_spec.rb"
457
520
  - "./spec/lib/http_stub/server/registry_spec.rb"
521
+ - "./spec/lib/http_stub/server/request/factory_spec.rb"
458
522
  - "./spec/lib/http_stub/server/request/headers_spec.rb"
459
523
  - "./spec/lib/http_stub/server/request/parameters_spec.rb"
460
524
  - "./spec/lib/http_stub/server/request/request_spec.rb"
461
- - "./spec/lib/http_stub/server/request_spec.rb"
525
+ - "./spec/lib/http_stub/server/request/sinatra_request_spec.rb"
462
526
  - "./spec/lib/http_stub/server/response_spec.rb"
463
- - "./spec/lib/http_stub/server/scenario/activator_spec.rb"
464
527
  - "./spec/lib/http_stub/server/scenario/controller_spec.rb"
465
528
  - "./spec/lib/http_stub/server/scenario/links_spec.rb"
529
+ - "./spec/lib/http_stub/server/scenario/not_found_error_spec.rb"
466
530
  - "./spec/lib/http_stub/server/scenario/parser_spec.rb"
467
531
  - "./spec/lib/http_stub/server/scenario/scenario_spec.rb"
468
532
  - "./spec/lib/http_stub/server/scenario/trigger_spec.rb"
469
533
  - "./spec/lib/http_stub/server/scenario_spec.rb"
534
+ - "./spec/lib/http_stub/server/session/configuration_spec.rb"
535
+ - "./spec/lib/http_stub/server/session/controller_spec.rb"
536
+ - "./spec/lib/http_stub/server/session/empty_spec.rb"
537
+ - "./spec/lib/http_stub/server/session/identifier_strategy_spec.rb"
538
+ - "./spec/lib/http_stub/server/session/registry_spec.rb"
539
+ - "./spec/lib/http_stub/server/session/session_spec.rb"
470
540
  - "./spec/lib/http_stub/server/stub/controller_spec.rb"
471
541
  - "./spec/lib/http_stub/server/stub/empty_spec.rb"
472
542
  - "./spec/lib/http_stub/server/stub/match/controller_spec.rb"
@@ -508,6 +578,7 @@ files:
508
578
  - "./spec/resources/sample.txt"
509
579
  - "./spec/spec_helper.rb"
510
580
  - "./spec/support/browser_integration.rb"
581
+ - "./spec/support/contain_file.rb"
511
582
  - "./spec/support/cross_origin_server/application.rb"
512
583
  - "./spec/support/cross_origin_server/index_page.rb"
513
584
  - "./spec/support/cross_origin_server/integration.rb"
@@ -518,14 +589,21 @@ files:
518
589
  - "./spec/support/http_stub/html_view_excluding_request_details.rb"
519
590
  - "./spec/support/http_stub/html_view_including_request_details.rb"
520
591
  - "./spec/support/http_stub/scenario_fixture.rb"
592
+ - "./spec/support/http_stub/server/application/http_stub_rack_application_test.rb"
593
+ - "./spec/support/http_stub/server/driver.rb"
594
+ - "./spec/support/http_stub/server/memory_fixture.rb"
521
595
  - "./spec/support/http_stub/server/request_fixture.rb"
522
- - "./spec/support/http_stub/server/scenario/scenario_fixture.rb"
596
+ - "./spec/support/http_stub/server/scenario_fixture.rb"
597
+ - "./spec/support/http_stub/server/session_fixture.rb"
523
598
  - "./spec/support/http_stub/server/stub/match/match_fixture.rb"
524
599
  - "./spec/support/http_stub/server/stub/match/miss_fixture.rb"
525
600
  - "./spec/support/http_stub/server_integration.rb"
526
601
  - "./spec/support/http_stub/stub_fixture.rb"
527
602
  - "./spec/support/http_stub/stub_registrator.rb"
528
603
  - "./spec/support/include_in_json.rb"
604
+ - "./spec/support/rack/rack_application_test.rb"
605
+ - "./spec/support/rack/request_fixture.rb"
606
+ - "./spec/support/surpressed_output.rb"
529
607
  - "./spec/tmp/log/json_stub_console.log"
530
608
  - "./spec/tmp/pids/json_stub.pid"
531
609
  homepage: http://github.com/MYOB-Technology/http_stub
@@ -548,12 +626,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
548
626
  version: '0'
549
627
  requirements: []
550
628
  rubyforge_project: http_stub
551
- rubygems_version: 2.4.6
629
+ rubygems_version: 2.5.1
552
630
  signing_key:
553
631
  specification_version: 4
554
632
  summary: A HTTP Server replaying configured stub responses
555
633
  test_files:
556
- - "./spec/acceptance/activator_spec.rb"
557
634
  - "./spec/acceptance/configurer_initialization_spec.rb"
558
635
  - "./spec/acceptance/configurer_part_spec.rb"
559
636
  - "./spec/acceptance/cross_origin_support_spec.rb"
@@ -561,6 +638,8 @@ test_files:
561
638
  - "./spec/acceptance/request_reference_spec.rb"
562
639
  - "./spec/acceptance/scenario_spec.rb"
563
640
  - "./spec/acceptance/server_defaults_spec.rb"
641
+ - "./spec/acceptance/server_memory_spec.rb"
642
+ - "./spec/acceptance/session_spec.rb"
564
643
  - "./spec/acceptance/stub_body_request_matching_spec.rb"
565
644
  - "./spec/acceptance/stub_control_values_spec.rb"
566
645
  - "./spec/acceptance/stub_match_last_spec.rb"
@@ -569,16 +648,16 @@ test_files:
569
648
  - "./spec/acceptance/stub_spec.rb"
570
649
  - "./spec/acceptance/stub_trigger_spec.rb"
571
650
  - "./spec/curl_samples.txt"
572
- - "./spec/lib/http_stub/configurer/dsl/deprecated_spec.rb"
573
- - "./spec/lib/http_stub/configurer/dsl/endpoint_template_spec.rb"
574
651
  - "./spec/lib/http_stub/configurer/dsl/request_attribute_referencer_spec.rb"
575
652
  - "./spec/lib/http_stub/configurer/dsl/request_referencer_spec.rb"
576
- - "./spec/lib/http_stub/configurer/dsl/scenario_activator_spec.rb"
577
653
  - "./spec/lib/http_stub/configurer/dsl/scenario_builder_spec.rb"
654
+ - "./spec/lib/http_stub/configurer/dsl/server_endpoint_template_spec.rb"
578
655
  - "./spec/lib/http_stub/configurer/dsl/server_spec.rb"
579
- - "./spec/lib/http_stub/configurer/dsl/stub_activator_builder_spec.rb"
580
- - "./spec/lib/http_stub/configurer/dsl/stub_builder_producer_spec.rb"
656
+ - "./spec/lib/http_stub/configurer/dsl/session_endpoint_template_spec.rb"
657
+ - "./spec/lib/http_stub/configurer/dsl/session_factory_spec.rb"
658
+ - "./spec/lib/http_stub/configurer/dsl/session_spec.rb"
581
659
  - "./spec/lib/http_stub/configurer/dsl/stub_builder_spec.rb"
660
+ - "./spec/lib/http_stub/configurer/dsl/stub_builder_template_spec.rb"
582
661
  - "./spec/lib/http_stub/configurer/part_spec.rb"
583
662
  - "./spec/lib/http_stub/configurer/request/controllable_value_spec.rb"
584
663
  - "./spec/lib/http_stub/configurer/request/http/basic_spec.rb"
@@ -589,40 +668,66 @@ test_files:
589
668
  - "./spec/lib/http_stub/configurer/request/scenario_spec.rb"
590
669
  - "./spec/lib/http_stub/configurer/request/stub_response_spec.rb"
591
670
  - "./spec/lib/http_stub/configurer/request/stub_spec.rb"
671
+ - "./spec/lib/http_stub/configurer/request/triggers_spec.rb"
592
672
  - "./spec/lib/http_stub/configurer/server/buffered_command_processor_spec.rb"
593
673
  - "./spec/lib/http_stub/configurer/server/command_processor_integration_spec.rb"
594
674
  - "./spec/lib/http_stub/configurer/server/command_spec.rb"
675
+ - "./spec/lib/http_stub/configurer/server/configuration_spec.rb"
595
676
  - "./spec/lib/http_stub/configurer/server/facade_spec.rb"
596
677
  - "./spec/lib/http_stub/configurer/server/request_processor_spec.rb"
678
+ - "./spec/lib/http_stub/configurer/server/session_facade_spec.rb"
679
+ - "./spec/lib/http_stub/configurer_spec.rb"
597
680
  - "./spec/lib/http_stub/extensions/core/hash/formatted_spec.rb"
598
681
  - "./spec/lib/http_stub/extensions/core/hash/indifferent_and_insensitive_access_spec.rb"
599
682
  - "./spec/lib/http_stub/extensions/core/hash/with_indifferent_and_insensitive_access_spec.rb"
600
683
  - "./spec/lib/http_stub/extensions/core/hash_spec.rb"
684
+ - "./spec/lib/http_stub/extensions/core/uri_spec.rb"
601
685
  - "./spec/lib/http_stub/extensions/rack/handler_spec.rb"
686
+ - "./spec/lib/http_stub/extensions/sinatra/namespace_spec.rb"
602
687
  - "./spec/lib/http_stub/json_spec.rb"
603
688
  - "./spec/lib/http_stub/rake/server_daemon_tasks_smoke_spec.rb"
604
689
  - "./spec/lib/http_stub/rake/server_tasks_smoke_spec.rb"
605
690
  - "./spec/lib/http_stub/rake/server_tasks_spec.rb"
606
- - "./spec/lib/http_stub/server/application/application_integration_spec.rb"
607
691
  - "./spec/lib/http_stub/server/application/application_spec.rb"
692
+ - "./spec/lib/http_stub/server/application/configuration_spec.rb"
608
693
  - "./spec/lib/http_stub/server/application/cross_origin_support_spec.rb"
694
+ - "./spec/lib/http_stub/server/application/request_support_integration_spec.rb"
695
+ - "./spec/lib/http_stub/server/application/request_support_spec.rb"
609
696
  - "./spec/lib/http_stub/server/application/response_pipeline_spec.rb"
697
+ - "./spec/lib/http_stub/server/application/response_support_spec.rb"
698
+ - "./spec/lib/http_stub/server/application/routes/memory_spec.rb"
699
+ - "./spec/lib/http_stub/server/application/routes/resource_spec.rb"
700
+ - "./spec/lib/http_stub/server/application/routes/scenario_spec.rb"
701
+ - "./spec/lib/http_stub/server/application/routes/session_integration_spec.rb"
702
+ - "./spec/lib/http_stub/server/application/routes/session_spec.rb"
703
+ - "./spec/lib/http_stub/server/application/routes/stub_integration_spec.rb"
704
+ - "./spec/lib/http_stub/server/application/routes/stub_spec.rb"
705
+ - "./spec/lib/http_stub/server/application/session_uri_support_spec.rb"
610
706
  - "./spec/lib/http_stub/server/application/text_formatting_support_spec.rb"
611
707
  - "./spec/lib/http_stub/server/daemon_integration_spec.rb"
612
708
  - "./spec/lib/http_stub/server/daemon_spec.rb"
709
+ - "./spec/lib/http_stub/server/memory/controller_spec.rb"
710
+ - "./spec/lib/http_stub/server/memory/memory_spec.rb"
613
711
  - "./spec/lib/http_stub/server/registry_spec.rb"
712
+ - "./spec/lib/http_stub/server/request/factory_spec.rb"
614
713
  - "./spec/lib/http_stub/server/request/headers_spec.rb"
615
714
  - "./spec/lib/http_stub/server/request/parameters_spec.rb"
616
715
  - "./spec/lib/http_stub/server/request/request_spec.rb"
617
- - "./spec/lib/http_stub/server/request_spec.rb"
716
+ - "./spec/lib/http_stub/server/request/sinatra_request_spec.rb"
618
717
  - "./spec/lib/http_stub/server/response_spec.rb"
619
- - "./spec/lib/http_stub/server/scenario/activator_spec.rb"
620
718
  - "./spec/lib/http_stub/server/scenario/controller_spec.rb"
621
719
  - "./spec/lib/http_stub/server/scenario/links_spec.rb"
720
+ - "./spec/lib/http_stub/server/scenario/not_found_error_spec.rb"
622
721
  - "./spec/lib/http_stub/server/scenario/parser_spec.rb"
623
722
  - "./spec/lib/http_stub/server/scenario/scenario_spec.rb"
624
723
  - "./spec/lib/http_stub/server/scenario/trigger_spec.rb"
625
724
  - "./spec/lib/http_stub/server/scenario_spec.rb"
725
+ - "./spec/lib/http_stub/server/session/configuration_spec.rb"
726
+ - "./spec/lib/http_stub/server/session/controller_spec.rb"
727
+ - "./spec/lib/http_stub/server/session/empty_spec.rb"
728
+ - "./spec/lib/http_stub/server/session/identifier_strategy_spec.rb"
729
+ - "./spec/lib/http_stub/server/session/registry_spec.rb"
730
+ - "./spec/lib/http_stub/server/session/session_spec.rb"
626
731
  - "./spec/lib/http_stub/server/stub/controller_spec.rb"
627
732
  - "./spec/lib/http_stub/server/stub/empty_spec.rb"
628
733
  - "./spec/lib/http_stub/server/stub/match/controller_spec.rb"
@@ -664,6 +769,7 @@ test_files:
664
769
  - "./spec/resources/sample.txt"
665
770
  - "./spec/spec_helper.rb"
666
771
  - "./spec/support/browser_integration.rb"
772
+ - "./spec/support/contain_file.rb"
667
773
  - "./spec/support/cross_origin_server/application.rb"
668
774
  - "./spec/support/cross_origin_server/index_page.rb"
669
775
  - "./spec/support/cross_origin_server/integration.rb"
@@ -674,13 +780,20 @@ test_files:
674
780
  - "./spec/support/http_stub/html_view_excluding_request_details.rb"
675
781
  - "./spec/support/http_stub/html_view_including_request_details.rb"
676
782
  - "./spec/support/http_stub/scenario_fixture.rb"
783
+ - "./spec/support/http_stub/server/application/http_stub_rack_application_test.rb"
784
+ - "./spec/support/http_stub/server/driver.rb"
785
+ - "./spec/support/http_stub/server/memory_fixture.rb"
677
786
  - "./spec/support/http_stub/server/request_fixture.rb"
678
- - "./spec/support/http_stub/server/scenario/scenario_fixture.rb"
787
+ - "./spec/support/http_stub/server/scenario_fixture.rb"
788
+ - "./spec/support/http_stub/server/session_fixture.rb"
679
789
  - "./spec/support/http_stub/server/stub/match/match_fixture.rb"
680
790
  - "./spec/support/http_stub/server/stub/match/miss_fixture.rb"
681
791
  - "./spec/support/http_stub/server_integration.rb"
682
792
  - "./spec/support/http_stub/stub_fixture.rb"
683
793
  - "./spec/support/http_stub/stub_registrator.rb"
684
794
  - "./spec/support/include_in_json.rb"
795
+ - "./spec/support/rack/rack_application_test.rb"
796
+ - "./spec/support/rack/request_fixture.rb"
797
+ - "./spec/support/surpressed_output.rb"
685
798
  - "./spec/tmp/log/json_stub_console.log"
686
799
  - "./spec/tmp/pids/json_stub.pid"