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 .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
This comparison is big! We’re only showing the most recent 250 commits
Commits on Dec 01, 2010
@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
@myronmarston Fix readme links. bd013c9
@myronmarston Fixes for relish. 5bd3bff
@myronmarston Use "And" instead of second "Given". b19a93f
@myronmarston Fleshed out cassette format outline. fb6dbaa
Commits on Mar 05, 2011
@myronmarston Fix faraday middleware to handle nil response headers. 0131853
Commits on Mar 06, 2011
@myronmarston Fixed net/http adapter.
URI#request_uri should be used rather than URI#path, since #request_uri includes query params but #path does not.
@myronmarston Fix faraday adapter so that it properly normalizes query parameters. 0d4d9f5
@myronmarston Fix broken cukes.
We can't have different adapters return different values for #normalize_uri because it breaks when you stub with multiple libraries.
Commits on Mar 19, 2011
@myronmarston 1.7.1 release. 0022cf7
Commits on Mar 24, 2011
@myronmarston Add rvm rubies to travis build. e875ddc
Commits on Mar 26, 2011
@myronmarston Don't build so many rubies. Travis seems to have gotten confused. f189e62
@myronmarston Ensure that header values are the same when recording and replaying.
- Typhoeus would have a single header value like 'text/html' when recording, but it was in an array on playback ['text/html'].
- Faraday headers are returned with lower case keys, and I was not handling this properly at all.

There are a few adapter/http library combinations that do not work properly when there are multiple values for one header:
- Faraday/Patron
- WebMock/HTTP Client
- WebMock/EM HTTP Request
- WebMock/Curb

I think this is due to a bug in those libraries.  I could change the way I pass headers to Faraday and WebMock, but that would break the other libs used with Faraday and WebMock (i.e. Faraday/Net::HTTP or WebMock/Net::HTTP) so I think it's best for now to just leave these pending.

