Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: myronmarston/vcr
head fork: myronmarston/vcr
This comparison is big! We're only showing the most recent 250 commits
Commits on Sep 08, 2010
Myron Marston When the result of a request is an exception, raise it, rather than t…
…rying to read a body from it.
Myron Marston Update a few development gems. d7284af
Commits on Sep 09, 2010
Myron Marston 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.
Myron Marston Simplify implementation of VCR::Net::HTTPResponse. e6270c5
Myron Marston Remove unnecessary cucumber LoadError rescue. 53d1f7d
Commits on Sep 10, 2010
Myron Marston Add ability to disable Net::HTTP monkey patches for some specs. 96c71dd
Myron Marston Fix VCR::Net::HTTPResponse so it handles a nil body (such as for a HE…
…AD request).
Myron Marston Documentation update. 6d8ec54
Myron Marston 1.1.2 release. b827a7b
Commits on Sep 14, 2010
Myron Marston Update some gems. Use rspec 2.0.0.beta.22 rather than locking to a sp…
…ecific git commit.
Commits on Sep 18, 2010
Myron Marston 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
Myron Marston Improve wording of some cucumber steps. 851f779
Myron Marston A few gemspec tweaks. 362147f
Myron Marston Added timecop so we can simulate the passage of time in our tests. acb7e63
Myron Marston 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
Myron Marston Don't auto re-record a cassette if there is no internet connection av…
Myron Marston Fix spec_helper requires. "spec" is on the load path. 626adfe
Myron Marston Add aruba for use in cucumber features. 89748b9
Commits on Sep 21, 2010
Myron Marston Improved RSpec support.
Added #use_vcr_cassette macro method that sets up a cassette for an example group.
Myron Marston Fix for ruby 1.9: ping was removed from the 1.9 standard library. 30b6242
Commits on Sep 27, 2010
Myron Marston Updated to the latest rspec-core on github. cbb493e
Myron Marston 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
Myron Marston Update changelog. 709f593
Myron Marston Use NameError#name rather than parsing the name from the message with…
… a regex.
Myron Marston 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:
Myron Marston 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
Myron Marston 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.
Myron Marston Fixed RSpec `use_vcr_cassette` macro so that it works with RSpec 1.
Closes #16.
Myron Marston 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.
Myron Marston 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.
Myron Marston 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.
Myron Marston 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
Myron Marston Remove some unnecessary code. 11c97c0
Myron Marston Add documentation about the new :re_record_interval option. f2cb33e
Myron Marston Add documentation about new RSpec macros. 7c52664
Commits on Oct 04, 2010
Myron Marston Downgrade rack and remove capybara. ff88b37
Myron Marston Rewrote localhost server so it doesn't depend on capybara. 4d4e288
Commits on Oct 05, 2010
Myron Marston Deal with weird load path issue on jruby.
This fixes the rspec-1 scenario so that it passes on jruby.
Myron Marston Lock webmock to latest dev version on github. 4ff5f27
Myron Marston Remove pending...the latest WebMock considers to be localhost. c8b2771
Myron Marston Add curb dependency. a736ec6
Myron Marston Add test coverage for Curb support. ea777b9
Commits on Oct 06, 2010
Myron Marston Update to rspec 2.0.0.rc. 0b7f947
Myron Marston README formatting. 376be5f
Myron Marston Move some requires around so the reason for the ordering is more clear. 28abbef
Myron Marston Fixed curb http adapter module so it supports all HTTP methods. 2b45310
Myron Marston Don't run curb specs on jruby since jruby doesn't support curb. 0c711b1
Commits on Oct 09, 2010
Myron Marston Added a couple more similar libraries. 92e330c
Commits on Oct 11, 2010
Myron Marston Update to rspec 2.0.0. 40c5c59
Myron Marston Add links to github comparison view for each release. d7d9ac9
Commits on Oct 12, 2010
Myron Marston Update vendored rspec 1 to my fork that ignored rubinius .rbc files. d2c0a0c
Myron Marston Got specs and features to pass on rubinius 1.1. 646eab5
Myron Marston Update README. a5b0a93
Myron Marston Fixed typo. 8f369c1
Commits on Oct 13, 2010
Myron Marston Upgrade to WebMock 1.4.0. 91d67ad
Myron Marston 1.2.0 release. d25e34c
Commits on Oct 28, 2010
Myron Marston The documentation has moved to the wiki. ab5e334
Myron Marston Finish sentence. 6cd291c
Commits on Oct 29, 2010
Myron Marston Remove unncessary "should". d696c02
Myron Marston Remove methods of WebMock adapter that are no longer necessary.
These were necessary when we used our Net::HTTP extension with WebMock.
Myron Marston Refactor addition of VCR info to exception message. 9ee96be
Commits on Nov 02, 2010
Myron Marston Specify that stubbing adapters should return rotate through multiple …
…responses for the same request.
Myron Marston Move some code around so related methods are near each other. 0ca7ca8
Myron Marston Refactor to reduce duplication. cb3fdec
Myron Marston Update changelog. e305b26
Myron Marston Fix InternetConnection.available? so that it memoizes correctly when …
…a connection is not available.
Myron Marston Update webmock to 1.5.0. 65c599d
Myron Marston Allow newly released WebMock 1.5.0 to be used without a warning. 4b34280
Commits on Nov 03, 2010
Myron Marston Fix spec docstring. 97e28fe
Myron Marston It's the wiki, not the README. cd2a090
Commits on Nov 06, 2010
Myron Marston Setup guard-rspec. 015b5eb
Myron Marston Start TODO list. 05445e1
Myron Marston Add typhoeus dependency. 547caff
Myron Marston Add Typhoeus adapter. c9dde9e
Myron Marston Deal with some edge cases that Typhoeus doesn't quite handle right yet. e4bbb51
Myron Marston Update typhoeus and fix remaining typhoeus specs. 5e55a90
Myron Marston 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.
Myron Marston Deprecate config.http_stubbing_library= in favor of config.stub_with.
Use the MultiObjectProxy to allow multiple adapters to be used.
Myron Marston 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.
Myron Marston 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
Myron Marston Ensure header hash is recorded correctly. 9bcbd89
Myron Marston Refactor header normalization specs a bit. fe40ee9
Myron Marston Ensure URIs are recorded in a normalized format. b99f5c2
Commits on Nov 08, 2010
Myron Marston Fix webmock dependency declaration to work on ruby 1.8.6. 65f1424
Myron Marston Use Kernel.raise (needed for BasicObject on 1.9). f6678f5
Myron Marston 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.
Myron Marston Fix Gemfile so it works on JRuby. bedd8ae
Myron Marston Upgrade to RSpec 2.1. eec43a5
Myron Marston Allow specs to run on JRuby, which can't use Typhoeus. b3f0e25
Myron Marston Update typhoeus (latest fixes a bug on 1.8.6). 1605f26
Myron Marston Setup cukes to run against typhoeus. e47e5dd
Myron Marston Add full_build script. Run ./full_build to run all specs/cukes agains…
…t all supported rubies.
Myron Marston Add jruby-openssl gem for jruby. eef4a2c
Myron Marston Update README and CHANGELOG with Typhoeus info. 1991c61
Myron Marston Update cucumber. b7e4d2d
Myron Marston 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.
Myron Marston Fix full_build to install bundler. 69715e3
Commits on Nov 11, 2010
Myron Marston Update to the just released Typhoeus 0.2.0. c0acf8f
Myron Marston 1.3.0 release. a2e9b46
Commits on Nov 12, 2010
Myron Marston Upgrade to WebMock 1.6.0. 0418416
Myron Marston WebMock.reset_webmock is deprecated in favor of WebMock.reset! e7a4c0d
Myron Marston WebMock::StubRegistry rather than WebMock::RequestRegistry.
WebMock has moved #request_stubs to this new class.
Myron Marston Fix the way we override the webmock stubbing instructions. 7f95cf8
Myron Marston Update WebMock version check. 7f3e1f3
Myron Marston 1.3.1 release. 75fd8bd
Myron Marston Fix URLs in changelog. 429619f
Myron Marston Update FakeWeb vs WebMock benchmarks. cb59842
Commits on Nov 13, 2010
Myron Marston 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)
Myron Marston Move full_build script into new script folder. ee02a25
Myron Marston Add cucumber.yml. 4485967
Myron Marston Update aruba. c47262d
Myron Marston Fix load path and requires. 2570015
Myron Marston Remove old cukes. I'm going to rewrite them in a documentation style. 7a12870
Myron Marston Add cuke outline. b0334d1
Myron Marston New cuke: basic_usage.feature. 15d027e
Myron Marston New cuke: configuration/cassette_library_dir.feature c5592a6
Myron Marston New cuke: configuration/ignore_localhost.feature 10f473c
Myron Marston Rename #sinatra_app to #start_sinatra_app. 2058a85
Myron Marston Add additional check that demonstrates that the server responds diffe…
…rently on the second run.
Myron Marston Put colon with stub_with setting to make it clear it needs to be a sy…
Myron Marston Symlink the vcr_cucumber_helpers.rb file for each scenario rather tha…
…n create it new.
Myron Marston 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.
Myron Marston Only use a subprocess for Patron. Threads are faster. a4588cf
Myron Marston Fix tables so they line up. c215cea
Myron Marston Refactor rspec feature. 94b76da
Myron Marston Add new cuke: test_frameworks/cucumber.feature 42ebae6
Myron Marston Add new cuke: test_frameworks/test_unit.feature. 3350530
Myron Marston Fix for 1.9.1.
Apparently, on 1.9.1, params[:splat] is an array.  On 1.8 it's a single value.
Myron Marston Load path/require fixes for ruby 1.9.2. 618637f
Myron Marston 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.
Myron Marston Add new cuke: test_frameworks/shoulda.feature. cf565f5
Myron Marston Add new cuke: configuration/default_cassette_options.feature cab4b29
Myron Marston Add new cuke: configuration/stub_with.feature. 908a94c
Myron Marston Add new cuke: cassettes/format.feature 6e0b923
Myron Marston Removed old cucumber rake tasks. 4531950
Commits on Nov 14, 2010
Myron Marston 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.
Myron Marston Add new cuke: cassettes/erb.feature 1af00f5
Myron Marston Add new cuke cassettes/record_modes/none.feature 5c09fba
Myron Marston Add new cuke: cassettes/record_modes/new_episodes.feature 8f87d9b
Myron Marston Add new cuke: cassettes/record_modes/all.feature 4798afd
Commits on Nov 15, 2010
Myron Marston Work around aruba's reliance on background_process on rubies that don…
…'t support it.

