acfs 1.7.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (237) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +144 -116
  3. data/README.md +19 -24
  4. data/acfs.gemspec +7 -10
  5. data/lib/acfs/collections/paginatable.rb +11 -11
  6. data/lib/acfs/configuration.rb +1 -1
  7. data/lib/acfs/errors.rb +6 -6
  8. data/lib/acfs/global.rb +2 -2
  9. data/lib/acfs/location.rb +1 -1
  10. data/lib/acfs/resource/attributes/uuid.rb +1 -1
  11. data/lib/acfs/resource/attributes.rb +1 -1
  12. data/lib/acfs/resource/dirty.rb +1 -1
  13. data/lib/acfs/resource/operational.rb +4 -4
  14. data/lib/acfs/resource/query_methods.rb +3 -3
  15. data/lib/acfs/response/status.rb +1 -1
  16. data/lib/acfs/service/middleware.rb +2 -2
  17. data/lib/acfs/singleton_resource.rb +2 -2
  18. data/lib/acfs/stub.rb +1 -1
  19. data/lib/acfs/version.rb +2 -2
  20. data/lib/acfs/yard.rb +1 -0
  21. data/spec/acfs/adapter/typhoeus_spec.rb +3 -3
  22. data/spec/acfs/configuration_spec.rb +1 -1
  23. data/spec/acfs/global_spec.rb +5 -5
  24. data/spec/acfs/location_spec.rb +1 -1
  25. data/spec/acfs/middleware/json_spec.rb +1 -1
  26. data/spec/acfs/middleware/message_pack_spec.rb +1 -1
  27. data/spec/acfs/operation_spec.rb +1 -1
  28. data/spec/acfs/resource/attributes/boolean_spec.rb +31 -31
  29. data/spec/acfs/resource/attributes/date_time_spec.rb +9 -9
  30. data/spec/acfs/resource/attributes/dict_spec.rb +10 -10
  31. data/spec/acfs/resource/attributes/float_spec.rb +11 -11
  32. data/spec/acfs/resource/attributes/integer_spec.rb +6 -6
  33. data/spec/acfs/resource/attributes/list_spec.rb +1 -1
  34. data/spec/acfs/resource/attributes/uuid_spec.rb +8 -8
  35. data/spec/acfs/resource/attributes_spec.rb +8 -8
  36. data/spec/acfs/resource/dirty_spec.rb +1 -1
  37. data/spec/acfs/resource/persistence_spec.rb +7 -7
  38. data/spec/acfs/resource/query_methods_spec.rb +1 -1
  39. data/spec/acfs/runner_spec.rb +12 -12
  40. data/spec/acfs/stub_spec.rb +13 -18
  41. data/spec/acfs_spec.rb +4 -4
  42. data/spec/spec_helper.rb +9 -5
  43. data/spec/support/hash.rb +1 -1
  44. data/vendor/bundle/ruby/3.4.0/bundler/gems/rubocop-config-67802c9d1826/LICENSE +21 -0
  45. data/vendor/bundle/ruby/3.4.0/bundler/gems/rubocop-config-67802c9d1826/README.md +23 -0
  46. data/vendor/bundle/ruby/3.4.0/bundler/gems/rubocop-config-67802c9d1826/rubocop-config.gemspec +31 -0
  47. data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.1/CHANGELOG.md +205 -0
  48. data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.1/MIT-LICENSE +21 -0
  49. data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.1/README.rdoc +57 -0
  50. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.1/CHANGELOG.md +67 -0
  51. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.1/MIT-LICENSE +21 -0
  52. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.1/README.rdoc +40 -0
  53. data/vendor/bundle/ruby/3.4.0/gems/activemodel-8.0.1/CHANGELOG.md +110 -0
  54. data/vendor/bundle/ruby/3.4.0/gems/activemodel-8.0.1/MIT-LICENSE +21 -0
  55. data/vendor/bundle/ruby/3.4.0/gems/activemodel-8.0.1/README.rdoc +266 -0
  56. data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/CHANGELOG.md +157 -0
  57. data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/MIT-LICENSE +20 -0
  58. data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/README.rdoc +40 -0
  59. data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/CHANGELOG.md +301 -0
  60. data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/LICENSE.txt +202 -0
  61. data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/README.md +121 -0
  62. data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/addressable.gemspec +28 -0
  63. data/vendor/bundle/ruby/3.4.0/gems/appraisal-2.5.0/MIT-LICENSE +21 -0
  64. data/vendor/bundle/ruby/3.4.0/gems/appraisal-2.5.0/README.md +243 -0
  65. data/vendor/bundle/ruby/3.4.0/gems/appraisal-2.5.0/appraisal.gemspec +29 -0
  66. data/vendor/bundle/ruby/3.4.0/gems/base64-0.2.0/LICENSE.txt +22 -0
  67. data/vendor/bundle/ruby/3.4.0/gems/base64-0.2.0/README.md +48 -0
  68. data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.0/README.md +138 -0
  69. data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.0/benchmark.gemspec +32 -0
  70. data/vendor/bundle/ruby/3.4.0/gems/bigdecimal-3.1.9/LICENSE +56 -0
  71. data/vendor/bundle/ruby/3.4.0/gems/bigdecimal-3.1.9/bigdecimal.gemspec +57 -0
  72. data/vendor/bundle/ruby/3.4.0/gems/builder-3.3.0/MIT-LICENSE +20 -0
  73. data/vendor/bundle/ruby/3.4.0/gems/builder-3.3.0/README.md +258 -0
  74. data/vendor/bundle/ruby/3.4.0/gems/builder-3.3.0/builder.gemspec +49 -0
  75. data/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/CHANGELOG.md +603 -0
  76. data/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/LICENSE.txt +21 -0
  77. data/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/README.md +407 -0
  78. data/vendor/bundle/ruby/3.4.0/gems/connection_pool-2.5.0/LICENSE +20 -0
  79. data/vendor/bundle/ruby/3.4.0/gems/connection_pool-2.5.0/README.md +167 -0
  80. data/vendor/bundle/ruby/3.4.0/gems/connection_pool-2.5.0/connection_pool.gemspec +24 -0
  81. data/vendor/bundle/ruby/3.4.0/gems/crack-1.0.0/LICENSE +20 -0
  82. data/vendor/bundle/ruby/3.4.0/gems/crack-1.0.0/README.md +43 -0
  83. data/vendor/bundle/ruby/3.4.0/gems/crass-1.0.6/LICENSE +18 -0
  84. data/vendor/bundle/ruby/3.4.0/gems/crass-1.0.6/README.md +192 -0
  85. data/vendor/bundle/ruby/3.4.0/gems/crass-1.0.6/crass.gemspec +31 -0
  86. data/vendor/bundle/ruby/3.4.0/gems/diff-lcs-1.5.1/License.md +41 -0
  87. data/vendor/bundle/ruby/3.4.0/gems/diff-lcs-1.5.1/README.rdoc +84 -0
  88. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.1/LICENSE.txt +22 -0
  89. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.1/drb.gemspec +41 -0
  90. data/vendor/bundle/ruby/3.4.0/gems/erubi-1.13.1/CHANGELOG +111 -0
  91. data/vendor/bundle/ruby/3.4.0/gems/erubi-1.13.1/MIT-LICENSE +21 -0
  92. data/vendor/bundle/ruby/3.4.0/gems/erubi-1.13.1/README.rdoc +151 -0
  93. data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/CHANGELOG.md +375 -0
  94. data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/LICENSE +20 -0
  95. data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/README.md +118 -0
  96. data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/ethon.gemspec +26 -0
  97. data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/CHANGELOG.md +465 -0
  98. data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/LICENSE +24 -0
  99. data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/LICENSE.SPECS +22 -0
  100. data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/README.md +137 -0
  101. data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/ffi.gemspec +42 -0
  102. data/vendor/bundle/ruby/3.4.0/gems/hashdiff-1.1.2/LICENSE +19 -0
  103. data/vendor/bundle/ruby/3.4.0/gems/hashdiff-1.1.2/README.md +298 -0
  104. data/vendor/bundle/ruby/3.4.0/gems/hashdiff-1.1.2/changelog.md +119 -0
  105. data/vendor/bundle/ruby/3.4.0/gems/hashdiff-1.1.2/hashdiff.gemspec +39 -0
  106. data/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.6/MIT-LICENSE +20 -0
  107. data/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.6/README.md +127 -0
  108. data/vendor/bundle/ruby/3.4.0/gems/json-2.9.1/README.md +195 -0
  109. data/vendor/bundle/ruby/3.4.0/gems/json-2.9.1/json.gemspec +64 -0
  110. data/vendor/bundle/ruby/3.4.0/gems/logger-1.6.5/README.md +104 -0
  111. data/vendor/bundle/ruby/3.4.0/gems/logger-1.6.5/logger.gemspec +28 -0
  112. data/vendor/bundle/ruby/3.4.0/gems/loofah-2.24.0/CHANGELOG.md +591 -0
  113. data/vendor/bundle/ruby/3.4.0/gems/loofah-2.24.0/MIT-LICENSE.txt +23 -0
  114. data/vendor/bundle/ruby/3.4.0/gems/loofah-2.24.0/README.md +410 -0
  115. data/vendor/bundle/ruby/3.4.0/gems/minitest-5.25.4/README.rdoc +835 -0
  116. data/vendor/bundle/ruby/3.4.0/gems/multi_json-1.15.0/CHANGELOG.md +275 -0
  117. data/vendor/bundle/ruby/3.4.0/gems/multi_json-1.15.0/LICENSE.md +20 -0
  118. data/vendor/bundle/ruby/3.4.0/gems/multi_json-1.15.0/README.md +121 -0
  119. data/vendor/bundle/ruby/3.4.0/gems/nokogiri-1.18.1-x86_64-linux-gnu/LICENSE-DEPENDENCIES.md +2224 -0
  120. data/vendor/bundle/ruby/3.4.0/gems/nokogiri-1.18.1-x86_64-linux-gnu/LICENSE.md +9 -0
  121. data/vendor/bundle/ruby/3.4.0/gems/nokogiri-1.18.1-x86_64-linux-gnu/README.md +293 -0
  122. data/vendor/bundle/ruby/3.4.0/gems/public_suffix-6.0.1/CHANGELOG.md +491 -0
  123. data/vendor/bundle/ruby/3.4.0/gems/public_suffix-6.0.1/LICENSE.txt +22 -0
  124. data/vendor/bundle/ruby/3.4.0/gems/public_suffix-6.0.1/README.md +222 -0
  125. data/vendor/bundle/ruby/3.4.0/gems/racc-1.8.1/ChangeLog +846 -0
  126. data/vendor/bundle/ruby/3.4.0/gems/racc-1.8.1/README.ja.rdoc +58 -0
  127. data/vendor/bundle/ruby/3.4.0/gems/racc-1.8.1/README.rdoc +60 -0
  128. data/vendor/bundle/ruby/3.4.0/gems/rack-3.1.8/CHANGELOG.md +998 -0
  129. data/vendor/bundle/ruby/3.4.0/gems/rack-3.1.8/MIT-LICENSE +20 -0
  130. data/vendor/bundle/ruby/3.4.0/gems/rack-3.1.8/README.md +328 -0
  131. data/vendor/bundle/ruby/3.4.0/gems/rack-session-2.1.0/license.md +72 -0
  132. data/vendor/bundle/ruby/3.4.0/gems/rack-session-2.1.0/readme.md +47 -0
  133. data/vendor/bundle/ruby/3.4.0/gems/rack-test-2.2.0/MIT-LICENSE.txt +20 -0
  134. data/vendor/bundle/ruby/3.4.0/gems/rack-test-2.2.0/README.md +139 -0
  135. data/vendor/bundle/ruby/3.4.0/gems/rails-dom-testing-2.2.0/MIT-LICENSE +23 -0
  136. data/vendor/bundle/ruby/3.4.0/gems/rails-dom-testing-2.2.0/README.md +91 -0
  137. data/vendor/bundle/ruby/3.4.0/gems/rails-html-sanitizer-1.6.2/CHANGELOG.md +255 -0
  138. data/vendor/bundle/ruby/3.4.0/gems/rails-html-sanitizer-1.6.2/MIT-LICENSE +23 -0
  139. data/vendor/bundle/ruby/3.4.0/gems/rails-html-sanitizer-1.6.2/README.md +267 -0
  140. data/vendor/bundle/ruby/3.4.0/gems/rake-13.2.1/MIT-LICENSE +21 -0
  141. data/vendor/bundle/ruby/3.4.0/gems/rake-13.2.1/README.rdoc +155 -0
  142. data/vendor/bundle/ruby/3.4.0/gems/rake-13.2.1/rake.gemspec +101 -0
  143. data/vendor/bundle/ruby/3.4.0/gems/rake-release-1.3.0/LICENSE +21 -0
  144. data/vendor/bundle/ruby/3.4.0/gems/rake-release-1.3.0/README.md +107 -0
  145. data/vendor/bundle/ruby/3.4.0/gems/rake-release-1.3.0/rake-release.gemspec +23 -0
  146. data/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.0/LICENSE.txt +22 -0
  147. data/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.0/README.md +57 -0
  148. data/vendor/bundle/ruby/3.4.0/gems/rspec-3.13.0/LICENSE.md +27 -0
  149. data/vendor/bundle/ruby/3.4.0/gems/rspec-3.13.0/README.md +47 -0
  150. data/vendor/bundle/ruby/3.4.0/gems/rspec-collection_matchers-1.2.1/Changelog.md +68 -0
  151. data/vendor/bundle/ruby/3.4.0/gems/rspec-collection_matchers-1.2.1/LICENSE.txt +27 -0
  152. data/vendor/bundle/ruby/3.4.0/gems/rspec-collection_matchers-1.2.1/README.md +76 -0
  153. data/vendor/bundle/ruby/3.4.0/gems/rspec-collection_matchers-1.2.1/rspec-collection_matchers.gemspec +33 -0
  154. data/vendor/bundle/ruby/3.4.0/gems/rspec-core-3.13.2/Changelog.md +2415 -0
  155. data/vendor/bundle/ruby/3.4.0/gems/rspec-core-3.13.2/LICENSE.md +26 -0
  156. data/vendor/bundle/ruby/3.4.0/gems/rspec-core-3.13.2/README.md +389 -0
  157. data/vendor/bundle/ruby/3.4.0/gems/rspec-expectations-3.13.3/Changelog.md +1352 -0
  158. data/vendor/bundle/ruby/3.4.0/gems/rspec-expectations-3.13.3/LICENSE.md +25 -0
  159. data/vendor/bundle/ruby/3.4.0/gems/rspec-expectations-3.13.3/README.md +326 -0
  160. data/vendor/bundle/ruby/3.4.0/gems/rspec-its-2.0.0/Changelog.md +73 -0
  161. data/vendor/bundle/ruby/3.4.0/gems/rspec-its-2.0.0/LICENSE.txt +27 -0
  162. data/vendor/bundle/ruby/3.4.0/gems/rspec-its-2.0.0/README.md +104 -0
  163. data/vendor/bundle/ruby/3.4.0/gems/rspec-its-2.0.0/rspec-its.gemspec +31 -0
  164. data/vendor/bundle/ruby/3.4.0/gems/rspec-mocks-3.13.2/Changelog.md +1299 -0
  165. data/vendor/bundle/ruby/3.4.0/gems/rspec-mocks-3.13.2/LICENSE.md +25 -0
  166. data/vendor/bundle/ruby/3.4.0/gems/rspec-mocks-3.13.2/README.md +465 -0
  167. data/vendor/bundle/ruby/3.4.0/gems/rspec-support-3.13.2/Changelog.md +408 -0
  168. data/vendor/bundle/ruby/3.4.0/gems/rspec-support-3.13.2/LICENSE.md +23 -0
  169. data/vendor/bundle/ruby/3.4.0/gems/rspec-support-3.13.2/README.md +40 -0
  170. data/vendor/bundle/ruby/3.4.0/gems/securerandom-0.4.1/README.md +72 -0
  171. data/vendor/bundle/ruby/3.4.0/gems/thor-1.3.2/LICENSE.md +20 -0
  172. data/vendor/bundle/ruby/3.4.0/gems/thor-1.3.2/README.md +45 -0
  173. data/vendor/bundle/ruby/3.4.0/gems/thor-1.3.2/thor.gemspec +33 -0
  174. data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/CHANGELOG.md +410 -0
  175. data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/LICENSE +22 -0
  176. data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/README.md +588 -0
  177. data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/typhoeus.gemspec +25 -0
  178. data/vendor/bundle/ruby/3.4.0/gems/tzinfo-2.0.6/LICENSE +19 -0
  179. data/vendor/bundle/ruby/3.4.0/gems/tzinfo-2.0.6/README.md +406 -0
  180. data/vendor/bundle/ruby/3.4.0/gems/uri-1.0.2/README.md +55 -0
  181. data/vendor/bundle/ruby/3.4.0/gems/useragent-0.16.11/LICENSE +20 -0
  182. data/vendor/bundle/ruby/3.4.0/gems/useragent-0.16.11/README.md +42 -0
  183. data/vendor/bundle/ruby/3.4.0/gems/webmock-3.24.0/CHANGELOG.md +2104 -0
  184. data/vendor/bundle/ruby/3.4.0/gems/webmock-3.24.0/LICENSE +20 -0
  185. data/vendor/bundle/ruby/3.4.0/gems/webmock-3.24.0/README.md +1222 -0
  186. data/vendor/bundle/ruby/3.4.0/specifications/actionpack-8.0.1.gemspec +36 -0
  187. data/vendor/bundle/ruby/3.4.0/specifications/actionview-8.0.1.gemspec +33 -0
  188. data/vendor/bundle/ruby/3.4.0/specifications/activemodel-8.0.1.gemspec +26 -0
  189. data/vendor/bundle/ruby/3.4.0/specifications/activesupport-8.0.1.gemspec +38 -0
  190. data/vendor/bundle/ruby/3.4.0/specifications/addressable-2.8.7.gemspec +30 -0
  191. data/vendor/bundle/ruby/3.4.0/specifications/appraisal-2.5.0.gemspec +31 -0
  192. data/vendor/bundle/ruby/3.4.0/specifications/base64-0.2.0.gemspec +23 -0
  193. data/vendor/bundle/ruby/3.4.0/specifications/benchmark-0.4.0.gemspec +23 -0
  194. data/vendor/bundle/ruby/3.4.0/specifications/bigdecimal-3.1.9.gemspec +25 -0
  195. data/vendor/bundle/ruby/3.4.0/specifications/builder-3.3.0.gemspec +22 -0
  196. data/vendor/bundle/ruby/3.4.0/specifications/concurrent-ruby-1.3.5.gemspec +24 -0
  197. data/vendor/bundle/ruby/3.4.0/specifications/connection_pool-2.5.0.gemspec +28 -0
  198. data/vendor/bundle/ruby/3.4.0/specifications/crack-1.0.0.gemspec +27 -0
  199. data/vendor/bundle/ruby/3.4.0/specifications/crass-1.0.6.gemspec +27 -0
  200. data/vendor/bundle/ruby/3.4.0/specifications/diff-lcs-1.5.1.gemspec +37 -0
  201. data/vendor/bundle/ruby/3.4.0/specifications/drb-2.2.1.gemspec +22 -0
  202. data/vendor/bundle/ruby/3.4.0/specifications/erubi-1.13.1.gemspec +29 -0
  203. data/vendor/bundle/ruby/3.4.0/specifications/ethon-0.16.0.gemspec +24 -0
  204. data/vendor/bundle/ruby/3.4.0/specifications/ffi-1.17.1-x86_64-linux-gnu.gemspec +31 -0
  205. data/vendor/bundle/ruby/3.4.0/specifications/hashdiff-1.1.2.gemspec +30 -0
  206. data/vendor/bundle/ruby/3.4.0/specifications/i18n-1.14.6.gemspec +27 -0
  207. data/vendor/bundle/ruby/3.4.0/specifications/json-2.9.1.gemspec +0 -0
  208. data/vendor/bundle/ruby/3.4.0/specifications/logger-1.6.5.gemspec +22 -0
  209. data/vendor/bundle/ruby/3.4.0/specifications/loofah-2.24.0.gemspec +27 -0
  210. data/vendor/bundle/ruby/3.4.0/specifications/minitest-5.25.4.gemspec +31 -0
  211. data/vendor/bundle/ruby/3.4.0/specifications/multi_json-1.15.0.gemspec +26 -0
  212. data/vendor/bundle/ruby/3.4.0/specifications/nokogiri-1.18.1-x86_64-linux-gnu.gemspec +31 -0
  213. data/vendor/bundle/ruby/3.4.0/specifications/public_suffix-6.0.1.gemspec +24 -0
  214. data/vendor/bundle/ruby/3.4.0/specifications/racc-1.8.1.gemspec +28 -0
  215. data/vendor/bundle/ruby/3.4.0/specifications/rack-3.1.8.gemspec +31 -0
  216. data/vendor/bundle/ruby/3.4.0/specifications/rack-session-2.1.0.gemspec +30 -0
  217. data/vendor/bundle/ruby/3.4.0/specifications/rack-test-2.2.0.gemspec +29 -0
  218. data/vendor/bundle/ruby/3.4.0/specifications/rails-dom-testing-2.2.0.gemspec +28 -0
  219. data/vendor/bundle/ruby/3.4.0/specifications/rails-html-sanitizer-1.6.2.gemspec +27 -0
  220. data/vendor/bundle/ruby/3.4.0/specifications/rake-13.2.1.gemspec +26 -0
  221. data/vendor/bundle/ruby/3.4.0/specifications/rake-release-1.3.0.gemspec +26 -0
  222. data/vendor/bundle/ruby/3.4.0/specifications/rexml-3.4.0.gemspec +25 -0
  223. data/vendor/bundle/ruby/3.4.0/specifications/rspec-3.13.0.gemspec +31 -0
  224. data/vendor/bundle/ruby/3.4.0/specifications/rspec-collection_matchers-1.2.1.gemspec +27 -0
  225. data/vendor/bundle/ruby/3.4.0/specifications/rspec-core-3.13.2.gemspec +39 -0
  226. data/vendor/bundle/ruby/3.4.0/specifications/rspec-expectations-3.13.3.gemspec +33 -0
  227. data/vendor/bundle/ruby/3.4.0/specifications/rspec-its-2.0.0.gemspec +27 -0
  228. data/vendor/bundle/ruby/3.4.0/specifications/rspec-mocks-3.13.2.gemspec +33 -0
  229. data/vendor/bundle/ruby/3.4.0/specifications/rspec-support-3.13.2.gemspec +29 -0
  230. data/vendor/bundle/ruby/3.4.0/specifications/securerandom-0.4.1.gemspec +23 -0
  231. data/vendor/bundle/ruby/3.4.0/specifications/thor-1.3.2.gemspec +28 -0
  232. data/vendor/bundle/ruby/3.4.0/specifications/typhoeus-1.4.1.gemspec +24 -0
  233. data/vendor/bundle/ruby/3.4.0/specifications/tzinfo-2.0.6.gemspec +30 -0
  234. data/vendor/bundle/ruby/3.4.0/specifications/uri-1.0.2.gemspec +23 -0
  235. data/vendor/bundle/ruby/3.4.0/specifications/useragent-0.16.11.gemspec +25 -0
  236. data/vendor/bundle/ruby/3.4.0/specifications/webmock-3.24.0.gemspec +45 -0
  237. metadata +204 -67
