http_stub 0.27.0 → 0.28.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (299) hide show
  1. checksums.yaml +4 -4
  2. data/lib/http_stub/client.rb +18 -0
  3. data/lib/http_stub/client/client.rb +28 -0
  4. data/lib/http_stub/client/request.rb +38 -0
  5. data/lib/http_stub/client/server.rb +20 -0
  6. data/lib/http_stub/client/session.rb +43 -0
  7. data/lib/http_stub/configurator.rb +61 -0
  8. data/lib/http_stub/configurator/endpoint_template.rb +24 -0
  9. data/lib/http_stub/configurator/part.rb +23 -0
  10. data/lib/http_stub/configurator/scenario.rb +42 -0
  11. data/lib/http_stub/configurator/server.rb +53 -0
  12. data/lib/http_stub/configurator/state.rb +41 -0
  13. data/lib/http_stub/configurator/stub.rb +13 -0
  14. data/lib/http_stub/configurator/stub/stub.rb +75 -0
  15. data/lib/http_stub/{configurer/dsl/stub_builder_template.rb → configurator/stub/template.rb} +5 -5
  16. data/lib/http_stub/extensions/core/object.rb +17 -0
  17. data/lib/http_stub/rake/server_tasks.rb +2 -14
  18. data/lib/http_stub/rake/task_generators.rb +3 -3
  19. data/lib/http_stub/server.rb +110 -0
  20. data/lib/http_stub/server/application/application.rb +10 -6
  21. data/lib/http_stub/server/application/request_support.rb +2 -2
  22. data/lib/http_stub/server/application/routes/memory.rb +1 -6
  23. data/lib/http_stub/server/application/routes/scenario.rb +1 -11
  24. data/lib/http_stub/server/application/routes/session.rb +1 -1
  25. data/lib/http_stub/server/application/routes/status.rb +0 -10
  26. data/lib/http_stub/server/application/routes/stub.rb +2 -12
  27. data/lib/http_stub/server/daemon.rb +1 -10
  28. data/lib/http_stub/server/memory/controller.rb +2 -8
  29. data/lib/http_stub/server/memory/initial_state.rb +27 -0
  30. data/lib/http_stub/server/memory/memory.rb +6 -27
  31. data/lib/http_stub/server/registry.rb +3 -1
  32. data/lib/http_stub/server/request/factory.rb +3 -3
  33. data/lib/http_stub/server/response.rb +12 -6
  34. data/lib/http_stub/server/scenario.rb +2 -2
  35. data/lib/http_stub/server/scenario/controller.rb +3 -13
  36. data/lib/http_stub/server/scenario/registry.rb +25 -0
  37. data/lib/http_stub/server/scenario/scenario.rb +13 -8
  38. data/lib/http_stub/server/session.rb +0 -1
  39. data/lib/http_stub/server/session/controller.rb +7 -8
  40. data/lib/http_stub/server/session/identifier_strategy.rb +9 -2
  41. data/lib/http_stub/server/session/registry.rb +7 -13
  42. data/lib/http_stub/server/session/session.rb +4 -8
  43. data/lib/http_stub/server/stdout_logger.rb +13 -0
  44. data/lib/http_stub/server/stub.rb +3 -2
  45. data/lib/http_stub/server/stub/controller.rb +0 -10
  46. data/lib/http_stub/server/stub/empty.rb +2 -1
  47. data/lib/http_stub/server/stub/match/controller.rb +1 -1
  48. data/lib/http_stub/server/stub/match/exact_value_matcher.rb +2 -1
  49. data/lib/http_stub/server/stub/match/omitted_value_matcher.rb +1 -1
  50. data/lib/http_stub/server/stub/match/regexp_value_matcher.rb +1 -2
  51. data/lib/http_stub/server/stub/match/rule/body.rb +7 -29
  52. data/lib/http_stub/server/stub/match/rule/{json_body.rb → json_schema_body.rb} +1 -1
  53. data/lib/http_stub/server/stub/match/rule/method.rb +1 -1
  54. data/lib/http_stub/server/stub/match/rule/schema_body.rb +39 -0
  55. data/lib/http_stub/server/stub/match/rules.rb +6 -6
  56. data/lib/http_stub/server/stub/match/string_value_matcher.rb +1 -2
  57. data/lib/http_stub/server/stub/registry.rb +4 -4
  58. data/lib/http_stub/server/stub/response.rb +2 -6
  59. data/lib/http_stub/server/stub/response/blocks.rb +33 -0
  60. data/lib/http_stub/server/stub/response/body.rb +21 -0
  61. data/lib/http_stub/server/stub/response/file_body.rb +46 -0
  62. data/lib/http_stub/server/stub/response/headers.rb +24 -0
  63. data/lib/http_stub/server/stub/response/response.rb +52 -0
  64. data/lib/http_stub/server/stub/response/text_body.rb +32 -0
  65. data/lib/http_stub/server/stub/stub.rb +17 -11
  66. data/lib/http_stub/server/stub/triggers.rb +16 -5
  67. data/lib/http_stub/server/views/_file_body_response.haml +1 -0
  68. data/lib/http_stub/server/views/_response.haml +6 -1
  69. data/lib/http_stub/server/views/_text_body_response.haml +1 -0
  70. data/lib/http_stub/server/views/application.sass +31 -31
  71. data/lib/http_stub/version.rb +1 -1
  72. data/spec/acceptance/{configurer_part_spec.rb → configurator_part_spec.rb} +8 -8
  73. data/spec/acceptance/cross_origin_support_spec.rb +9 -11
  74. data/spec/acceptance/endpoint_template_spec.rb +5 -5
  75. data/spec/acceptance/scenario_spec.rb +8 -8
  76. data/spec/acceptance/server_defaults_spec.rb +3 -3
  77. data/spec/acceptance/server_memory_spec.rb +13 -5
  78. data/spec/acceptance/server_status_spec.rb +4 -21
  79. data/spec/acceptance/session_spec.rb +8 -11
  80. data/spec/acceptance/stub_body_request_matching_spec.rb +9 -9
  81. data/spec/acceptance/stub_control_values_spec.rb +74 -82
  82. data/spec/acceptance/stub_match_last_spec.rb +60 -80
  83. data/spec/acceptance/stub_match_list_spec.rb +30 -66
  84. data/spec/acceptance/stub_miss_list_spec.rb +19 -27
  85. data/spec/acceptance/stub_response_block_spec.rb +66 -0
  86. data/spec/acceptance/stub_spec.rb +109 -185
  87. data/spec/acceptance/stub_trigger_spec.rb +12 -89
  88. data/spec/helper.rb +32 -10
  89. data/spec/lib/http_stub/client/client_spec.rb +109 -0
  90. data/spec/lib/http_stub/client/request_integration_spec.rb +74 -0
  91. data/spec/lib/http_stub/client/request_spec.rb +32 -0
  92. data/spec/lib/http_stub/client/server_spec.rb +75 -0
  93. data/spec/lib/http_stub/client/session_spec.rb +117 -0
  94. data/spec/lib/http_stub/client_spec.rb +15 -0
  95. data/spec/lib/http_stub/{configurer/dsl/server_endpoint_template_spec.rb → configurator/endpoint_template_spec.rb} +49 -38
  96. data/spec/lib/http_stub/configurator/part_spec.rb +103 -0
  97. data/spec/lib/http_stub/configurator/scenario_spec.rb +162 -0
  98. data/spec/lib/http_stub/configurator/server_spec.rb +344 -0
  99. data/spec/lib/http_stub/configurator/state_spec.rb +113 -0
  100. data/spec/lib/http_stub/configurator/stub/stub_spec.rb +867 -0
  101. data/spec/lib/http_stub/{configurer/dsl/stub_builder_template_spec.rb → configurator/stub/template_spec.rb} +46 -44
  102. data/spec/lib/http_stub/configurator/stub_spec.rb +27 -0
  103. data/spec/lib/http_stub/configurator_spec.rb +113 -0
  104. data/spec/lib/http_stub/extensions/core/hash_spec.rb +3 -3
  105. data/spec/lib/http_stub/extensions/core/object_spec.rb +29 -0
  106. data/spec/lib/http_stub/rake/server_daemon_tasks_smoke_spec.rb +14 -9
  107. data/spec/lib/http_stub/rake/server_tasks_smoke_spec.rb +25 -53
  108. data/spec/lib/http_stub/rake/server_tasks_spec.rb +12 -55
  109. data/spec/lib/http_stub/server/application/application_spec.rb +4 -49
  110. data/spec/lib/http_stub/server/application/cross_origin_support_spec.rb +2 -5
  111. data/spec/lib/http_stub/server/application/request_support_integration_spec.rb +4 -4
  112. data/spec/lib/http_stub/server/application/request_support_spec.rb +16 -11
  113. data/spec/lib/http_stub/server/application/routes/memory_spec.rb +1 -21
  114. data/spec/lib/http_stub/server/application/routes/scenario_spec.rb +4 -56
  115. data/spec/lib/http_stub/server/application/routes/session_integration_spec.rb +1 -1
  116. data/spec/lib/http_stub/server/application/routes/status_spec.rb +2 -36
  117. data/spec/lib/http_stub/server/application/routes/stub_integration_spec.rb +3 -34
  118. data/spec/lib/http_stub/server/application/routes/stub_spec.rb +6 -55
  119. data/spec/lib/http_stub/server/daemon_integration_spec.rb +5 -1
  120. data/spec/lib/http_stub/server/daemon_spec.rb +8 -77
  121. data/spec/lib/http_stub/server/memory/controller_spec.rb +2 -28
  122. data/spec/lib/http_stub/server/memory/initial_state_spec.rb +57 -0
  123. data/spec/lib/http_stub/server/memory/memory_spec.rb +28 -116
  124. data/spec/lib/http_stub/server/registry_spec.rb +57 -2
  125. data/spec/lib/http_stub/server/request/factory_spec.rb +8 -6
  126. data/spec/lib/http_stub/server/response_spec.rb +32 -10
  127. data/spec/lib/http_stub/server/scenario/controller_spec.rb +14 -53
  128. data/spec/lib/http_stub/server/scenario/registry_spec.rb +147 -0
  129. data/spec/lib/http_stub/server/scenario/scenario_spec.rb +8 -10
  130. data/spec/lib/http_stub/server/scenario_spec.rb +1 -1
  131. data/spec/lib/http_stub/server/session/controller_spec.rb +4 -5
  132. data/spec/lib/http_stub/server/session/identifier_strategy_spec.rb +15 -48
  133. data/spec/lib/http_stub/server/session/registry_spec.rb +15 -28
  134. data/spec/lib/http_stub/server/session/session_spec.rb +13 -71
  135. data/spec/lib/http_stub/server/stdout_logger_spec.rb +17 -0
  136. data/spec/lib/http_stub/server/stub/controller_spec.rb +7 -65
  137. data/spec/lib/http_stub/server/stub/empty_spec.rb +8 -0
  138. data/spec/lib/http_stub/server/stub/match/controller_spec.rb +2 -2
  139. data/spec/lib/http_stub/server/stub/match/exact_value_matcher_spec.rb +49 -11
  140. data/spec/lib/http_stub/server/stub/match/hash_matcher_spec.rb +4 -4
  141. data/spec/lib/http_stub/server/stub/match/match_spec.rb +4 -4
  142. data/spec/lib/http_stub/server/stub/match/miss_spec.rb +2 -2
  143. data/spec/lib/http_stub/server/stub/match/omitted_value_matcher_spec.rb +31 -12
  144. data/spec/lib/http_stub/server/stub/match/regexp_value_matcher_spec.rb +20 -11
  145. data/spec/lib/http_stub/server/stub/match/rule/body_spec.rb +3 -3
  146. data/spec/lib/http_stub/server/stub/match/rule/{json_body_spec.rb → json_schema_body_spec.rb} +5 -5
  147. data/spec/lib/http_stub/server/stub/match/rule/method_spec.rb +42 -8
  148. data/spec/lib/http_stub/server/stub/match/rule/schema_body_spec.rb +64 -0
  149. data/spec/lib/http_stub/server/stub/match/rules_spec.rb +18 -18
  150. data/spec/lib/http_stub/server/stub/match/string_value_matcher_spec.rb +10 -63
  151. data/spec/lib/http_stub/server/stub/registry_integration_spec.rb +11 -28
  152. data/spec/lib/http_stub/server/stub/registry_spec.rb +6 -13
  153. data/spec/lib/http_stub/server/stub/response/blocks_spec.rb +64 -0
  154. data/spec/lib/http_stub/server/stub/response/body_spec.rb +52 -0
  155. data/spec/lib/http_stub/server/stub/response/file_body_spec.rb +117 -0
  156. data/spec/lib/http_stub/server/stub/response/headers_spec.rb +89 -0
  157. data/spec/lib/http_stub/server/stub/response/response_spec.rb +342 -0
  158. data/spec/lib/http_stub/server/stub/response/text_body_spec.rb +138 -0
  159. data/spec/lib/http_stub/server/stub/response_spec.rb +23 -32
  160. data/spec/lib/http_stub/server/stub/stub_spec.rb +33 -39
  161. data/spec/lib/http_stub/server/stub/triggers_spec.rb +47 -12
  162. data/spec/lib/http_stub/server/stub_spec.rb +1 -1
  163. data/spec/support/extensions/core/random.rb +23 -0
  164. data/spec/support/http_stub/configurator/scenario_builder.rb +35 -0
  165. data/spec/support/http_stub/configurator/scenario_fixture.rb +39 -0
  166. data/spec/support/http_stub/configurator/stub_builder.rb +112 -0
  167. data/spec/support/http_stub/configurator/stub_fixture.rb +58 -0
  168. data/spec/support/http_stub/configurator_fixture.rb +13 -0
  169. data/spec/support/http_stub/configurator_with_stub_builder_and_requester.rb +14 -0
  170. data/spec/support/http_stub/headers_fixture.rb +11 -0
  171. data/spec/support/http_stub/{html_view_excluding_request_details.rb → html_view_excluding_a_stub_request.rb} +2 -2
  172. data/spec/support/http_stub/{html_view_including_request_details.rb → html_view_including_a_stub_request.rb} +20 -12
  173. data/spec/support/http_stub/port.rb +12 -0
  174. data/spec/support/http_stub/server/application/http_stub_rack_application_test.rb +2 -3
  175. data/spec/support/http_stub/server/driver.rb +20 -15
  176. data/spec/support/http_stub/server/memory_fixture.rb +2 -2
  177. data/spec/support/http_stub/server/request/sinatra_request_fixture.rb +16 -0
  178. data/spec/support/http_stub/server/request_fixture.rb +11 -6
  179. data/spec/support/http_stub/server/scenario_fixture.rb +14 -2
  180. data/spec/support/http_stub/server/session_fixture.rb +2 -16
  181. data/spec/support/http_stub/server/silent_logger.rb +7 -0
  182. data/spec/support/http_stub/server/simple_request.rb +17 -0
  183. data/spec/support/http_stub/server/stub/match/match_fixture.rb +1 -1
  184. data/spec/support/http_stub/server/stub/response/blocks_fixture.rb +54 -0
  185. data/spec/support/http_stub/server/stub/response/file_body_fixture.rb +25 -0
  186. data/spec/support/http_stub/server/stub/response/text_body_fixture.rb +33 -0
  187. data/spec/support/http_stub/server/stub/response_builder.rb +24 -0
  188. data/spec/support/http_stub/server/stub/response_fixture.rb +15 -0
  189. data/spec/support/http_stub/server/stub_fixture.rb +21 -0
  190. data/spec/support/http_stub/server_integration.rb +9 -6
  191. data/spec/support/http_stub/stub_requester.rb +37 -0
  192. data/spec/support/object_convertable_to_json.rb +11 -0
  193. data/spec/support/rack/rack_application_test.rb +1 -1
  194. data/spec/support/rack/request_fixture.rb +22 -4
  195. metadata +166 -207
  196. data/lib/http_stub.rb +0 -131
  197. data/lib/http_stub/configurer.rb +0 -42
  198. data/lib/http_stub/configurer/dsl/request_attribute_referencer.rb +0 -19
  199. data/lib/http_stub/configurer/dsl/request_referencer.rb +0 -24
  200. data/lib/http_stub/configurer/dsl/scenario_builder.rb +0 -39
  201. data/lib/http_stub/configurer/dsl/server.rb +0 -80
  202. data/lib/http_stub/configurer/dsl/server_endpoint_template.rb +0 -23
  203. data/lib/http_stub/configurer/dsl/session.rb +0 -51
  204. data/lib/http_stub/configurer/dsl/session_endpoint_template.rb +0 -22
  205. data/lib/http_stub/configurer/dsl/session_factory.rb +0 -34
  206. data/lib/http_stub/configurer/dsl/stub_builder.rb +0 -65
  207. data/lib/http_stub/configurer/part.rb +0 -23
  208. data/lib/http_stub/configurer/request/controllable_value.rb +0 -19
  209. data/lib/http_stub/configurer/request/http/basic.rb +0 -27
  210. data/lib/http_stub/configurer/request/http/factory.rb +0 -33
  211. data/lib/http_stub/configurer/request/http/multipart.rb +0 -34
  212. data/lib/http_stub/configurer/request/omittable.rb +0 -26
  213. data/lib/http_stub/configurer/request/regexpable.rb +0 -33
  214. data/lib/http_stub/configurer/request/scenario.rb +0 -29
  215. data/lib/http_stub/configurer/request/stub.rb +0 -39
  216. data/lib/http_stub/configurer/request/stub_response.rb +0 -38
  217. data/lib/http_stub/configurer/request/stub_response_file.rb +0 -20
  218. data/lib/http_stub/configurer/request/triggers.rb +0 -25
  219. data/lib/http_stub/configurer/server/buffered_command_processor.rb +0 -24
  220. data/lib/http_stub/configurer/server/command.rb +0 -22
  221. data/lib/http_stub/configurer/server/command_processor.rb +0 -35
  222. data/lib/http_stub/configurer/server/configuration.rb +0 -33
  223. data/lib/http_stub/configurer/server/facade.rb +0 -61
  224. data/lib/http_stub/configurer/server/request_processor.rb +0 -30
  225. data/lib/http_stub/configurer/server/session_facade.rb +0 -57
  226. data/lib/http_stub/server/application/configuration.rb +0 -38
  227. data/lib/http_stub/server/application/response_pipeline.rb +0 -20
  228. data/lib/http_stub/server/application/response_support.rb +0 -19
  229. data/lib/http_stub/server/scenario/parser.rb +0 -17
  230. data/lib/http_stub/server/session/configuration.rb +0 -32
  231. data/lib/http_stub/server/status/controller.rb +0 -25
  232. data/lib/http_stub/server/stub/parser.rb +0 -17
  233. data/lib/http_stub/server/stub/payload.rb +0 -20
  234. data/lib/http_stub/server/stub/payload/base_uri_modifier.rb +0 -17
  235. data/lib/http_stub/server/stub/payload/response_body_modifier.rb +0 -21
  236. data/lib/http_stub/server/stub/response/attribute/body.rb +0 -32
  237. data/lib/http_stub/server/stub/response/attribute/headers.rb +0 -32
  238. data/lib/http_stub/server/stub/response/attribute/interpolator.rb +0 -26
  239. data/lib/http_stub/server/stub/response/attribute/interpolator/headers.rb +0 -27
  240. data/lib/http_stub/server/stub/response/attribute/interpolator/parameters.rb +0 -27
  241. data/lib/http_stub/server/stub/response/base.rb +0 -61
  242. data/lib/http_stub/server/stub/response/file.rb +0 -45
  243. data/lib/http_stub/server/stub/response/text.rb +0 -35
  244. data/lib/http_stub/server/views/_file_response.haml +0 -1
  245. data/lib/http_stub/server/views/_text_response.haml +0 -1
  246. data/spec/acceptance/configurer_initialization_spec.rb +0 -157
  247. data/spec/acceptance/request_reference_spec.rb +0 -42
  248. data/spec/lib/http_stub/configurer/dsl/request_attribute_referencer_spec.rb +0 -37
  249. data/spec/lib/http_stub/configurer/dsl/request_referencer_spec.rb +0 -37
  250. data/spec/lib/http_stub/configurer/dsl/scenario_builder_spec.rb +0 -201
  251. data/spec/lib/http_stub/configurer/dsl/server_spec.rb +0 -575
  252. data/spec/lib/http_stub/configurer/dsl/session_endpoint_template_spec.rb +0 -150
  253. data/spec/lib/http_stub/configurer/dsl/session_factory_spec.rb +0 -97
  254. data/spec/lib/http_stub/configurer/dsl/session_spec.rb +0 -210
  255. data/spec/lib/http_stub/configurer/dsl/stub_builder_spec.rb +0 -747
  256. data/spec/lib/http_stub/configurer/part_spec.rb +0 -103
  257. data/spec/lib/http_stub/configurer/request/controllable_value_spec.rb +0 -34
  258. data/spec/lib/http_stub/configurer/request/http/basic_spec.rb +0 -91
  259. data/spec/lib/http_stub/configurer/request/http/factory_spec.rb +0 -222
  260. data/spec/lib/http_stub/configurer/request/http/multipart_spec.rb +0 -118
  261. data/spec/lib/http_stub/configurer/request/omittable_spec.rb +0 -70
  262. data/spec/lib/http_stub/configurer/request/regexpable_spec.rb +0 -77
  263. data/spec/lib/http_stub/configurer/request/scenario_spec.rb +0 -69
  264. data/spec/lib/http_stub/configurer/request/stub_response_spec.rb +0 -195
  265. data/spec/lib/http_stub/configurer/request/stub_spec.rb +0 -231
  266. data/spec/lib/http_stub/configurer/request/triggers_spec.rb +0 -101
  267. data/spec/lib/http_stub/configurer/server/buffered_command_processor_spec.rb +0 -35
  268. data/spec/lib/http_stub/configurer/server/command_processor_integration_spec.rb +0 -75
  269. data/spec/lib/http_stub/configurer/server/command_spec.rb +0 -26
  270. data/spec/lib/http_stub/configurer/server/configuration_spec.rb +0 -139
  271. data/spec/lib/http_stub/configurer/server/facade_spec.rb +0 -235
  272. data/spec/lib/http_stub/configurer/server/request_processor_spec.rb +0 -100
  273. data/spec/lib/http_stub/configurer/server/session_facade_spec.rb +0 -285
  274. data/spec/lib/http_stub/configurer_spec.rb +0 -105
  275. data/spec/lib/http_stub/server/application/configuration_spec.rb +0 -59
  276. data/spec/lib/http_stub/server/application/response_pipeline_spec.rb +0 -29
  277. data/spec/lib/http_stub/server/application/response_support_spec.rb +0 -30
  278. data/spec/lib/http_stub/server/scenario/parser_spec.rb +0 -64
  279. data/spec/lib/http_stub/server/session/configuration_spec.rb +0 -94
  280. data/spec/lib/http_stub/server/status/controller_spec.rb +0 -47
  281. data/spec/lib/http_stub/server/stub/parser_spec.rb +0 -56
  282. data/spec/lib/http_stub/server/stub/payload/base_uri_modifier_spec.rb +0 -23
  283. data/spec/lib/http_stub/server/stub/payload/response_body_modifier_spec.rb +0 -84
  284. data/spec/lib/http_stub/server/stub/payload_spec.rb +0 -33
  285. data/spec/lib/http_stub/server/stub/response/attribute/body_spec.rb +0 -98
  286. data/spec/lib/http_stub/server/stub/response/attribute/headers_spec.rb +0 -73
  287. data/spec/lib/http_stub/server/stub/response/attribute/interpolator/headers_spec.rb +0 -53
  288. data/spec/lib/http_stub/server/stub/response/attribute/interpolator/parameters_spec.rb +0 -53
  289. data/spec/lib/http_stub/server/stub/response/attribute/interpolator_spec.rb +0 -41
  290. data/spec/lib/http_stub/server/stub/response/base_spec.rb +0 -217
  291. data/spec/lib/http_stub/server/stub/response/file_spec.rb +0 -197
  292. data/spec/lib/http_stub/server/stub/response/text_spec.rb +0 -182
  293. data/spec/resources/sample.pdf +0 -0
  294. data/spec/resources/sample.txt +0 -1
  295. data/spec/support/http_stub/configurer_integration.rb +0 -24
  296. data/spec/support/http_stub/empty_configurer.rb +0 -7
  297. data/spec/support/http_stub/scenario_fixture.rb +0 -33
  298. data/spec/support/http_stub/stub_fixture.rb +0 -125
  299. data/spec/support/http_stub/stub_registrator.rb +0 -83