For more info, see:
Myron Marston Filter out cuke examples that can't run on JRuby because of using a g…
…em w/ a C extension.
Myron Marston 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.
Myron Marston Exclude typhoeus scenario from running on jruby. 272554d
Myron Marston Filter out patron cukes on rubinius since it's freezing (like 1.9.2). 5f387c0
Myron Marston Add get_response helper method to simplify getting response body. 7b8c719
Myron Marston Added relish gem. 4da14cd
Commits on Nov 16, 2010
Myron Marston Add new cuke: cassettes/request_matching.feature. 994e094
Myron Marston Add new cuke: cassettes/re_recording.feature. 4826db6
Commits on Nov 17, 2010
Myron Marston Ignore em-http-request cukes on rubinius since they are failing and i…
…t's not likely a bug in VCR.
Myron Marston I'm also getting errors from curb's C extension on rubinius, so ignor…
…e it in the cukes.
Myron Marston Add new cuke: cassettes/no_cassette.feature. c04c653
Myron Marston 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).
Myron Marston Add new cuke: http_libraries/net_http.feature e294671
Myron Marston Add features/README. e1e4898
Myron Marston Add relish task that runs as part of release. a7e9528
Myron Marston Add additional links to README. 51438f7
Myron Marston Fixed relish task -- I guess it doesn't take the -v arg. 89fb244
Myron Marston 1.3.2 release. 2efe05d
Myron Marston Fix text so it works on rubinius. e0651f9
Myron Marston Ignore rerun.txt (temp cucumber artifact). 8366235
Myron Marston I'm using rbx on rvm now (rather than rbx-head). f380338
Commits on Nov 18, 2010
Myron Marston 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).
Myron Marston Upgrade webmock to the latest (1.6.1). aa260cb
Myron Marston 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
Myron Marston Update bundler and relish gems to latest. bde0268
Myron Marston Updated relish task to push a version. 84992d2
Commits on Nov 21, 2010
Myron Marston Hit a local sinatra app rather than in specs. 76137bf
Myron Marston Use `expect { ... }.to` rather than `lambda { ... }.should` since it …
…reads better.
Myron Marston Stub VCR::InternetConnection.available? so that our cukes don't actua…
…lly depend on an internet connection.
Myron Marston Group Givens and Thens together. 029ebc7
Myron Marston Remove PendingOnHeroku module.
I'm not using heroku for CI for VCR anymore, so this is no longer necessary.
Commits on Nov 22, 2010
Myron Marston 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.
Myron Marston Remove unnecessary #freeze on constants. 72bcd12
Myron Marston Fix relish task 450747a
Myron Marston 1.3.3 release. ae45360
Commits on Nov 23, 2010
Myron Marston Update guard setup. f0503aa
Myron Marston Reorganize some specs. b201054
Myron Marston Document the fact that Typhoeus::Easy, Typhoeus::Mutli and Curb::Mult…
…i are not supported.

