Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

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.
Commits on Mar 09, 2010
@myronmarston Changed the configuration option to have a default_cassette_options h…
…ash. #default_cassette_record_mode is deprecated.
@myronmarston Added a global before/after that sets default settings for VCR and fa…
…keweb, so our specs don't have to keep setting things back to the defaults in their own before and after blocks.
@myronmarston Added #allow_real_http cassette option, that allows real http request…
…s for URLs that return true for the given lambda.
@myronmarston Updated readme. eb0ac7e
@myronmarston Updated the history. aa14820
@myronmarston Version bump to 0.2.0 59ca1b1
@myronmarston Updated gemspec. 5fd41fd
Commits on Mar 10, 2010
@myronmarston Refactored some of the step definitions. 6b7166a
@myronmarston Added asynchronous request replay scenario. This functionality works …
…but I didn't a scenario demonstrating it before.
Commits on Mar 13, 2010
@myronmarston Corrected the wording on a couple of specs. 6b148a0
@myronmarston Fixed a typo and the copyright date. f4eb12f
@myronmarston Updated Readme with links to the CI servers. 4714a00
Commits on Mar 24, 2010
@myronmarston Updated some of the method names/option keys to fit the VCR metaphor …
…better. The first pass of the code was based on "sandboxes" rather than "cassettes" and the terminology reflected that.


* VCR.create_cassette! => VCR.insert_cassette
* VCR.destroy_cassette! => VCR.eject_cassette
* VCR.with_cassette => VCR.use_cassette
* VCR::Cassette#destroy! => VCR::Cassette#eject
* VCR::Cassette#cache_file => VCR::Cassette#file
* VCR::Config.cache_dir => VCR::Config.cassette_library_dir
* :unregistered record mode => :new_episodes record mode
@myronmarston Moved the VCR::Config.default_cassette_record_mode deprecation into t…
…he deprecation file.
@myronmarston Updated readme. 7bdd7ab
Commits on Mar 25, 2010
@myronmarston Fixed deprecation warning message to use the correct method name. ea72321
@myronmarston 0.3.0 release. d4767bf
Commits on Apr 11, 2010
@myronmarston Updated our Net::HTTP extension so that the response is yielded after…
… the response is stored, in case the block has a return statement. Closes GH-1.
@myronmarston 0.3.1 release. 323d72d
@myronmarston Added request body and headers to recorded response. These will come …
…in handy for getting VCR to work with webmock.
@myronmarston Extracted the interactions with FakeWeb into an adapter so we can imp…
…lement the same adapter interface for other http stubbing libraries like WebMock.
@myronmarston Pulled the fakeweb logic that constructs the request_uri out of the n…
…et http extension and put it in the fakeweb extension.
@myronmarston Use the fakeweb http_stubbing_adapter rather than using fakeweb direc…
@myronmarston Updated features rake task to run the features against multiple http_…
@myronmarston Instead of unstubbing the previously stubbed requests, use a checkpoi…
…nt system, so that the http_stubbing registry is returned to exactly the same state.
@myronmarston Removed unneeded fakeweb extensions. 8fe911f
Commits on Apr 15, 2010
@myronmarston Changed the format of the cassettes. Use a VCR structured object rath…
…er than a Net::HTTP response as that is tied directly to net/http and I hope to get this to work with other http libraries eventually.
@myronmarston Added rake task to migrate old VCR cassettes to the new format, to ma…
…ke it easy for VCR users to upgrade.
@myronmarston Migrated all of the vcr cassette fixtures using the rake task. 59acae8
@myronmarston Added back request bodies since I had lost them in the migration. 11bbf3b
@myronmarston Updated the code to work with the new structs and terminology. a835bb5
@myronmarston Implemented the WebMock http stubbing adapter. 208310e
Commits on Apr 16, 2010
@myronmarston Updated the http interaction structs:
- Renamed RequestSignature to Request since the object represents the actual request.
- Changed the response headers to use an array for the values, since a response can have multiple values for the same header.
@myronmarston Updated our cassette fixtures to the latest format. 9a01697
Commits on Apr 17, 2010
@myronmarston Use VCR.http_stubbing_adapter rather than VCR::Config.http_stubbing_a…
@myronmarston Allow the webmock adapter to be used. 011586c
@myronmarston Update the default rake task to that it runs the features with the we…
…bmock adapter in addition to the fakeweb one.
@myronmarston Temporarily disable a spec that won't pass until some changes are mad…
…e to webmock.
@myronmarston Load our net/http extension so it gets used when webmock is used. Whe…
…n fakeweb is used, our net/http extension has to be loaded after it, so we load it after webmock as well.
@myronmarston Simplified our net http extension. 57dec56
@myronmarston Added logic to VCR::Config.http_stubbing_adapter so that it returns t…
…he appropriate value if just one of fakeweb/webmock are loaded.
@myronmarston Raise a helpful error message when people try to use VCR with depreca…
…ted cassettes.
Commits on Apr 18, 2010
@myronmarston Made most of VCR::Cassette's methods private. I had forgotten to make…
… the methods private before, but most of them don't need to be exposed.
@myronmarston Reorganized some code. d17615b
@myronmarston Disallow http connections by default. 5d89dff
@myronmarston Updated exception message to be more helpful. 0242578
@myronmarston Check that the versions of FakeWeb and WebMock are supported. 80ad7b3
@myronmarston Disallow http connections and check the adapter version when the VCR.…
…config block completes, rather than the first time http_stubbing_adpater is accessed. This ensures that these things are done before the test suite starts running.
Commits on Apr 19, 2010
@myronmarston Bumped the webmock version requirement to 1.1.0 as that is the versio…
…n number that will be used for the webmock release that supports VCR.
@myronmarston Override WebMock::NetConnectNotAllowedError so that it includes a hel…
…pful message about using VCR.
Commits on Apr 22, 2010
@myronmarston Added a benchmark to test the performance characterstics of fakeweb v…
…s webmock.
@myronmarston Renamed file. 8d41610
@myronmarston Fixed the vcr task so it actually, you fffd3aa
@myronmarston Change History file to markdown format and renamed it to changelog. 3e442f3
Commits on Apr 24, 2010
@myronmarston Renamed VCR::Cassette#http_stubbing_adapter to http_stubbing_library. 632db1f
@myronmarston Changed the readme to markdown format, and re-wrote most of it. cff2b84
@myronmarston Updated CHANGELOG with the info about what is coming in the next rele…
@myronmarston Updated gemspec info. ee245f3
@myronmarston Updated the cucumber VCR configuration so that it uses :fakeweb by de…
…fault if HTTP_STUBBING_ADAPTER is not set.
Commits on Apr 29, 2010
@myronmarston Use strings instead of symbols for the hash keys for Net::HTTP.post_f…

