All Versions
152
Latest Version
Avg Release Cycle
21 days
Latest Release
-

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 1 hash_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, when em-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! accepts RegExp as :allow parameter

      Thanks 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-sdk

      Thanks 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

  • 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.
  • v1.7.7 Changes

    • Passing response object to a block passed to HTTPClient#do_get_block. This fixes HTTPClient.get_content failures. issue 130

      Thanks 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