@@ -0,0 +1,25 @@
1
+ module HttpStub
2
+ module Server
3
+ module Stub
4
+ module Response
5
+
6
+ class FileBodyFixture
7
+
8
+ class << self
9
+
10
+ def args
11
+ { file: { path: "#{HttpStub::Examples::RESOURCES_DIR}/example.txt" } }
12
+ end
13
+
14
+ def create
15
+ HttpStub::Server::Stub::FileBody.new(args)
16
+ end
17
+
18
+ end
19
+
20
+ end
21
+
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,33 @@
1
+ module HttpStub
2
+ module Server
3
+ module Stub
4
+ module Response
5
+
6
+ class TextBodyFixture
7
+
8
+ class << self
9
+
10
+ def args_with_body
11
+ { body: "some text" }
12
+ end
13
+
14
+ def args_with_json(json_value="some json")
15
+ { json: ObjectConvertableToJson.new(json_value) }
16
+ end
17
+
18
+ def json
19
+ HttpStub::Server::Stub::Response::TextBody.new(args_with_json)
20
+ end
21
+
22
+ def text
23
+ HttpStub::Server::Stub::Response::TextBody.new(args_with_body)
24
+ end
25
+
26
+ end
27
+
28
+ end
29
+
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,24 @@
1
+ module HttpStub
2
+ module Server
3
+ module Stub
4
+
5
+ class ResponseBuilder
6
+
7
+ def initialize(status=203)
8
+ @status = status
9
+ @headers = {}
10
+ end
11
+
12
+ def with_headers!(headers=HttpStub::HeadersFixture.many)
13
+ self.tap { @headers = headers }
14
+ end
15
+
16
+ def build
17
+ HttpStub::Server::Stub::Response.create(status: @status, headers: @headers)
18
+ end
19
+
20
+ end
21
+
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,15 @@
1
+ module HttpStub
2
+ module Server
3
+ module Stub
4
+
5
+ class ResponseFixture
6
+
7
+ def self.create
8
+ HttpStub::Server::Stub::ResponseBuilder.new.build
9
+ end
10
+
11
+ end
12
+
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,21 @@
1
+ module HttpStub
2
+ module Server
3
+
4
+ class StubFixture
5
+
6
+ class << self
7
+
8
+ def create(args={})
9
+ HttpStub::Server::Stub.create(HttpStub::Configurator::StubFixture.create_hash(args))
10
+ end
11
+
12
+ def many
13
+ (1..3).map { self.create }
14
+ end
15
+
16
+ end
17
+
18
+ end
19
+
20
+ end
21
+ end
@@ -2,16 +2,19 @@ shared_context "server integration" do
2
2
  include Rack::Utils
