Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
Commits on Jul 04, 2010
@myronmarston Use the --debugger option rather than starting the debugger manually. 30f5c5d
Commits on Jul 05, 2010
@myronmarston Use bundler to manage gem dependencies. bca4e49
Commits on Jul 06, 2010
@myronmarston Silence WEBrick logging. 5c29c88
@myronmarston Disable the --debugger option for jruby since ruby-debug can't be ins…
…talled on jruby.
@myronmarston The current version of rack (1.2.1) does not work on ruby 1.8.6, so l…
…ock the dependency to 1.2.0.
@myronmarston Ensure the response body is serialized as a raw string, without any e…
…xtensions on the string instance.

This is needed for rest-client.  Closes #4.
@myronmarston Add conditional check so we don't get an exception for a nil body. 1678b3f
@myronmarston Removed check_dependencies rake task. It's no longer necessary with b…
@myronmarston 1.0.2 release. e13d215
Commits on Jul 22, 2010
@myronmarston Use the platform feature of bundler rather than conditional checks.
Commit the Gemfile.lock file to lock us to this set of gems.
@myronmarston Lock cucumber to 0.8.5 or greater. Added rake as a development depend…
…ency since I use it for development.
@myronmarston Added a be_tagged_with matcher since cucumber no longer provides the …
…#tagged_with? method.
@myronmarston Lock to em-http-request 0.2.7.
The newest release (0.2.10) doesn't work with webmock--see for more info.
Commits on Jul 27, 2010
@myronmarston Upgrade to rspec-2. f05cc59
Commits on Aug 01, 2010
@myronmarston Added spec focused filtering. 817c2b9
@myronmarston Use cucumber Around hook rather than Before/After hooks, as it simpli…
…fies the code significantly.
@myronmarston Simplify passing the block to VCR.use_cassette -- use &block rather t…
…han { }.
Commits on Aug 04, 2010
@myronmarston Require WebMock 1.3.3 or greater.
Previous versions did not handle multiple values for the same response header correctly.  Note that FakeWeb has this issue, too, and I've submitted a patch to fix it.

This closes issue #7.
Commits on Aug 06, 2010
@myronmarston Added link to the new google group. f68da93
@myronmarston Updated README section about WebMock and FakeWeb. 3e69767
@myronmarston Updated VCR usage suggestions. dd5c563
@myronmarston Added note about other similar libraries to the README. f410fda
@myronmarston Updated README to mention RSpec 2 usage. 5aa47b2
@myronmarston 1.0.3 release. ce13279
Commits on Aug 07, 2010
@myronmarston Updated Gemfile.lock. 3bcafd9
@myronmarston Removed task runner as it's no longer needed. 0289298
@myronmarston Raise an error if is given invalid options. 606e328
@myronmarston Optimized ERB rendering a bit. f2bb986
@myronmarston Updated em-http-request to 0.2.10.
See for more info about some of the changes.
Commits on Aug 09, 2010
@myronmarston Extracted the http calls from the specs for each http library into mo…
…dules that we can use in our cucumber features to keep things DRY.
@myronmarston Updated URLs in our cucumber scenarios to be full URLs.
URI.parse('') raises an error because it lacks a path.
URI.parse('') does not ('/' is the path).
Commits on Aug 10, 2010
@myronmarston Ignore .bundle dir. 043a05b
Commits on Aug 11, 2010
@myronmarston Simplify Net::HTTP extension a bit. 788590f
Commits on Aug 12, 2010
@myronmarston Enable debugger in specs. 3ced987
@myronmarston Added some failing scenarios for the new :match_requests_on feature I…
…'m working on.
@myronmarston Added RequestMatcher, which we'll use to determine which parts of an …
…HTTP request to match on.
@myronmarston Added VCR::Request#matcher, which returns a request matcher for the g…
…iven request, using the provided match_attributes.
Commits on Aug 16, 2010
@myronmarston Changed the HTTP Stubbing Adapters to support the match_requests_on
@myronmarston Documentation updates for new :match_requests_on option. 3def0be
Commits on Aug 17, 2010
@myronmarston Minor documentation tweaks. b1c62bc
@bblimke bblimke Added failing spec to show a problem with recording request headers b…
…efore the real request is made.
@myronmarston Do not record Net::HTTP request headers that it defaults late in the …
…http request process.

