Skip to content


Subversion checkout URL

You can clone with
Download ZIP

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.
base fork: myronmarston/vcr
head fork: myronmarston/vcr
Checking mergeability… Don't worry, you can still create the pull request.
This comparison is big! We're only showing the most recent 250 commits
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
@myronmarston Fix text so it works on rubinius. e0651f9
@myronmarston Ignore rerun.txt (temp cucumber artifact). 8366235
@myronmarston I'm using rbx on rvm now (rather than rbx-head). f380338
Commits on Nov 18, 2010
@myronmarston Fix FakeWeb error extension so that it works on JRuby.
(I have no idea why this wasn't working on JRuby, but it wasn't, and this fixes it).
@myronmarston Upgrade webmock to the latest (1.6.1). aa260cb
@myronmarston Exclude ping.rb and basic_object.rb from rcov code coverage report.
I don't have (or intend to add) tests for these since I copied these from other well-tested projects:

- ping.rb came from MRI 1.8.7 source (it was removed from 1.9).
- basic_object.rb came from (for 1.8; it's built into 1.9).
Commits on Nov 20, 2010
@myronmarston Update bundler and relish gems to latest. bde0268
@myronmarston Updated relish task to push a version. 84992d2
Commits on Nov 21, 2010
@myronmarston Hit a local sinatra app rather than in specs. 76137bf
@myronmarston Use `expect { ... }.to` rather than `lambda { ... }.should` since it …
…reads better.
@myronmarston Stub VCR::InternetConnection.available? so that our cukes don't actua…
…lly depend on an internet connection.
@myronmarston Group Givens and Thens together. 029ebc7
@myronmarston Remove PendingOnHeroku module.
I'm not using heroku for CI for VCR anymore, so this is no longer necessary.
Commits on Nov 22, 2010
@myronmarston Fix VCR::Config.http_stubbing_libraries so that it always returns an …

Previously, it would return nil when it had not been configured; this lead to a confusing error but will now raise an explicit "The http stubbing library is not configured" error.
@myronmarston Remove unnecessary #freeze on constants. 72bcd12
@myronmarston Fix relish task 450747a
@myronmarston 1.3.3 release. ae45360
Commits on Nov 23, 2010
@myronmarston Update guard setup. f0503aa
@myronmarston Reorganize some specs. b201054
@myronmarston Document the fact that Typhoeus::Easy, Typhoeus::Mutli and Curb::Mult…
…i are not supported.

Closes #31.
@myronmarston Add VCR.turn_off! / VCR.turn_on! / VCR.turned_off { ... }.
When VCR is turned off, it has no affect on HTTP requests--they can be made as normal, and they will not be recorded.  You cannot insert a cassette while VCR is turned off.
Commits on Nov 24, 2010
@myronmarston Add allow_http_connections_when_no_cassette config option. c23596b
@myronmarston Update changelog. c1c590e
@myronmarston Fixed bug with ignore_localhost config option.
Previously, an error would be raised if it was set before the stub_with option.
Commits on Nov 25, 2010
@myronmarston Use fuubar rspec formatter. b845bb8
@myronmarston Add rack middleware feature. b58808d
Commits on Nov 27, 2010
@myronmarston Split one spec into many. 2c207cf
@myronmarston Remove redundant spec. c8b6dfa
Commits on Nov 30, 2010
@myronmarston Fixed bug with VCR::RequestMatcher#hash.
On Ruby 1.8.6 & 1.9.1, identical hashes have different #hash values.
Commits on Dec 01, 2010
@myronmarston Fix header key so it's a string instead of a symbol.
(I messed this up when creating the fixture for 1.9.1).
@myronmarston Extract some common logic out of rack middleware into Common module. a59077a
@myronmarston Add faraday dev dependency. 39b219d
@myronmarston Yield the cassette instance from VCR.use_cassette when the block acce…
…pts args.
@myronmarston Add Faraday support. 4f8e467
@myronmarston Ensure requests made through Faraday are not recorded multiple times …
…if the other stubbing adapters are also being used.
@myronmarston Fix comment. ff15b04
@myronmarston Update TODO list. 1b624d2
@myronmarston Allow specs to run on jruby. 5d8f380
@myronmarston Words. 03720a2
@myronmarston Add cuke demonstrating usage with em-http-request asynch. 5ca6595
Commits on Dec 03, 2010
@myronmarston Add some sleeps so the em-http-request callbacks are invoked in order. 49476df
@myronmarston 1.4.0 release. 6d40d17
Commits on Dec 05, 2010
Karl added spec and fix for case of empty cassette file which occurs most …
…likely due to ctrl-c
@myronmarston Added script/spec -- runs all specs against all supported rubies. 41160d5
@myronmarston Words. 2e87813
Commits on Dec 07, 2010
@myronmarston Fix formatting of feature discussion text now that relish supports ma…
@myronmarston Fixed record mode (was a copy & paste error). 1816a94
@myronmarston Fix a couple of grammar mistakes. 1ff9917
Commits on Dec 25, 2010
@myronmarston Fix backtick quoting. 75b04f1
@myronmarston Update feature narative. bf8fe19
@myronmarston Fix typo. be37d30
@myronmarston Remove extra word. 59bb05c
Commits on Dec 28, 2010
@myronmarston Put shoulda in the gemspec since it is used by one of the cukes and i…
…s a dev dependency.
Commits on Jan 03, 2011
@myronmarston Clean up #compare_version. ccc63df
Commits on Jan 04, 2011
@myronmarston Upgrade RSpec. 535e264
@myronmarston Update relish. 7e7a57c
@myronmarston Add rubygems require to synopsis so the example works out of the box. 6c6df0b
Commits on Jan 08, 2011
@myronmarston We have no test or bin dir. 0211741
@myronmarston Use #each, not #all?. #all? doesn't make sense here. a6ae40c
@myronmarston Raise an error when a nested cassette is inserted with the same name …
…as a previously inserted cassette.
@myronmarston Don't debug on 1.9.2.
We're locked to a version of ruby-debug19 that works on 1.9.1 but not 1.9.2.
@myronmarston Update fuubar. ec545b6
@myronmarston Use the cassette instance rather than the cassette name to create and…
… restore stub checkpoints.

This is better since multiple cassette instances can share the same name.

See issue #36 for more info:
@myronmarston Update features so they look better on relish.
- Provide a .nav file so the features are listed in an order that makes sense.
- Fix some of the feature names.
- Fix formatting of some of the feature description text.
@myronmarston Use if/else rather than long ternary operator. 063cdec
@myronmarston Raise an error when no checkpoint can be found.
Otherwise, we get an obscure TypeError later on (see
@myronmarston Update changelog. 4765bcf
@myronmarston Update copyright year. 1fdac5e
Commits on Jan 09, 2011
@myronmarston Change VCR::Config to a module.
VCR::Config is not intended to ever be instantiated so a module is more appropriate.
@opsb opsb Added before_record and before_playback hooks c4bb060
@myronmarston Clear vcr hooks in global rspec hooks. 219533d
@myronmarston Extract hook logic into a separate module.
- New logic allows users to add multiple hooks (only one was allowed
- Supports hook & cassette tagging.
- Decouples hook logic from the rest of VCR's logic.  VCR::Hooks has no
  knowledge of the rest of VCR.
- Hooks now yield different arguments based on what the block accepts:
  - First argument is array of HTTP interactions.
  - Second argument is the cassette instance.
@myronmarston Use the "extend self" idiom rather than the singleton class for VCR::…

This simplifies things a bit.
@myronmarston Add cucumber feature documenting new hooks. 205dc8c
Commits on Jan 11, 2011
@myronmarston Fix line num passed to instance_eval string. 4233262
@myronmarston Rearrange spec directory so that it mirrors the structure of lib. fa00f3c
Commits on Jan 12, 2011
@myronmarston Move ping, basic_object and internet_connection into util sub-folder. a4bbd09
@myronmarston Simplify require line for spec support files. 21956cf
@myronmarston Fix Guardfile to work with new spec organization. 8c61077
@myronmarston No need to pass argument that is exposed as an instance method. dcfddfb
@myronmarston Iterate over array once instead of twice. 5554d2c
@myronmarston Extract cassette reading/erb rendering into a separate class. 9e0665a
@myronmarston Change hooks so they yield individual HTTPInteraction instances rathe…
…r than an array.
@myronmarston Allow before_playback/record hooks to prevent playback/recording by c…
…alling #ignore! on the yielded interaction.
@myronmarston Words. fb94dec
@myronmarston Upgrade to newly released WebMock 1.6.2. 8b14350
@myronmarston Fix full build script to run jruby separately.
I'm getting mysterious errors on jruby with the full build script as it currently is.
@myronmarston 1.5.0 release. 9c4a71c
Commits on Jan 16, 2011
@myronmarston Improve full build output. 5cdbba3
Commits on Jan 21, 2011
@myronmarston Ensure headers get serialized as raw strings.
Closes #39.
@myronmarston 1.5.1 release. be6672d