All Versions
Latest Version
Avg Release Cycle
21 days
Latest Release

Changelog History
Page 13

  • v1.7.6 Changes

    • πŸ‘Œ Support for the HTTPClient's request_filter feature

    Thanks to Roman Shterenzon

  • v1.7.5 Changes

    • βž• 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.

    Thanks to Andreas Garnæs

  • v1.7.4 Changes

    • βž• Added support for matching EM-HTTP-Request requests with body declared as a Hash

    Thanks to David Yeu

  • v1.7.3 Changes

    • βž• 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.

    Thanks to Klaus Hartl for reporting this issue.

  • v1.7.2 Changes

    • Redefined const_get and constants methods on the replaced Net::HTTP to return same values as original Net::HTTP
  • v1.7.1 Changes

    • πŸ›  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.

    Thanks to CΓ‘ssio Marques for reporting the issue and to Myron Marston for help with the solution.

  • v1.7.0 Changes

    • Fixed Net::HTTP adapter to not break normal Net::HTTP behaviour when network connections are allowed. This fixes selenium-webdriver compatibility!!!

    • βž• Added support for EM-HTTP-Request 1.0.x and EM-Synchrony. Thanks to Steve Hull

    • βž• Added support for setting expectations to on a stub itself i.e.

      stub = stub_request(:get, "")
      # ... make requests ...
      stub.should have_been_requested

    Thanks to Aidan Feldman

    • βœ… Minitest support! Thanks to Peter Higgins

    • βž• Added support for Typhoeus::Hydra

    • Added support for Curb::Easy#http_post and Curb::Easy#http_post with multiple arguments. Thanks to Salvador Fuentes Jr and Alex Rothenberg

    • πŸ‘ Rack support. Requests can be stubbed to respond with a Rack app i.e.

      class MyRackApp
          [200, {}, ["Hello"]]
      stub_request(:get, "").to_rack(MyRackApp)
      RestClient.get("") # ===> "Hello"

      Thanks to Jay Adkisson

    • βž• Added support for selective disabling and enabling of http lib adapters

      WebMock.disable!                         #disable WebMock (all adapters)
      WebMock.disable!(:except => [:net_http]) #disable WebMock for all libs except Net::HTTP
      WebMock.enable!                          #enable WebMock (all adapters)
      WebMock.enable!(:except => [:patron])    #enable WebMock for all libs except Patron
    • The error message on an unstubbed request shows a code snippet with body as a hash when it was in url encoded form.

      >'', "data[a]=1&data[b]=2", :content_type => 'application/x-www-form-urlencoded')
      WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled....
      You can stub this request with the following snippet:
      stub_request(:post, "").
        with(:body => {"data"=>{"a"=>"1", "b"=>"2"}},
             :headers => { 'Content-Type'=>'application/x-www-form-urlencoded' }).
        to_return(:status => 200, :body => "", :headers => {})

      Thanks to Alex Rothenberg

    • The error message on an unstubbed request shows currently registered request stubs.

      > stub_request(:get, "")
      > stub_request(:get, "")
      > RestClient.get("")
      WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled....
      You can stub this request with the following snippet:
      stub_request(:get, "").
        to_return(:status => 200, :body => "", :headers => {})
      registered request stubs:
      stub_request(:get, "")
      stub_request(:get, "")

      Thanks to Lin Jen-Shin for suggesting this feature.

    • πŸ›  Fixed problem with matching requests with json body, when json strings have date format. Thanks to Joakim Ekberg for reporting this issue.

    • 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 for suggesting this change.

    • External requests can be disabled while allowing selected ports on selected hosts

      WebMock.disable_net_connect!(:allow => "")
      RestClient.get("") # ===> Failure
      RestClient.get("")  # ===> Allowed.

      Thanks to Zach Dennis

    • πŸ›  Fixed syntax error in README examples, showing the ways of setting request expectations. Thanks to Nikita Fedyashev

    πŸ‘· Many thanks to WebMock co-maintainer James Conroy-Finn who did a great job maintaining WebMock on his own for the last couple of months.

  • v1.6.4 Changes

    πŸš€ This is a quick slip release to regenerate the gemspec. Apparently jeweler inserts dependencies twice if you use the gemspec method in your Gemfile and declare gem dependencies in your gemspec.


    πŸš€ > This just bit me. I just released a gem with the wrong dependencies ⚑️ > because I have updated jeweler. This should have been opt-in, πŸš€ > otherwise a bunch of people using jeweler are going to release gems

    with the wrong dependencies because you are automatically importing from the Gemfile.

  • v1.6.3 Changes

    • ⚑️ Update the dependency on addressable to get around an issue in v2.2.5. Thanks to Peter Higgins.

    • βž• Add support for matching parameter values using a regular expression as well as a string. Thanks to Oleg M Prozorov.

    • πŸ›  Fix integration with httpclient as the internal API has changed. Thanks to Frank Prâßdorf.

    • Ensure Curl::Easy#content_type is always set. Thanks to Peter Higgins.

    • πŸ›  Fix bug with em-http-request adapter stubbing responses that have a chunked transfer encoding. Thanks to Myron Marston.

    • πŸ›  Fix a load of spec failures with Patron, httpclient, and specs that depended on the behaviour of Thanks to Alex Grigorovich.

  • v1.6.2 Changes

    • Em-http-request adapter sets last_effective_url property. Thanks to Sam Stokes.

    • 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