Closes #10.
@myronmarston Simplified implementation of RequestMatcher#hash. b470034
@myronmarston Fixed RequestMatcher to handle regex URIs. 2a66bb0
Commits on Aug 18, 2010
@myronmarston Updated README to recommend putting the vcr cassette library director…
…y outside of test/fixtures for a Rails 3 app.

This closes #9.
Commits on Aug 19, 2010
@myronmarston Updated Gemfile to use rspec-core off of github since I'm using some …
…features that haven't been released in a gem yet.
@myronmarston Disable rspec debug for java since ruby-debug doesn't install cleanly…
… on jruby with bundler.
@myronmarston Updated http_stubbing_adapter.request_stubbed? so that it uses a Requ…
Commits on Aug 20, 2010
@myronmarston Refactored some tests. 0f304c1
@myronmarston Fixed some host specs to include a path. bb479ce
Commits on Aug 21, 2010
@myronmarston Add support for matching requests on :path. 0f9165e
@myronmarston Use the latest rspec-expectations from github since it includes a 1.8…
….6 compatibility fix that hasn't been released yet.
Commits on Aug 22, 2010
@myronmarston Fix specs so they pass on 1.8.6. 69d060f
@myronmarston 1.9.2 compatibility fix: sort attributes before putting them in a Set.
On 1.9.2,[1, 2]).hash !=[2, 1]).hash, but[1, 2]).hash ==[1, 2]).hash.
@myronmarston 1.9.2 compatibility fix: don't try to use ruby-debug on 1.9.2.
On 1.9.2, I'm getting errors like these:

dyld: lazy symbol binding failed: Symbol not found: _rb_method_node
  Referenced from: /Users/mmarston/.rvm/gems/ruby-1.9.2-p0/gems/ruby-debug-base19-0.11.23/lib/ruby_debug.bundle
  Expected in: flat namespace

dyld: Symbol not found: _rb_method_node
  Referenced from: /Users/mmarston/.rvm/gems/ruby-1.9.2-p0/gems/ruby-debug-base19-0.11.23/lib/ruby_debug.bundle
  Expected in: flat namespace
@myronmarston 1.9.2 compatibility fix: in an override, use an alias to refer to the…
… original method rather than super.

This works around an error I'm getting on 1.9.2:

"super from singleton method that is defined to multiple classes is not supported; this will be fixed in 1.9.3 or later"
@myronmarston Make it easy to temporarily use documentation format for the specs. 4ed657f
@myronmarston 1.9.1 compatibility fix: moved a constant to the global namespace to …
…avoid an rspec bug that manifests on 1.9.1.

See these links for more info:
@myronmarston Lock rspec-core to one of my branches that fixes an issue with shared…
… example groups on 1.8.6.
@myronmarston Require spec_helper's full expanded path so it's not loaded twice. 9fbae9f
@myronmarston Fixed Gemfile so rbx can use it. rcov doesn't work on rbx. 1c49c08
@myronmarston Readme updates. c948f88
@myronmarston 1.1.0 release. 4a465ca
Commits on Aug 23, 2010
@myronmarston Removed default value of argument--there's no need for it. 8a3d22f
@myronmarston Optimized #stub_requests a bit.
Appending to an array with `<< value` is faster than with `+= [value]`, as it doesn't create a new array object for each append.

A benchmark shows there is about a 10x performance difference:
@myronmarston Upgrade to FakeWeb 1.3.0. f9e0dab
@myronmarston The latest FakeWeb passes this spec (was pending before). ed4a662
@myronmarston Use FakeWeb::Utility.request_uri_as_string rather than our own logic …
…to create the request uri.
Commits on Aug 24, 2010
@myronmarston Use a localhost regex with FakeWeb.allow_net_connect for the ignore_l…
…ocalhost feature.

This is simpler than changing allow_net_connect from false to true and back again in our Net::HTTP extension for a localhost request.
@myronmarston Require FakeWeb 1.3.0 or greater. a2a9f54
Commits on Aug 26, 2010
@myronmarston Change http stubbing adapters to be modules rather than classes.
They should never be instantiated and don't really hold state.  A module is more appropriate here.
@myronmarston Refactored and updated #check_version! on FakeWeb/WebMock adapters so…
… that a warning is printed for a version with a greater major or minor version number.