3
3
  include HtmlHelpers
4
4
 
5
- let(:server_specification) { {} }
6
- let(:server_driver) { HttpStub::Server::Driver.find_or_create(server_specification) }
7
- let(:server_host) { server_driver.host }
8
- let(:server_port) { server_driver.port }
9
- let(:server_uri) { server_driver.uri }
5
+ let(:configurator) { HttpStub::Examples::ConfiguratorWithTrivialStubs }
6
+
7
+ let(:server_driver) { HttpStub::Server::Driver.find_or_create(configurator) }
8
+ let(:server_host) { server_driver.host }
9
+ let(:server_port) { server_driver.port }
10
+ let(:server_uri) { server_driver.uri }
11
+ let(:client) { server_driver.client }
10
12
 
11
13
  before(:example) { server_driver.start }
12
14
 
15
+ after(:example) { client.reset! }
16
+
13
17
  def initialize_server
14
- HTTParty.post("#{server_uri}/http_stub/status/initialized")
15
18
  server_driver.session_id = transactional_session_id
16
19
  end
17
20
 
@@ -0,0 +1,37 @@
1
+ module HttpStub
2
+
3
+ class StubRequester
4
+
5
+ attr_reader :last_request
6
+
7
+ def initialize(server_uri, stub_builder)
8
+ @server_uri = server_uri
9
+ @stub_builder = stub_builder
10
+ end
11
+
12
+ def expected_response
13
+ @stub_builder.response_for(HttpStub::Server::SimpleRequest.new(@stub_builder.match_rules))
14
+ end
15
+
16
+ def issue_matching_request
17
+ issue_request({})
18
+ end
19
+
20
+ def issue_non_matching_request
21
+ issue_request(headers: { "some_header" => "does not match" })
22
+ end
23
+
24
+ private
25
+
26
+ def issue_request(overrides)
27
+ request = @stub_builder.match_rules.merge(overrides)
28
+ options = {}
29
+ options[:headers] = request[:headers] if request[:headers]
30
+ options[:query] = request[:parameters] if request[:parameters]
31
+ options[:body] = request[:body] if request[:body]
32
+ HTTParty.send(request[:method], "#{@server_uri}#{request[:uri]}", options).tap { @last_request = request }
33
+ end
34
+
35
+ end
36
+
37
+ end
@@ -0,0 +1,11 @@
1
+ class ObjectConvertableToJson
2
+
3
+ def initialize(json)
4
+ @json = json
5
+ end
6
+
7
+ def to_json
8
+ @json
9
+ end
10
+
11
+ end
@@ -4,6 +4,6 @@ shared_context "rack application test" do
4
4
  let(:response) { last_response }
5
5
  let(:response_body) { response.body.to_s }
6
6
 
7
- let(:app) { app_class.new! }
7
+ let(:app) { app_class.new! }
8
8
 
9
9
  end
@@ -2,10 +2,28 @@ module Rack
2
2
 
3
3
  class RequestFixture
4
4
 
5
- def self.create
6
- Rack::Request.new("PATH_INFO" => "/some/path/info",
7
- "REQUEST_METHOD" => "GET",
8
- "rack.input" => StringIO.new)
5
+ class << self
6
+
7
+ def create(args={})
8
+ Rack::Request.new(
9
+ env_headers_for(args).merge(
10
+ "PATH_INFO" => "/some/path/info",
11
+ "REQUEST_METHOD" => args[:method] || "GET",
12
+ "QUERY_STRING" => query_string_for(args),
13
+ "rack.input" => StringIO.new(args[:body] || ""))
14
+ )
15
+ end
16
+
17
+ def env_headers_for(args)
18
+ (args[:headers] || {}).each_with_object({}) do |(name, value), headers|
19
+ headers["HTTP_#{name.to_s.upcase}"] = value
20
+ end
21
+ end
22
+
23
+ def query_string_for(args)
24
+ (args[:parameters] || []).map { |name, value| "#{name}=#{value}" }.join("&;")
25
+ end
26
+
9
27
  end