Closes #50.
@myronmarston Update to em-http-request 0.3.0.
This fixes some specs that were previously pending due to a bug in em-http-request.
@myronmarston 1.7.2 release. 717d7c8
Commits on Apr 01, 2011
@myronmarston Update to Faraday 0.6. fb156a7
@myronmarston 1.8.0 release. 487332d
@myronmarston Fix spec to use https like the doc string says. 239f744
Commits on Apr 05, 2011
@myronmarston Fix synopsis example. has changed :(.
Commits on Apr 06, 2011
@myronmarston I've been told travis supports all these rubies let's try bu…
…ilding against them all.
Commits on Apr 08, 2011
@myronmarston Add some test cases for https requests. fb9d0f7
Commits on Apr 09, 2011
@myronmarston Use local tmp folder rather than Dir.mktmpdir for spec isolation.
On travis, the jruby build is failing every spec with an error like "Permission denied - /tmp/d20110408-13741-ptyay/."  This should fix it.
@myronmarston Fix spec so it passes on JRuby on travis.
On travis, JRuby is having permission denied errors for Dir.mktmpdir.
@myronmarston Fix spec so we don't create a 'spec..' dir on accident. 28d8916
@myronmarston Don't run em-http-request tests on travis on 1.8.6.
On travis, we're getting a weird error like:

ruby: symbol lookup error: /home/travis/.rvm/gems/ruby-1.8.6-p420/gems/em-http-request-0.3.0/lib/ undefined symbol: rb_hash_lookup
@myronmarston Lock linecache19 to a version that can install on 1.9.1 and 1.9.2. ded5cf1
@myronmarston Ignore leading and trailing whitespace for YAML fragment matching step. e2adda0
Commits on Apr 13, 2011
@myronmarston Install excon. 4cff3f5
@myronmarston Add beginnings of Excon adapter. 1b135e5
@myronmarston Check Excon version. b3e0b9c
@myronmarston Implement excon http adapter module. 38346fd
@myronmarston Implement Excon adapter. 92786a7
@myronmarston Add excon to cukes. 46341a1
@myronmarston Add excon info to readme. 0eef043
@myronmarston Update to Excon 0.6.1. 7bc841a
@myronmarston Fix spec so it doesn't create a cassette_lib directory in the project…
… root.
@myronmarston Fix cassette/format.feature cuke for excon.
Excon doesn't expose http_version or status.message so these are set to nil.
@myronmarston The excon adapter doesn't yet support regex URIs. 3b040aa
@myronmarston Remove travis status icon.
The build has been very unstable on travis recently (even though it passes fine locally) so there's no point in advertising the "unstable" travis status.
Commits on Apr 15, 2011
@myronmarston Upgrade excon to 0.6.2. 4c10172
@myronmarston Remove jruby stuff from full build--I can't get jruby to work with th…
…e full build :(.
@myronmarston 1.9.0 release. ab598a7
@myronmarston Lock addressable to 2.2.4--2.2.5 has some regression errors.
See sporkmonger/addressable#33 for more info.
Commits on Apr 19, 2011
@myronmarston Build just 1.8.7 for now. 8f3f960
Commits on Apr 20, 2011
@myronmarston Fix header normalization to properly handle nested arrays and non-str…
…ing values.

Closes #40.
Commits on Apr 22, 2011
@myronmarston Fix synopsis description. 89b3403
Commits on Apr 24, 2011
@myronmarston Curb uses the Curl namespace.
(thanks @phiggins!)
Commits on Apr 26, 2011
@myronmarston Add cassette naming cuke that documents the fact that VCR sanitizes c…
…assette names.
@myronmarston Lock relish to 0.2.2 since 0.2.3 has a jruby-openssl dependency.
This dependency causes issues since bundler puts it on the load path.

Closes #57.
@myronmarston Remove spec focusing I accidentally left before. bdd8e95
Commits on May 06, 2011
@myronmarston Use new github markdown syntax features. aa61962
@myronmarston Relax relish version constraint now that jruby-openssl isn't a depend…
@myronmarston Fix capitalization of cassette name.
This cuke should hopefully pass travis now.
@myronmarston Now that the 1.8.7 travis build is passing, let's try against other M…
…RI rubies.
@myronmarston Don't enable debugging on 1.9.1.
For some reason I'm getting an error on travis for `config.debug = true` even though it works fine locally.
Commits on May 07, 2011
@myronmarston Remove obselete reference to ba1ce1f
Commits on May 11, 2011
@jsmestad jsmestad Allow cassette insertions to be ignored while VCR is turned off. 1f3c02c
@myronmarston Cleanup new :disable_cassette_errors option.
- Rename it to :ignore_cassettes--I think this is more intention-revealing.
- Ensure `insert_cassette` does not actually insert a cassette when VCR is turned off with :ignore_cassettes => true.
- No need for `use_cassette` to handle this since `insert_cassette` handles it properly now.
- Add additional specs.
- Fix cassette insertion error message so it mentions the new
  :ignore_cassettes option.
@myronmarston Add scenarios to document new :ignore_cassettes option.
Closes #56.
@myronmarston Update changelog. 7613284
@myronmarston Raise an argument error when `VCR.turn_off!` is passed invalid options. 660267f
Commits on May 12, 2011
@myronmarston For the cucumber cuke, pull the server code into a separate file to h…
…opefully make it clearer that vcr_cucumber_helpers is not a file for end users to require.

See for more details.
@myronmarston Update contributors. b466443
@myronmarston Fix rack middleware so that it is threadsafe.
VCR as a whole is not designed to be threadsafe (running your tests in multiple threads is asking for trouble), but the rack middleware needs to be, since some rack servers (like WEBrick) are multithreaded.

Closes #58.
@myronmarston Use a mutex rather than Thread.exclusive.
I'm getting errors from the rack middleware cuke on 1.8 w/ the Thread.exclusive.
Commits on May 13, 2011
@myronmarston Only build 1.9.2 so I can focus on the one failing ruby. fd9fa29
@myronmarston Focus on just one failed cucumber scenario with logging output so I c…
…an see what's going on on travis.
Commits on May 14, 2011
@myronmarston Update rspec to latest. f52b13a
@myronmarston Make webrick logging visible on CI but not locally. 7be1de9
@myronmarston Use ci tag rather than wip for travis. b26c536
@myronmarston Ensure rack response body responds to each. 4453e92
@myronmarston Don't try to boot the sinatra server multiple times. 3449849
Commits on May 16, 2011
@myronmarston For some reason, this pending spec passes on travis CI even though it…
… fails locally.
@myronmarston Run all cukes on CI.
One of the ones that was failing on 1.9.2 passes in isolation, so I want to run them all to see if there's an issue with running all of them.
Commits on May 17, 2011
@myronmarston Run against all rubies on travis.
For some reason, I got a weird error on travis when running against 1.9.2 for HTTPClient, where the response was already the body string rather than an object that responds to #content.  This fixes that as well.
Commits on May 18, 2011
@myronmarston Update addressable. ef232ea
Commits on May 19, 2011
@myronmarston Update to latest webmock. a32bc78
@myronmarston 1.10.0 release. 5fcfa61
Commits on May 30, 2011
@myronmarston fix typo d37b7f8
Commits on Jun 03, 2011
@myronmarston Allow relish docs to be re-pushed when I run "rake relish". 4db3d6e
Commits on Jun 14, 2011
@myronmarston Update Faraday to latest. 0308929
@myronmarston Github has changed their url for raw gists. 53023c2
Commits on Jun 20, 2011
Bradley option to turn off cassettes is :ignore_cassettes. error message help…
… said it was :ignore_cassette, singular. This makes it nicer when you run into this problem :)
@myronmarston Just run against 1.8.7 and 1.9.2 for now as I seem to regularly get b…
…acked up on travis.
Commits on Jun 21, 2011
@myronmarston Merge pull request #72 from bradleyisotope/patch-1
option to turn off cassettes is :ignore_cassettes.  error message help sa
@myronmarston Update changelog. b604625
Commits on Jul 05, 2011
@myronmarston Fix excon adapter to handle query specified as a hash.
Closes #73.
Commits on Jul 15, 2011
@myronmarston Upgrade excon to latest. 113487e
@geemus geemus [excon] stubbed_response should return hash instead of struct 2b7ed5f
@myronmarston Update changelog. 2659fd5
Commits on Jul 16, 2011
@myronmarston Add spec for excon's streaming API. 00f50c2
@myronmarston Fix excon adapter so that it records a response even when excon raise…
…s an error due to an unexpected response.

Closes #77.
@myronmarston Update excon version requirement to 0.6.5. 042a1b5
Commits on Jul 17, 2011
@myronmarston 1.10.1 release. 7573d96
@myronmarston 1.10.2 release.
Botched 1.10.1 by building gem on 1.9.2 with psych :(.
Commits on Jul 22, 2011
@myronmarston Add recent contributors to readme. d78791e
@myronmarston Handle case where body is nil.
Closes #79.
@myronmarston 1.10.3 release. d62fe13
Commits on Aug 16, 2011
@myronmarston Use latest webmock (1.7.0). 407b74e
@myronmarston WebMock::Net::HTTPResponse has been renamed to Net::WebMockHTTPResponse. 1eafe63
@myronmarston Refactor monkey patch management so that they are turned off by defau…
…lt and only enabled for individual specs.
@myronmarston Fix typhoeus adapter to work with latest WebMock.
WebMock now directly supports Typhoeus; we need to disable it so there aren't conflicts.
@myronmarston Bump up the webmock minimum version. df067af
@myronmarston Remove scenario that doesn't provide much value.
Also, it was failing with the latest webmock since webmock loads typhoeus now.
@myronmarston Remove cukes from travis build.
They are very slow and may have been the source of previous travis issues.
@myronmarston Disable a spec from running on CI--it gets a stack level too deep err…
…or. I don't get it locally though--must be some weird psych issue.
Commits on Aug 18, 2011
@myronmarston Build against some other MRI rubies. 8320c22
@myronmarston Don't install a bunch of extra unnecessary gems on travis. d21b758
@myronmarston Remove extra server logging from travis CI output. 5ff5728
@myronmarston Disable RSpec debug flag for CI. 5bb86dd
@myronmarston Update travis build matrix.
- The version of cucumber I'm locked to doesn't install on 1.9.3.
- Let's try building against rbx and jruby, too.
@myronmarston Typhoeus is not available on JRuby. 0cf5a1e
@myronmarston Rubinius is getting crazy crashes on travis, so skip it for now. 698ad7d
@myronmarston Rename method so it matches what it actually does. 2349cbc
@myronmarston Extract common adapter logic. 9eacb74
@myronmarston WebMock 1.7.4 is out. abb8be9
@myronmarston Lock linecache to the latest version that works on 1.8.6 (since we st…
…ill support 1.8.6).
Commits on Aug 19, 2011
@myronmarston 1.11.0 release. 966d8ba
@myronmarston Prevent releases on 1.9 as that leads to weird psych/syck errors in t…
…he gemspec.
@myronmarston 1.11.1 release. 5393e26