This simulates the ~> gem comparison operator, and is inspired by wycats' recent blog post:
@myronmarston Updated Gemfile/gemspec/Rakefile, etc to use latest best practices ba…
…sed on the gem skeleton that bundler generates.
@myronmarston Add missing test coverage for #ignore_localhost? e0c518c
Commits on Aug 27, 2010
@myronmarston Lock dev dependency to WebMock 1.3.3.
On 1.3.4 I get a failing cucumber scenario, but I believe it's a bug in WebMock.  I'm going to investigate more.
@myronmarston Add REE to list of tested ruby interpretters. 99147b7
@myronmarston The newest ruby-debug-base19 isn't working on 1.9.1 for me, so lock t…
…o the previous release.
@myronmarston 1.1.1 release. 69c0fe7
Commits on Aug 28, 2010
@myronmarston List patron and em-http-request in our Gemfile so that our Gemfile.lo…
…ck doesn't change everytime we run something on JRuby.
Commits on Sep 08, 2010
@myronmarston When the result of a request is an exception, raise it, rather than t…
…rying to read a body from it.
@myronmarston Update a few development gems. d7284af
Commits on Sep 09, 2010
@myronmarston Don't extend a Net::HTTP response with our module when WebMock has al…
…ready extended it with its own module.

These modules duplicate the same behavior and stomp on each other's toes.
@myronmarston Simplify implementation of VCR::Net::HTTPResponse. e6270c5
@myronmarston Remove unnecessary cucumber LoadError rescue. 53d1f7d
Commits on Sep 10, 2010
@myronmarston Add ability to disable Net::HTTP monkey patches for some specs. 96c71dd
@myronmarston Fix VCR::Net::HTTPResponse so it handles a nil body (such as for a HE…
…AD request).
@myronmarston Documentation update. 6d8ec54
@myronmarston 1.1.2 release. b827a7b
Commits on Sep 14, 2010
@myronmarston Update some gems. Use rspec 2.0.0.beta.22 rather than locking to a sp…
…ecific git commit.
Commits on Sep 18, 2010
@myronmarston Improved the :all record mode so that it keeps previously recorded in…
…teractions that do not match the new recorded interactions.

Previously, all of the previously recorded interactions were deleted.
Commits on Sep 19, 2010
@myronmarston Improve wording of some cucumber steps. 851f779
@myronmarston A few gemspec tweaks. 362147f
@myronmarston Added timecop so we can simulate the passage of time in our tests. acb7e63
@myronmarston Add :re_record_interval cassette option.
This option causes a cassette to be re-recorded when the existing file is older than the specified interval.
Commits on Sep 20, 2010
@myronmarston Don't auto re-record a cassette if there is no internet connection av…
@myronmarston Fix spec_helper requires. "spec" is on the load path. 626adfe
@myronmarston Add aruba for use in cucumber features. 89748b9
Commits on Sep 21, 2010
@myronmarston Improved RSpec support.
Added #use_vcr_cassette macro method that sets up a cassette for an example group.
@myronmarston Fix for ruby 1.9: ping was removed from the 1.9 standard library. 30b6242
Commits on Sep 27, 2010
@myronmarston Updated to the latest rspec-core on github. cbb493e
@myronmarston Fix WebMock/Net::HTTP integration.
Rather than using a Net::HTTP monkey patch to record new requests, use WebMock's callback.  This prevents the monkey patches from colliding each other and ensures that VCR & WebMock work properly with Open URI.

Closes #14.
Commits on Sep 28, 2010
@myronmarston Update changelog. 709f593
@myronmarston Use NameError#name rather than parsing the name from the message with…
… a regex.
@myronmarston Don't use parallel assignment as it doesn't work in this case on rubi…

For more info, see this issue on the rubinius issue tracker:
@myronmarston Consider to be a localhost alias.
Note that WebMock doesn't yet consider to be localhost, so it doesn't fully work if you use WebMock.