10
28
 
11
29
  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.27.0
4
+ version: 0.28.0.beta1
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: 2017-02-01 00:00:00.000000000 Z
15
+ date: 2017-11-17 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rake
@@ -71,159 +71,159 @@ dependencies:
71
71
  - !ruby/object:Gem::Version
72
72
  version: '1.0'
73
73
  - !ruby/object:Gem::Dependency
74
- name: multipart-post
74
+ name: http_server_manager
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - "~>"
78
78
  - !ruby/object:Gem::Version
79
- version: '2.0'
79
+ version: '0.5'
80
80
  type: :runtime
81
81
  prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - "~>"
85
85
  - !ruby/object:Gem::Version
86
- version: '2.0'
86
+ version: '0.5'
87
87
  - !ruby/object:Gem::Dependency
88
- name: http_server_manager
88
+ name: json-schema
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
91
  - - "~>"
92
92
  - !ruby/object:Gem::Version
93
- version: '0.5'
93
+ version: '2.8'
94
94
  type: :runtime
95
95
  prerelease: false
96
96
  version_requirements: !ruby/object:Gem::Requirement
97
97
  requirements:
98
98
  - - "~>"
99
99
  - !ruby/object:Gem::Version
100
- version: '0.5'
100
+ version: '2.8'
101
101
  - !ruby/object:Gem::Dependency
102
- name: json-schema
102
+ name: activesupport
103
103
  requirement: !ruby/object:Gem::Requirement
104
104
  requirements:
105
105
  - - "~>"
106
106
  - !ruby/object:Gem::Version
107
- version: '2.7'
107
+ version: '5.1'
108
108
  type: :runtime
109
109
  prerelease: false
110
110
  version_requirements: !ruby/object:Gem::Requirement
111
111
  requirements:
112
112
  - - "~>"
113
113
  - !ruby/object:Gem::Version
114
- version: '2.7'
114
+ version: '5.1'
115
115
  - !ruby/object:Gem::Dependency
116
- name: activesupport
116
+ name: method_source
117
117
  requirement: !ruby/object:Gem::Requirement
118
118
  requirements:
119
119
  - - "~>"
120
120
  - !ruby/object:Gem::Version
121
- version: '5.0'
121
+ version: '0.9'
122
122
  type: :runtime
123
123
  prerelease: false
124
124
  version_requirements: !ruby/object:Gem::Requirement
125
125
  requirements:
126
126
  - - "~>"
127
127
  - !ruby/object:Gem::Version
128
- version: '5.0'
128
+ version: '0.9'
129
129
  - !ruby/object:Gem::Dependency
130
130
  name: haml
131
131
  requirement: !ruby/object:Gem::Requirement
132
132
  requirements:
133
133
  - - "~>"
134
134
  - !ruby/object:Gem::Version
135
- version: '4.0'
135
+ version: '5.0'
136
136
  type: :runtime
137
137
  prerelease: false
138
138
  version_requirements: !ruby/object:Gem::Requirement
139
139
  requirements:
140
140
  - - "~>"
141
141
  - !ruby/object:Gem::Version
142
- version: '4.0'
142
+ version: '5.0'
143
143
  - !ruby/object:Gem::Dependency
144
144
  name: sass
145
145
  requirement: !ruby/object:Gem::Requirement
146
146
  requirements:
147
147
  - - "~>"
148
148
  - !ruby/object:Gem::Version
149
- version: '3.4'
149
+ version: '3.5'
150
150
  type: :runtime
151
151
  prerelease: false
152
152
  version_requirements: !ruby/object:Gem::Requirement
153
153
  requirements:
154
154
  - - "~>"
155
155
  - !ruby/object:Gem::Version
156
- version: '3.4'
156
+ version: '3.5'
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: rubocop
159
159
  requirement: !ruby/object:Gem::Requirement
160
160
  requirements:
161
161
  - - "~>"
162
162
  - !ruby/object:Gem::Version
163
- version: '0.47'
163
+ version: '0.51'
164
164
  type: :development
165
165
  prerelease: false
166
166
  version_requirements: !ruby/object:Gem::Requirement
167
167
  requirements:
168
168
  - - "~>"
169
169
  - !ruby/object:Gem::Version
170
- version: '0.47'
170
+ version: '0.51'
171
171
  - !ruby/object:Gem::Dependency
172
172
  name: rspec
173
173
  requirement: !ruby/object:Gem::Requirement
174
174
  requirements:
175
175
  - - "~>"
176
176
  - !ruby/object:Gem::Version
177
- version: '3.5'
177
+ version: '3.7'
178
178
  type: :development
179
179
  prerelease: false
180
180
  version_requirements: !ruby/object:Gem::Requirement
181
181
  requirements:
182
182
  - - "~>"
183
183
  - !ruby/object:Gem::Version
184
- version: '3.5'
184
+ version: '3.7'
185
185
  - !ruby/object:Gem::Dependency
186
186
  name: nokogiri
187
187
  requirement: !ruby/object:Gem::Requirement
188
188
  requirements:
189
189
  - - "~>"
190
190
  - !ruby/object:Gem::Version
191
- version: '1.7'
191
+ version: '1.8'
192
192
  type: :development
193
193
  prerelease: false
194
194
  version_requirements: !ruby/object:Gem::Requirement
195
195
  requirements:
196
196
  - - "~>"
197
197
  - !ruby/object:Gem::Version
198
- version: '1.7'
198
+ version: '1.8'
199
199
  - !ruby/object:Gem::Dependency
200
200
  name: httparty
201
201
  requirement: !ruby/object:Gem::Requirement
202
202
  requirements:
203
203
  - - "~>"
204
204
  - !ruby/object:Gem::Version
205
- version: '0.14'
205
+ version: '0.15'
206
206
  type: :development
207
207
  prerelease: false
208
208
  version_requirements: !ruby/object:Gem::Requirement
209
209
  requirements:
210
210
  - - "~>"
211
211
  - !ruby/object:Gem::Version
212
- version: '0.14'
212
+ version: '0.15'
213
213
  - !ruby/object:Gem::Dependency
214
214
  name: rack-test
215
215
  requirement: !ruby/object:Gem::Requirement
216
216
  requirements:
217
217
  - - "~>"
218
218
  - !ruby/object:Gem::Version
219
- version: '0.6'
219
+ version: '0.7'
220
220
  type: :development
221
221
  prerelease: false
222
222
  version_requirements: !ruby/object:Gem::Requirement
223
223
  requirements:
224
224
  - - "~>"
225
225
  - !ruby/object:Gem::Version
226
- version: '0.6'
226
+ version: '0.7'
227
227
  - !ruby/object:Gem::Dependency
228
228
  name: wait_until
229
229
  requirement: !ruby/object:Gem::Requirement
@@ -244,28 +244,28 @@ dependencies:
244
244
  requirements:
245
245
  - - "~>"
246
246
  - !ruby/object:Gem::Version
247
- version: '3.0'
247
+ version: '3.7'
248
248
  type: :development
249
249
  prerelease: false
250
250
  version_requirements: !ruby/object:Gem::Requirement
251
251
  requirements:
252
252
  - - "~>"
253
253
  - !ruby/object:Gem::Version
254
- version: '3.0'
254
+ version: '3.7'
255
255
  - !ruby/object:Gem::Dependency
256
256
  name: simplecov
257
257
  requirement: !ruby/object:Gem::Requirement
258
258
  requirements:
259
259
  - - "~>"
260
260
  - !ruby/object:Gem::Version
261
- version: '0.13'
261
+ version: 0.13.0
262
262
  type: :development
263
263
  prerelease: false
264
264
  version_requirements: !ruby/object:Gem::Requirement
265
265
  requirements:
266
266
  - - "~>"
267
267
  - !ruby/object:Gem::Version
268
- version: '0.13'
268
+ version: 0.13.0
269
269
  - !ruby/object:Gem::Dependency
270
270
  name: codeclimate-test-reporter
271
271
  requirement: !ruby/object:Gem::Requirement
@@ -301,53 +301,35 @@ executables: []
301
301
  extensions: []
302
302
  extra_rdoc_files: []
303
303
  files:
304
- - "./lib/http_stub.rb"
305
- - "./lib/http_stub/configurer.rb"
306
- - "./lib/http_stub/configurer/dsl/request_attribute_referencer.rb"
307
- - "./lib/http_stub/configurer/dsl/request_referencer.rb"
308
- - "./lib/http_stub/configurer/dsl/scenario_builder.rb"
309
- - "./lib/http_stub/configurer/dsl/server.rb"
310
- - "./lib/http_stub/configurer/dsl/server_endpoint_template.rb"
311
- - "./lib/http_stub/configurer/dsl/session.rb"
312
- - "./lib/http_stub/configurer/dsl/session_endpoint_template.rb"
313
- - "./lib/http_stub/configurer/dsl/session_factory.rb"
314
- - "./lib/http_stub/configurer/dsl/stub_builder.rb"
315
- - "./lib/http_stub/configurer/dsl/stub_builder_template.rb"
316
- - "./lib/http_stub/configurer/part.rb"
317
- - "./lib/http_stub/configurer/request/controllable_value.rb"
318
- - "./lib/http_stub/configurer/request/http/basic.rb"
319
- - "./lib/http_stub/configurer/request/http/factory.rb"
320
- - "./lib/http_stub/configurer/request/http/multipart.rb"
321
- - "./lib/http_stub/configurer/request/omittable.rb"
322
- - "./lib/http_stub/configurer/request/regexpable.rb"
323
- - "./lib/http_stub/configurer/request/scenario.rb"
324
- - "./lib/http_stub/configurer/request/stub.rb"
325
- - "./lib/http_stub/configurer/request/stub_response.rb"
326
- - "./lib/http_stub/configurer/request/stub_response_file.rb"
327
- - "./lib/http_stub/configurer/request/triggers.rb"
328
- - "./lib/http_stub/configurer/server/buffered_command_processor.rb"
329
- - "./lib/http_stub/configurer/server/command.rb"
330
- - "./lib/http_stub/configurer/server/command_processor.rb"
331
- - "./lib/http_stub/configurer/server/configuration.rb"
332
- - "./lib/http_stub/configurer/server/facade.rb"
333
- - "./lib/http_stub/configurer/server/request_processor.rb"
334
- - "./lib/http_stub/configurer/server/session_facade.rb"
304
+ - "./lib/http_stub/client.rb"
305
+ - "./lib/http_stub/client/client.rb"
306
+ - "./lib/http_stub/client/request.rb"
307
+ - "./lib/http_stub/client/server.rb"
308
+ - "./lib/http_stub/client/session.rb"
309
+ - "./lib/http_stub/configurator.rb"
310
+ - "./lib/http_stub/configurator/endpoint_template.rb"
311
+ - "./lib/http_stub/configurator/part.rb"
312
+ - "./lib/http_stub/configurator/scenario.rb"
313
+ - "./lib/http_stub/configurator/server.rb"
314
+ - "./lib/http_stub/configurator/state.rb"
315
+ - "./lib/http_stub/configurator/stub.rb"
316
+ - "./lib/http_stub/configurator/stub/stub.rb"
317
+ - "./lib/http_stub/configurator/stub/template.rb"
335
318
  - "./lib/http_stub/extensions/core/hash.rb"