On my ruby 1.9.1 CI server, the build is failing with this error: "TypeError: can't dup Symbol".  I can't repro this locally (maybe a different 1.9.1 patch level?), but I think this may fix it.
@myronmarston 0.4.0 release. 7663252
Commits on May 12, 2010
@myronmarston Fixed a bug: Net::HTTPResponse#read_body was raising an error because…
… VCR "pre-read" the body when recording a new request.

My fix is to extend the already read response with a module that attempts to preserve the behavior of #read_body when the response has not yet been read.
@myronmarston 0.4.1 release. dfceeb1
Commits on Jun 07, 2010
@myronmarston Removed dependency on jeweler. Manage the gemspec by hand instead. Ex…
…posed the version:

- VCR.version 		=> string (in the format "major.minor.patch")
- => array of integers
- VCR.version.major => integer
- VCR.version.minor => integer
- VCR.version.patch => integer
@myronmarston Use the version in the URL to the README. 6a82f5c
@myronmarston Added cucumber scenario that demonstrates the use of a regex for a UR…
…I in a cassette.
@myronmarston Updated README with info about putting regexes in cassettes. df1e230
Commits on Jun 11, 2010
@myronmarston Remove the Net::ReadAdapter extension. We don't need it now that we r…
…ecord the response before calling the block passed to Net::HTTP#request. Our Net::HTTPResponse extension takes care of making the response act as if it's never been read and works with asynchronous requests properly.
@myronmarston Refactored the http_stubbing_adapter shared spec so that it can be re…
…-used for the different http libraries that webmock supports.
@myronmarston Move the Net::HTTP-specific scenarios and cucumber steps into separat…
…e files, so the main feature/step files can be re-used for multiple http libraries.
@myronmarston Refactor the vcr steps so they are polymorphic, and can use whichever…
… HTTP library is passed as HTTP_LIB.
Commits on Jun 12, 2010
@myronmarston Moved code out of fakeweb extension and into fakeweb http_stubbing_ad…
@myronmarston Changed the way we allow requests to localhost: rather than having a …
…per-cassette :allow_real_http option, use a #ignore_localhost config setting.