Closes #15.
Commits on Sep 29, 2010
@myronmarston Add RSpec 1 as a submodule at vendor/rspec-1.
I want to ensure the new RSpec macros work with RSpec 1, and this is the easiest way I can find to test it, since I can't add multiple versions of RSpec to my gemfile.
@myronmarston Fixed RSpec `use_vcr_cassette` macro so that it works with RSpec 1.
Closes #16.
@myronmarston Only require the Net::HTTPResponse extension where it is needed.
We no longer needed it for WebMock, so there's no point in requiring when it's not needed.
@myronmarston Autoload vcr/cucumber_tags, rather than always requiring it.
This is only needed for people using VCR with cucumber, so we shouldn't always require it.
@myronmarston Autoload 'vcr/rspec' when VCR::RSpec is referenced.
That way, people can just require 'vcr' to use the new RSpec macros...but requiring 'vcr/rspec' works, too.
@myronmarston Autoload 'vcr/internet_connection' as it is only used sometimes and t…
…here's no need to always require it.
Commits on Sep 30, 2010
@myronmarston Remove some unnecessary code. 11c97c0
@myronmarston Add documentation about the new :re_record_interval option. f2cb33e
@myronmarston Add documentation about new RSpec macros. 7c52664
Commits on Oct 04, 2010
@myronmarston Downgrade rack and remove capybara. ff88b37
@myronmarston Rewrote localhost server so it doesn't depend on capybara. 4d4e288
Commits on Oct 05, 2010
@myronmarston Deal with weird load path issue on jruby.
This fixes the rspec-1 scenario so that it passes on jruby.
@myronmarston Lock webmock to latest dev version on github. 4ff5f27
@myronmarston Remove pending...the latest WebMock considers to be localhost. c8b2771
@myronmarston Add curb dependency. a736ec6
@myronmarston Add test coverage for Curb support. ea777b9
Commits on Oct 06, 2010
@myronmarston Update to rspec 2.0.0.rc. 0b7f947
@myronmarston README formatting. 376be5f
@myronmarston Move some requires around so the reason for the ordering is more clear. 28abbef
@myronmarston Fixed curb http adapter module so it supports all HTTP methods. 2b45310
@myronmarston Don't run curb specs on jruby since jruby doesn't support curb. 0c711b1
Commits on Oct 09, 2010
@myronmarston Added a couple more similar libraries. 92e330c
Commits on Oct 11, 2010
@myronmarston Update to rspec 2.0.0. 40c5c59
@myronmarston Add links to github comparison view for each release. d7d9ac9
Commits on Oct 12, 2010
@myronmarston Update vendored rspec 1 to my fork that ignored rubinius .rbc files. d2c0a0c
@myronmarston Got specs and features to pass on rubinius 1.1. 646eab5
@myronmarston Update README. a5b0a93
@myronmarston Fixed typo. 8f369c1
Commits on Oct 13, 2010
@myronmarston Upgrade to WebMock 1.4.0. 91d67ad
@myronmarston 1.2.0 release. d25e34c
Commits on Oct 28, 2010
@myronmarston The documentation has moved to the wiki. ab5e334
@myronmarston Finish sentence. 6cd291c
Commits on Oct 29, 2010
@myronmarston Remove unncessary "should". d696c02
@myronmarston Remove methods of WebMock adapter that are no longer necessary.
These were necessary when we used our Net::HTTP extension with WebMock.
@myronmarston Refactor addition of VCR info to exception message. 9ee96be
Commits on Nov 02, 2010
@myronmarston Specify that stubbing adapters should return rotate through multiple …
…responses for the same request.
@myronmarston Move some code around so related methods are near each other. 0ca7ca8
@myronmarston Refactor to reduce duplication. cb3fdec
@myronmarston Update changelog. e305b26
@myronmarston Fix InternetConnection.available? so that it memoizes correctly when …
…a connection is not available.
@myronmarston Update webmock to 1.5.0. 65c599d
@myronmarston Allow newly released WebMock 1.5.0 to be used without a warning. 4b34280
Commits on Nov 03, 2010
@myronmarston Fix spec docstring. 97e28fe
@myronmarston It's the wiki, not the README. cd2a090
Commits on Nov 06, 2010
@myronmarston Setup guard-rspec. 015b5eb
@myronmarston Start TODO list. 05445e1
@myronmarston Add typhoeus dependency. 547caff
@myronmarston Add Typhoeus adapter. c9dde9e
@myronmarston Deal with some edge cases that Typhoeus doesn't quite handle right yet. e4bbb51
@myronmarston Update typhoeus and fix remaining typhoeus specs. 5e55a90
@myronmarston Add MultiObjectProxy.
Instances of this class proxy method calls to multiple objects, and will be useful to allow multiple http stubbing adapters to be used.
@myronmarston Deprecate config.http_stubbing_library= in favor of config.stub_with.
Use the MultiObjectProxy to allow multiple adapters to be used.
@myronmarston For consistency, predicate methods should return a boolean.
This is particularly important for our new MultiObjectProxy as it raises an error when the proxied objects return different values for predicat methods.
@myronmarston Ensure FakeWeb adapter is used for Net::HTTP extension specs since Fa…
…keWeb is the only adapter that needs it.
Commits on Nov 07, 2010
@myronmarston Ensure header hash is recorded correctly. 9bcbd89
@myronmarston Refactor header normalization specs a bit. fe40ee9
@myronmarston Ensure URIs are recorded in a normalized format. b99f5c2
Commits on Nov 08, 2010
@myronmarston Fix webmock dependency declaration to work on ruby 1.8.6. 65f1424
@myronmarston Use Kernel.raise (needed for BasicObject on 1.9). f6678f5
@myronmarston Don't bother using the MultiObjectProxy when there is only one adapte…
…r configured.