336
319
  - "./lib/http_stub/extensions/core/hash/formatted.rb"
337
320
  - "./lib/http_stub/extensions/core/hash/indifferent_and_insensitive_access.rb"
338
321
  - "./lib/http_stub/extensions/core/hash/with_indifferent_and_insensitive_access.rb"
322
+ - "./lib/http_stub/extensions/core/object.rb"
339
323
  - "./lib/http_stub/extensions/core/uri.rb"
340
324
  - "./lib/http_stub/extensions/rack/handler.rb"
341
325
  - "./lib/http_stub/extensions/sinatra/namespace.rb"
342
326
  - "./lib/http_stub/rake/server_daemon_tasks.rb"
343
327
  - "./lib/http_stub/rake/server_tasks.rb"
344
328
  - "./lib/http_stub/rake/task_generators.rb"
329
+ - "./lib/http_stub/server.rb"
345
330
  - "./lib/http_stub/server/application/application.rb"
346
- - "./lib/http_stub/server/application/configuration.rb"
347
331
  - "./lib/http_stub/server/application/cross_origin_support.rb"
348
332
  - "./lib/http_stub/server/application/request_support.rb"
349
- - "./lib/http_stub/server/application/response_pipeline.rb"
350
- - "./lib/http_stub/server/application/response_support.rb"
351
333
  - "./lib/http_stub/server/application/routes/memory.rb"
352
334
  - "./lib/http_stub/server/application/routes/resource.rb"
353
335
  - "./lib/http_stub/server/application/routes/scenario.rb"
@@ -358,6 +340,7 @@ files:
358
340
  - "./lib/http_stub/server/application/text_formatting_support.rb"
359
341
  - "./lib/http_stub/server/daemon.rb"
360
342
  - "./lib/http_stub/server/memory/controller.rb"
343
+ - "./lib/http_stub/server/memory/initial_state.rb"
361
344
  - "./lib/http_stub/server/memory/memory.rb"
362
345
  - "./lib/http_stub/server/public/favicon.ico"
363
346
  - "./lib/http_stub/server/public/jquery-2.2.4.min.js"
@@ -372,17 +355,16 @@ files:
372
355
  - "./lib/http_stub/server/scenario/controller.rb"
373
356
  - "./lib/http_stub/server/scenario/links.rb"
374
357
  - "./lib/http_stub/server/scenario/not_found_error.rb"
375
- - "./lib/http_stub/server/scenario/parser.rb"
358
+ - "./lib/http_stub/server/scenario/registry.rb"
376
359
  - "./lib/http_stub/server/scenario/scenario.rb"
377
360
  - "./lib/http_stub/server/scenario/trigger.rb"
378
361
  - "./lib/http_stub/server/session.rb"
379
- - "./lib/http_stub/server/session/configuration.rb"
380
362
  - "./lib/http_stub/server/session/controller.rb"
381
363
  - "./lib/http_stub/server/session/empty.rb"
382
364
  - "./lib/http_stub/server/session/identifier_strategy.rb"
383
365
  - "./lib/http_stub/server/session/registry.rb"
384
366
  - "./lib/http_stub/server/session/session.rb"
385
- - "./lib/http_stub/server/status/controller.rb"
367
+ - "./lib/http_stub/server/stdout_logger.rb"
386
368
  - "./lib/http_stub/server/stub.rb"
387
369
  - "./lib/http_stub/server/stub/controller.rb"
388
370
  - "./lib/http_stub/server/stub/empty.rb"
@@ -395,31 +377,26 @@ files:
395
377
  - "./lib/http_stub/server/stub/match/regexp_value_matcher.rb"
396
378
  - "./lib/http_stub/server/stub/match/rule/body.rb"
397
379
  - "./lib/http_stub/server/stub/match/rule/headers.rb"
398
- - "./lib/http_stub/server/stub/match/rule/json_body.rb"
380
+ - "./lib/http_stub/server/stub/match/rule/json_schema_body.rb"
399
381
  - "./lib/http_stub/server/stub/match/rule/method.rb"
400
382
  - "./lib/http_stub/server/stub/match/rule/parameters.rb"
383
+ - "./lib/http_stub/server/stub/match/rule/schema_body.rb"
401
384
  - "./lib/http_stub/server/stub/match/rule/simple_body.rb"
402
385
  - "./lib/http_stub/server/stub/match/rule/truthy.rb"
403
386
  - "./lib/http_stub/server/stub/match/rule/uri.rb"
404
387
  - "./lib/http_stub/server/stub/match/rules.rb"
405
388
  - "./lib/http_stub/server/stub/match/string_value_matcher.rb"
406
- - "./lib/http_stub/server/stub/parser.rb"
407
- - "./lib/http_stub/server/stub/payload.rb"
408
- - "./lib/http_stub/server/stub/payload/base_uri_modifier.rb"
409
- - "./lib/http_stub/server/stub/payload/response_body_modifier.rb"
410
389
  - "./lib/http_stub/server/stub/registry.rb"
411
390
  - "./lib/http_stub/server/stub/response.rb"
412
- - "./lib/http_stub/server/stub/response/attribute/body.rb"
413
- - "./lib/http_stub/server/stub/response/attribute/headers.rb"
414
- - "./lib/http_stub/server/stub/response/attribute/interpolator.rb"
415
- - "./lib/http_stub/server/stub/response/attribute/interpolator/headers.rb"
416
- - "./lib/http_stub/server/stub/response/attribute/interpolator/parameters.rb"
417
- - "./lib/http_stub/server/stub/response/base.rb"
418
- - "./lib/http_stub/server/stub/response/file.rb"
419
- - "./lib/http_stub/server/stub/response/text.rb"
391
+ - "./lib/http_stub/server/stub/response/blocks.rb"
392
+ - "./lib/http_stub/server/stub/response/body.rb"
393
+ - "./lib/http_stub/server/stub/response/file_body.rb"
394
+ - "./lib/http_stub/server/stub/response/headers.rb"
395
+ - "./lib/http_stub/server/stub/response/response.rb"
396
+ - "./lib/http_stub/server/stub/response/text_body.rb"
420
397
  - "./lib/http_stub/server/stub/stub.rb"
421
398
  - "./lib/http_stub/server/stub/triggers.rb"
422
- - "./lib/http_stub/server/views/_file_response.haml"
399
+ - "./lib/http_stub/server/views/_file_body_response.haml"
423
400
  - "./lib/http_stub/server/views/_home.haml"
424
401
  - "./lib/http_stub/server/views/_post_link_function.haml"
425
402
  - "./lib/http_stub/server/views/_request.haml"
@@ -429,7 +406,7 @@ files:
429
406
  - "./lib/http_stub/server/views/_stub_match.haml"
430
407
  - "./lib/http_stub/server/views/_stub_miss.haml"
431
408
  - "./lib/http_stub/server/views/_stubs.haml"
432
- - "./lib/http_stub/server/views/_text_response.haml"
409
+ - "./lib/http_stub/server/views/_text_body_response.haml"
433
410
  - "./lib/http_stub/server/views/application.sass"
434
411
  - "./lib/http_stub/server/views/layout.haml"
435
412
  - "./lib/http_stub/server/views/matches.haml"
@@ -443,11 +420,9 @@ files:
443
420
  - "./lib/http_stub/server/views/stubs.haml"
444
421
  - "./lib/http_stub/server/views/transactional_session.haml"
445
422
  - "./lib/http_stub/version.rb"
446
- - "./spec/acceptance/configurer_initialization_spec.rb"
447
- - "./spec/acceptance/configurer_part_spec.rb"
423
+ - "./spec/acceptance/configurator_part_spec.rb"
448
424
  - "./spec/acceptance/cross_origin_support_spec.rb"
449
425
  - "./spec/acceptance/endpoint_template_spec.rb"
450
- - "./spec/acceptance/request_reference_spec.rb"
451
426
  - "./spec/acceptance/scenario_spec.rb"
452
427
  - "./spec/acceptance/server_defaults_spec.rb"
453
428
  - "./spec/acceptance/server_memory_spec.rb"
@@ -458,43 +433,31 @@ files:
458
433
  - "./spec/acceptance/stub_match_last_spec.rb"
459
434
  - "./spec/acceptance/stub_match_list_spec.rb"
460
435
  - "./spec/acceptance/stub_miss_list_spec.rb"
436
+ - "./spec/acceptance/stub_response_block_spec.rb"
461
437
  - "./spec/acceptance/stub_spec.rb"
462
438
  - "./spec/acceptance/stub_trigger_spec.rb"
463
439
  - "./spec/curl_samples.txt"
464
440
  - "./spec/helper.rb"