There's no way to make the :allow_real_http option work for the other http libraries.  This is a simpler way to get the important functionality.
Commits on Jun 15, 2010
@myronmarston Fixed warning: "already initialized constant NET_CONNECT_NOT_ALLOWED_…
@myronmarston Work around a bug in WebMock. 1bb664d
@myronmarston Ensure #request_stubbed? works, regardless of if the uri is a string …
…or URI.
@myronmarston Refactored our Net::HTTP recording, and corresponding specs, to make …
…it easier to setup the recording of WebMock's other http libraries, and have them share the same specs.
@myronmarston Remove old deprecations. The next release will be VCR 1.0.0, indicati…
…ng breaking changes.
Commits on Jun 16, 2010
@myronmarston Removed webmock work around that is no longer necessary. 969ac53
@myronmarston Disable FakeWeb::VERSION constant reassignment warnings. 9f08b7a
@myronmarston Hooked up recording of other http libraries, using WebMock.after_requ…
…est callback.
Commits on Jun 17, 2010
@myronmarston Some slight refactoring of our extensions.
WebMock has the same Net::HTTPResponse extension module I have, and to prevent instance variable name collisions, I renamed the instance variable I use.
@myronmarston Updated the fakeweb vs webmock benchmarks using the latest webmock. 2c33d93
Commits on Jun 18, 2010
@myronmarston Added cucumber scenarios to test using HTTPClient asynchronously. 86bc458
@myronmarston Fixed some formatting. fb57340
@myronmarston Generalized a cucumber step so I can easily pass different options to…
… a cassette.
Commits on Jun 19, 2010
@myronmarston Added :erb option that enables dynamic erb cassettes. 2b794ef
@myronmarston Configured rcov rake task. 8f2d6e4
@myronmarston Removed some unused code. bf32f17
@myronmarston Honor default :erb option. e31104e
@myronmarston Raise a more helpful error message when the ERB in a cassette referen…
…ces an undefined variable.
Commits on Jun 21, 2010
@myronmarston Clarified spec name. d102afd
@myronmarston Ensure VCR.http_stubbing_adapter returns the adapter being tested.
I guess this was happening by luck previously (allowing the specs to pass on my box) but the changed order of the specs on the CI server caused it to be a different adapter, causing some failing specs.
@myronmarston Added necessary before/after blocks to prevent WebMock from extending…
… the response with WebMock's version of the same response extension.
@myronmarston Fixed the ignore_localhost option so that localhost requests are neve…
…r recorded when it's set to true.
Commits on Jun 22, 2010
@myronmarston Kill the localserver processes when the test process exits. cac7d2e
@myronmarston Refactored rakefile so that we have features:fakeweb and features:web…
…mock rake tasks.
@myronmarston Our specs that depend on the spawning of a localhost webserver in a s…
…eparate process do not pass on heroku due to their restrictions, so I've disabled them here when the specs are run on heroku.
@myronmarston Fixed the heroku pending module so it passes the pending message to t…
…he pending method.
@myronmarston Disable cucumber scenarios that can't pass on heroku due to heroku's …
@myronmarston Don't set message expectations on nil. 333c394
@myronmarston Add capybara as an explicit development dependency since we use Capyb…
…ara::Server to start a localhost server in some tests.
@myronmarston Ignore error that occurs occassionally when the child process exits i…
…mmediately before #wait is called.
@myronmarston Fixed ignore_localhost so that localhost requests are not registered …
…with the http_stubbing_adapter.
@myronmarston Added spec and feature coverage for em-http-request support. ef1447c
@myronmarston Require webmock 1.3.0. a664c18
@myronmarston Added check_dependencies rake task that is a prerequesite for the spe…
…cs and features.
@myronmarston Relax the cucumber version requirement a bit. 9b7c7c8
@myronmarston Updated benchmarks with latest results. ef8519a
@myronmarston Use #ignore_localhost? rather than #ignore_localhost, since it's more…
… idiomatic ruby.
@myronmarston Gracefully used requirement? or version_requirements? based on which …
…is available. It appears that requirement? isn't available in rubygems 1.3.5.
@myronmarston 1.0.0 release. a5ac5bf
Commits on Jun 26, 2010
@myronmarston Got specs and features to pass on jruby. 50965aa
@myronmarston Improve the speed of some specs: rather than repeating the same HTTP …
…request for each spec, make the HTTP request once, and then clone the response for each spec.
Commits on Jun 27, 2010
@myronmarston The code that stops the localhost server process isn't working on 1.9.2.
Hopefully I can fix it at some point, but for now I'm disabling it and the code that depends on it for 1.9.2.
@myronmarston Got the specs and features to pass on 1.9.2.
Ruby 1.9.1 has some slight YAML serialization differences from 1.8.x.  1.9.2 has the same YAML serialization as 1.8.x, so I've changed the fixtures directories from 1.8.6, 1.8.7 and 1.9.1 to 1.9.1 and not_1.9.1.
@myronmarston Add 1.9.2-preview3 to the list of tested ruby versions. 7bb861c
@myronmarston Fixed localhost server so that it properly shuts down with rack 1.2.1.
I had disabled this for 1.9.2 because I thought it was an issue with that version of ruby, but it was actually an issue with having rack 1.2.1 installed for 1.9.2.  Now I've re-enabled it for 1.9.2.
@myronmarston Ignore rubinius .rbc files. 8e98eac
Commits on Jun 28, 2010
@myronmarston Fixed readme--the :erb setting should be "true" rather than ":true" (…
…a symbol).
Commits on Jun 30, 2010
@myronmarston Added tags to .gitignore. 643c3ce
Commits on Jul 01, 2010
@myronmarston Fixed requires so that each spec file can be run individually. 5243544
@myronmarston Normalize request and response headers so they are always saved with
lower case keys and arrays of values.

This is the way Net::HTTP normalizes them, but recording non-Net::HTTP
requests resulted in cassettes with headers that deviated from this
@myronmarston Fixed VCR.use_cassette so that it only ejects the cassette if it was …
…successfully inserted.
@myronmarston Added spec for basic auth for #request_uri on the http stubbing
@ericallam ericallam Fixed an undefined constant FakeWeb::Utility error 0638040
@myronmarston Fixed spec description. 5226f81
@myronmarston Reorganized specs so that they are grouped more logically. 4b8f6dc
Commits on Jul 02, 2010
@myronmarston Updated README. e9c7e31
@myronmarston 1.0.1 release. ade8181