There's no reason to add the additional overhead of the proxy if its not needed.
@myronmarston Fix Gemfile so it works on JRuby. bedd8ae
@myronmarston Upgrade to RSpec 2.1. eec43a5
@myronmarston Allow specs to run on JRuby, which can't use Typhoeus. b3f0e25
@myronmarston Update typhoeus (latest fixes a bug on 1.8.6). 1605f26
@myronmarston Setup cukes to run against typhoeus. e47e5dd
@myronmarston Add full_build script. Run ./full_build to run all specs/cukes agains…
…t all supported rubies.
@myronmarston Add jruby-openssl gem for jruby. eef4a2c
@myronmarston Update README and CHANGELOG with Typhoeus info. 1991c61
@myronmarston Update cucumber. b7e4d2d
@myronmarston Fix full_build script.
- Use tee to put the output into tmp/full_build.out
- jruby before rbx-head: if I put rbx-head before jruby, rvm looks for jruby-head for some reason.
@myronmarston Fix full_build to install bundler. 69715e3
Commits on Nov 11, 2010
@myronmarston Update to the just released Typhoeus 0.2.0. c0acf8f
@myronmarston 1.3.0 release. a2e9b46
Commits on Nov 12, 2010
@myronmarston Upgrade to WebMock 1.6.0. 0418416
@myronmarston WebMock.reset_webmock is deprecated in favor of WebMock.reset! e7a4c0d
@myronmarston WebMock::StubRegistry rather than WebMock::RequestRegistry.
WebMock has moved #request_stubs to this new class.
@myronmarston Fix the way we override the webmock stubbing instructions. 7f95cf8
@myronmarston Update WebMock version check. 7f3e1f3
@myronmarston 1.3.1 release. 75fd8bd
@myronmarston Fix URLs in changelog. 429619f
@myronmarston Update FakeWeb vs WebMock benchmarks. cb59842
Commits on Nov 13, 2010
@myronmarston Normalize structs so they are serialized the same regardless of which…
… HTTP lib was used to make the request.