465
- - "./spec/lib/http_stub/configurer/dsl/request_attribute_referencer_spec.rb"
466
- - "./spec/lib/http_stub/configurer/dsl/request_referencer_spec.rb"
467
- - "./spec/lib/http_stub/configurer/dsl/scenario_builder_spec.rb"
468
- - "./spec/lib/http_stub/configurer/dsl/server_endpoint_template_spec.rb"
469
- - "./spec/lib/http_stub/configurer/dsl/server_spec.rb"
470
- - "./spec/lib/http_stub/configurer/dsl/session_endpoint_template_spec.rb"
471
- - "./spec/lib/http_stub/configurer/dsl/session_factory_spec.rb"
472
- - "./spec/lib/http_stub/configurer/dsl/session_spec.rb"
473
- - "./spec/lib/http_stub/configurer/dsl/stub_builder_spec.rb"
474
- - "./spec/lib/http_stub/configurer/dsl/stub_builder_template_spec.rb"
475
- - "./spec/lib/http_stub/configurer/part_spec.rb"
476
- - "./spec/lib/http_stub/configurer/request/controllable_value_spec.rb"
477
- - "./spec/lib/http_stub/configurer/request/http/basic_spec.rb"
478
- - "./spec/lib/http_stub/configurer/request/http/factory_spec.rb"
479
- - "./spec/lib/http_stub/configurer/request/http/multipart_spec.rb"
480
- - "./spec/lib/http_stub/configurer/request/omittable_spec.rb"
481
- - "./spec/lib/http_stub/configurer/request/regexpable_spec.rb"
482
- - "./spec/lib/http_stub/configurer/request/scenario_spec.rb"
483
- - "./spec/lib/http_stub/configurer/request/stub_response_spec.rb"
484
- - "./spec/lib/http_stub/configurer/request/stub_spec.rb"
485
- - "./spec/lib/http_stub/configurer/request/triggers_spec.rb"
486
- - "./spec/lib/http_stub/configurer/server/buffered_command_processor_spec.rb"
487
- - "./spec/lib/http_stub/configurer/server/command_processor_integration_spec.rb"
488
- - "./spec/lib/http_stub/configurer/server/command_spec.rb"
489
- - "./spec/lib/http_stub/configurer/server/configuration_spec.rb"
490
- - "./spec/lib/http_stub/configurer/server/facade_spec.rb"
491
- - "./spec/lib/http_stub/configurer/server/request_processor_spec.rb"
492
- - "./spec/lib/http_stub/configurer/server/session_facade_spec.rb"
493
- - "./spec/lib/http_stub/configurer_spec.rb"
441
+ - "./spec/lib/http_stub/client/client_spec.rb"
442
+ - "./spec/lib/http_stub/client/request_integration_spec.rb"
443
+ - "./spec/lib/http_stub/client/request_spec.rb"
444
+ - "./spec/lib/http_stub/client/server_spec.rb"
445
+ - "./spec/lib/http_stub/client/session_spec.rb"
446
+ - "./spec/lib/http_stub/client_spec.rb"
447
+ - "./spec/lib/http_stub/configurator/endpoint_template_spec.rb"
448
+ - "./spec/lib/http_stub/configurator/part_spec.rb"
449
+ - "./spec/lib/http_stub/configurator/scenario_spec.rb"
450
+ - "./spec/lib/http_stub/configurator/server_spec.rb"
451
+ - "./spec/lib/http_stub/configurator/state_spec.rb"
452
+ - "./spec/lib/http_stub/configurator/stub/stub_spec.rb"
453
+ - "./spec/lib/http_stub/configurator/stub/template_spec.rb"
454
+ - "./spec/lib/http_stub/configurator/stub_spec.rb"
455
+ - "./spec/lib/http_stub/configurator_spec.rb"
494
456
  - "./spec/lib/http_stub/extensions/core/hash/formatted_spec.rb"
495
457
  - "./spec/lib/http_stub/extensions/core/hash/indifferent_and_insensitive_access_spec.rb"
496
458
  - "./spec/lib/http_stub/extensions/core/hash/with_indifferent_and_insensitive_access_spec.rb"
497
459
  - "./spec/lib/http_stub/extensions/core/hash_spec.rb"
460
+ - "./spec/lib/http_stub/extensions/core/object_spec.rb"
498
461
  - "./spec/lib/http_stub/extensions/core/uri_spec.rb"
499
462
  - "./spec/lib/http_stub/extensions/rack/handler_spec.rb"
500
463
  - "./spec/lib/http_stub/extensions/sinatra/namespace_spec.rb"
@@ -503,12 +466,9 @@ files:
503
466
  - "./spec/lib/http_stub/rake/server_tasks_smoke_spec.rb"
504
467
  - "./spec/lib/http_stub/rake/server_tasks_spec.rb"
505
468
  - "./spec/lib/http_stub/server/application/application_spec.rb"
506
- - "./spec/lib/http_stub/server/application/configuration_spec.rb"
507
469
  - "./spec/lib/http_stub/server/application/cross_origin_support_spec.rb"
508
470
  - "./spec/lib/http_stub/server/application/request_support_integration_spec.rb"
509
471
  - "./spec/lib/http_stub/server/application/request_support_spec.rb"
510
- - "./spec/lib/http_stub/server/application/response_pipeline_spec.rb"
511
- - "./spec/lib/http_stub/server/application/response_support_spec.rb"
512
472
  - "./spec/lib/http_stub/server/application/routes/memory_spec.rb"
513
473
  - "./spec/lib/http_stub/server/application/routes/resource_spec.rb"
514
474
  - "./spec/lib/http_stub/server/application/routes/scenario_spec.rb"
@@ -522,6 +482,7 @@ files:
522
482
  - "./spec/lib/http_stub/server/daemon_integration_spec.rb"
523
483
  - "./spec/lib/http_stub/server/daemon_spec.rb"
524
484
  - "./spec/lib/http_stub/server/memory/controller_spec.rb"
485
+ - "./spec/lib/http_stub/server/memory/initial_state_spec.rb"
525
486
  - "./spec/lib/http_stub/server/memory/memory_spec.rb"
526
487
  - "./spec/lib/http_stub/server/registry_spec.rb"
527
488
  - "./spec/lib/http_stub/server/request/factory_spec.rb"
@@ -533,17 +494,16 @@ files:
533
494
  - "./spec/lib/http_stub/server/scenario/controller_spec.rb"
534
495
  - "./spec/lib/http_stub/server/scenario/links_spec.rb"
535
496
  - "./spec/lib/http_stub/server/scenario/not_found_error_spec.rb"
536
- - "./spec/lib/http_stub/server/scenario/parser_spec.rb"
497
+ - "./spec/lib/http_stub/server/scenario/registry_spec.rb"
537
498
  - "./spec/lib/http_stub/server/scenario/scenario_spec.rb"
538
499
  - "./spec/lib/http_stub/server/scenario/trigger_spec.rb"
539
500
  - "./spec/lib/http_stub/server/scenario_spec.rb"
540
- - "./spec/lib/http_stub/server/session/configuration_spec.rb"
541
501
  - "./spec/lib/http_stub/server/session/controller_spec.rb"
542
502
  - "./spec/lib/http_stub/server/session/empty_spec.rb"
543
503
  - "./spec/lib/http_stub/server/session/identifier_strategy_spec.rb"
544
504
  - "./spec/lib/http_stub/server/session/registry_spec.rb"
545
505
  - "./spec/lib/http_stub/server/session/session_spec.rb"
546
- - "./spec/lib/http_stub/server/status/controller_spec.rb"
506
+ - "./spec/lib/http_stub/server/stdout_logger_spec.rb"
547
507
  - "./spec/lib/http_stub/server/stub/controller_spec.rb"
548
508
  - "./spec/lib/http_stub/server/stub/empty_spec.rb"
549
509
  - "./spec/lib/http_stub/server/stub/match/controller_spec.rb"
@@ -555,59 +515,67 @@ files:
555
515
  - "./spec/lib/http_stub/server/stub/match/regexp_value_matcher_spec.rb"
556
516
  - "./spec/lib/http_stub/server/stub/match/rule/body_spec.rb"
557
517
  - "./spec/lib/http_stub/server/stub/match/rule/headers_spec.rb"
558
- - "./spec/lib/http_stub/server/stub/match/rule/json_body_spec.rb"
518
+ - "./spec/lib/http_stub/server/stub/match/rule/json_schema_body_spec.rb"
559
519
  - "./spec/lib/http_stub/server/stub/match/rule/method_spec.rb"
560
520
  - "./spec/lib/http_stub/server/stub/match/rule/parameters_spec.rb"
521
+ - "./spec/lib/http_stub/server/stub/match/rule/schema_body_spec.rb"
561
522
  - "./spec/lib/http_stub/server/stub/match/rule/simple_body_spec.rb"
562
523
  - "./spec/lib/http_stub/server/stub/match/rule/truthy_spec.rb"
563
524
  - "./spec/lib/http_stub/server/stub/match/rule/uri_spec.rb"
564
525
  - "./spec/lib/http_stub/server/stub/match/rules_spec.rb"
565
526
  - "./spec/lib/http_stub/server/stub/match/string_value_matcher_spec.rb"
566
- - "./spec/lib/http_stub/server/stub/parser_spec.rb"
567
- - "./spec/lib/http_stub/server/stub/payload/base_uri_modifier_spec.rb"
568
- - "./spec/lib/http_stub/server/stub/payload/response_body_modifier_spec.rb"
569
- - "./spec/lib/http_stub/server/stub/payload_spec.rb"
570
527
  - "./spec/lib/http_stub/server/stub/registry_integration_spec.rb"
571
528
  - "./spec/lib/http_stub/server/stub/registry_spec.rb"
572
- - "./spec/lib/http_stub/server/stub/response/attribute/body_spec.rb"
573
- - "./spec/lib/http_stub/server/stub/response/attribute/headers_spec.rb"
574
- - "./spec/lib/http_stub/server/stub/response/attribute/interpolator/headers_spec.rb"
575
- - "./spec/lib/http_stub/server/stub/response/attribute/interpolator/parameters_spec.rb"
576
- - "./spec/lib/http_stub/server/stub/response/attribute/interpolator_spec.rb"
577
- - "./spec/lib/http_stub/server/stub/response/base_spec.rb"
578
- - "./spec/lib/http_stub/server/stub/response/file_spec.rb"
579
- - "./spec/lib/http_stub/server/stub/response/text_spec.rb"
529
+ - "./spec/lib/http_stub/server/stub/response/blocks_spec.rb"
530
+ - "./spec/lib/http_stub/server/stub/response/body_spec.rb"
531
+ - "./spec/lib/http_stub/server/stub/response/file_body_spec.rb"
532
+ - "./spec/lib/http_stub/server/stub/response/headers_spec.rb"
533
+ - "./spec/lib/http_stub/server/stub/response/response_spec.rb"
534
+ - "./spec/lib/http_stub/server/stub/response/text_body_spec.rb"
580
535
  - "./spec/lib/http_stub/server/stub/response_spec.rb"
581
536
  - "./spec/lib/http_stub/server/stub/stub_spec.rb"