@@ -0,0 +1,2104 @@
1
+ # Changelog
2
+
3
+ # 3.24.0
4
+
5
+ * Ignore parsing errors when parsing invalid JSON or XML body to match against body pattern #1066
6
+
7
+ Thanks to [Christian Schmidt](https://github.com/c960657)
8
+
9
+ * Added support for mocked HTTP::Connection#finished_request? method #1065
10
+
11
+ Thanks to [Christian Schmidt](https://github.com/c960657)
12
+
13
+ * Detect if Patron is loaded by checking if Patron::Session constant is defined #1068
14
+
15
+ Thanks to [Rodrigo Argumedo](https://github.com/rodrigoargumedo)
16
+
17
+ * Raising an ArgumentError when uri is passed as a Pathname object to stub_request or request expectation declaration.
18
+
19
+ * Dropped support for em-http-request on Ruby 3.4. The current version of em-http-request (1.1.7) is incompatible with Ruby 3.4 due to an unresolved issue (https://github.com/igrigorik/em-http-request/issues/365). Support for em-http-request will be re-enabled once the compatibility issue is resolved.
20
+
21
+ Thanks to [Christian Schmidt](https://github.com/c960657)
22
+
23
+ # 3.23.1
24
+
25
+ * Added support for async-http version >= 0.65.0 [PR](https://github.com/bblimke/webmock/pull/1056)
26
+
27
+ Thanks to [Jacob Frautschi](https://github.com/jakeonfire)
28
+
29
+ # 3.23.0
30
+
31
+ * Fixed HTTP.rb adapter to support streaming real responses when WebMock is enabled.
32
+
33
+ Thanks to [Viacheslav Nepomniashchikh](https://github.com/aka-nez) for reporting and investigating this [issue](https://github.com/bblimke/webmock/issues/1017).
34
+
35
+ # 3.22.0
36
+
37
+ * Addressed an issue in the HTTPClient adapter where memoized stubbed responses and memoized request_signatures were incorrectly persisted between subsequent requests ([#1019](https://github.com/bblimke/webmock/issues/1019)). The implementation of a more robust thread-safety solution by [Tom Beauvais](https://github.com/tbeauvais) in [PR #300](https://github.com/bblimke/webmock/pull/300) not only resolved the memoization problem but also enhanced the overall thread safety of the adapter. This update ensures that stubbed responses and request signatures are correctly isolated to individual requests, improving both consistency and thread safety.
38
+
39
+ # 3.21.2
40
+
41
+ * Corrected type checking in `WebMock::Response#assert_valid_body!` to accurately recognize `Hash` objects. Additionally, improved the clarity of the error message for unsupported body types, guiding users towards proper usage.
42
+
43
+ Thanks to [Jake Robb](https://github.com/jakerobb) for reporting.
44
+
45
+ # 3.21.1
46
+
47
+ * The stubbed Net::HTTPResponse#uri now returns request.uri, aligning it with the behavior of an actual Net::HTTPResponse.
48
+
49
+ Thanks to [Abe Voelker](https://github.com/abevoelker) for reporting and to [Victor Maslov](https://github.com/Nakilon) and [Gio Lodi](https://github.com/mokagio) for the suggested solution.
50
+
51
+ # 3.21.0
52
+
53
+ * Don't use deprecated Rack::VERSION for Rack >= 3
54
+
55
+ Thanks to [Étienne Barrié](https://github.com/etiennebarrie)
56
+
57
+ * Updated HTTPClient adapter, to build request signature using the URI after filters have been applied.
58
+
59
+ Thanks to [Matt Brown](https://github.com/mattbnz)
60
+
61
+ # 3.20.0
62
+
63
+ * Optimised EmHttpRequestAdapter performance.
64
+
65
+ Thanks to [Ricardo Trindade](https://github.com/RicardoTrindade)
66
+
67
+ * Removed runtime dependency on base64.
68
+
69
+ Thanks to [Earlopain](https://github.com/Earlopain)
70
+
71
+ * Typhoeus::Response objects constructed from stubbed responses now have all timing attributes set to 0.0.
72
+
73
+ Thanks to [James Brown](https://github.com/Roguelazer)
74
+
75
+ * Optimised WebMock::Util::Headers by removing redundant freeze invocations.
76
+
77
+ Thanks to [Kazuhiro NISHIYAMA](https://github.com/znz)
78
+
79
+ * The default stubbed response body, which is an empty String, is unfrozen.
80
+
81
+ * When building signatures of requests made by http.rb, the request body encoding is now preserved.
82
+
83
+ # 3.19.1
84
+
85
+ * When passing a Proc or lambda as response body to `to_return_json`, the body is evaluated at the time of request and not at the time of `to_return_json` method invocation.
86
+
87
+ Thanks to [Jason Karns](https://github.com/jasonkarns) for reporting.
88
+
89
+ # 3.19.0
90
+
91
+ * Do not alter real (non-stubbed) request headers when handling em-http-request requests.
92
+
93
+ Thanks to [Yoann Lecuyer](https://github.com/ylecuyer)
94
+
95
+ * Fix matching stubs with HashExcludingMatcher
96
+
97
+ Thanks to [Lucas Arnaud](https://github.com/lucasarnaud)
98
+
99
+ * Remove development and test files from the gem package
100
+
101
+ Thanks to [Orien Madgwick](https://github.com/orien)
102
+
103
+ * Fix supported http client gem version checks.
104
+
105
+ Thanks to [Marc Rohloff](https://github.com/marcrohloff) and [Roman Stražanec](https://github.com/romanstrazanec)
106
+
107
+ * Non-string body passed to #to_return_json is now converted to JSON string.
108
+
109
+ Thanks to [inkstak](https://github.com/inkstak)
110
+
111
+ * `[::1]` is recognised as localhost e.g when passing `allow_localhost` option to `disable_net_connect!`
112
+
113
+ Thanks to [Yuki Inoue](https://github.com/Yuki-Inoue)
114
+
115
+ * Optimized `normalize_headers` for performance
116
+
117
+ Thanks to [Brandon Weaver](https://github.com/baweaver)
118
+
119
+ * Added Frozen string literal to files to optimise memory usage
120
+
121
+ Thanks to [Josh Nichols](https://github.com/technicalpickles)
122
+
123
+ # 3.18.1
124
+
125
+ * Reverted simplified connection handing in Net::HTTP adapter due to https://github.com/bblimke/webmock/issues/999
126
+
127
+ # 3.18.0
128
+
129
+ * Net::BufferedIO is not replaced anymore.
130
+
131
+ Thanks to [Ray Zane](https://github.com/rzane)
132
+
133
+ * Simplified connection handing in Net::HTTP adapter.
134
+
135
+ Thanks to [Ray Zane](https://github.com/rzane)
136
+
137
+ # 3.17.1
138
+
139
+ * Fixed Syntax Error
140
+
141
+ Thanks to [Mark Spangler](https://github.com/mspangler)
142
+
143
+ # 3.17.0
144
+
145
+ * Minimum required Ruby version is 2.3
146
+
147
+ Thanks to [Go Sueyoshi](https://github.com/sue445)
148
+
149
+ * When using Net::HTTP, stubbed socket StubSocket#close and StubSocket#closed? behave more like the real sockets.
150
+
151
+ Thanks to [Ray Zane](https://github.com/rzane)
152
+
153
+ * Added `peeraddr`, `ssl_version` and `cipher` methods to stubbed sockets used by Net::HTTP.
154
+
155
+ Thanks to [Ray Zane](https://github.com/rzane)
156
+
157
+ * Added support for matching top-level array in JSON request body.
158
+
159
+ E.g.
160
+
161
+ ````
162
+ stub_request(:post, 'www.example.com').with(body: [{a: 1}])
163
+ ````
164
+
165
+ Thanks to [Cedric Sohrauer](https://github.com/cedrics)
166
+
167
+ # 3.16.2
168
+
169
+ * Minimum required Ruby version is 2.0.
170
+
171
+ # 3.16.0 (yanked)
172
+
173
+ * Fix leaky file descriptors and reuse socket for persistent connections.
174
+
175
+ Thanks to [Ray Zane](https://github.com/rzane)
176
+
177
+ * Allow specifying for what URIs or hosts, Net::HTTP should connect on start.
178
+
179
+ Thanks to [Ray Zane](https://github.com/rzane)
180
+
181
+ # 3.15.2
182
+
183
+ * Minimum required Ruby version is 2.0.
184
+
185
+ # 3.15.0 (yanked)
186
+
187
+ * fixed async-http adapter on Windows
188
+
189
+ Thanks to [Pavel Rosický](https://github.com/ahorek)
190
+
191
+ * Support for http.rb >= 5.0.2
192
+
193
+ Thanks to [ojab](https://github.com/ojab)
194
+
195
+ * Curb adapter supports headers with `:` character in the header value
196
+
197
+ Thanks to [Giorgio Gambino](https://github.com/mrbuzz)
198
+
199
+ * Support for matching body of JSON or application/x-www-form-urlencoded requests with content type header including charset.
200
+
201
+ Thanks to [Timmitry](https://github.com/Timmitry)
202
+
203
+ * Prevent double-wrapping http.rb features on non-stubbed requests
204
+
205
+ Thanks to [Michael Fairley](https://github.com/michaelfairley)
206
+
207
+ # 3.14.0
208
+
209
+ * Bump Addressable from 2.3.6 to 2.8.0
210
+
211
+ Thanks to [Eduardo Hernandez](https://github.com/EduardoGHdez)
212
+
213
+ # 3.13.0
214
+
215
+ * Support http.rb 5.x
216
+
217
+ Thanks to [Will Storey](https://github.com/horgh)
218
+
219
+ # 3.12.2
220
+
221
+ * Fixed em-http-request adapter to avoid calling middleware twice.
222
+
223
+ Thanks to [Alex Vondrak](https://github.com/ajvondrak)
224
+
225
+ # 3.12.1
226
+
227
+ * Fixed handling of URIs with IPv6 addresses with square brackets when in Net::HTTP adapter.
228
+
229
+ Thanks to [Johanna Hartmann](https://github.com/JohannaHartmann)
230
+
231
+ # 3.12.0
232
+
233
+ * Added support for handling custom JSON and XML content types e.g. 'application/vnd.api+json'
234
+
235
+ # 3.11.3
236
+
237
+ * Fixed async-http adapter to only considered requests as real if they are real.
238
+
239
+ Thanks to [Tony Schneider](https://github.com/tonywok) and [Samuel Williams](https://github.com/ioquatix)
240
+
241
+ # 3.11.2
242
+
243
+ * Fix for Manticore streaming mode
244
+
245
+ Thanks to [Oleksiy Kovyrin](https://github.com/kovyrin)
246
+
247
+ # 3.11.1
248
+
249
+ * Compatibility with async-http 0.54+
250
+
251
+ Thanks to [Jun Jiang](https://github.com/jasl)
252
+
253
+ # 3.11.0
254
+
255
+ * Added support for `features` in http.rb adapter.
256
+
257
+ Thanks to [Carl (ce07c3)](https://github.com/ce07c3)
258
+
259
+ # 3.10.0
260
+
261
+ * Added option to global stubs to have lower priority than local stubs.
262
+
263
+ WebMock.globally_stub_request(:after_local_stubs) do
264
+ { body: "global stub body" }
265
+ end
266
+
267
+ stub_request(:get, "www.example.com").to_return(body: 'non-global stub body')
268
+
269
+ expect(http_request(:get, "http://www.example.com/").body).to eq("non-global stub body")
270
+
271
+ Thanks to [Marek Kasztelnik](https://github.com/mkasztelnik)
272
+
273
+ # 3.9.5
274
+
275
+ * Prevent overwriting `teardown` method in Test::Unit
276
+
277
+ Thanks to [Jesse Bowes](https://github.com/jessebs)
278
+
279
+ # 3.9.4
280
+
281
+ * More intuitive error message when stubbed response body was provided as Hash
282
+
283
+ Thanks to [Ben Koshy](https://github.com/BKSpurgeon)
284
+
285
+ # 3.9.3
286
+
287
+ * Make httpclient_adapter thread-safe
288
+
289
+ Thanks to [Adam Harwood](https://github.com/adam-harwood)
290
+
291
+ # 3.9.2
292
+
293
+ * Made global stubs thread-safe
294
+
295
+ Thanks to [Adam Harwood](https://github.com/adam-harwood)
296
+
297
+ # 3.9.1
298
+
299
+ * Fixed support for passing `URI` objects as second argument of `stub_request`
300
+
301
+ Thanks to [Ryan Kerr](https://github.com/leboshi)
302
+
303
+ ## 3.9.0
304
+
305
+ * Allow using a "callable" (like a proc) as URI pattern
306
+
307
+ stub_request(:any, ->(uri) { true })
308
+
309
+ Thanks to [John Hawthorn](https://github.com/jhawthorn)
310
+
311
+ * Added stubbed IO on stubbed socket in Net::HTTP adapter.
312
+
313
+ Thanks to [Thilo Rusche](https://github.com/trusche)
314
+
315
+ * When 'webmock/rspec' is required, reset WebMock after all after(:each/example) hooks
316
+
317
+ Thanks to [Andrew Stuntz](https://github.com/drews256)
318
+
319
+ * Fixed `net_connect_allowed?` when invoked with no arguments, when there were any allowed URIs passed to `disable_net_connect?`.
320
+
321
+ Thanks to [Lucas Uyezu](https://github.com/lucasuyezu)
322
+
323
+ * Fixed async-http adapter which caused Async::HTTP::Client or Async::HTTP::Internet to hang and never return a response.
324
+
325
+ Thanks to [Bruno Sutic](https://github.com/bruno-) and [Samuel Williams](https://github.com/ioquatix)
326
+
327
+ * Fixed warning when using async-http adapter
328
+
329
+ Thanks to [Bruno Sutic](https://github.com/bruno-)
330
+
331
+ * Dropped support for Ruby 2.3 - EOL date: 2019-03-31
332
+
333
+ * Dropped support for Ruby 2.4 - EOL date: 2020-03-31
334
+
335
+ * Handling matching of Addressable::Template patterns that have an ip address without port and patterns that have ip address and don’t have schema and path.
336
+
337
+ Thanks to [Rafael França](https://github.com/rafaelfranca) and [guppy0356](https://github.com/guppy0356)
338
+
339
+ ## 3.8.3
340
+
341
+ * Fixed problem introduced in version 3.4.2, which caused matching against Addressable::Template representing host part of the URI to raise an error.
342
+
343
+ Thanks to [Vesa Laakso](https://github.com/valscion)
344
+
345
+ ## 3.8.2
346
+
347
+ * Support correct encoding parameter for HTTP.rb 2.x and earlier
348
+
349
+ Thanks to [Alex Coomans](https://github.com/drcapulet)
350
+
351
+ ## 3.8.1
352
+
353
+ * Added support for mocking non-ASCII bodies when making requests with HTTP.rb
354
+
355
+ Thanks to [Patrik Ragnarsson](https://github.com/dentarg)
356
+
357
+ ## 3.8.0
358
+
359
+ * Fixed options handling when initialising Async::HTTP::Client
360
+
361
+ Thanks to [Samuel Williams](https://github.com/ioquatix)
362
+
363
+ * Ruby 2.7 support.
364
+
365
+ Thanks to [Ryan Davis](https://github.com/zenspider) and [Brandur](https://github.com/brandur)
366
+
367
+ ## 3.7.6
368
+
369
+ * Suppressed keyword argument warnings in Ruby 2.7 in async-http adapter.
370
+
371
+ Thanks to [Koichi ITO](https://github.com/koic)
372
+
373
+ ## 3.7.5
374
+
375
+ * Suppress Excon warning generated by extra key
376
+
377
+ Thanks to [Marco Costa](https://github.com/marcotc)
378
+
379
+ ## 3.7.4
380
+
381
+ * Resetting memoized response fields in Curb adapter.
382
+
383
+ Thanks to [Andrei Sidorov](https://github.com/heretge)
384
+
385
+ ## 3.7.3
386
+
387
+ * Fix for http.rb. Allow passing an output buffer to HTTP::Response::Body#readpartial
388
+
389
+ Thanks to [George Claghorn](https://github.com/georgeclaghorn)
390
+
391
+ * Fixed Manticore adapter to invoke Manticore failure handler on stubbed timeout
392
+
393
+ Thanks to [Alex Junger](https://github.com/alexJunger)
394
+
395
+ * Added project metadata to the gemspec
396
+
397
+ Thanks to [Orien Madgwick](https://github.com/orien)
398
+
399
+ ## 3.7.2
400
+
401
+ * Fixed handling of non UTF-8 encoded urls
402
+
403
+ Thanks to [Rafael França](https://github.com/rafaelfranca)
404
+
405
+ * Fixed "shadowing outer local variable" warning
406
+
407
+ Thanks to [y-yagi](https://github.com/y-yagi)
408
+
409
+ ## 3.7.1
410
+
411
+ * Fixed Async::HTTP::Client adapter code to not cause Ruby warning
412
+
413
+ Thanks to [y-yagi](https://github.com/y-yagi)
414
+
415
+ ## 3.7.0
416
+
417
+ * Support for Async::HTTP::Client
418
+
419
+ Thanks to [Andriy Yanko](https://github.com/ayanko)
420
+
421
+ ## 3.6.2
422
+
423
+ * Fixed Patron adapter to handle HTTP/2 status line.
424
+
425
+ Thanks to [Fábio D. Batista](https://github.com/fabiob)
426
+
427
+ ## 3.6.1
428
+
429
+ * Fixed issue with matching Addressable::Template without a period in the domain
430
+
431
+ Thanks to [Eike Send](https://github.com/eikes)
432
+
433
+ * Support for `write_timeout` in Net::HTTP
434
+
435
+ Thanks to [Claudio Poli](https://github.com/masterkain)
436
+
437
+ * Fixed issue with handling urls with ":80" or ":443" in the path.
438
+
439
+ Thanks to [Csaba Apagyi](https://github.com/thisismydesign) for reporting and to [Frederick Cheung](https://github.com/fcheung) for fixing the issue.
440
+
441
+ ## 3.6.0
442
+
443
+ * Compatibility with the latest version of hashdiff gem, with constant changed from HashDiff to Hashdiff
444
+
445
+ Thanks to [Jeff Felchner](https://github.com/jfelchner)
446
+
447
+ * Added a hint to the error message raised when `with` method is called without args or a block.
448
+
449
+ Thanks to [Adam Sokolnicki](https://github.com/asok)
450
+
451
+ * Resetting configured HTTP method in Curb adapter after each request
452
+
453
+ Thanks to [tiendo1011](https://github.com/tiendo1011)
454
+
455
+ * Added `WebMock.enable_net_connect!` as an alias for `WebMock.allow_net_connect!`
456
+ and `WebMock.disallow_net_connect!` as an alias for `WebMock.disable_net_connect!`
457
+
458
+ Thanks to [SoonKhen OwYong](https://github.com/owyongsk)
459
+
460
+ * Fixed handling of empty arrays as query params when using Faraday
461
+
462
+ Thanks to [Ryan Moret](https://github.com/rcmoret)
463
+
464
+ ## 3.5.1
465
+
466
+ * Disabling TracePoint defined in Net::BufferedIO in case of exception being raised.
467
+
468
+ Thanks to [Koichi Sasada](https://github.com/ko1)
469
+
470
+
471
+ ## 3.5.0
472
+
473
+ * Ruby 2.6.0 support
474
+
475
+ Thanks to [Arkadiy Tetelman](https://github.com/arkadiyt)
476
+
477
+ * Added `WebMock.reset_executed_requests!` method.
478
+
479
+ stub_get = stub_request(:get, "www.example.com")
480
+ Net::HTTP.get('www.example.com', '/')
481
+ WebMock::RequestRegistry.instance.times_executed(stub_get.request_pattern) # => 1
482
+ reset_executed_requests!
483
+ WebMock::RequestRegistry.instance.times_executed(stub_get.request_pattern) # => 0
484
+
485
+ Thanks to [Olia Kremmyda](https://github.com/oliakremmyda)
486
+
487
+ * Performance improvements
488
+
489
+ Thanks to [Pavel Rosický](https://github.com/ahorek)
490
+
491
+ ## 3.4.2
492
+
493
+ * Fixed `rbuf_fill` in Net::HTTP adapter to be thread-safe
494
+
495
+ Thanks to [Arkadiy Tetelman](https://github.com/arkadiyt)
496
+
497
+ * Fix invalid scheme error with Addressable::Template
498
+
499
+ Thanks to [Kazato Sugimoto](https://github.com/uiureo)
500
+
501
+ ## 3.4.1
502
+
503
+ * When comparing url encoded body to a body from request stub, which was declared as hash, only String, Numeric and boolean hash values are stringified before the comparison.
504
+
505
+ Thanks to [Lukas Pokorny](https://github.com/luk4s)
506
+
507
+ ## 3.4.0
508
+
509
+ * Ruby 2.6 support. Prevent `Net/ReadTimeout` error in Ruby 2.6
510
+
511
+ Thanks to [Koichi ITO](https://github.com/koic)
512
+
513
+ * Handling query params, which represent nested hashes with keys starting with non word characters.
514
+
515
+ Thanks to [rapides](https://github.com/rapides) for reporting the issue.
516
+
517
+ * Patron adapter handles PATCH requests with body.
518
+
519
+ Thanks to [Mattia](https://github.com/iMacTia) for reporting the issue.
520
+
521
+ * Allowing requests with url encoded body to be matched by request stubs declared with hash body with non-string values.
522
+
523
+ stub_request(:post, "www.example.com").with(body: {"a" => 1, "b" => false})
524
+
525
+ RestClient.post('www.example.com', 'a=1&b=false', :content_type => 'application/x-www-form-urlencoded') # ===> Success
526
+
527
+ Thanks to [Kenny Ortmann](https://github.com/yairgo) for suggesting this feature.
528
+
529
+ * When request headers contain 'Accept'=>'application/json' and no registered stub matches the request, WebMock prints a suggested stub code with to_return body set to '{}'.
530
+
531
+ Thanks to [redbar0n](https://github.com/redbar0n)
532
+
533
+ * Improved suggested stub output when the request stub only contains headers declaration.
534
+
535
+ Thanks to [Olia Kremmyda](https://github.com/oliakremmyda)
536
+
537
+ * Fixed Curb adapter to handle `reset` method.
538
+
539
+ Thanks tp [dinhhuydh](https://github.com/dinhhuydh) for reporting the issue.
540
+ Thanks to [Olia Kremmyda](https://github.com/oliakremmyda) for fixing it.
541
+
542
+
543
+ ## 3.3.0
544
+
545
+ * Better formatting of outputted request stub snippets, displayed on failures due to unstubbed requests.
546
+
547
+ Thanks to [Olia Kremmyda](https://github.com/oliakremmyda)
548
+
549
+
550
+ ## 3.2.1
551
+
552
+ * Fixed Ruby warning under Ruby 2.5
553
+
554
+ Thanks to [Matt Brictson](https://github.com/mattbrictson)
555
+
556
+
557
+ ## 3.2.0
558
+
559
+ * Automatically disable WebMock after Rspec suite
560
+
561
+ Thanks to [Michał Matyas](https://github.com/d4rky-pl)
562
+
563
+ * Fixed bug when handling redirection using Curb.
564
+
565
+ Thanks to [Olia Kremmyda](https://github.com/oliakremmyda)
566
+
567
+
568
+ ## 3.1.1
569
+
570
+ * Warning message is displayed only once when adding query params to URIAddressablePattern.
571
+
572
+ ## 3.1.0
573
+
574
+ * http.rb 3.0.0 compatibility
575
+
576
+ Thanks to [Piotr Boniecki](https://github.com/Bonias)
577
+
578
+ * Typhoeus 1.3.0 support
579
+
580
+ Thanks to [NARUSE, Yui](https://github.com/nurse)
581
+
582
+ * Added support for matching partial query params using hash_excluding
583
+
584
+ stub_request(:get, "www.example.com").
585
+ with(query: hash_excluding({"a" => "b"}))
586
+
587
+ RestClient.get("http://www.example.com/?a=b") # ===> Failure
588
+ RestClient.get("http://www.example.com/?a=c") # ===> Success
589
+
590
+ Thanks to [Olexandr Hoshylyk](https://github.com/Warrior109)
591
+
592
+ * Added MRI 2.3+ frozen string literal compatibility
593
+
594
+ Thanks to [Pat Allan](https://github.com/pat)
595
+
596
+ * Ensured that HTTPClient adapter does not yield block on empty response body if a block is provided
597
+
598
+ Thanks to [NARUSE, Yui](https://github.com/nurse)
599
+
600
+ * Fixed issue with `to_timeout` incorrectly raising `HTTP::ConnectionError` instead of `HTTP::TimeoutError` when using http.rb
601
+
602
+ Thanks to [Rick Song](https://github.com/RickCSong)
603
+
604
+ * Fixed problem with `response.connection.close` method being undefined when using http.rb
605
+
606
+ Thanks to [Janko Marohnić](https://github.com/janko-m)
607
+
608
+ * Fixed problem with matching Net::HTTP request header values assigned as numbers.
609
+
610
+ Thanks to [Felipe Constantino de Oliveira](https://github.com/felipecdo) for reporting the issue.
611
+
612
+ * Fixed problem with Net::HTTP adapter converting empty response body to nil for non 204 responses.
613
+
614
+ Thanks to [Jeffrey Charles](https://github.com/jeffcharles) for reporting the issue.
615
+
616
+
617
+ ## 3.0.1
618
+
619
+ * Suppressed \`warning: \`&' interpreted as argument prefix\`
620
+
621
+ Thanks to [Koichi ITO](https://github.com/koic)
622
+
623
+ ## 3.0.0
624
+
625
+ * Dropped support for Ruby 1.9.3
626
+
627
+ * Using Ruby >= 1.9 hash key syntax in stub suggestions
628
+
629
+ Thanks to [Tarmo Tänav](https://github.com/tarmo)
630
+
631
+ * Add at_least matchers for fakeweb-style expectations
632
+
633
+ Thanks to [Joe Marty](https://github.com/mltsy)
634
+
635
+ * Fix against "can't modify frozen String' error when Ruby option `frozen_string_literal` is enabled.
636
+
637
+ Thanks to [Chris Thomson](https://github.com/christhomson)
638
+
639
+ * Handling `read_timeout` option in Net::HTTP in Ruby >= 2.4
640
+
641
+ Thanks to [Christof Koenig](https://github.com/ckoenig)
642
+
643
+ * `RequestRegistry` fix for `RuntimeError - can't add a new key into hash during iteration`
644
+
645
+ Thanks to [Chung-Yi Chi](https://github.com/starsirius)
646
+
647
+ ## 2.3.2
648
+
649
+ * Restored support for Ruby 1.9.3 to comply with semantic versioning.
650
+
651
+ Thanks to [Jordan Harband](https://github.com/ljharb) for reporting the problem.
652
+
653
+ ## 2.3.1
654
+
655
+ * Added support for Ruby 2.4
656
+
657
+ Thanks to [Koichi ITO](https://github.com/koic)
658
+
659
+ * Dropped support for Ruby 1.9.3
660
+
661
+ ## 2.2.0
662
+
663
+ * Added `refute_requested` as an alias for `assert_not_requested`
664
+
665
+ Thanks to [Michael Grosser](https://github.com/grosser)
666
+
667
+ * Raising `Net::OpenTimeout` instead of `Timeout::Error` if available when a request stub is declared `to_timeout`
668
+
669
+ Thanks to [Gabe Martin-Dempesy](https://github.com/gabetax)
670
+
671
+ ## 2.1.1
672
+
673
+ * Added support for handling status messages in Excon responses.
674
+
675
+ Thanks to [Tero Marttila](https://github.com/SpComb) for reporting the issue.
676
+
677
+ ## 2.1.0
678
+
679
+ * Added support for `on_debug` callback in Curb.
680
+
681
+ Thanks to [Pavel Jurašek](https://github.com/pavel-jurasek-bcgdv-com)
682
+
683
+ * Added support for PATCH requests using Curb.
684
+
685
+ Thanks to [Pavel Jurašek](https://github.com/pavel-jurasek-bcgdv-com)
686
+
687
+ ## 2.0.3
688
+
689
+ * Handling headers passed as an Array to Curl::Easy
690
+
691
+ Thanks to [Chelsea](https://github.com/grosscr) for reporting the issue.
692
+
693
+ * Removed Ruby warnings.
694
+
695
+ Thanks to [Aaron Kromer](https://github.com/cupakromer)
696
+
697
+ ## 2.0.2
698
+
699
+ * Using `Base64.strict_encode64` instead of `Base64.encode64` to handle long user:pass basic auth credentials
700
+
701
+ Thanks to [Jonathan Schatz](https://github.com/modosc)
702
+
703
+ * Fixed handling of Authorisation header provided as string instead of array when using em-http-request.
704
+
705
+ Thanks to [Michael Richardson](https://github.com/TTransmit) for reporing the issue.
706
+
707
+ * Ensured `WebMock.net_connect_explicit_allowed?` always returns boolean.
708
+
709
+ Thanks tp [Jose Luis Honorato](https://github.com/jlhonora)
710
+
711
+ ## 2.0.1
712
+
713
+ * Added code responsible for loading em-http-request if available, which has been removed by mistake.
714
+
715
+ Thanks to [Vasiliy](https://github.com/304)
716
+
717
+ * WebMock loads "base64" if it's not yet loaded.
718
+
719
+ Thanks to [Taiki Ono](https://github.com/taiki45).
720
+
721
+ ## 2.0.0
722
+
723
+ * `require 'webmock'` does not enable WebMock anymore. `gem 'webmock'` can now be safely added to a Gemfile and no http client libs will be modified when it's loaded. Call `WebMock.enable!` to enable WebMock.
724
+
725
+ Please note that `require 'webmock/rspec'`, `require 'webmock/test_unit'`, `require 'webmock/minitest'` and `require 'webmock/cucumber'` still do enable WebMock.
726
+
727
+ * Dropped support for Ruby < 1.9.3
728
+
729
+ * Dropped support for em-http-request < 1.0.0
730
+
731
+ * WebMock 2.0 does not match basic authentication credentials in the userinfo part of the url, with credentials passed in `Authorization: Basic ...` header anymore.
732
+ It now treats the Authorization header and credentials in the userinfo part of a url as two completely separate attributes of a request.
733
+
734
+ The following stub declaration, which used to work in WebMock 1.x, is not going to work anymore
735
+
736
+ stub_request(:get, "user:pass@www.example.com")
737
+
738
+ Net::HTTP.start('www.example.com') do |http|
739
+ req = Net::HTTP::Get.new('/')
740
+ req.basic_auth 'user', 'pass'
741
+ http.request(req)
742
+ end # ===> Failure
743
+
744
+ In order to stub a request with basic authentication credentials provided in the Authorization header, please use the following code:
745
+
746
+ stub_request(:get, "www.example.com").with(basic_auth: ['user', 'pass'])
747
+
748
+ or
749
+
750
+ stub_request(:get, "www.example.com").
751
+ with(headers: 'Authorization' => "Basic #{ Base64.strict_encode64('user:pass').chomp}")
752
+
753
+ In order to stub a request with basic authentication credentials provided in the url, please use the following code:
754
+
755
+ stub_request(:get, "user:pass@www.example.com")
756
+
757
+ RestClient.get('user:pass@www.example.com') # ===> Success
758
+
759
+ ## 1.24.6
760
+
761
+ * Fixed issue with RUBY_VERSION comparison using old RubyGems.
762
+
763
+ Thanks to [Chris Griego](https://github.com/cgriego).
764
+
765
+ * Support for http.rb >= 2.0.0
766
+
767
+ ## 1.24.4
768
+
769
+ * Fixed the issue with parsing query to a hash with nested array i.e. `a[][b][]=one&a[][c][]=two`
770
+
771
+ Thanks to [Tim Diggins](https://github.com/timdiggins) for reporting the issue.
772
+ Thanks to [Cedric Pimenta](https://github.com/cedricpim) for finding the solution.
773
+
774
+ ## 1.24.3
775
+
776
+ * Allow Net:HTTP headers keys to be provided as symbols if `RUBY_VERSION` >= 2.3.0
777
+
778
+ Thanks to [Alex Kestner](https://github.com/akestner)
779
+
780
+ * Added a clear message on an attempt to match a multipart encoded request body.
781
+ WebMock doesn't support requests with multipart body... yet.
782
+
783
+ * `WebMock.disable_net_connect` `:allow` option, provided as regexp, matches https URIs correctly.
784
+
785
+ * `WebMock.disable_net_connect` `:allow` option can be set as a url string with scheme, host and port.
786
+
787
+ WebMock.disable_net_connect!(:allow => 'https://www.google.pl')
788
+
789
+ Thanks to [Gabriel Chaney](https://github.com/gabrieljoelc) for reporting the issue.
790
+
791
+ ## 1.24.2
792
+
793
+ * Improve parsing of params on request
794
+
795
+ Thanks to [Cedric Pimenta](https://github.com/cedricpim)
796
+
797
+ ## 1.24.1
798
+
799
+ * HTTPClient adapter supports reading basic authentication credentials directly from Authorization header.
800
+
801
+ Thanks to [Michiel Karnebeek](https://github.com/mkarnebeek)
802
+
803
+ ## 1.24.0
804
+
805
+ * Enabled support for Curb > 0.8.6
806
+
807
+ ## 1.23.0
808
+
809
+ * `WebMock.disable_net_connect` accepts `:allow` option with an object that responds to `#call`, receiving a `URI` object and returning a boolean:
810
+
811
+
812
+ denylist = ['google.com', 'facebook.com', 'apple.com']
813
+ allowed_sites = lambda{|uri|
814
+ denylist.none?{|site| uri.host.include?(site) }
815
+ }
816
+ WebMock.disable_net_connect!(:allow => allowed_sites)
817
+
818
+ RestClient.get('www.example.org', '/') # ===> Allowed
819
+ RestClient.get('www.facebook.com', '/') # ===> Failure
820
+ RestClient.get('apple.com', '/') # ===> Failure
821
+
822
+ Thanks to [Pablo Brasero](https://github.com/pablobm)
823
+
824
+ * Support for HTTPClient stream responses with body chunks
825
+
826
+ Thanks to [Cedric Pimenta](https://github.com/cedricpim)
827
+
828
+
829
+ ## 1.22.6
830
+
831
+ * Fixes [issue](https://github.com/bblimke/webmock/issues/568) around
832
+ WebMock restricting [Addressable](https://github.com/sporkmonger/addressable)
833
+ version, based on Ruby 1.8.7 for all versions of Ruby.
834
+
835
+ This change inverts that, and forces Ruby 1.8.7 users to specify in thier
836
+ Gemfile an Addressable version < 2.4.0.
837
+
838
+ Thanks to [PikachuEXE](https://github.com/PikachuEXE) and
839
+ [Matthew Rudy Jacobs](https://github.com/matthewrudy).
840
+
841
+ ## 1.22.5
842
+
843
+ * Fixes [bug](https://github.com/bblimke/webmock/issues/565) where WebMock tries
844
+ to alias a method that is deprecated in Ruby Versions > 1.9.2 ('sysread' for class 'StringIO')
845
+
846
+ Thanks to [Marcos Acosta](https://github.com/mmaa) for discovering this bug.
847
+
848
+ ## 1.22.4
849
+
850
+ * Adds support for JSONClient (a subclass of HTTPClient)
851
+
852
+ Thanks to [Andrew Kozin](https://github.com/nepalez)
853
+
854
+ * Adds support for Ruby 2.3.0
855
+
856
+ Thanks to [Charles Pence](https://github.com/cpence)
857
+
858
+ * Adds support for [http](https://github.com/httprb/http) versions >= 1.0.0
859
+
860
+ Thanks to [Alexey Zapparov](https://github.com/ixti)
861
+
862
+ * Fixes support for Ruby 1.8.7 by restrciting Addressable version < 2.4.0
863
+
864
+ Thanks to [Matthew Rudy Jacobs](https://github.com/matthewrudy)
865
+
866
+ ## 1.22.3
867
+
868
+ * Return "effective_url" attribute in Typhoeus::Response
869
+
870
+ Thanks to [Senya](https://github.com/cmrd-senya)
871
+
872
+ ## 1.22.2
873
+
874
+ * Fix: prevents adding an extra =true to urls with parameters without values
875
+
876
+ Thanks to [David Begin](https://github.com/davidbegin)
877
+
878
+ ## 1.22.1
879
+
880
+ * Adds Rack as a development dependency and removes require rack/utils in main lib.
881
+
882
+ Thanks to [Keenan Brock](https://github.com/kbrock)
883
+
884
+ ## 1.22.0
885
+
886
+ All the credit for preparing this release go to [David Begin](https://github.com/davidbegin)!
887
+
888
+ * Adds [Manticore](https://github.com/cheald/manticore) support.
889
+
890
+ Thanks to [Mike Knepper](https://github.com/mikeknep), [David Abdemoulaie](https://github.com/hobodave)
891
+
892
+ * Update to Show a hash diff for requests that have stubs with a body.
893
+
894
+ Thanks to [yurivm](https://github.com/yurivm)
895
+
896
+ * Update to mirror Net::HTTP handling of headers as symbols
897
+
898
+ * Update to ignore non-comparable-values error when sorting
899
+ query values, because sorting is just a convience.
900
+
901
+ Thanks to [Magne Land](https://github.com/magneland)
902
+
903
+ * Covert Boolean values to Strings when using them to define
904
+ the body of a request.
905
+
906
+ Thanks to [Krzysztof Rygielski](https://github.com/riggy)
907
+
908
+ * Fixes WebMock's parsing Multibyte characters
909
+
910
+ Thanks to [Zhao Wen](https://github.com/VincentZhao)
911
+
912
+ * Updates to be compatible with httpclient 2.6.0
913
+
914
+ * Converts keys from symbols to strings when for QueryMapper.to_query
915
+
916
+ Thanks to [Ramon Tayag](https://github.com/ramontayag)
917
+
918
+ * Restricts http.rb version to 0.7.3 for Ruby 1.8.7
919
+
920
+ * Fixes issue emulating em-http-request's handling of multiple requests.
921
+
922
+ Thanks to [Matt Palmer](https://github.com/mpalmer)
923
+
924
+ * WebMock requires only the necessary parts of crack to avoid pulling in safe_yaml
925
+
926
+ Thanks to [Johannes Schlumberger](https://github.com/spjsschl)
927
+
928
+ ## 1.21.0
929
+
930
+ * Support for http.rb >= 0.8.0
931
+
932
+ Thanks to [Zachary Anker](https://github.com/zanker), [Aleksey V. Zapparov](https://github.com/ixti)
933
+
934
+ * Support for http.rb 0.7.0
935
+
936
+ Thanks to [Mattias Putman](https://github.com/challengee)
937
+
938
+ * Added support for RSpec3-like `and_return`, `and_raise`, `and_timeout` syntax.
939
+
940
+ Thanks to [Franky Wahl](https://github.com/frankywahl)
941
+
942
+ * Restricted Curb support up to version 0.8.6. WebMock specs fail with Curb 0.8.7.
943
+
944
+ ## 1.20.4
945
+
946
+ * Fixed support for `hash_including` matcher in RSpec 3
947
+
948
+ ## 1.20.3
949
+
950
+ * `with` method raises error if provided without options hash and without block
951
+
952
+ * `with` and `to_return` raise an error if invoked with invalid keys in options hash.
953
+
954
+ ## 1.20.2
955
+
956
+ * WebMock provides a helpful error message if an incompatible object is given as response body.
957
+
958
+ Thanks to [Mark Lorenz](https://github.com/dapplebeforedawn)
959
+
960
+ ## 1.20.1
961
+
962
+ * `assert_requested` and `assert_not_requested` accept `at_least_times` and `at_most_times` options
963
+
964
+ Thanks to [Dan Buettner](https://github.com/Capncavedan)
965
+
966
+ * Silenced `instance variable undefined` warnings in Curb adapted.
967
+
968
+ Thanks to [Sven Riedel](https://github.com/sriedel)
969
+
970
+ ## 1.20.0
971
+
972
+ * Add support for on_missing callback of Curb::Easy
973
+
974
+ Thanks to [Tasos Stathopoulos](https://github.com/astathopoulos)
975
+
976
+ * Add at_least_times and at_most_times matchers
977
+
978
+ Thanks to [Dan Buettner](https://github.com/Capncavedan)
979
+
980
+ ## 1.19.0
981
+
982
+ * Fixed issue with Excon adapter giving warning message when redirects middleware was enabled.
983
+
984
+ Thanks to [Theo Hultberg](https://github.com/iconara) for reporting that.
985
+
986
+ * Fixed issue with `undefined method 'valid_request_keys' for Excon::Utils:Module`
987
+
988
+ Thanks to [Pablo Jairala](https://github.com/davidjairala)
989
+
990
+ * Fixed query mapper to encode `'one' => ['1','2']` as `'one[]=1&one[]=2'`.
991
+
992
+ Thanks to [Insoo Buzz Jung](https://github.com/insoul)
993
+
994
+ * Improved cookies support for em-http-request
995
+
996
+ Thanks to [Carlos Alonso Pérez](https://github.com/calonso)
997
+
998
+ * Fix HTTP Gem adapter to ensure uri attribute is set on response object.
999
+
1000
+ Thanks to [Aleksey V. Zapparov](https://github.com/ixti)
1001
+
1002
+ * Fixed HTTPClient adapter. The response header now receives `request_method`, `request_uri`, and `request_query` transferred from request header
1003
+
1004
+ Thanks to [trlorenz](https://github.com/trlorenz)
1005
+
1006
+ * Query mapper supports nested data structures i.e. `{"first" => [{"two" => [{"three" => "four"}, "five"]}]}`
1007
+
1008
+ Thanks to [Alexander Simonov](https://github.com/simonoff)
1009
+
1010
+ * Fixed compatibility with latest versions of Excon which don't define `VALID_REQUEST_KEYS` anymore.
1011
+
1012
+ Thanks to [Pablo Jairala](https://github.com/davidjairala)
1013
+
1014
+ * Request method is always a symbol is request signatures. This fixes the issue of WebMock not matching Typhoeus requests with request method defined as string.
1015
+
1016
+ Thanks to [Thorbjørn Hermanse](https://github.com/thhermansen)
1017
+
1018
+ * Stubbing instructions which are displayed when no matching stub is found, can be disabled with `Config.instance.show_stubbing_instructions = false`
1019
+
1020
+ Thanks to [Mark Lorenz](https://github.com/dapplebeforedawn)
1021
+
1022
+ * Notation used for mapping query strings to data structure can be configured i.e. `WebMock::Config.instance.query_values_notation = :subscript`. This allows setting `:flat_array` notation which supports duplicated parameter names in query string.
1023
+
1024
+ Thanks to [tjsousa](https://github.com/tjsousa)
1025
+
1026
+ ## 1.18.0
1027
+
1028
+ * Updated dependency on Addressable to versions >= 2.3.6
1029
+
1030
+ * Added support for matching uris using RFC 6570 (URI Templates)
1031
+
1032
+ uri_template = Addressable::Template.new "www.example.com/{id}/"
1033
+ stub_request(:any, uri_template)
1034
+
1035
+ Thanks to [Max Lincoln](https://github.com/maxlinc)
1036
+
1037
+ * Fixed content length calculation for Rack responses with UTF8 body
1038
+
1039
+ Thanks to [Oleg Gritsenko](https://github.com/Claster)
1040
+
1041
+ * Add missing Curl::Easy aliases
1042
+
1043
+ Thanks to [Hwan-Joon Choi](https://github.com/hc5duke)
1044
+
1045
+ * HTTP Gem >= 0.6.0 compatibility
1046
+
1047
+ Thanks to [Aleksey V. Zapparov](https://github.com/ixti)
1048
+
1049
+ * Minitest 4 and 5 compatibility.
1050
+
1051
+ Thanks to [SHIBATA Hiroshi](https://github.com/hsbt)
1052
+
1053
+ ## 1.17.4
1054
+
1055
+ * Update matchers for RSpec 3's matcher protocol
1056
+
1057
+ Thanks to [Rob Olson](https://github.com/robolson)
1058
+
1059
+ ## 1.17.3
1060
+
1061
+ * Fixed issue with Rack response removing 'Content-Type' header
1062
+
1063
+ Thanks to [Bo Jeanes](https://github.com/bjeanes) and [Matthew Conway](https://github.com/mattonrails)
1064
+
1065
+ ## 1.17.2
1066
+
1067
+ * Support for chunked responses in Curb
1068
+
1069
+ Thanks to [Zachary Belzer](https://github.com/zbelzer)
1070
+
1071
+ * Fixed handling of request body passed as a hash to `Typhoeus.post`
1072
+
1073
+ Thanks to [Mason Chang](https://github.com/changmason) for reporting.
1074
+
1075
+ ## 1.17.1
1076
+
1077
+ * Added missing license statements.
1078
+
1079
+ Thanks to [Praveen Arimbrathodiyil](https://github.com/pravi)
1080
+
1081
+ ## 1.17.0
1082
+
1083
+ * HTTP gem support!
1084
+
1085
+ Thanks to [Aleksey V. Zapparov](https://github.com/ixti)
1086
+
1087
+ * Limited Excon gem requirement to version < 0.30 until the compatibility with version > 0.30.0 is fixed.
1088
+
1089
+ Thanks to [Aleksey V. Zapparov](https://github.com/ixti)
1090
+
1091
+ * Fixed issue where empty query key caused a `TypeError`
1092
+
1093
+ Thanks to [Jon Rowe](https://github.com/JonRowe)
1094
+
1095
+ * Handling Typhoeus `on_headers` and `on_body` params.
1096
+
1097
+ Thanks to [Matt Burke](https://github.com/spraints)
1098
+
1099
+ ## 1.16.1
1100
+
1101
+ * Fixed "NameError: uninitialized constant WebMock::Response::Pathname" issue.
1102
+
1103
+ Thanks to [Alex Stupakow and Karen Wang](https://github.com/stupakov) for the fix.
1104
+
1105
+ ## 1.16.0
1106
+
1107
+ * Allow a Pathname to be passed as a Response body
1108
+
1109
+ stub_request(:get, /example.com/).to_return(
1110
+ body: Rails.root.join('test/fixtures/foo.txt')
1111
+ )
1112
+
1113
+ Thanks to [Ben Pickles](https://github.com/benpickles)
1114
+
1115
+ * `hash_including` matcher can be initialized with empty keys to match any values.
1116
+
1117
+ stub_request(:post, "www.example.com").with(:body => hash_including(:a, :b => {'c'}))
1118
+ RestClient.post('www.example.com', '{"a":"1","b":"c"}', :content_type => 'application/json')
1119
+
1120
+ Thanks to [Stefano Uliari](https://github.com/steookk)
1121
+
1122
+ ## 1.15.2
1123
+
1124
+ * Fixed `hash_including` to accept a splat of solitary keys.
1125
+
1126
+ Thanks to [Tamir Duberstein](https://github.com/tamird) and [https://github.com/strongriley](https://github.com/strongriley)
1127
+
1128
+ ## 1.15.0
1129
+
1130
+ * Excon >= 0.27.5 compatibility.
1131
+
1132
+ Thanks to [Brian D. Burns](https://github.com/burns)
1133
+
1134
+ ## 1.14.0
1135
+
1136
+ * Handling non UTF-8 characters in query params.
1137
+
1138
+ Thanks to [Florian Dütsch](https://github.com/der-flo) for reporting the issue.
1139
+
1140
+ * Added support for `request_block` param in Excon
1141
+
1142
+ Thanks to [Dmitry Gutov](https://github.com/dgutov) for reporting the issue.
1143
+
1144
+ * Fixed compatibility with latest Curb
1145
+
1146
+ Thanks to [Ian Lesperance](https://github.com/elliterate) and [Matthew Horan](https://github.com/mhoran)
1147
+
1148
+ * Triggering errbacks assynchronously in em-http-request adapter.
1149
+
1150
+ Thanks to [Ian Lesperance](https://github.com/elliterate) and [Matthew Horan](https://github.com/mhoran)
1151
+
1152
+ * Handling query params with a hashes nested inside arrays.
1153
+
1154
+ Thanks to [Ian Asaff](https://github.com/montague)
1155
+
1156
+ * Changed NetConnectNotAllowedError to inherit from Exception to allow it to bubble up into a test suite.
1157
+
1158
+ Thanks to [Daniel van Hoesel](https://github.com/s0meone)
1159
+
1160
+ * HTTPClient adapter is thread safe.
1161
+
1162
+ Thanks to [Tom Beauvais](https://github.com/tbeauvais)
1163
+
1164
+ ## 1.13.0
1165
+
1166
+ * Net::HTTP::Persistent compatibility.
1167
+ WebMock doesn't disconnect previously started connections upon a request anymore.
1168
+
1169
+
1170
+ ## 1.12.3
1171
+
1172
+ * Fixed issue with handling Addressable::URI with query params passed to `Net::HTTP.get_response`
1173
+
1174
+ Thanks to [Leif Bladt](https://github.com/leifbladt)
1175
+
1176
+ * Fixed HTTPClient adapter to not raise an error if a request with multipart body is executed.
1177
+
1178
+ ## 1.12.2
1179
+
1180
+ * Fixed issue with handling request.path when Addressable::URI is passed to #request instead of URI with Ruby 2.0.
1181
+
1182
+ Thanks to [Leif Bladt](https://github.com/leifbladt)
1183
+
1184
+ * Accept integers as query param values in request stubs
1185
+
1186
+ i.e. `stub_request(:get, /.*/).with(:query => {"a" => 1})`
1187
+
1188
+ Thanks to [Mitsutaka Mimura](https://github.com/takkanm)
1189
+
1190
+ ## 1.12.1
1191
+
1192
+ * Fixed Minitest < 5.0 compatibility
1193
+
1194
+ Thanks to [Alex Tomlins](https://github.com/alext) for reporting the issue.
1195
+
1196
+ ## 1.12.0
1197
+
1198
+ * Not using Gem spec anymore to check loaded Curb version.
1199
+
1200
+ * `WebMock.disable_net_connect!` now accepts array of regexps as allow param:
1201
+
1202
+ i.e. `WebMock.disable_net_connect!(:allow => [/google.com/, /yahoo.com/])`
1203
+
1204
+ Thanks to [Bastien Vaucher](https://github.com/bastien)
1205
+
1206
+ * Fixed `on_header` Curb callback behaviour in Curb adapter
1207
+
1208
+ Thanks to [Joel Chippindale](https://github.com/mocoso)
1209
+
1210
+ * Fixed aws-sdk compatibility with Ruby 2.0, by supporting `continue_timeout` accessor on Net::HTTP socket.
1211
+
1212
+ Thanks to [Lin Jen-Shin](https://github.com/godfat)
1213
+
1214
+ * Fixed WebMock::Server to not give "log writing failed. can't be called from trap context" warning with Ruby 2.0
1215
+
1216
+ Thanks to [Murahashi Sanemat Kenichi](https://github.com/sanemat)
1217
+
1218
+ * Added support for EM-HTTP-Request streaming data off disk feature.
1219
+
1220
+ Thanks to [Lin Jen-Shin](https://github.com/godfat)
1221
+
1222
+ * Added compatibility with Minitest 5
1223
+
1224
+ Thanks to [Tim Kurvers](https://github.com/timkurvers)
1225
+
1226
+ * Excon >= 0.22 compatibility.
1227
+
1228
+ * README has nice sytnax hightlighting and fixed code styling!
1229
+
1230
+ Thanks to [Ilya Vassilevsky](https://github.com/vassilevsky)
1231
+
1232
+ * Compatibility with Rails 4 `rack.session.options`
1233
+
1234
+ Thanks to [gotwalt](https://github.com/gotwalt)
1235
+
1236
+ ## 1.11.0
1237
+
1238
+ * Excon >= 0.17 support.
1239
+
1240
+ Thanks to [Nathan Sutton](https://github.com/nate) for reporting this issue and to [Wesley Beary](https://github.com/geemus) and [Myron Marston](https://github.com/myronmarston) for help.
1241
+
1242
+ ## 1.10.2
1243
+
1244
+ * '+' in request path is treated as plus, but in query params always as a space.
1245
+
1246
+ ## 1.10.1
1247
+
1248
+ * '+' in request body is still treated as a space. This fixes a bug introduced in previous version.
1249
+
1250
+ Thanks to [Erik Michaels-Ober](https://github.com/sferik) for reporting this problem.
1251
+
1252
+ * Fixed issue: response body declared as Proc was not evaluated again on subsequent requests.
1253
+
1254
+ Thanks to [Rick Fletcher](https://github.com/rfletcher) for reporting this issue.
1255
+
1256
+ ## 1.10.0
1257
+
1258
+ * '+' in query params is not treated as space anymore and is encoded as %2B
1259
+
1260
+ Thanks to [goblin](https://github.com/goblin) for reporting this issue.
1261
+
1262
+ * added `remove_request_stub` method to the api to allow removing unused stubs i.e.
1263
+
1264
+ stub_get = stub_request(:get, "www.example.com")
1265
+ remove_request_stub(stub_get)
1266
+
1267
+ * `assert_requested` and `assert_not_requested` raise an error if a stub object is provided together with a block.
1268
+
1269
+ ## 1.9.3
1270
+
1271
+ * Fixed issue with unavailable constant Mutex in Ruby < 1.9
1272
+
1273
+ Thanks to [Lucas Dohmen](https://github.com/moonglum) for reporting this issue.
1274
+
1275
+ ## 1.9.2
1276
+
1277
+ * Added support for Excon's :response_block parameter
1278
+
1279
+ Thanks to [Myron Marston](https://github.com/myronmarston) for reporting this issue.
1280
+
1281
+ ## 1.9.1
1282
+
1283
+ * Fix 'rack.errors' not being set for Rack apps
1284
+
1285
+ Thanks to [Alex Grant](https://github.com/grantovich)
1286
+
1287
+ * Added support for minitest assertions count
1288
+
1289
+ Thanks to [Mokevnin Kirill](https://github.com/mokevnin)
1290
+
1291
+ * Fixed issues with registering http requests in multi-threaded environments
1292
+
1293
+ Thanks to [Tom Beauvais](https://github.com/tbeauvais)
1294
+
1295
+ * Bumped Crack version to >=0.3.2
1296
+
1297
+ Thanks to [Jake Benilov](https://github.com/benilovj)
1298
+
1299
+ * Fixed issues in Typhoeus 0.6. Defaulted method to GET when no method specified.
1300
+
1301
+ Thanks to [Hans Hasselberg](https://github.com/i0rek)
1302
+
1303
+ * Add license information to the gemspec
1304
+
1305
+ Thanks to [Jordi Massaguer Pla](https://github.com/jordimassaguerpla) and [Murahashi Sanemat Kenichi](https://github.com/sanemat)
1306
+
1307
+ * Added support for :expects option in Excon adapter
1308
+
1309
+ Thanks to [Evgeniy Dolzhenko](https://github.com/dolzenko)
1310
+
1311
+ * Fixed Faye compatibility by treating StringIO in Net::HTTP adapter properly
1312
+
1313
+ Thanks to [Pavel Forkert](https://github.com/fxposter)
1314
+
1315
+ * Updated VCR link
1316
+
1317
+ Thanks to [Rex Feng](https://github.com/xta)
1318
+
1319
+ ## 1.9.0
1320
+
1321
+ * Added support for Typhoeus >= 0.5.0 and removed support for Typhoeus < 0.5.0.
1322
+
1323
+ Thanks to [Hans Hasselberg](https://github.com/i0rek)
1324
+
1325
+ ## 1.8.11
1326
+
1327
+ * Fix excon adapter to handle `:body => some_file_object`
1328
+
1329
+ Thanks to [Myron Marston](https://github.com/myronmarston)
1330
+
1331
+ ## 1.8.10
1332
+
1333
+ * em-http-request fix. After request callbacks are correctly invoked for 3xx responses,
1334
+ when :redirects option is set.
1335
+
1336
+ Thanks to [Myron Marston](https://github.com/myronmarston) for reporting that issue.
1337
+
1338
+ * Fixed compatibility with Net::HTTP::DigestAuth
1339
+
1340
+ Thanks to [Jonathan Hyman](https://github.com/jonhyman) for reporting that issue.
1341
+
1342
+ * Fixed problem in em-http-request 0.x appending the query to the client URI twice.
1343
+
1344
+ Thanks to [Paweł Pierzchała](https://github.com/wrozka)
1345
+
1346
+ ## 1.8.9
1347
+
1348
+ * Fixed problem with caching nil responses when the same HTTPClient instance is used.
1349
+
1350
+ Thanks to [Myron Marston](https://github.com/myronmarston)
1351
+
1352
+ * Added support for Addressable >= 2.3.0. Addressable 2.3.0 removed support for multiple query value notations and broke backwards compatibility.
1353
+
1354
+ https://github.com/sporkmonger/addressable/commit/f51e290b5f68a98293327a7da84eb9e2d5f21c62
1355
+ https://github.com/sporkmonger/addressable/issues/77
1356
+
1357
+
1358
+ ## 1.8.8
1359
+
1360
+ * Fixed Net::HTTP adapter so that it returns `nil` for an empty body response.
1361
+
1362
+ Thanks to [Myron Marston](https://github.com/myronmarston)
1363
+
1364
+ * Gemspec defines compatibility with Addressable ~> 2.2.8, not >= 2.3.0
1365
+
1366
+ * Specs compatibility with Typhoeus 0.4.0
1367
+
1368
+ Thanks to [Hans Hasselberg](https://github.com/i0rek)
1369
+
1370
+ * Handling content types that specify a charset
1371
+
1372
+ Thanks to [Kevin Glowacz](https://github.com/kjg)
1373
+
1374
+ * Fixed em-http-request adapter to correctly fetch authorization header from a request
1375
+
1376
+ Thanks to [Julien Boyer](https://github.com/chatgris)
1377
+
1378
+ * Fixing travis-ci image to report master's status
1379
+
1380
+ Thanks to [Ryan Schlesinger](https://github.com/ryansch)
1381
+
1382
+ * Fixed problem with em-http-request callback triggering if there were other EM::Deferred callbacks registered
1383
+
1384
+ Thanks to [Jon Leighton](https://github.com/jonleighton)
1385
+
1386
+ * Fixed problem with em-http-request appending the query to the URI a second time, and
1387
+ the parameters are repeated.
1388
+
1389
+ Thanks to [Jon Leighton](https://github.com/jonleighton)
1390
+
1391
+ ## 1.8.7
1392
+
1393
+ * Compatibility with RSpec >= 2.10
1394
+
1395
+ Thanks to [erwanlr](https://github.com/erwanlr) for reporting this issue.
1396
+
1397
+ * Add missing required rack environment variable SCRIPT_NAME
1398
+
1399
+ Thanks to [Eric Oestrich](https://github.com/oestrich)
1400
+
1401
+ * Fixed warnings due to @query_params not being initialized
1402
+
1403
+ Thanks to [Ben Bleything](https://github.com/bleything)
1404
+
1405
+ ## 1.8.6
1406
+
1407
+ * Pass through SERVER_PORT when stubbing to rack
1408
+
1409
+ Thanks to [Eric Oestrich](https://github.com/oestrich)
1410
+
1411
+ * Fixed problem with missing parenthesis in `WebMock#net_connect_allowed?` conditions.
1412
+
1413
+ Thanks to [aindustries](https://github.com/aindustries)
1414
+
1415
+ ## 1.8.5
1416
+
1417
+ * WebMock::RackResponse supports basic auth
1418
+
1419
+ Thanks to [jugyo](https://github.com/jugyo)
1420
+
1421
+ ## 1.8.4
1422
+
1423
+ * Warning message is printed when an unsupported version of a http library is loaded.
1424
+
1425
+ Thanks to [Alexander Staubo](https://github.com/alexstaubo) for reporting the problem and to [Myron Marston](https://github.com/myronmarston) for a help with solution.
1426
+
1427
+ ## 1.8.3
1428
+
1429
+ * Fixed compatibility with latest em-http-request
1430
+
1431
+ Thanks to [Paul Cortens](https://github.com/thoughtless)
1432
+
1433
+ ## 1.8.2
1434
+
1435
+ * Prevent Webmock `hash_including` from overriding RSpec version 1 `hash_including` method.
1436
+
1437
+ Thanks to [Joe Karayusuf](https://github.com/karayusuf)
1438
+
1439
+ * Ensured WebMock handles RSpec 1 `hash_including` matcher for matching query params and body.
1440
+
1441
+ ## 1.8.1
1442
+
1443
+ * Ensured WebMock doesn't interfere with `em-synchrony`, when `em-synchrony/em-http` is not included.
1444
+
1445
+ Thanks to [Nick Recobra](https://github.com/oruen)
1446
+
1447
+ * Improved README
1448
+
1449
+ Thanks to [Jordan Elver](https://github.com/jordelver)
1450
+
1451
+
1452
+ ## 1.8.0
1453
+
1454
+ * Matching request body against partial hash.
1455
+
1456
+ stub_http_request(:post, "www.example.com").
1457
+ with(:body => hash_including({:data => {:a => '1', :b => 'five'}}))
1458
+
1459
+ RestClient.post('www.example.com', "data[a]=1&data[b]=five&x=1",
1460
+ :content_type => 'application/x-www-form-urlencoded') # ===> Success
1461
+
1462
+ request(:post, "www.example.com").
1463
+ with(:body => hash_including({:data => {:a => '1', :b => 'five'}}),
1464
+ :headers => 'Content-Type' => 'application/json').should have_been_made # ===> Success
1465
+
1466
+ Thanks to [Marnen Laibow-Koser](https://github.com/marnen) for help with this solution
1467
+
1468
+ * Matching request query params against partial hash.
1469
+
1470
+ stub_http_request(:get, "www.example.com").with(:query => hash_including({"a" => ["b", "c"]}))
1471
+
1472
+ RestClient.get("http://www.example.com/?a[]=b&a[]=c&x=1") # ===> Success
1473
+
1474
+ request(:get, "www.example.com").
1475
+ with(:query => hash_including({"a" => ["b", "c"]})).should have_been_made # ===> Success
1476
+
1477
+ * Added support for Excon.
1478
+
1479
+ Thanks to [Dimitrij Denissenko](https://github.com/dim)
1480
+
1481
+ * Added support for setting expectations on the request stub with `assert_requested`
1482
+
1483
+ stub_get = stub_request(:get, "www.example.com")
1484
+ stub_post = stub_request(:post, "www.example.com")
1485
+
1486
+ Net::HTTP.get('www.example.com', '/')
1487
+
1488
+ assert_requested(stub_get)
1489
+ assert_not_requested(stub_post)
1490
+
1491
+ Thanks to [Nicolas Fouché](https://github.com/nfo)
1492
+
1493
+ * `WebMock.disable_net_connect!` accepts `RegExp` as `:allow` parameter
1494
+
1495
+ Thanks to [Frank Schumacher](https://github.com/thenoseman)
1496
+
1497
+ * Ensure multiple values for the same header can be recorded and played back
1498
+
1499
+ Thanks to [Myron Marston](https://github.com/myronmarston)
1500
+
1501
+ * Updated dependency on Addressable to version >= 2.2.7 to handle nested hash query values. I.e. `?one[two][three][]=four&one[two][three][]=five`
1502
+
1503
+ * Fixed compatibility with Curb >= 0.7.16 This breaks compatibility with Curb < 0.7.16
1504
+
1505
+ * Fix #to_rack to handle non-array response bodies.
1506
+
1507
+ Thanks to [Tammer Saleh](https://github.com/tsaleh)
1508
+
1509
+ * Added `read_timeout` accessor to StubSocket which fixes compatibility with aws-sdk
1510
+
1511
+ Thanks to [Lin Jen-Shin](https://github.com/godfat)
1512
+
1513
+ * Fix warning "instance variable @query_params not initialized"
1514
+
1515
+ Thanks to [Joe Van Dyk](https://github.com/joevandyk)
1516
+
1517
+ * Using bytesize of message instead of its length for content-length header in em-http-request adapter.
1518
+ This fixes a problem with messages getting truncated in Ruby >= 1.9
1519
+
1520
+ Thanks to [Mark Abramov](https://github.com/markiz)
1521
+
1522
+ * Fixed problem with body params being matched even if params were different.
1523
+
1524
+ Thanks to [Evgeniy Dolzhenko](https://github.com/dolzenko) for reporting this issue.
1525
+
1526
+ ## 1.7.10
1527
+
1528
+ * Yanked 1.7.9 and rebuilt gem on 1.8.7 to deal with syck/psych incompatibilties in gemspec.
1529
+
1530
+ ## 1.7.9
1531
+
1532
+ * Fixed support for native Typhoeus timeouts.
1533
+
1534
+ Thanks to [Albert Llop](https://github.com/mrsimo)
1535
+
1536
+ * Fixed problem with WebMock and RSpec compatibility on TeamCity servers. See [this article](http://www.coding4streetcred.com/blog/post/Issue-RubyMine-31-Webmock-162-and-%E2%80%9CSpecconfigure%E2%80%9D-curse.aspx) for more details.
1537
+
1538
+ Thanks to [Christopher Pickslay](https://github.com/chrispix) from [Two Bit Labs](https://github.com/twobitlabs)
1539
+
1540
+
1541
+ ## 1.7.8
1542
+
1543
+ * Fix each adapter so that it calls a `stub.with` block only once per
1544
+ request. Previously, the block would be called two or three times per
1545
+ request [Myron Marston](https://github.com/myronmarston).
1546
+
1547
+ ## 1.7.7 - RuPy 2011 release
1548
+
1549
+ * Passing response object to a block passed to `HTTPClient#do_get_block`. This fixes `HTTPClient.get_content` failures. [issue 130](https://github.com/bblimke/webmock/pull/130)
1550
+
1551
+ Thanks to [Chris McGrath](https://github.com/chrismcg)
1552
+
1553
+ * Cleaned up ruby warnings when running WebMock code with `-w`.
1554
+
1555
+ Thanks to [Stephen Celis](https://github.com/stephencelis)
1556
+
1557
+ * Curb adapter now correctly calls on_failure for 4xx response codes.
1558
+
1559
+ Thanks to [Eugene Pimenov](https://github.com/libc)
1560
+
1561
+ ## 1.7.6
1562
+
1563
+ * Support for the HTTPClient's request_filter feature
1564
+
1565
+ Thanks to [Roman Shterenzon](https://github.com/romanbsd)
1566
+
1567
+ ## 1.7.5
1568
+
1569
+ * Added support for Patron 0.4.15. This change is not backward compatible so please upgrade Patron to version >= 0.4.15 if you want to use it with WebMock.
1570
+
1571
+ Thanks to [Andreas Garnæs](https://github.com/andreas)
1572
+
1573
+ ## 1.7.4
1574
+
1575
+ * Added support for matching EM-HTTP-Request requests with body declared as a Hash
1576
+
1577
+ Thanks to [David Yeu](https://github.com/daveyeu)
1578
+
1579
+ ## 1.7.3
1580
+
1581
+ * Added `Get`, `Post`, `Delete`, `Put`, `Head`, `Option` constants to replaced `Net::HTTP` to make it possible to marshal objects with these constants assigned to properties. This fixed problem with `tvdb_party` gem which serializes HTTParty responses.
1582
+
1583
+ Thanks to [Klaus Hartl](https://github.com/carhartl) for reporting this issue.
1584
+
1585
+ ## 1.7.2
1586
+
1587
+ * Redefined `const_get` and `constants` methods on the replaced `Net::HTTP` to return same values as original `Net::HTTP`
1588
+
1589
+ ## 1.7.1
1590
+
1591
+ * Redefined `const_defined?` on the replaced `Net::HTTP` so that it returns true if constant is defined on the original `Net::HTTP`. This fixes problems with `"Net::HTTP::Get".constantize`.
1592
+
1593
+ Thanks to [Cássio Marques](https://github.com/cassiomarques) for reporting the issue and to [Myron Marston](https://github.com/myronmarston) for help with the solution.
1594
+
1595
+ ## 1.7.0
1596
+
1597
+ * Fixed Net::HTTP adapter to not break normal Net::HTTP behaviour when network connections are allowed. This fixes **selenium-webdriver compatibility**!!!
1598
+
1599
+ * Added support for EM-HTTP-Request 1.0.x and EM-Synchrony. Thanks to [Steve Hull](https://github.com/sdhull)
1600
+
1601
+ * Added support for setting expectations to on a stub itself i.e.
1602
+
1603
+ stub = stub_request(:get, "www.example.com")
1604
+ # ... make requests ...
1605
+ stub.should have_been_requested
1606
+
1607
+ Thanks to [Aidan Feldman](https://github.com/afeld)
1608
+
1609
+ * Minitest support! Thanks to [Peter Higgins](https://github.com/phiggins)
1610
+
1611
+ * Added support for Typhoeus::Hydra
1612
+
1613
+ * Added support for `Curb::Easy#http_post` and `Curb::Easy#http_post` with multiple arguments. Thanks to [Salvador Fuentes Jr](https://github.com/fuentesjr) and [Alex Rothenberg](https://github.com/alexrothenberg)
1614
+
1615
+ * Rack support. Requests can be stubbed to respond with a Rack app i.e.
1616
+
1617
+ class MyRackApp
1618
+ def self.call(env)
1619
+ [200, {}, ["Hello"]]
1620
+ end
1621
+ end
1622
+
1623
+ stub_request(:get, "www.example.com").to_rack(MyRackApp)
1624
+
1625
+ RestClient.get("www.example.com") # ===> "Hello"
1626
+
1627
+
1628
+ Thanks to [Jay Adkisson](https://github.com/jayferd)
1629
+
1630
+ * Added support for selective disabling and enabling of http lib adapters
1631
+
1632
+ WebMock.disable! #disable WebMock (all adapters)
1633
+ WebMock.disable!(:except => [:net_http]) #disable WebMock for all libs except Net::HTTP
1634
+ WebMock.enable! #enable WebMock (all adapters)
1635
+ WebMock.enable!(:except => [:patron]) #enable WebMock for all libs except Patron
1636
+
1637
+ * The error message on an unstubbed request shows a code snippet with body as a hash when it was in url encoded form.
1638
+
1639
+ > RestClient.post('www.example.com', "data[a]=1&data[b]=2", :content_type => 'application/x-www-form-urlencoded')
1640
+
1641
+ WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled....
1642
+
1643
+ You can stub this request with the following snippet:
1644
+
1645
+ stub_request(:post, "http://www.example.com/").
1646
+ with(:body => {"data"=>{"a"=>"1", "b"=>"2"}},
1647
+ :headers => { 'Content-Type'=>'application/x-www-form-urlencoded' }).
1648
+ to_return(:status => 200, :body => "", :headers => {})
1649
+
1650
+ Thanks to [Alex Rothenberg](https://github.com/alexrothenberg)
1651
+
1652
+ * The error message on an unstubbed request shows currently registered request stubs.
1653
+
1654
+ > stub_request(:get, "www.example.net")
1655
+ > stub_request(:get, "www.example.org")
1656
+ > RestClient.get("www.example.com")
1657
+ WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled....
1658
+
1659
+ You can stub this request with the following snippet:
1660
+
1661
+ stub_request(:get, "http://www.example.com/").
1662
+ to_return(:status => 200, :body => "", :headers => {})
1663
+
1664
+ registered request stubs:
1665
+
1666
+ stub_request(:get, "http://www.example.net/")
1667
+ stub_request(:get, "http://www.example.org/")
1668
+
1669
+ Thanks to [Lin Jen-Shin](https://github.com/godfat) for suggesting this feature.
1670
+
1671
+ * Fixed problem with matching requests with json body, when json strings have date format. Thanks to [Joakim Ekberg](https://github.com/kalasjocke) for reporting this issue.
1672
+
1673
+ * WebMock now attempts to require each http library before monkey patching it. This is to avoid problem when http library is required after WebMock is required. Thanks to [Myron Marston](https://github.com/myronmarston) for suggesting this change.
1674
+
1675
+ * External requests can be disabled while allowing selected ports on selected hosts
1676
+
1677
+ WebMock.disable_net_connect!(:allow => "www.example.com:8080")
1678
+ RestClient.get("www.example.com:80") # ===> Failure
1679
+ RestClient.get("www.example.com:8080") # ===> Allowed.
1680
+
1681
+ Thanks to [Zach Dennis](https://github.com/zdennis)
1682
+
1683
+ * Fixed syntax error in README examples, showing the ways of setting request expectations. Thanks to [Nikita Fedyashev](https://github.com/nfedyashev)
1684
+
1685
+
1686
+ **Many thanks to WebMock co-maintainer [James Conroy-Finn](https://github.com/jcf) who did a great job maintaining WebMock on his own for the last couple of months.**
1687
+
1688
+ ## 1.6.4
1689
+
1690
+ This is a quick slip release to regenerate the gemspec. Apparently
1691
+ jeweler inserts dependencies twice if you use the `gemspec` method in
1692
+ your Gemfile and declare gem dependencies in your gemspec.
1693
+
1694
+ https://github.com/technicalpickles/jeweler/issues/154
1695
+
1696
+ josevalim:
1697
+
1698
+ > This just bit me. I just released a gem with the wrong dependencies
1699
+ > because I have updated jeweler. This should have been opt-in,
1700
+ > otherwise a bunch of people using jeweler are going to release gems
1701
+ > with the wrong dependencies because you are automatically importing
1702
+ > from the Gemfile.
1703
+
1704
+ ## 1.6.3
1705
+
1706
+ * Update the dependency on addressable to get around an issue in v2.2.5.
1707
+ Thanks to [Peter Higgins](https://github.com/phiggins).
1708
+
1709
+ * Add support for matching parameter values using a regular expression
1710
+ as well as a string. Thanks to [Oleg M Prozorov](https://github.com/oleg).
1711
+
1712
+ * Fix integration with httpclient as the internal API has changed.
1713
+ Thanks to [Frank Prößdorf](https://github.com/endor).
1714
+
1715
+ * Ensure Curl::Easy#content_type is always set. Thanks to [Peter
1716
+ Higgins](https://github.com/phiggins).
1717
+
1718
+ * Fix bug with em-http-request adapter stubbing responses that have a
1719
+ chunked transfer encoding. Thanks to [Myron
1720
+ Marston](https://github.com/myronmarston).
1721
+
1722
+ * Fix a load of spec failures with Patron, httpclient, and specs that
1723
+ depended on the behaviour of example.com. Thanks to [Alex
1724
+ Grigorovich](https://github.com/grig).
1725
+
1726
+ ## 1.6.2
1727
+
1728
+ * Em-http-request adapter sets `last_effective_url` property. Thanks to [Sam Stokes](https://github.com/samstokes).
1729
+
1730
+ * Curb adapter supports `Curb::Easy#http_post` and `Curb::Easy#http_put` without arguments (by setting `post_body` or `put_data` beforehand). Thanks to [Eugene Bolshakov](https://github.com/eugenebolshakov)
1731
+
1732
+ ## 1.6.1
1733
+
1734
+ * Fixed issue with `webmock/rspec` which didn't load correctly if `rspec/core` was already required but `rspec/expectations` not.
1735
+
1736
+ ## 1.6.0
1737
+
1738
+ * Simplified integration with Test::Unit, RSpec and Cucumber. Now only a single file has to be required i.e.
1739
+
1740
+ require 'webmock/test_unit'
1741
+ require 'webmock/rspec'
1742
+ require 'webmock/cucumber'
1743
+
1744
+ * The error message on unstubbed request now contains code snippet which can be used to stub this request. Thanks to Martyn Loughran for suggesting this feature.
1745
+
1746
+ * The expectation failure message now contains a list of made requests. Thanks to Martyn Loughran for suggesting this feature.
1747
+
1748
+ * Added `WebMock.print_executed_requests` method which can be useful to find out what requests were made until a given point.
1749
+
1750
+ * em-http-request adapter is now activated by replacing EventMachine::HttpRequest constant, instead of monkeypatching the original class.
1751
+
1752
+ This technique is borrowed from em-http-request native mocking module. It allows switching WebMock adapter on an off, and using it interchangeably with em-http-request native mocking i.e:
1753
+
1754
+ EventMachine::WebMockHttpRequest.activate!
1755
+ EventMachine::WebMockHttpRequest.deactivate!
1756
+
1757
+ Thanks to Martyn Loughran for suggesting this feature.
1758
+
1759
+ * `WebMock.reset_webmock` is deprecated in favour of new `WebMock.reset!`
1760
+
1761
+ * Fixed integration with Cucumber. Previously documented example didn't work with new versions of Cucumber.
1762
+
1763
+ * Fixed stubbing requests with body declared as a hash. Thanks to Erik Michaels-Ober for reporting the issue.
1764
+
1765
+ * Fixed issue with em-http-request adapter which didn't work when :query option value was passed as a string, not a hash. Thanks to Chee Yeo for reporting the issue.
1766
+
1767
+ * Fixed problem with assert_requested which didn't work if used outside rspec or test/unit
1768
+
1769
+ * Removed dependency on json gem
1770
+
1771
+ ## 1.5.0
1772
+
1773
+ * Support for dynamically evaluated raw responses recorded with `curl -is` <br/>
1774
+ i.e.
1775
+
1776
+ `curl -is www.example.com > /tmp/www.example.com.txt`
1777
+ stub_request(:get, "www.example.com").to_return(lambda { |request| File.new("/tmp/#{request.uri.host.to_s}.txt" }))
1778
+
1779
+ * `:net_http_connect_on_start` option can be passed to `WebMock.allow_net_connect!` and `WebMock.disable_net_connect!` methods, i.e.
1780
+
1781
+ WebMock.allow_net_connect!(:net_http_connect_on_start => true)
1782
+
1783
+ This forces WebMock Net::HTTP adapter to always connect on `Net::HTTP.start`. Check 'Connecting on Net::HTTP.start' in README for more information.
1784
+
1785
+ Thanks to Alastair Brunton for reporting the issue and for fix suggestions.
1786
+
1787
+ * Fixed an issue where Patron spec tried to remove system temporary directory.
1788
+ Thanks to Hans de Graaff
1789
+
1790
+ * WebMock specs now use RSpec 2
1791
+
1792
+ * `rake spec NO_CONNECTION=true` can now be used to only run WebMock specs which do not make real network connections
1793
+
1794
+ ## 1.4.0
1795
+
1796
+ * Curb support!!! Thanks to the awesome work of Pete Higgins!
1797
+
1798
+ * `include WebMock` is now deprecated to avoid method and constant name conflicts. Please `include WebMock::API` instead.
1799
+
1800
+ * `WebMock::API#request` is renamed to `WebMock::API#a_request` to prevent method name conflicts with i.e. Rails controller specs.
1801
+ WebMock.request is still available.
1802
+
1803
+ * Deprecated `WebMock#request`, `WebMock#allow_net_connect!`, `WebMock#net_connect_allowed?`, `WebMock#registered_request?`, `WebMock#reset_callbacks`, `WebMock#after_request` instance methods. These methods are still available, but only as WebMock class methods.
1804
+
1805
+ * Removed `WebMock.response_for_request` and `WebMock.assertion_failure` which were only used internally and were not documented.
1806
+
1807
+ * :allow_localhost => true' now permits 0.0.0.0 in addition to 127.0.0.1 and 'localhost'. Thanks to Myron Marston and Mike Gehard for suggesting this.
1808
+
1809
+ * Fixed issue with both RSpec 1.x and 2.x being available.
1810
+
1811
+ WebMock now tries to use already loaded version of RSpec (1.x or 2.x). Previously it was loading RSpec 2.0 if available, even if RSpec 1.3 was already loaded.
1812
+
1813
+ Thanks to Hans de Graaff for reporting this.
1814
+
1815
+ * Changed runtime dependency on Addressable version 2.2.2 which fixes handling of percent-escaped '+'
1816
+
1817
+ ## 1.3.5
1818
+
1819
+ * External requests can be disabled while allowing selected hosts. Thanks to Charles Li and Ryan Bigg
1820
+
1821
+ This feature was available before only for localhost with `:allow_localhost => true`
1822
+
1823
+ WebMock.disable_net_connect!(:allow => "www.example.org")
1824
+
1825
+ Net::HTTP.get('www.something.com', '/') # ===> Failure
1826
+
1827
+ Net::HTTP.get('www.example.org', '/') # ===> Allowed.
1828
+
1829
+ * Fixed Net::HTTP adapter so that it preserves the original behavior of Net::HTTP.
1830
+
1831
+ When making a request with a block that calls #read_body on the request,
1832
+ Net::HTTP causes the body to be set to a Net::ReadAdapter, but WebMock was causing the body to be set to a string.
1833
+
1834
+ ## 1.3.4
1835
+
1836
+ * Fixed Net::HTTP adapter to handle cases where a block with `read_body` call is passed to `request`.
1837
+ This fixes compatibility with `open-uri`. Thanks to Mark Evans for reporting the issue.
1838
+
1839
+ ## 1.3.3
1840
+
1841
+ * Fixed handling of multiple values for the same response header for Net::HTTP. Thanks to Myron Marston for reporting the issue.
1842
+
1843
+ ## 1.3.2
1844
+
1845
+ * Fixed compatibility with EM-HTTP-Request >= 0.2.9. Thanks to Myron Marston for reporting the issue.
1846
+
1847
+ ## 1.3.1
1848
+
1849
+ * The less hacky way to get the stream behaviour working for em-http-request. Thanks to Martyn Loughran
1850
+
1851
+ * Fixed issues where Net::HTTP was not accepting valid nil response body. Thanks to Muness Alrubaie
1852
+
1853
+ ## 1.3.0
1854
+
1855
+ * Added support for [em-http-request](http://github.com/igrigorik/em-http-request)
1856
+
1857
+ * Matching query params using a hash
1858
+
1859
+ stub_http_request(:get, "www.example.com").with(:query => {"a" => ["b", "c"]})
1860
+
1861
+ RestClient.get("http://www.example.com/?a[]=b&a[]=c") # ===> Success
1862
+
1863
+ request(:get, "www.example.com").with(:query => {"a" => ["b", "c"]}).should have_been_made # ===> Success
1864
+
1865
+ * Matching request body against a hash. Body can be URL-Encoded, JSON or XML.
1866
+
1867
+ (Thanks to Steve Tooke for the idea and a solution for url-encoded bodies)
1868
+
1869
+ stub_http_request(:post, "www.example.com").
1870
+ with(:body => {:data => {:a => '1', :b => 'five'}})
1871
+
1872
+ RestClient.post('www.example.com', "data[a]=1&data[b]=five",
1873
+ :content_type => 'application/x-www-form-urlencoded') # ===> Success
1874
+
1875
+ RestClient.post('www.example.com', '{"data":{"a":"1","b":"five"}}',
1876
+ :content_type => 'application/json') # ===> Success
1877
+
1878
+ RestClient.post('www.example.com', '<data a="1" b="five" />',
1879
+ :content_type => 'application/xml' ) # ===> Success
1880
+
1881
+ request(:post, "www.example.com").
1882
+ with(:body => {:data => {:a => '1', :b => 'five'}},
1883
+ :headers => 'Content-Type' => 'application/json').should have_been_made # ===> Success
1884
+
1885
+ * Request callbacks (Thanks to Myron Marston for all suggestions)
1886
+
1887
+ WebMock can now invoke callbacks for stubbed or real requests:
1888
+
1889
+ WebMock.after_request do |request_signature, response|
1890
+ puts "Request #{request_signature} was made and #{response} was returned"
1891
+ end
1892
+
1893
+ invoke callbacks for real requests only and except requests made with Patron client
1894
+
1895
+ WebMock.after_request(:except => [:patron], :real_requests_only => true) do |request_signature, response|
1896
+ puts "Request #{request_signature} was made and #{response} was returned"
1897
+ end
1898
+
1899
+ * `to_raise()` now accepts an exception instance or a string as argument in addition to an exception class
1900
+
1901
+ stub_request(:any, 'www.example.net').to_raise(StandardError.new("some error"))
1902
+
1903
+ stub_request(:any, 'www.example.net').to_raise("some error")
1904
+
1905
+ * Matching requests based on a URI is 30% faster
1906
+
1907
+ * Fixed constant namespace issues in HTTPClient adapter. Thanks to Nathaniel Bibler for submitting a patch.
1908
+
1909
+ ## 1.2.2
1910
+
1911
+ * Fixed problem where ArgumentError was raised if query params were made up of an array e.g. data[]=a&data[]=b. Thanks to Steve Tooke
1912
+
1913
+ ## 1.2.1
1914
+
1915
+ * Changed license from GPL to MIT
1916
+
1917
+ * Fixed gemspec file. Thanks to Razic
1918
+
1919
+ ## 1.2.0
1920
+
1921
+ * RSpec 2 compatibility. Thanks to Sam Phillips!
1922
+
1923
+ * :allow_localhost => true' now permits 127.0.0.1 as well as 'localhost'. Thanks to Mack Earnhardt
1924
+
1925
+ * Request URI matching in now 2x faster!
1926
+
1927
+
1928
+ ## 1.1.0
1929
+
1930
+ * [VCR](http://github.com/myronmarston/vcr/) compatibility. Many thanks to Myron Marston for all suggestions.
1931
+
1932
+ * Support for stubbing requests and returning responses with multiple headers with the same name. i.e multiple Accept headers.
1933
+
1934
+ stub_http_request(:get, 'www.example.com').
1935
+ with(:headers => {'Accept' => ['image/png', 'image/jpeg']}).
1936
+ to_return(:body => 'abc')
1937
+ RestClient.get('www.example.com',
1938
+ {"Accept" => ['image/png', 'image/jpeg']}) # ===> "abc\n"
1939
+
1940
+ * When real net connections are disabled and unstubbed request is made, WebMock throws WebMock::NetConnectNotAllowedError instead of assertion error or StandardError.
1941
+
1942
+ * Added WebMock.version()
1943
+
1944
+
1945
+ ## 1.0.0
1946
+
1947
+ * Added support for [Patron](http://toland.github.com/patron/)
1948
+
1949
+ * Responses dynamically evaluated from block (idea and implementation by Tom Ward)
1950
+
1951
+ stub_request(:any, 'www.example.net').
1952
+ to_return { |request| {:body => request.body} }
1953
+
1954
+ RestClient.post('www.example.net', 'abc') # ===> "abc\n"
1955
+
1956
+ * Responses dynamically evaluated from lambda (idea and implementation by Tom Ward)
1957
+
1958
+ stub_request(:any, 'www.example.net').
1959
+ to_return(lambda { |request| {:body => request.body} })
1960
+
1961
+ RestClient.post('www.example.net', 'abc') # ===> "abc\n"
1962
+
1963
+ * Response with custom status message
1964
+
1965
+ stub_request(:any, "www.example.com").to_return(:status => [500, "Internal Server Error"])
1966
+
1967
+ req = Net::HTTP::Get.new("/")
1968
+ Net::HTTP.start("www.example.com") { |http| http.request(req) }.message # ===> "Internal Server Error"
1969
+
1970
+ * Raising timeout errors (suggested by Jeffrey Jones) (compatibility with Ruby 1.8.6 by Mack Earnhardt)
1971
+
1972
+ stub_request(:any, 'www.example.net').to_timeout
1973
+
1974
+ RestClient.post('www.example.net', 'abc') # ===> RestClient::RequestTimeout
1975
+
1976
+ * External requests can be disabled while allowing localhost (idea and implementation by Mack Earnhardt)
1977
+
1978
+ WebMock.disable_net_connect!(:allow_localhost => true)
1979
+
1980
+ Net::HTTP.get('www.something.com', '/') # ===> Failure
1981
+
1982
+ Net::HTTP.get('localhost:9887', '/') # ===> Allowed. Perhaps to Selenium?
1983
+
1984
+
1985
+ ### Bug fixes
1986
+
1987
+ * Fixed issue where Net::HTTP adapter didn't work for requests with body responding to read (reported by Tekin Suleyman)
1988
+ * Fixed issue where request stub with headers declared as nil was matching requests with non empty headers
1989
+
1990
+ ## 0.9.1
1991
+
1992
+ * Fixed issue where response status code was not read from raw (curl -is) responses
1993
+
1994
+ ## 0.9.0
1995
+
1996
+ * Matching requests against provided block (by Sergio Gil)
1997
+
1998
+ stub_request(:post, "www.example.com").with { |request| request.body == "abc" }.to_return(:body => "def")
1999
+ RestClient.post('www.example.com', 'abc') # ===> "def\n"
2000
+ request(:post, "www.example.com").with { |req| req.body == "abc" }.should have_been_made
2001
+ #or
2002
+ assert_requested(:post, "www.example.com") { |req| req.body == "abc" }
2003
+
2004
+ * Matching request body against regular expressions (suggested by Ben Pickles)
2005
+
2006
+ stub_request(:post, "www.example.com").with(:body => /^.*world$/).to_return(:body => "abc")
2007
+ RestClient.post('www.example.com', 'hello world') # ===> "abc\n"
2008
+
2009
+ * Matching request headers against regular expressions (suggested by Ben Pickles)
2010
+
2011
+ stub_request(:post, "www.example.com").with(:headers => {"Content-Type" => /image\/.+/}).to_return(:body => "abc")
2012
+ RestClient.post('www.example.com', '', {'Content-Type' => 'image/png'}) # ===> "abc\n"
2013
+
2014
+ * Replaying raw responses recorded with `curl -is`
2015
+
2016
+ `curl -is www.example.com > /tmp/example_curl_-is_output.txt`
2017
+ raw_response_file = File.new("/tmp/example_curl_-is_output.txt")
2018
+
2019
+ from file
2020
+
2021
+ stub_request(:get, "www.example.com").to_return(raw_response_file)
2022
+
2023
+ or string
2024
+
2025
+ stub_request(:get, "www.example.com").to_return(raw_response_file.read)
2026
+
2027
+ * Multiple responses for repeated requests
2028
+
2029
+ stub_request(:get, "www.example.com").to_return({:body => "abc"}, {:body => "def"})
2030
+ Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
2031
+ Net::HTTP.get('www.example.com', '/') # ===> "def\n"
2032
+
2033
+ * Multiple responses using chained `to_return()` or `to_raise()` declarations
2034
+
2035
+ stub_request(:get, "www.example.com").
2036
+ to_return({:body => "abc"}).then. #then() just is a syntactic sugar
2037
+ to_return({:body => "def"}).then.
2038
+ to_raise(MyException)
2039
+ Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
2040
+ Net::HTTP.get('www.example.com', '/') # ===> "def\n"
2041
+ Net::HTTP.get('www.example.com', '/') # ===> MyException raised
2042
+
2043
+ * Specifying number of times given response should be returned
2044
+
2045
+ stub_request(:get, "www.example.com").
2046
+ to_return({:body => "abc"}).times(2).then.
2047
+ to_return({:body => "def"})
2048
+
2049
+ Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
2050
+ Net::HTTP.get('www.example.com', '/') # ===> "abc\n"
2051
+ Net::HTTP.get('www.example.com', '/') # ===> "def\n"
2052
+
2053
+ * Added support for `Net::HTTP::Post#body_stream`
2054
+
2055
+ This fixes compatibility with new versions of RestClient
2056
+
2057
+ * WebMock doesn't suppress default request headers added by http clients anymore.
2058
+
2059
+ i.e. Net::HTTP adds `'Accept'=>'*/*'` to all requests by default
2060
+
2061
+
2062
+
2063
+ ## 0.8.2
2064
+
2065
+ * Fixed issue where WebMock was not closing IO object passed as response body after reading it.
2066
+ * Ruby 1.9.2 compat: Use `File#expand_path` for require path because "." is not be included in LOAD_PATH since Ruby 1.9.2
2067
+
2068
+
2069
+ ## 0.8.1
2070
+
2071
+ * Fixed HTTPClient adapter compatibility with Ruby 1.8.6 (reported by Piotr Usewicz)
2072
+ * Net:HTTP adapter now handles request body assigned as Net::HTTP::Post#body attribute (fixed by Mack Earnhardt)
2073
+ * Fixed issue where requests were not matching stubs with Accept header set.(reported by Piotr Usewicz)
2074
+ * Fixed compatibility with Ruby 1.9.1, 1.9.2 and JRuby 1.3.1 (reported by Diego E. “Flameeyes” Pettenò)
2075
+ * Fixed issue with response body declared as IO object and multiple requests (reported by Niels Meersschaert)
2076
+ * Fixed "undefined method `assertion_failure'" error (reported by Nick Plante)
2077
+
2078
+
2079
+ ## 0.8.0
2080
+
2081
+ * Support for HTTPClient (sync and async requests)
2082
+ * Support for dynamic responses. Response body and headers can be now declared as lambda.
2083
+ (Thanks to Ivan Vega ( @ivanyv ) for suggesting this feature)
2084
+ * Support for stubbing and expecting requests with empty body
2085
+ * Executing non-stubbed request leads to failed expectation instead of error
2086
+
2087
+
2088
+ ### Bug fixes
2089
+
2090
+ * Basic authentication now works correctly
2091
+ * Fixed problem where WebMock didn't call a block with the response when block was provided
2092
+ * Fixed problem where uris with single slash were not matching uris without path provided
2093
+
2094
+
2095
+ ## 0.7.3
2096
+
2097
+ * Clarified documentation
2098
+ * Fixed some issues with loading of Webmock classes
2099
+ * Test::Unit and RSpec adapters have to be required separately
2100
+
2101
+
2102
+ ## 0.7.2
2103
+
2104
+ * Added support for matching escaped and non escaped URLs