Changelog History
Page 12
-
v1.8.5 Changes
π WebMock::RackResponse supports basic auth
Thanks to jugyo
-
v1.8.4 Changes
β Warning message is printed when an unsupported version of a http library is loaded.
Thanks to Alexander Staubo for reporting the problem and to Myron Marston for a help with solution.
-
v1.8.3 Changes
π Fixed compatibility with latest em-http-request
Thanks to Paul Cortens
-
v1.8.2 Changes
Prevent Webmock
hash_including
from overriding RSpec version 1hash_including
method.Thanks to Joe Karayusuf
Ensured WebMock handles RSpec 1
hash_including
matcher for matching query params and body.
-
v1.8.1 Changes
π Ensured WebMock doesn't interfere with
em-synchrony
, whenem-synchrony/em-http
is not included.Thanks to Nick Recobra
π Improved README
Thanks to Jordan Elver
-
v1.8.0 Changes
Matching request body against partial hash.
stub_http_request(:post, "www.example.com"). with(:body => hash_including({:data => {:a => '1', :b => 'five'}})) RestClient.post('www.example.com', "data[a]=1&data[b]=five&x=1", :content_type => 'application/x-www-form-urlencoded') # ===> Success request(:post, "www.example.com"). with(:body => hash_including({:data => {:a => '1', :b => 'five'}}), :headers => 'Content-Type' => 'application/json').should have_been_made # ===> Success
Thanks to Marnen Laibow-Koser for help with this solution
Matching request query params against partial hash.
stub_http_request(:get, "www.example.com").with(:query => hash_including({"a" => ["b", "c"]})) RestClient.get("http://www.example.com/?a[]=b&a[]=c&x=1") # ===> Success request(:get, "www.example.com"). with(:query => hash_including({"a" => ["b", "c"]})).should have_been_made # ===> Success
β Added support for Excon.
Thanks to Dimitrij Denissenko
β Added support for setting expectations on the request stub with
assert_requested
stub_get = stub_request(:get, "www.example.com") stub_post = stub_request(:post, "www.example.com") Net::HTTP.get('www.example.com', '/') assert_requested(stub_get) assert_not_requested(stub_post)
Thanks to Nicolas FouchΓ©
WebMock.disable_net_connect!
acceptsRegExp
as:allow
parameterThanks to Frank Schumacher
Ensure multiple values for the same header can be recorded and played back
Thanks to Myron Marston
β‘οΈ 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
π Fixed compatibility with Curb >= 0.7.16 This breaks compatibility with Curb < 0.7.16
π Fix #to_rack to handle non-array response bodies.
Thanks to Tammer Saleh
β Added
read_timeout
accessor to StubSocket which fixes compatibility with aws-sdkThanks to Lin Jen-Shin
π Fix warning "instance variable @query_params not initialized"
Thanks to Joe Van Dyk
Using bytesize of message instead of its length for content-length header in em-http-request adapter. This fixes a problem with messages getting truncated in Ruby >= 1.9
Thanks to Mark Abramov
π Fixed problem with body params being matched even if params were different.
Thanks to Evgeniy Dolzhenko for reporting this issue.
-
v1.7.10 Changes
- Yanked 1.7.9 and rebuilt gem on 1.8.7 to deal with syck/psych incompatibilties in gemspec.
-
v1.7.9 Changes
π Fixed support for native Typhoeus timeouts.
Thanks to Albert Llop
π Fixed problem with WebMock and RSpec compatibility on TeamCity servers. See this article for more details.
Thanks to Christopher Pickslay from Two Bit Labs
-
v1.7.8 Changes
- π Fix each adapter so that it calls a
stub.with
block only once per request. Previously, the block would be called two or three times per request Myron Marston.
- π Fix each adapter so that it calls a
-
v1.7.7 Changes
Passing response object to a block passed to
HTTPClient#do_get_block
. This fixesHTTPClient.get_content
failures. issue 130Thanks to Chris McGrath
β Cleaned up ruby warnings when running WebMock code with
-w
.Thanks to Stephen Celis
Curb adapter now correctly calls on_failure for 4xx response codes.
Thanks to Eugene Pimenov