582
537
  - "./spec/lib/http_stub/server/stub/triggers_spec.rb"
583
538
  - "./spec/lib/http_stub/server/stub_spec.rb"
584
- - "./spec/resources/sample.pdf"
585
- - "./spec/resources/sample.txt"
586
539
  - "./spec/support/browser_integration.rb"
587
540
  - "./spec/support/contain_file.rb"
588
541
  - "./spec/support/cross_origin_server/application.rb"
589
542
  - "./spec/support/cross_origin_server/index_page.rb"
590
543
  - "./spec/support/cross_origin_server/integration.rb"
591
544
  - "./spec/support/cross_origin_server/public/index.html"
545
+ - "./spec/support/extensions/core/random.rb"
592
546
  - "./spec/support/html_helpers.rb"
593
- - "./spec/support/http_stub/configurer_integration.rb"
594
- - "./spec/support/http_stub/empty_configurer.rb"
595
- - "./spec/support/http_stub/html_view_excluding_request_details.rb"
596
- - "./spec/support/http_stub/html_view_including_request_details.rb"
597
- - "./spec/support/http_stub/scenario_fixture.rb"
547
+ - "./spec/support/http_stub/configurator/scenario_builder.rb"
548
+ - "./spec/support/http_stub/configurator/scenario_fixture.rb"
549
+ - "./spec/support/http_stub/configurator/stub_builder.rb"
550
+ - "./spec/support/http_stub/configurator/stub_fixture.rb"
551
+ - "./spec/support/http_stub/configurator_fixture.rb"
552
+ - "./spec/support/http_stub/configurator_with_stub_builder_and_requester.rb"
553
+ - "./spec/support/http_stub/headers_fixture.rb"
554
+ - "./spec/support/http_stub/html_view_excluding_a_stub_request.rb"
555
+ - "./spec/support/http_stub/html_view_including_a_stub_request.rb"
556
+ - "./spec/support/http_stub/port.rb"
598
557
  - "./spec/support/http_stub/selenium/browser.rb"
599
558
  - "./spec/support/http_stub/server/application/http_stub_rack_application_test.rb"
600
559
  - "./spec/support/http_stub/server/driver.rb"
601
560
  - "./spec/support/http_stub/server/memory_fixture.rb"
561
+ - "./spec/support/http_stub/server/request/sinatra_request_fixture.rb"
602
562
  - "./spec/support/http_stub/server/request_fixture.rb"
603
563
  - "./spec/support/http_stub/server/scenario_fixture.rb"
604
564
  - "./spec/support/http_stub/server/session_fixture.rb"
565
+ - "./spec/support/http_stub/server/silent_logger.rb"
566
+ - "./spec/support/http_stub/server/simple_request.rb"
605
567
  - "./spec/support/http_stub/server/stub/match/match_fixture.rb"
606
568
  - "./spec/support/http_stub/server/stub/match/miss_fixture.rb"
569
+ - "./spec/support/http_stub/server/stub/response/blocks_fixture.rb"
570
+ - "./spec/support/http_stub/server/stub/response/file_body_fixture.rb"
571
+ - "./spec/support/http_stub/server/stub/response/text_body_fixture.rb"
572
+ - "./spec/support/http_stub/server/stub/response_builder.rb"
573
+ - "./spec/support/http_stub/server/stub/response_fixture.rb"
574
+ - "./spec/support/http_stub/server/stub_fixture.rb"
607
575
  - "./spec/support/http_stub/server_integration.rb"
608
- - "./spec/support/http_stub/stub_fixture.rb"
609
- - "./spec/support/http_stub/stub_registrator.rb"
576
+ - "./spec/support/http_stub/stub_requester.rb"
610
577
  - "./spec/support/include_in_json.rb"
578
+ - "./spec/support/object_convertable_to_json.rb"
611
579
  - "./spec/support/rack/rack_application_test.rb"
612
580
  - "./spec/support/rack/request_fixture.rb"
613
581
  - "./spec/support/surpressed_output.rb"
@@ -626,21 +594,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
626
594
  version: 2.2.2
627
595
  required_rubygems_version: !ruby/object:Gem::Requirement
628
596
  requirements:
629
- - - ">="
597
+ - - ">"
630
598
  - !ruby/object:Gem::Version
631
- version: '0'
599
+ version: 1.3.1
632
600
  requirements: []
633
601
  rubyforge_project: http_stub
634
- rubygems_version: 2.6.10
602
+ rubygems_version: 2.6.14
635
603
  signing_key:
636
604
  specification_version: 4
637
605
  summary: A service virtualization tool that encourages contract based testing
638
606
  test_files:
639
- - "./spec/acceptance/configurer_initialization_spec.rb"
640
- - "./spec/acceptance/configurer_part_spec.rb"
607
+ - "./spec/acceptance/configurator_part_spec.rb"
641
608
  - "./spec/acceptance/cross_origin_support_spec.rb"
642
609
  - "./spec/acceptance/endpoint_template_spec.rb"
643
- - "./spec/acceptance/request_reference_spec.rb"
644
610
  - "./spec/acceptance/scenario_spec.rb"
645
611
  - "./spec/acceptance/server_defaults_spec.rb"
646
612
  - "./spec/acceptance/server_memory_spec.rb"
@@ -651,43 +617,31 @@ test_files:
651
617
  - "./spec/acceptance/stub_match_last_spec.rb"
652
618
  - "./spec/acceptance/stub_match_list_spec.rb"
653
619
  - "./spec/acceptance/stub_miss_list_spec.rb"
620
+ - "./spec/acceptance/stub_response_block_spec.rb"
654
621
  - "./spec/acceptance/stub_spec.rb"
655
622
  - "./spec/acceptance/stub_trigger_spec.rb"
656
623
  - "./spec/curl_samples.txt"
657
624
  - "./spec/helper.rb"
658
- - "./spec/lib/http_stub/configurer/dsl/request_attribute_referencer_spec.rb"
659
- - "./spec/lib/http_stub/configurer/dsl/request_referencer_spec.rb"
660
- - "./spec/lib/http_stub/configurer/dsl/scenario_builder_spec.rb"
661
- - "./spec/lib/http_stub/configurer/dsl/server_endpoint_template_spec.rb"
662
- - "./spec/lib/http_stub/configurer/dsl/server_spec.rb"
663
- - "./spec/lib/http_stub/configurer/dsl/session_endpoint_template_spec.rb"
664
- - "./spec/lib/http_stub/configurer/dsl/session_factory_spec.rb"
665
- - "./spec/lib/http_stub/configurer/dsl/session_spec.rb"
666
- - "./spec/lib/http_stub/configurer/dsl/stub_builder_spec.rb"
667
- - "./spec/lib/http_stub/configurer/dsl/stub_builder_template_spec.rb"
668
- - "./spec/lib/http_stub/configurer/part_spec.rb"
669
- - "./spec/lib/http_stub/configurer/request/controllable_value_spec.rb"
670
- - "./spec/lib/http_stub/configurer/request/http/basic_spec.rb"
671
- - "./spec/lib/http_stub/configurer/request/http/factory_spec.rb"
672
- - "./spec/lib/http_stub/configurer/request/http/multipart_spec.rb"
673
- - "./spec/lib/http_stub/configurer/request/omittable_spec.rb"
674
- - "./spec/lib/http_stub/configurer/request/regexpable_spec.rb"
675
- - "./spec/lib/http_stub/configurer/request/scenario_spec.rb"
676
- - "./spec/lib/http_stub/configurer/request/stub_response_spec.rb"
677
- - "./spec/lib/http_stub/configurer/request/stub_spec.rb"
678
- - "./spec/lib/http_stub/configurer/request/triggers_spec.rb"
679
- - "./spec/lib/http_stub/configurer/server/buffered_command_processor_spec.rb"
680
- - "./spec/lib/http_stub/configurer/server/command_processor_integration_spec.rb"
681
- - "./spec/lib/http_stub/configurer/server/command_spec.rb"
682
- - "./spec/lib/http_stub/configurer/server/configuration_spec.rb"
683
- - "./spec/lib/http_stub/configurer/server/facade_spec.rb"
684
- - "./spec/lib/http_stub/configurer/server/request_processor_spec.rb"
685
- - "./spec/lib/http_stub/configurer/server/session_facade_spec.rb"
686
- - "./spec/lib/http_stub/configurer_spec.rb"
625
+ - "./spec/lib/http_stub/client/client_spec.rb"
626
+ - "./spec/lib/http_stub/client/request_integration_spec.rb"
627
+ - "./spec/lib/http_stub/client/request_spec.rb"
628
+ - "./spec/lib/http_stub/client/server_spec.rb"
629
+ - "./spec/lib/http_stub/client/session_spec.rb"
630
+ - "./spec/lib/http_stub/client_spec.rb"
631
+ - "./spec/lib/http_stub/configurator/endpoint_template_spec.rb"
632
+ - "./spec/lib/http_stub/configurator/part_spec.rb"
633
+ - "./spec/lib/http_stub/configurator/scenario_spec.rb"
634
+ - "./spec/lib/http_stub/configurator/server_spec.rb"
635
+ - "./spec/lib/http_stub/configurator/state_spec.rb"
636
+ - "./spec/lib/http_stub/configurator/stub/stub_spec.rb"
637
+ - "./spec/lib/http_stub/configurator/stub/template_spec.rb"
638
+ - "./spec/lib/http_stub/configurator/stub_spec.rb"
639
+ - "./spec/lib/http_stub/configurator_spec.rb"
687
640
  - "./spec/lib/http_stub/extensions/core/hash/formatted_spec.rb"
688
641
  - "./spec/lib/http_stub/extensions/core/hash/indifferent_and_insensitive_access_spec.rb"
689
642
  - "./spec/lib/http_stub/extensions/core/hash/with_indifferent_and_insensitive_access_spec.rb"
690
643
  - "./spec/lib/http_stub/extensions/core/hash_spec.rb"
644
+ - "./spec/lib/http_stub/extensions/core/object_spec.rb"
691
645
  - "./spec/lib/http_stub/extensions/core/uri_spec.rb"
692
646
  - "./spec/lib/http_stub/extensions/rack/handler_spec.rb"
693
647
  - "./spec/lib/http_stub/extensions/sinatra/namespace_spec.rb"
@@ -696,12 +650,9 @@ test_files:
696
650
  - "./spec/lib/http_stub/rake/server_tasks_smoke_spec.rb"