- Remove extra padding on status message ("OK " => "OK")
- Set body to nil if it is the empty string
- Set headers to nil if it is an empty hash
- Remove extraneous headers added by the HTTP lib (i.e. Typhoeus user agent)
@myronmarston Move full_build script into new script folder. ee02a25
@myronmarston Add cucumber.yml. 4485967
@myronmarston Update aruba. c47262d
@myronmarston Fix load path and requires. 2570015
@myronmarston Remove old cukes. I'm going to rewrite them in a documentation style. 7a12870
@myronmarston Add cuke outline. b0334d1
@myronmarston New cuke: basic_usage.feature. 15d027e
@myronmarston New cuke: configuration/cassette_library_dir.feature c5592a6
@myronmarston New cuke: configuration/ignore_localhost.feature 10f473c
@myronmarston Rename #sinatra_app to #start_sinatra_app. 2058a85
@myronmarston Add additional check that demonstrates that the server responds diffe…
…rently on the second run.
@myronmarston Put colon with stub_with setting to make it clear it needs to be a sy…
@myronmarston Symlink the vcr_cucumber_helpers.rb file for each scenario rather tha…
…n create it new.
@myronmarston Fix spec support requires.
We want to require support files as "support/filename" rather than the full path so that they don't get required multiple times.
@myronmarston Only use a subprocess for Patron. Threads are faster. a4588cf
@myronmarston Fix tables so they line up. c215cea
@myronmarston Refactor rspec feature. 94b76da
@myronmarston Add new cuke: test_frameworks/cucumber.feature 42ebae6
@myronmarston Add new cuke: test_frameworks/test_unit.feature. 3350530
@myronmarston Fix for 1.9.1.
Apparently, on 1.9.1, params[:splat] is an array.  On 1.8 it's a single value.
@myronmarston Load path/require fixes for ruby 1.9.2. 618637f
@myronmarston Skip patron cukes on 1.9.2.
For some reason I can't figure out, the localhost server isn't shutting down when patron is loaded, so for now we can just filter it out.
@myronmarston Add new cuke: test_frameworks/shoulda.feature. cf565f5
@myronmarston Add new cuke: configuration/default_cassette_options.feature cab4b29
@myronmarston Add new cuke: configuration/stub_with.feature. 908a94c
@myronmarston Add new cuke: cassettes/format.feature 6e0b923
@myronmarston Removed old cucumber rake tasks. 4531950
Commits on Nov 14, 2010
@myronmarston Fix some cukes on 1.9.2.
Some were failing with "no such file to load -- vcr", so this ensures vcr is on the load path.
@myronmarston Add new cuke: cassettes/erb.feature 1af00f5
@myronmarston Add new cuke cassettes/record_modes/none.feature 5c09fba
@myronmarston Add new cuke: cassettes/record_modes/new_episodes.feature 8f87d9b
@myronmarston Add new cuke: cassettes/record_modes/all.feature 4798afd
Commits on Nov 15, 2010
@myronmarston Work around aruba's reliance on background_process on rubies that don…
…'t support it.

For more info, see:
@myronmarston Filter out cuke examples that can't run on JRuby because of using a g…
…em w/ a C extension.
@myronmarston Setup RUBYOPT needed for cukes to pass on JRuby.
I'm surprised I need these, but I get weird load path/require issues without them.
@myronmarston Exclude typhoeus scenario from running on jruby. 272554d
@myronmarston Filter out patron cukes on rubinius since it's freezing (like 1.9.2). 5f387c0
@myronmarston Add get_response helper method to simplify getting response body. 7b8c719
@myronmarston Added relish gem. 4da14cd
Commits on Nov 16, 2010
@myronmarston Add new cuke: cassettes/request_matching.feature. 994e094
@myronmarston Add new cuke: cassettes/re_recording.feature. 4826db6
Commits on Nov 17, 2010
@myronmarston Ignore em-http-request cukes on rubinius since they are failing and i…
…t's not likely a bug in VCR.
@myronmarston I'm also getting errors from curb's C extension on rubinius, so ignor…
…e it in the cukes.
@myronmarston Add new cuke: cassettes/no_cassette.feature. c04c653
@myronmarston Rename #get_response to #response_body_for.
#get_response implies it's a GET request and returns the response object; #response_body_for implies it returns the body string (as it does) and it could be any HTTP verb (as it is).
@myronmarston Add new cuke: http_libraries/net_http.feature e294671
@myronmarston Add features/README. e1e4898
@myronmarston Add relish task that runs as part of release. a7e9528
@myronmarston Add additional links to README. 51438f7
@myronmarston Fixed relish task -- I guess it doesn't take the -v arg. 89fb244
@myronmarston 1.3.2 release. 2efe05d