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.
This comparison is big! We’re only showing the most recent 250 commits
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
Commits on Jan 22, 2011
@myronmarston Fix spec doc strings. fd41836
@myronmarston Clean up VCR.version. c9d9bca
@myronmarston Refactoring: extract private method. 44acf01
Commits on Jan 31, 2011
@myronmarston Update benchmarks. 356eca4
@myronmarston Updated typhoeus to latest 0.2.1 release.
The latest includes a new ignore_hosts option.
@myronmarston Extract some logic into new method: VCR::Config.uri_should_be_ignored? ee52fa8
@myronmarston Remove #ignore_localhost? from the http stubbing adapters. 7b6c9f3
@myronmarston Add new VCR::Config.ignore_hosts option. bf907f7
@myronmarston Add deprecations.
The following are deprecated:

- VCR::Config.ignore_localhost?
- VCR::HttpStubbingAdapters::{FakeWeb,WebMock,Typhoeus,Faraday}.ignore_localhost?
- VCR::HttpStubbingAdapters::FakeWeb::LOCALHOST_REGEX
@myronmarston Refactoring: extract regex construction into module. bd4f25b
@myronmarston Add cuke for new ignore_hosts configuration option.
Closes #30.
@myronmarston Clean up set construction. e94e616
@myronmarston Add cuke demonstrating Net/HTTP usage over HTTPS. 3a5100d
Commits on Feb 03, 2011
@myronmarston Split structs.rb (and structs_spec.rb) into separate files for each c…
…lass and module.
Commits on Feb 04, 2011
@myronmarston Fix require (no more vcr/structs file). b5c66b2
@myronmarston 1.6.0 release. de8c689
Commits on Feb 08, 2011
@myronmarston Ignore Gemfile.lock. 5f3c8a3
@myronmarston Lock aruba version. f602a2a
@myronmarston Use latest version of ruby-debug on 1.9.2. 6b6d19c
@myronmarston Update RSpec. fccbf7e
@myronmarston Fix VCR::Request#method so that it delegates to Object#method when gi…
…ven arguments.
@myronmarston Use Psych if it is available.
Syck (the default YAML engine) modifies strings when they are
round-tripped through it: "1/n /n2" becomes "1/n/n2".  Psych doesn't.

This doesn't usually matter, but can occasionally cause problems when
using an HTTP client that raises errors when the content_length header
does not match the actual content length (as does Mechanize).

To use psych, you may need to reinstall ruby 1.9.2 with psych support.
On OSX with homebrew and rvm, this will do the trick:

brew install libyaml
rvm install ruby-1.9.2 --with-libyaml-dir=/usr/local

For more info, see the following:

@myronmarston Document known issue with syck. fbc1fac
Commits on Feb 09, 2011
@myronmarston Favor polymorphism over ternary operator. 3639d0b
@myronmarston Fix VCR::HttpStubbingAdapters::FakeWeb.stub_requests so that it handl…
…es empty headers.
@myronmarston Add new :update_content_length_header cassette option. 1e2e011
@myronmarston Update changelog. d66f924
Commits on Feb 10, 2011
@myronmarston Add new :once record mode.
Closes #44.
@myronmarston Re-organize description of record modes. f840dc3
@myronmarston Make the new `:once` record mode the default. 2f62c03
@myronmarston Update changelog. 8ca9b67
@myronmarston Update gem description. 78a8028
Commits on Feb 11, 2011
@myronmarston Use a more straightforward way to delegate to Object#method. 55fab3b
@myronmarston Move hooks.rb into util directory. 3b0e037
@myronmarston Move cucumber and rspec support into new test_frameworks directory. d9b2f33
@myronmarston Extract deprecations into separate files for each class. 426ac36
@myronmarston Use an explicit lambda in some specs so that we properly test variabl…
…e args.

Blocks can already accept a variable number of args, but lambdas raise an error.  We should use a lambda so we can test it properly.
@myronmarston Unify handling of a variable number of args for a block into a reusab…
…le module.
Commits on Feb 12, 2011
@myronmarston Move all shared example group definitions into a directory. a8d61d8
Commits on Feb 13, 2011
@myronmarston Words. ea6933b
@myronmarston Add note about release policy using semantic versioning. d84800a
Commits on Feb 17, 2011
@myronmarston Ensure the cassette_library_dir is isolated for all specs.
Trying to get builds to pass on exposed some ordering dependencies between specs because of this setting.
@myronmarston Use metadata instead of #disable_warnings macro method. 983c148
@myronmarston Use metadata rather than #without_webmock_callbacks macro method. f30f2dc
@myronmarston Use metadata rather than #without_monkey_patches macro method. c217a7d
Commits on Feb 18, 2011
@myronmarston Use a shared example group rather than a macro method. 17926de
Commits on Feb 19, 2011
@myronmarston Setup build for
- Lock patron to 0.4.9.  On, my build failed because the newest patron uses a version of libcurl to new for the debian installation it uses.
- Setup ci:build.
Commits on Feb 24, 2011
@myronmarston Fix shared example group so it works on rubinius.
I was getting "unexpected return (LocalJumpError)".
Commits on Feb 27, 2011
@myronmarston Add travis build icon. acb9c52
@myronmarston Add new filter_sensitive_data configuration option.
Closes #38.
@myronmarston Match on headers to demonstrate that the header gets set back to the …
…original value before playback.
@myronmarston Update changelog. 06cf3f6
@myronmarston Lock curb to 0.7.8 as the latest version (0.7.12) seems to be having …
…issues installing through bundler.
Commits on Feb 28, 2011
@myronmarston Add support for 1aa5b6d
@myronmarston Add require so that users who required 'vcr/rspec' before still get v…
…cr loaded.
@myronmarston Allow specs to run when the code is not checked out through git.
The presence of `git` commands in my gemspec prevents bundler from being usable for `gem test vcr`.  This fixes the issue.
Commits on Mar 01, 2011
@myronmarston Don't configure rspec to use debugger when running tests through `gem…
… test vcr`.
@myronmarston Update changelog. fd67425
@myronmarston Use separate Before/After hooks rather than a single Around hook.
Unfortunately, cucumber doesn't run background steps within the Around hook.

Closes #45.
@myronmarston Update Changelog. 8050f83
@myronmarston Extract deprecation code into the lib/vcr/deprecations directory. d045a93
@myronmarston Rename relish doc. 851b83b
@myronmarston Add readme, changelog and license to relish docs. 284494f
@myronmarston Adding getting started document. 6435062
@myronmarston Link to relish instead of wiki. aab8b57
Commits on Mar 02, 2011
@myronmarston Fix failing cuke on JRuby. ef249d1
@myronmarston We shouldn't define Ping at the top level. c178cb0
@myronmarston Add list of supported ruby interpreters to README. 9329f89
@myronmarston Use proper constant. 508efd0
@myronmarston 1.7.0 release. 1467ebb