697
651
  - "./spec/lib/http_stub/rake/server_tasks_spec.rb"
698
652
  - "./spec/lib/http_stub/server/application/application_spec.rb"
699
- - "./spec/lib/http_stub/server/application/configuration_spec.rb"
700
653
  - "./spec/lib/http_stub/server/application/cross_origin_support_spec.rb"
701
654
  - "./spec/lib/http_stub/server/application/request_support_integration_spec.rb"
702
655
  - "./spec/lib/http_stub/server/application/request_support_spec.rb"
703
- - "./spec/lib/http_stub/server/application/response_pipeline_spec.rb"
704
- - "./spec/lib/http_stub/server/application/response_support_spec.rb"
705
656
  - "./spec/lib/http_stub/server/application/routes/memory_spec.rb"
706
657
  - "./spec/lib/http_stub/server/application/routes/resource_spec.rb"
707
658
  - "./spec/lib/http_stub/server/application/routes/scenario_spec.rb"
@@ -715,6 +666,7 @@ test_files:
715
666
  - "./spec/lib/http_stub/server/daemon_integration_spec.rb"
716
667
  - "./spec/lib/http_stub/server/daemon_spec.rb"
717
668
  - "./spec/lib/http_stub/server/memory/controller_spec.rb"
669
+ - "./spec/lib/http_stub/server/memory/initial_state_spec.rb"
718
670
  - "./spec/lib/http_stub/server/memory/memory_spec.rb"
719
671
  - "./spec/lib/http_stub/server/registry_spec.rb"
720
672
  - "./spec/lib/http_stub/server/request/factory_spec.rb"
@@ -726,17 +678,16 @@ test_files:
726
678
  - "./spec/lib/http_stub/server/scenario/controller_spec.rb"
727
679
  - "./spec/lib/http_stub/server/scenario/links_spec.rb"
728
680
  - "./spec/lib/http_stub/server/scenario/not_found_error_spec.rb"
729
- - "./spec/lib/http_stub/server/scenario/parser_spec.rb"
681
+ - "./spec/lib/http_stub/server/scenario/registry_spec.rb"
730
682
  - "./spec/lib/http_stub/server/scenario/scenario_spec.rb"
731
683
  - "./spec/lib/http_stub/server/scenario/trigger_spec.rb"
732
684
  - "./spec/lib/http_stub/server/scenario_spec.rb"
733
- - "./spec/lib/http_stub/server/session/configuration_spec.rb"
734
685
  - "./spec/lib/http_stub/server/session/controller_spec.rb"
735
686
  - "./spec/lib/http_stub/server/session/empty_spec.rb"
736
687
  - "./spec/lib/http_stub/server/session/identifier_strategy_spec.rb"
737
688
  - "./spec/lib/http_stub/server/session/registry_spec.rb"
738
689
  - "./spec/lib/http_stub/server/session/session_spec.rb"
739
- - "./spec/lib/http_stub/server/status/controller_spec.rb"
690
+ - "./spec/lib/http_stub/server/stdout_logger_spec.rb"
740
691
  - "./spec/lib/http_stub/server/stub/controller_spec.rb"
741
692
  - "./spec/lib/http_stub/server/stub/empty_spec.rb"
742
693
  - "./spec/lib/http_stub/server/stub/match/controller_spec.rb"
@@ -748,59 +699,67 @@ test_files:
748
699
  - "./spec/lib/http_stub/server/stub/match/regexp_value_matcher_spec.rb"
749
700
  - "./spec/lib/http_stub/server/stub/match/rule/body_spec.rb"
750
701
  - "./spec/lib/http_stub/server/stub/match/rule/headers_spec.rb"
751
- - "./spec/lib/http_stub/server/stub/match/rule/json_body_spec.rb"
702
+ - "./spec/lib/http_stub/server/stub/match/rule/json_schema_body_spec.rb"
752
703
  - "./spec/lib/http_stub/server/stub/match/rule/method_spec.rb"
753
704
  - "./spec/lib/http_stub/server/stub/match/rule/parameters_spec.rb"
705
+ - "./spec/lib/http_stub/server/stub/match/rule/schema_body_spec.rb"
754
706
  - "./spec/lib/http_stub/server/stub/match/rule/simple_body_spec.rb"
755
707
  - "./spec/lib/http_stub/server/stub/match/rule/truthy_spec.rb"
756
708
  - "./spec/lib/http_stub/server/stub/match/rule/uri_spec.rb"
757
709
  - "./spec/lib/http_stub/server/stub/match/rules_spec.rb"
758
710
  - "./spec/lib/http_stub/server/stub/match/string_value_matcher_spec.rb"
759
- - "./spec/lib/http_stub/server/stub/parser_spec.rb"
760
- - "./spec/lib/http_stub/server/stub/payload/base_uri_modifier_spec.rb"
761
- - "./spec/lib/http_stub/server/stub/payload/response_body_modifier_spec.rb"
762
- - "./spec/lib/http_stub/server/stub/payload_spec.rb"
763
711
  - "./spec/lib/http_stub/server/stub/registry_integration_spec.rb"
764
712
  - "./spec/lib/http_stub/server/stub/registry_spec.rb"
765
- - "./spec/lib/http_stub/server/stub/response/attribute/body_spec.rb"
766
- - "./spec/lib/http_stub/server/stub/response/attribute/headers_spec.rb"
767
- - "./spec/lib/http_stub/server/stub/response/attribute/interpolator/headers_spec.rb"
768
- - "./spec/lib/http_stub/server/stub/response/attribute/interpolator/parameters_spec.rb"
769
- - "./spec/lib/http_stub/server/stub/response/attribute/interpolator_spec.rb"
770
- - "./spec/lib/http_stub/server/stub/response/base_spec.rb"
771
- - "./spec/lib/http_stub/server/stub/response/file_spec.rb"
772
- - "./spec/lib/http_stub/server/stub/response/text_spec.rb"
713
+ - "./spec/lib/http_stub/server/stub/response/blocks_spec.rb"
714
+ - "./spec/lib/http_stub/server/stub/response/body_spec.rb"
715
+ - "./spec/lib/http_stub/server/stub/response/file_body_spec.rb"
716
+ - "./spec/lib/http_stub/server/stub/response/headers_spec.rb"
717
+ - "./spec/lib/http_stub/server/stub/response/response_spec.rb"
718
+ - "./spec/lib/http_stub/server/stub/response/text_body_spec.rb"
773
719
  - "./spec/lib/http_stub/server/stub/response_spec.rb"
774
720
  - "./spec/lib/http_stub/server/stub/stub_spec.rb"
775
721
  - "./spec/lib/http_stub/server/stub/triggers_spec.rb"
776
722
  - "./spec/lib/http_stub/server/stub_spec.rb"
777
- - "./spec/resources/sample.pdf"
778
- - "./spec/resources/sample.txt"
779
723
  - "./spec/support/browser_integration.rb"
780
724
  - "./spec/support/contain_file.rb"
781
725
  - "./spec/support/cross_origin_server/application.rb"
782
726
  - "./spec/support/cross_origin_server/index_page.rb"
783
727
  - "./spec/support/cross_origin_server/integration.rb"
784
728
  - "./spec/support/cross_origin_server/public/index.html"
729
+ - "./spec/support/extensions/core/random.rb"
785
730
  - "./spec/support/html_helpers.rb"
786
- - "./spec/support/http_stub/configurer_integration.rb"
787
- - "./spec/support/http_stub/empty_configurer.rb"
788
- - "./spec/support/http_stub/html_view_excluding_request_details.rb"
789
- - "./spec/support/http_stub/html_view_including_request_details.rb"
790
- - "./spec/support/http_stub/scenario_fixture.rb"
731
+ - "./spec/support/http_stub/configurator/scenario_builder.rb"
732
+ - "./spec/support/http_stub/configurator/scenario_fixture.rb"
733
+ - "./spec/support/http_stub/configurator/stub_builder.rb"
734
+ - "./spec/support/http_stub/configurator/stub_fixture.rb"
735
+ - "./spec/support/http_stub/configurator_fixture.rb"
736
+ - "./spec/support/http_stub/configurator_with_stub_builder_and_requester.rb"
737
+ - "./spec/support/http_stub/headers_fixture.rb"
738
+ - "./spec/support/http_stub/html_view_excluding_a_stub_request.rb"
739
+ - "./spec/support/http_stub/html_view_including_a_stub_request.rb"
740
+ - "./spec/support/http_stub/port.rb"
791
741
  - "./spec/support/http_stub/selenium/browser.rb"
792
742
  - "./spec/support/http_stub/server/application/http_stub_rack_application_test.rb"
793
743
  - "./spec/support/http_stub/server/driver.rb"
794
744
  - "./spec/support/http_stub/server/memory_fixture.rb"
745
+ - "./spec/support/http_stub/server/request/sinatra_request_fixture.rb"
795
746
  - "./spec/support/http_stub/server/request_fixture.rb"
796
747
  - "./spec/support/http_stub/server/scenario_fixture.rb"
797
748
  - "./spec/support/http_stub/server/session_fixture.rb"
749
+ - "./spec/support/http_stub/server/silent_logger.rb"
750
+ - "./spec/support/http_stub/server/simple_request.rb"
798
751
  - "./spec/support/http_stub/server/stub/match/match_fixture.rb"
799
752
  - "./spec/support/http_stub/server/stub/match/miss_fixture.rb"
753
+ - "./spec/support/http_stub/server/stub/response/blocks_fixture.rb"
754
+ - "./spec/support/http_stub/server/stub/response/file_body_fixture.rb"
755
+ - "./spec/support/http_stub/server/stub/response/text_body_fixture.rb"
756
+ - "./spec/support/http_stub/server/stub/response_builder.rb"
757
+ - "./spec/support/http_stub/server/stub/response_fixture.rb"
758
+ - "./spec/support/http_stub/server/stub_fixture.rb"
800
759
  - "./spec/support/http_stub/server_integration.rb"
801
- - "./spec/support/http_stub/stub_fixture.rb"
802
- - "./spec/support/http_stub/stub_registrator.rb"
760
+ - "./spec/support/http_stub/stub_requester.rb"
803
761
  - "./spec/support/include_in_json.rb"
762
+ - "./spec/support/object_convertable_to_json.rb"
804
763
  - "./spec/support/rack/rack_application_test.rb"
805
764
  - "./spec/support/rack/request_fixture.rb"
806
765
  - "./spec/support/surpressed_output.rb"