Closes #31.
Myron Marston 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
Myron Marston Add allow_http_connections_when_no_cassette config option. c23596b
Myron Marston Update changelog. c1c590e
Myron Marston 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
Myron Marston Use fuubar rspec formatter. b845bb8
Myron Marston Add rack middleware feature. b58808d
Commits on Nov 27, 2010
Myron Marston Split one spec into many. 2c207cf
Myron Marston Remove redundant spec. c8b6dfa
Commits on Nov 30, 2010
Myron Marston 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
Myron Marston Fix header key so it's a string instead of a symbol.
(I messed this up when creating the fixture for 1.9.1).
Myron Marston Extract some common logic out of rack middleware into Common module. a59077a
Myron Marston Add faraday dev dependency. 39b219d
Myron Marston Yield the cassette instance from VCR.use_cassette when the block acce…
…pts args.
Myron Marston Add Faraday support. 4f8e467
Myron Marston Ensure requests made through Faraday are not recorded multiple times …
…if the other stubbing adapters are also being used.
Myron Marston Fix comment. ff15b04
Myron Marston Update TODO list. 1b624d2
Myron Marston Allow specs to run on jruby. 5d8f380
Myron Marston Words. 03720a2
Myron Marston Add cuke demonstrating usage with em-http-request asynch. 5ca6595
Commits on Dec 03, 2010
Myron Marston Add some sleeps so the em-http-request callbacks are invoked in order. 49476df
Myron Marston 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
Myron Marston Added script/spec -- runs all specs against all supported rubies. 41160d5
Myron Marston Words. 2e87813
Commits on Dec 07, 2010
Myron Marston Fix formatting of feature discussion text now that relish supports ma…
Myron Marston Fixed record mode (was a copy & paste error). 1816a94
Myron Marston Fix a couple of grammar mistakes. 1ff9917
Commits on Dec 25, 2010
Myron Marston Fix backtick quoting. 75b04f1
Myron Marston Update feature narative. bf8fe19
Myron Marston Fix typo. be37d30
Myron Marston Remove extra word. 59bb05c
Commits on Dec 28, 2010
Myron Marston 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
Myron Marston Clean up #compare_version. ccc63df
Commits on Jan 04, 2011
Myron Marston Upgrade RSpec. 535e264
Myron Marston Update relish. 7e7a57c
Myron Marston Add rubygems require to synopsis so the example works out of the box. 6c6df0b
Commits on Jan 08, 2011
Myron Marston We have no test or bin dir. 0211741
Myron Marston Use #each, not #all?. #all? doesn't make sense here. a6ae40c
Myron Marston Raise an error when a nested cassette is inserted with the same name …
…as a previously inserted cassette.
Myron Marston 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.
Myron Marston Update fuubar. ec545b6
Myron Marston 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:
Myron Marston 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.
Myron Marston Use if/else rather than long ternary operator. 063cdec
Myron Marston Raise an error when no checkpoint can be found.
Otherwise, we get an obscure TypeError later on (see
Myron Marston Update changelog. 4765bcf
Myron Marston Update copyright year. 1fdac5e
Commits on Jan 09, 2011
Myron Marston Change VCR::Config to a module.
VCR::Config is not intended to ever be instantiated so a module is more appropriate.
Oliver Searle-Barnes opsb Added before_record and before_playback hooks c4bb060
Myron Marston Clear vcr hooks in global rspec hooks. 219533d
Myron Marston 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.
Myron Marston Use the "extend self" idiom rather than the singleton class for VCR::…

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