logstash-output-scalyr 0.1.10.beta → 0.1.11.beta

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