vcr 2.9.3 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/features/about_these_examples.md +1 -1
  3. data/features/cassettes/automatic_re_recording.feature +4 -4
  4. data/features/cassettes/decompress.feature +3 -3
  5. data/features/cassettes/exclusive.feature +11 -8
  6. data/features/cassettes/format.feature +135 -32
  7. data/features/cassettes/naming.feature +2 -2
  8. data/features/cassettes/no_cassette.feature +4 -4
  9. data/features/configuration/allow_http_connections_when_no_cassette.feature +6 -3
  10. data/features/configuration/cassette_library_dir.feature +2 -2
  11. data/features/configuration/debug_logging.feature +15 -8
  12. data/features/configuration/filter_sensitive_data.feature +8 -7
  13. data/features/configuration/hook_into.feature +8 -8
  14. data/features/configuration/ignore_request.feature +13 -14
  15. data/features/configuration/preserve_exact_body_bytes.feature +5 -5
  16. data/features/configuration/uri_parser.feature +15 -11
  17. data/features/hooks/after_http_request.feature +5 -4
  18. data/features/hooks/around_http_request.feature +3 -3
  19. data/features/hooks/before_http_request.feature +4 -2
  20. data/features/hooks/before_playback.feature +14 -15
  21. data/features/hooks/before_record.feature +10 -10
  22. data/features/http_libraries/em_http_request.feature +6 -3
  23. data/features/http_libraries/net_http.feature +15 -5
  24. data/features/middleware/faraday.feature +2 -2
  25. data/features/middleware/rack.feature +4 -4
  26. data/features/record_modes/all.feature +5 -5
  27. data/features/record_modes/new_episodes.feature +2 -2
  28. data/features/record_modes/once.feature +3 -3
  29. data/features/step_definitions/cli_steps.rb +37 -39
  30. data/features/support/env.rb +29 -26
  31. data/features/support/http_lib_filters.rb +0 -7
  32. data/features/test_frameworks/cucumber.feature +11 -10
  33. data/features/test_frameworks/rspec_macro.feature +5 -30
  34. data/features/test_frameworks/rspec_metadata.feature +9 -8
  35. data/features/test_frameworks/test_unit.feature +5 -2
  36. data/lib/vcr.rb +86 -14
  37. data/lib/vcr/cassette.rb +4 -2
  38. data/lib/vcr/cassette/serializers.rb +10 -8
  39. data/lib/vcr/cassette/serializers/compressed.rb +45 -0
  40. data/lib/vcr/configuration.rb +38 -17
  41. data/lib/vcr/library_hooks/fakeweb.rb +1 -0
  42. data/lib/vcr/library_hooks/faraday.rb +5 -1
  43. data/lib/vcr/middleware/faraday.rb +13 -9
  44. data/lib/vcr/test_frameworks/cucumber.rb +39 -5
  45. data/lib/vcr/version.rb +1 -1
  46. data/spec/acceptance/concurrency_spec.rb +51 -0
  47. data/spec/{vcr → lib/vcr}/cassette/erb_renderer_spec.rb +0 -0
  48. data/spec/{vcr → lib/vcr}/cassette/http_interaction_list_spec.rb +0 -0
  49. data/spec/{vcr → lib/vcr}/cassette/migrator_spec.rb +10 -9
  50. data/spec/{vcr → lib/vcr}/cassette/persisters/file_system_spec.rb +0 -0
  51. data/spec/{vcr → lib/vcr}/cassette/persisters_spec.rb +0 -0
  52. data/spec/{vcr → lib/vcr}/cassette/serializers_spec.rb +8 -2
  53. data/spec/{vcr → lib/vcr}/cassette_spec.rb +0 -0
  54. data/spec/{vcr → lib/vcr}/configuration_spec.rb +0 -0
  55. data/spec/{vcr → lib/vcr}/deprecations_spec.rb +0 -0
  56. data/spec/{vcr → lib/vcr}/errors_spec.rb +0 -0
  57. data/spec/{vcr → lib/vcr}/extensions/net_http_response_spec.rb +0 -0
  58. data/spec/{vcr → lib/vcr}/library_hooks/excon_spec.rb +0 -0
  59. data/spec/{vcr → lib/vcr}/library_hooks/fakeweb_spec.rb +0 -0
  60. data/spec/{vcr → lib/vcr}/library_hooks/faraday_spec.rb +0 -0
  61. data/spec/{vcr → lib/vcr}/library_hooks/typhoeus_0.4_spec.rb +0 -0
  62. data/spec/{vcr → lib/vcr}/library_hooks/typhoeus_spec.rb +0 -0
  63. data/spec/{vcr → lib/vcr}/library_hooks/webmock_spec.rb +2 -2
  64. data/spec/{vcr → lib/vcr}/library_hooks_spec.rb +0 -0
  65. data/spec/{vcr → lib/vcr}/middleware/faraday_spec.rb +0 -0
  66. data/spec/{vcr → lib/vcr}/middleware/rack_spec.rb +0 -0
  67. data/spec/{vcr → lib/vcr}/request_ignorer_spec.rb +0 -0
  68. data/spec/{vcr → lib/vcr}/request_matcher_registry_spec.rb +0 -0
  69. data/spec/{vcr → lib/vcr}/structs_spec.rb +0 -0
  70. data/spec/{vcr → lib/vcr}/test_frameworks/cucumber_spec.rb +0 -0
  71. data/spec/{vcr → lib/vcr}/test_frameworks/rspec_spec.rb +0 -0
  72. data/spec/{vcr → lib/vcr}/util/hooks_spec.rb +0 -0
  73. data/spec/{vcr → lib/vcr}/util/internet_connection_spec.rb +0 -0
  74. data/spec/{vcr → lib/vcr}/util/version_checker_spec.rb +0 -0
  75. data/spec/{vcr → lib/vcr}/version_spec.rb +0 -0
  76. data/spec/{vcr_spec.rb → lib/vcr_spec.rb} +2 -2
  77. data/spec/spec_helper.rb +21 -50
  78. data/spec/support/cucumber_helpers.rb +39 -0
  79. data/spec/support/limited_uri.rb +1 -11
  80. data/spec/support/shared_example_groups/hook_into_http_library.rb +2 -1
  81. data/spec/support/vcr_localhost_server.rb +2 -3
  82. metadata +475 -123
  83. data/.gemtest +0 -0
  84. data/.gitignore +0 -52
  85. data/.gitmodules +0 -3
  86. data/.rspec +0 -2
  87. data/.travis.yml +0 -27
  88. data/.yardopts +0 -9
  89. data/Appraisals +0 -5
  90. data/CHANGELOG.md +0 -987
  91. data/CONTRIBUTING.md +0 -26
  92. data/Gemfile +0 -54
  93. data/Gemfile.lock +0 -159
  94. data/LICENSE +0 -20
  95. data/README.md +0 -243
  96. data/Rakefile +0 -197
  97. data/Upgrade.md +0 -289
  98. data/benchmarks/http_stubbing_libraries.rb +0 -59
  99. data/benchmarks/null_logging.rb +0 -62
  100. data/cucumber.yml +0 -16
  101. data/features/.nav +0 -62
  102. data/features/cassettes/persistence.feature +0 -63
  103. data/features/support/vcr_cucumber_helpers.rb +0 -46
  104. data/gemfiles/typhoeus_old.gemfile +0 -34
  105. data/gemfiles/typhoeus_old.gemfile.lock +0 -133
  106. data/script/ci.sh +0 -27
  107. data/spec/capture_warnings.rb +0 -73
  108. data/spec/quality_spec.rb +0 -51
  109. data/vcr.gemspec +0 -23
data/.gemtest DELETED
File without changes
data/.gitignore DELETED
@@ -1,52 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
- tags
16
-
17
- ## PROJECT::GENERAL
18
- coverage
19
- coverage.data
20
- rdoc
21
- pkg
22
-
23
- ## PROJECT::SPECIFIC
24
- features/fixtures/vcr_cassettes/**/temp/
25
- *.rbc
26
- .rbc
27
- .rbx
28
- .bundle
29
- tmp
30
- rerun.txt
31
-
32
- features/README.md
33
- features/CHANGELOG.md
34
- features/LICENSE.md
35
- features/Upgrade.md
36
- features/CONTRIBUTING.md
37
-
38
- ## PROJECT::TOOLS
39
-
40
- .rvmrc
41
- .yardoc
42
- doc
43
-
44
- ## PROJECT::EDITORS
45
- .idea/
46
-
47
- .rbenv-version
48
- .ruby-version
49
- .ruby-gemset
50
- bin/*
51
- bundle/*
52
- .rspec-local
@@ -1,3 +0,0 @@
1
- [submodule "vendor/rspec-1"]
2
- path = vendor/rspec-1
3
- url = git://github.com/myronmarston/rspec-1.git
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format progress
2
- --color
@@ -1,27 +0,0 @@
1
- language: ruby
2
- env: CUCUMBER_FORMAT=progress
3
- bundler_args: --without extras
4
- script: "script/ci.sh"
5
- services:
6
- - redis-server
7
- rvm:
8
- - 1.8.7
9
- - 1.9.2
10
- - 1.9.3
11
- - 2.0.0
12
- - 2.1.0
13
- - ree
14
- - jruby-18mode
15
- - jruby-19mode
16
- - rbx-18mode
17
- - rbx-19mode
18
- matrix:
19
- allow_failures:
20
- - rvm: jruby-18mode
21
- - rvm: jruby-19mode
22
- - rvm: rbx-18mode
23
- - rvm: rbx-19mode
24
- branches:
25
- except:
26
- - gh-pages
27
-
data/.yardopts DELETED
@@ -1,9 +0,0 @@
1
- --no-private
2
- --exclude features
3
- --markup markdown
4
- --hide-void-return
5
- -
6
- CHANGELOG.md
7
- CONTRIBUTING.md
8
- LICENSE
9
- Upgrade.md
data/Appraisals DELETED
@@ -1,5 +0,0 @@
1
- appraise "typhoeus-old" do
2
- gem 'typhoeus', '~> 0.4.2'
3
- gem 'webmock', '1.8.11'
4
- end
5
-
@@ -1,987 +0,0 @@
1
- ## 2.9.3 (September 7, 2014)
2
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.9.2...v2.9.3)
3
-
4
- Bug Fixes:
5
-
6
- * Fix `VCR::Cassette#serializable_hash` so that it does not allow
7
- `before_record` hooks to apply mutations to existing HTTPInteraction
8
- instances. (Myron Marston)
9
-
10
- ## 2.9.2 (May 27, 2014)
11
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.9.1...v2.9.2)
12
-
13
- Bug Fixes:
14
-
15
- * Fix RSpec metadata integration once more -- we changed it a bit more
16
- in response to user feedback. (Myron Marston)
17
-
18
- ## 2.9.1 (May 23, 2014)
19
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.9.0...v2.9.1)
20
-
21
- Bug Fixes:
22
-
23
- * Fix RSpec metadata integration to not trigger deprecation warnings
24
- with RSpec 3.0.0.rc1+. (Janko Marohnić)
25
-
26
- ## 2.9.0 (March 27, 2014)
27
-
28
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.8.0...v2.9.0)
29
-
30
- Enhancements:
31
-
32
- * Update version checking to only assert that a given library is >=
33
- a minimum version. (Ryan Foster)
34
- * Explicitly support the latest Excon release (0.32). (Ryan Foster)
35
- * Explicitly support the latest Excon release (0.31). (Michiel de Mare)
36
- * Explicitly support the latest Webmock releases (1.16, 1.17).
37
- (Ryan Foster, Lawson Kurtz)
38
-
39
- ## 2.8.0 (November 23, 2013)
40
-
41
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.7.0...v2.8.0)
42
-
43
- Enhancements:
44
-
45
- * Explicitly support the latest Excon release (0.29). (Myron Marston)
46
- * Add `:body_as_json` request matcher. (Mike Dalton)
47
- * Include the body in the `UnhandledHTTPRequestError` message when
48
- matching on `:body` to help identify the request. (Chris Gunther)
49
-
50
- Bug Fixes:
51
-
52
- * Fix Excon adapter so that it properly records responses even when
53
- a middleware raises an error (such as via the `:expects` Excon
54
- option). Previously, the order `response_call` was invoked on
55
- Excon middleware caused VCR's recording ot be skipped when an
56
- error was raised by another middleware. To fix this, we have
57
- split up VCR Excon middleware into two middlewares that we can
58
- insert into the stack at the appropriate spots. Note that to get
59
- this to work, Excon < 0.25.2 is no longer supported.
60
- (Myron Marston)
61
- * Fix Excon adapter so that we pass it a dup of the body string
62
- rather than the body string itself, since Excon has code paths
63
- that will mutate the stubbed response string we give it, wreaking
64
- confusing havoc. (Myron Marston)
65
- * Fix rspec metadata implementation so that it does not emit warnings
66
- on RSpec 2.99. (Herman Verschooten)
67
-
68
- ## 2.7.0 (October 31, 2013)
69
-
70
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.6.0...v2.7.0)
71
-
72
- Enhancements:
73
-
74
- * Explicitly support the latest WebMock releases (1.14 and 1.15).
75
- (Eduardo Maia, Johannes Würbach)
76
- * Explicitly support the latest Excon releases (0.27 and 0.28).
77
- (Myron Marston)
78
- * Add support for Excon unix sockets by leveraging its
79
- new `::Excon::Utils.request_uri` method. (Todd Lunter)
80
- * Reword the "it may not work with this version" warning
81
- message so the intent is more clear (Myron Marston).
82
- * Support post/put bodies being specified as a hash when
83
- using Typhoeus by leveraging it's new `encoded_body` API.
84
- (Myron Marston, Hans Hasselberg)
85
-
86
- Bug Fixes:
87
-
88
- * Fix detection of encoding errors for MultiJson 1.8.1+.
89
- (Myron Marston).
90
- * Fix file name sanitization to better handle paths that have
91
- a dot in them (Rob Hanlon, Myron Marston).
92
- * Fix Faraday middleware so that it works properly when another
93
- adapter is exclusively enabled (Myron Marston).
94
-
95
- ## 2.6.0 (September 25, 2013)
96
-
97
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.5.0...v2.6.0)
98
-
99
- Enhancements:
100
-
101
- * Add `VCR::Cassette#originally_recorded_at` for use when freezing
102
- time based on when the cassette was recorded. (Myron Marston)
103
- * Improve the `:allow_unused_http_interactions => false` option
104
- so that it does not raise an error when there are unused interactions
105
- due to the test failing on its own; otherwise, it could raise
106
- an error and silence the original test failure. (Myron Marston)
107
- * Improve perf when no logger is used by having it short-circuit
108
- and not bother formatting a logger message that won't be
109
- printed, anyway (Luan Santos and Matt Parker).
110
-
111
- Bug Fixes:
112
-
113
- * Fix confusing errors that could result when using the YAML serializer
114
- if the client code added some state (e.g. via an extension module)
115
- onto a request or response body. (Myron Marston)
116
- * Ensure response body is always recorded when hooking into `:excon`,
117
- even when using a `:response_block` and an unexpected status is
118
- returned. Excon doesn't invoke the `:response_block` in this case,
119
- requiring special handling. (James Bence)
120
- * Explicitly support the latest WebMock (1.13). (Ron Smith)
121
- * Explicitly support the latest Excon (0.26). (Myron Marston)
122
- * Fix detection of encoding errors to handle `ArgumentError` that
123
- is raised by recent versions of `MultiJson`. (Myron Marston)
124
- * Fix Excon adapter so that it allows VCR to play nicely with
125
- manual Excon stubs (using Excon's `Excon.stub` API). (Myron Marston)
126
- * Fix Typhoeus adapter so that it sets `effective_url` properly
127
- when the `:followlocation` option is used and a redirect is
128
- followed. (Myron Marston)
129
-
130
- ## 2.5.0 (May 18, 2013)
131
-
132
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.4.0...v2.5.0)
133
-
134
- Bug Fixes:
135
-
136
- * Fix `around_http_request` so that it does not raise confusing
137
- errors when requests are made in multiple threads.
138
- * Fix `configure_rspec_metadata!` so that you can safely call it
139
- more than once
140
-
141
- Enhancements:
142
-
143
- * Relax WebMock version checker to allow WebMock 1.10 and 1.11 without
144
- issuing warnings (Johannes Würbach and Myron Marston).
145
- * Update Excon integration to take advantage of new Excon middleware
146
- architecture. This is a more robust way to hook into Excon and will
147
- be less prone to breakage due to internal Excon changes (Myron
148
- Marston).
149
-
150
- Deprecations:
151
-
152
- * Deprecate support for Typhoeus < 0.5. It will be removed in
153
- VCR 3.0 (Sheel Choksi).
154
-
155
- ## 2.4.0 (January 4, 2013)
156
-
157
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.3.0...v2.4.0)
158
-
159
- Enhancements:
160
-
161
- * Add `:query` request matcher. The new `query_parser` config option can
162
- bet set to change how the query is parsed. Thanks to [Nathaniel
163
- Bibler](https://github.com/nbibler) for implementing this.
164
-
165
- Bug Fixes:
166
-
167
- * Fix previously recorded requests not matching when using the URIWithoutParams
168
- builtin matcher. In the case where the original request was recorded without
169
- parameters and subsequent requests filter out all parameters, the subsequent
170
- requests were failing to match the originally recorded request. Thanks to
171
- [Dmitry Jemerov](https://github.com/yole) for reporting the issue and
172
- [Nathaniel Bibler](https://github.com/nbibler) for implementing the fix.
173
- * Set `effective_url` on Typhoeus response when playing back. Thanks to
174
- [Shay Frendt](https://github.com/shayfrendt) and
175
- [Ryan Castillo](https://github.com/rmcastil) for providing the fix and
176
- corresponding test.
177
-
178
- Deprecations:
179
-
180
- * Deprecate the `use_vcr_cassette` macro for RSpec. It has confusing
181
- semantics (e.g. calling it multiple times in the same example group
182
- can cause problems and it uses the same cassette for all examples
183
- in a group even though they may make different HTTP requests) and
184
- VCR's integration with RSpec metadata works much better. Thanks to
185
- [Austen Ito](https://github.com/austenito) for implementing this.
186
- * Deprecate integration with FakeWeb. FakeWeb appears to be no longer
187
- maintained (0 commits in 2012 and it has pull requests that are
188
- 2 years old) and WebMock is a far better option. Thanks to [Steve
189
- Faulkner](https://github.com/southpolesteve) for implementing this.
190
-
191
- ## 2.3.0 (October 29, 2012)
192
-
193
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.2.5...v2.3.0)
194
-
195
- Enhancements:
196
-
197
- * Add `uri_parser` configuration option. It defaults to `URI` but can
198
- be set to something like `Addressable::URI` to handle non-standard
199
- URIs that stdlib `URI` doesn't handle. Thanks to [Ryan
200
- Burrows](https://github.com/rhburrows) for contributing this feature.
201
- * Add support for Typhoeus 0.5. Thanks to [Hans
202
- Hasselberg](https://github.com/i0rek) for making the needed changes.
203
-
204
- Bug Fixes:
205
-
206
- * Fix `:use_scenario_name` cucumber tag option so that it only uses the
207
- first line of the scenario name. Scenarios can include a long preamble
208
- that Cucumber includes as part of the scenario name. Thanks to
209
- [Pascal Van Hecke](https://github.com/pascalvanhecke) for providing
210
- this fix.
211
-
212
- ## 2.2.5 (September 7, 2012)
213
-
214
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.2.4...v2.2.5)
215
-
216
- Enhancements:
217
-
218
- * Include note about `debug_logger` option in error message for
219
- unhandled HTTP requests. Thanks to [Jacob Green](https://github.com/Jacobkg)
220
- for implementing this.
221
-
222
- Bug Fixes:
223
-
224
- * Fix another edge case bug on the excon adapter that was causing it
225
- to mis-record in certain situations that used Excon's :expects option.
226
- * Fix the `:use_scenario_name` cucumber tags option to work properly
227
- with scenario outlines. Thanks to [Joe
228
- Nelson](https://github.com/begriffs) and [Stephen
229
- Anderson](https://github.com/bendycode) for the initial bug fixes and
230
- [Jacob Green](https://github.com/Jacobkg) for some further improvements.
231
-
232
- ## 2.2.4 (July 19, 2012)
233
-
234
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.2.3...v2.2.4)
235
-
236
- Bug Fixes:
237
-
238
- * Fix excon so real requests are made with a connection constructed with
239
- same args as the original connection.
240
-
241
- ## 2.2.3 (July 9, 2012)
242
-
243
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.2.2...v2.2.3)
244
-
245
- Bug Fixes:
246
-
247
- * Fix FakeWeb library hook so that it properly handles the case where
248
- multiple requests are made using the same Net::HTTP request object.
249
- Previously, a `NoMethodError` was raised. Thanks to [Jacob
250
- Green](https://github.com/Jacobkg) for helping to troubleshoot
251
- this bug!
252
-
253
- ## 2.2.2 (June 15, 2012)
254
-
255
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.2.1...v2.2.2)
256
-
257
- Bug Fixes:
258
-
259
- * Fix `VCR.eject_cassette` so that it always pops a cassette off the
260
- cassette stack even if an error occurs while ejecting the cassette.
261
- This is important to keep things consistent, so that a cassette for
262
- one test doesn't remain in place for another test.
263
-
264
- ## 2.2.1 (June 13, 2012)
265
-
266
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.2.0...v2.2.1)
267
-
268
- Bug Fixes:
269
-
270
- * Fix matcher generated by `VCR.request_matchers.uri_without_params` so that
271
- it handles URIs w/o query params properly. Previously, it would allow any
272
- two URIs w/o query params to match, even if the hosts or paths
273
- differed.
274
-
275
- ## 2.2.0 (May 31, 2012)
276
-
277
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.1.1...v2.2.0)
278
-
279
- Enhancements:
280
-
281
- * Add new `:persist_with` cassette option. It allows you to provide a
282
- customized persistence implementation so you can persist it to
283
- something other than disk (i.e. a key-value store or a database).
284
- Thanks to [Chris Le](https://github.com/chrisle) for the idea and
285
- help with the implementation.
286
- * Allow requests to be stubbed by external libraries (e.g. WebMock,
287
- FakeWeb or Typhoeus) without needing to turn VCR off.
288
- * Add new `:allow_unused_http_interactions` cassette option. When set
289
- to false, an error will be raised when a cassette is ejected and
290
- there are remaining unused HTTP interactions. Thanks to
291
- [Mattias Putman](https://github.com/challengee) for the idea
292
- and initial implementation.
293
-
294
- Bug Fixes:
295
-
296
- * Fix `after_http_request` to handle symbol request predicate filters
297
- (e.g. `:ignored?`, `:stubbed?`, `:recordable?`, `:unhandled?`, `:real?`)
298
- properly. Previously using one of these would raise an ArgumentError.
299
- Thanks to [playupchris](https://github.com/playupchris) for reporting
300
- the bug and providing a fix.
301
- * Fix FakeWeb hook so that it no longer breaks
302
- `FakeWeb.allow_net_connect?` with arguments. Thanks to
303
- [Ingemar](https://github.com/ingemar) for reporting the bug and
304
- providing a fix.
305
- * Fix WebMock hook so that it no longer breaks
306
- `WebMock.net_connect_allowed?` with arguments. Thanks to
307
- [Gordon Wilson](https://github.com/gordoncww) for reporting the bug and
308
- providing a fix.
309
- * Print a warning when VCR is used with a poorly behaved Faraday
310
- connection stack that has a middleware after the HTTP adapter.
311
- VCR may work improperly in this case.
312
- * Raise an error if a response object is recorded with a non-string
313
- body. This fails early and indicates the problem rather than failing
314
- later with a strange error.
315
- * Fix `filter_sensitive_data`/`define_cassette_placeholder` so that they
316
- handle non-strings gracefully (e.g. the port number as a Fixnum).
317
- * Gracefully handle Faraday connection stacks that do not explicitly
318
- specify an HTTP adapter. Thanks to [Patrick Roby](https://github.com/proby)
319
- for reporting the bug.
320
- * Work around a bug in WebMock's em-http-request adapter that prevented
321
- VCR from working when using the `:redirects` option with
322
- em-http-request. This change is just a work around. It fixes the main
323
- problem, but some features (such as the http request hooks) may not
324
- work properly for this case. The bug will ultimately need to be
325
- [fixed in WebMock](https://github.com/bblimke/webmock/pull/185).
326
- Thanks to [Mark Abramov](https://github.com/markiz) for reporting
327
- the bug and providing a great example test case.
328
- * Fix bug in handling of Faraday requests with multipart uploads.
329
- Thanks to [Tyler Hunt](https://github.com/tylerhunt) for reporting
330
- and fixing the bug.
331
-
332
- ## 2.1.1 (April 24, 2012)
333
-
334
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.1.0...v2.1.1)
335
-
336
- * Fix `:use_scenario_name` cucumber tag option so that it works properly
337
- with multiple scenarios. Thanks to [Brent Snook](https://github.com/brentsnook)
338
- for reporting this bug.
339
- * Fix `:use_scenario_name` cucumber tag option so that it only uses the
340
- first line of the scenario feature name. Cucumber includes all of the
341
- pre-amble text in the feature name but that can create a ridiculously
342
- long cassette name. Thanks to [Brent Snook](https://github.com/brentsnook)
343
- for reporting this bug.
344
-
345
- ## 2.1.0 (April 19, 2012)
346
-
347
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.0.1...v.2.1.0)
348
-
349
- * Add new `:use_scenario_name` option to the cucumber tags API. This
350
- allows you to use a generic tag (such as `@vcr`) and have the
351
- cassettes named based on the feature and scenario rather than based on
352
- the tag. Thanks to [Omer Rauchwerger](https://github.com/rauchy) for
353
- the implementation and [Chad Jolly](https://github.com/cjolly) for the
354
- initial idea and feedback.
355
- * Add new `:decode_compressed_response` cassette option. When set to
356
- true, VCR will decompress a gzipped or deflated response before
357
- recording the cassette, in order to make it more human readable.
358
- Thanks to [Mislav Marohnić](https://github.com/mislav) for the
359
- idea and implementation.
360
-
361
- ## 2.0.1 (March 30, 2012)
362
-
363
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.0.0...v2.0.1)
364
-
365
- * Fix encoding logic to not attempt to encode the request or response
366
- body on deserialization if there is no encoding specified. This should
367
- allow cassettes recorded on 1.8 to work on 1.9. Thanks to
368
- [Kevin Menard](https://github.com/nirvdrum) for reporting the bug.
369
- * Fix Excon adapter to fix a bug with Excon 0.11 and greater. When you
370
- passed a block to an excon request, the response body would not be
371
- recorded.
372
- * Fix Faraday middleware so that it plays back parallel requests
373
- properly. Thanks to [Dave Weiser](https://github.com/davidann) for
374
- reporting this bug.
375
-
376
- ## 2.0.0 (March 2, 2012)
377
-
378
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.0.0.rc2...v2.0.0)
379
-
380
- * Add some additional logged events for the `debug_logger`.
381
- * Don't worry about stripping the standard port from the request URI on
382
- playback. The standard port only needs to be stripped during recording;
383
- for playback, it will have already been stripped. This allows people
384
- to use the `filter_sensitive_data` option in a way that changes the URI;
385
- before this change, doing so could result in `URI::InvalidURIError`.
386
- Thanks to [Patrick Schmitz](https://github.com/bullfight) and
387
- [Dan Thompson](https://github.com/danthompson) for reporting the issue
388
- and helping diagnose it.
389
- * Relax Excon dependency to include newly released 0.10.
390
- * Relax Faraday dependency to include 0.8.
391
- * Fix Faraday library hook so that it always does the version checking.
392
-
393
- ## 2.0.0 RC 2 (February 23, 2012)
394
-
395
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.0.0.rc1...v2.0.0.rc2)
396
-
397
- ## New Features
398
-
399
- * Add YARD documentation for the public API. Thanks to
400
- [Ben Oakes](https://github.com/benjaminoakes) for help with setting
401
- this up.
402
- * Fix `around_http_request` hook so that `request.proceed` returns
403
- the response.
404
- * Resolve `cassette_library_dir` to an absolute path. Thanks to
405
- [Nate Clark](https://github.com/heythisisnate) for the suggestion.
406
- * Add to the `VCR::Request` API in `before_http_request` and
407
- `after_http_request` hooks so the request has query methods like
408
- `#real?`, `#recordable?`, `#ignored?`, etc. Thanks to
409
- [Nate Clark](https://github.com/heythisisnate) for the idea.
410
- * Allow filters (objects that respond to `#to_proc`) to be passed
411
- to `before_http_request` and `after_http_request`. This allows
412
- an API like `before_http_request(:real?)` or
413
- `after_http_request(lambda { |req| req.uri =~ /amazon/ })`.
414
- * Add `debug_logger` config option. This can be used to
415
- troubleshoot what VCR is doing.
416
- * Update WebMock to version (1.8.0) that supports Excon stubbing.
417
- * Store the encoding with the request & response bodies in the
418
- serialized cassette.
419
- * Add new `preserve_exact_body_bytes` option that base64 encodes the
420
- request or response body in order to preserve the bytes exactly.
421
- Thanks to [Jeff Pollard](https://github.com/Fluxx) for help
422
- designing this feature and for code reviewing it.
423
- * Update to and require latest Excon (0.9.6).
424
-
425
- ## Bug Fixes
426
-
427
- * Fix rspec metadata integration to allow the cassette name to be set
428
- at the example group level and apply to multiple examples. Thanks to
429
- [Paul Russell](https://github.com/pauljamesrussell) for reporting the
430
- bug.
431
- * Add missing `require 'vcr/version'` to the cassette migrator task.
432
- If you tried the migration rake task with 2.0.0.rc1 and got a
433
- `NoMethodError`, it should be fixed now.
434
- * Update Excon dependency to 0.9.5; 0.9.5 includes an important bug
435
- fix needed by VCR.
436
- * Ensure the excon retry limit is honored properly.
437
- * Ensure that the correct error class is raised by excon when stubbing
438
- an unexpected status.
439
- * Fix FakeWeb library hook so that it records the request body when
440
- using `Net::HTTP.post_form`. Thanks to
441
- [Retistic](https://github.com/Retistic) for reporting the bug.
442
-
443
- ## 2.0.0 RC 1 (December 8, 2011)
444
-
445
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.0.0.beta2...v2.0.0.rc1)
446
-
447
- * Add Faraday hook that automatically inserts the VCR middleware so that
448
- you can use VCR with Faraday without needing to insert the middleware
449
- yourself. Use `VCR.configure { |c| c.hook_into :faraday }`.
450
- * Add `ignore_request` config option. Pass it a block that returns
451
- true if the given request should be ignored.
452
- * Improve the unhandled HTTP request error message so that it lists
453
- different options for how to get VCR to handle it.
454
- * Add {before,after,around}_http_request hooks.
455
- * Updated WebMock integration and bumped up required version to 1.7.8.
456
- * Test against latest Excon (0.7.9) and confirm that VCR works fine with
457
- it.
458
- * Add define_cassette_placeholder as an alias for filter_sensitive_data.
459
- * Fix Faraday middleware so that it works properly when you use parallel
460
- requests.
461
- * Integrate VCR with RSpec metadata. Thanks to [Ryan Bates](https://github.com/ryanb)
462
- for the great idea.
463
-
464
- ## 2.0.0 Beta 2 (November 6, 2011)
465
-
466
- [Full Changelog](http://github.com/vcr/vcr/compare/v2.0.0.beta1...v2.0.0.beta2)
467
-
468
- * Update to (and require) Typhoeus 0.3.2.
469
- * Fix a bug with `VCR.request_matchers.uri_without_param(:some_param)`
470
- so that it properly handles URIs that have no parameters. Thanks to
471
- [Sathya Sekaran](https://github.com/sfsekaran) for this fix.
472
- * The cassette format has changed significantly:
473
- * The HTTPInteractions are no longer normalized in a lossy fashion.
474
- VCR 1.x converted all HTTP header keys to lowercase. VCR 2.0 no
475
- longer does this because it is impossible to know what the original
476
- casing was (i.e. given `etag`, was it originally `etag`, `ETag` or
477
- `Etag`?). Also, some HTTP libraries add particular request headers
478
- to every request, and these used to be ignored. The aren't anymore.
479
- * The ruby struct objects are not directly serialized anymore.
480
- Instead, only primitives (hashes, arrays, strings, integers) are
481
- serialized. This allows swappable serializers and will allow other
482
- tools to read and use a VCR cassette.
483
- * Add new serializer API. VCR ships with YAML, Syck, Psych and JSON
484
- serializers, and it is very simple to implement your own. The
485
- serializer can be configured on a per-cassette basis.
486
- * New `vcr:migrate_cassettes DIR=path/to/cassettes` rake task assists
487
- with upgrading from VCR 1.x to 2.0.
488
- * Cassettes now contain a `recorded_with` attribute. This should
489
- allow the cassette structure to be updated more easily in the future
490
- as the version number provides a means for easily migrating
491
- cassettes.
492
- * Add `recorded_at` to data serialized with an HTTPInteraction. This
493
- allows the `:re_record_interval` cassette option to work more
494
- accurately and no longer rely on the file modification time.
495
-
496
- Note that VCR 1.x cassettes cannot be used with VCR 2.0. See the
497
- upgrade notes for more info.
498
-
499
- ## 2.0.0 Beta 1 (October 8, 2011)
500
-
501
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.11.3...v2.0.0.beta1)
502
-
503
- ### Changed
504
-
505
- * Previously, the last matching response in a cassette would
506
- repeatedly playback if the same request kept being made. This is
507
- no longer the case.
508
- * The Faraday middleware has been rewritten.
509
- * You no longer need to configure `stub_with :faraday` to use it.
510
- * It has been updated to work in parallel mode.
511
- * It no longer accepts a block and uses that to determine the
512
- cassette. Instead, use `VCR.use_cassette` just like you would
513
- with FakeWeb or WebMock.
514
-
515
- ### Added
516
-
517
- * Allow any callable (an object that responds to #call, such as a
518
- lambda) to be used as a request matcher. Thanks to [Avdi Grimm](https://github.com/avdi)
519
- for the idea.
520
- * Add ability to register custom request matchers.
521
- * Add `VCR.request_matchers.uri_without_param(:some_param)` to generate
522
- a request matcher that matches on URI but ignores the named parameter.
523
- * New `:allow_playback_repeats` cassette option preserves the old
524
- playback repeat behavior. Thanks to [Avdi Grimm](https://github.com/avdi)
525
- for the idea.
526
- * New `:exclusive` cassette option allows a cassette to be exclusively
527
- used rather than keeping the existing one active as a fallback. Thanks
528
- to [Avdi Grimm](https://github.com/avdi) for the idea.
529
-
530
- ### Removed
531
-
532
- * Removed support for Ruby 1.8.6 and 1.9.1.
533
- * Removed lots of old deprecated APIs.
534
- * Removed support for manually changing the URI in a cassette to a regex.
535
-
536
- ### Deprecated
537
-
538
- * Deprecated `VCR.config` in favor of `VCR.configure`.
539
- * Deprecated `VCR::Config` singleton module in favor of
540
- `VCR::Configuration` class. The current configuration instance
541
- can be accessed via `VCR.configuration`.
542
- * Deprecated `stub_with` in favor of `hook_into`. The stubbing
543
- adapters have been completely rewritten and are no longer an
544
- implementation of the adapter design pattern. Instead they simply
545
- use the named library to globally hook into every HTTP request.
546
-
547
- ## 1.11.3 (August 31, 2011)
548
-
549
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.11.2...v1.11.3)
550
-
551
- * Fix cassette serialization so that it does not include extra `ignored`
552
- instance variable.
553
-
554
- ## 1.11.2 (August 28, 2011)
555
-
556
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.11.1...v1.11.2)
557
-
558
- * Updated rake, cucumber and aruba dev dependencies to latest releases.
559
- * Fix all warnings originating from VCR. VCR is now warning-free!
560
-
561
- ## 1.11.1 (August 18, 2011)
562
-
563
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.11.0...v1.11.1)
564
-
565
- * Yanked 1.11.0 and rebuilt gem on 1.8.7 to deal with syck/psych
566
- incompatibilties in gemspec.
567
-
568
- ## 1.11.0 (August 18, 2011)
569
-
570
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.10.3...v1.11.0)
571
-
572
- * Updates to work with WebMock 1.7.0.
573
-
574
- ## 1.10.3 (July 21, 2011)
575
-
576
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.10.2...v1.10.3)
577
-
578
- * Fix `:update_content_length_header` option so no error is raised if
579
- a response body is nil. Bug reported by [jg](https://github.com/jg).
580
-
581
- ## 1.10.2 (July 16, 2011)
582
-
583
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.10.1...v1.10.2)
584
-
585
- * Yanked 1.10.1 and rebuilt gem on 1.8.7 to deal with syck/psych
586
- incompatibilties in gemspec.
587
-
588
- ## 1.10.1 (July 16, 2011)
589
-
590
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.10.0...v1.10.1)
591
-
592
- * Fix typo in error message. Fix provided by [Bradley](https://github.com/bradleyisotope).
593
- * Fix excon adapter to properly handle queries specified as a hash.
594
- * Fix excon adapter to stub a response with a hash as excon expects.
595
- Fix provided by [Wesley Beary](https://github.com/geemus).
596
- * Fix excon adapter so that it records a response even when excon raises
597
- an error due to an unexpected response.
598
-
599
- ## 1.10.0 (May 18, 2011)
600
-
601
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.9.0...v1.10.0)
602
-
603
- * Fix header normalization so that it properly handles nested arrays and
604
- non-string values.
605
- * Add cucumber scenario documenting how VCR sanitizes cassette names
606
- to "normal" file names (i.e. only alphanumerics, no spaces).
607
- * Add `:ignore_cassettes` option to `VCR.turn_off!`. This causes
608
- cassette insertions to be ignored rather than to trigger an error.
609
- Patch provided by [Justin Smestad](https://github.com/jsmestad).
610
- * Fix rack middleware to make it threadsafe.
611
- * Update to latest RSpec (rspec 2.6).
612
-
613
- ## 1.9.0 (April 14, 2011)
614
-
615
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.8.0...v1.9.0)
616
-
617
- * Add support for [Excon](https://github.com/geemus/excon).
618
-
619
- ## 1.8.0 (March 31, 2011)
620
-
621
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.7.2...v1.8.0)
622
-
623
- * Updated Faraday middleware to work with newly released Faraday 0.6.0.
624
-
625
- ## 1.7.2 (March 26, 2011)
626
-
627
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.7.1...v1.7.2)
628
-
629
- * Fixed Typhoeus adapter so headers are returned in the same form during
630
- playback as they would be without VCR. Bug reported by
631
- [Avdi Grimm](https://github.com/avdi).
632
- * Fixed Faraday adapter so it treats response headers in the same way
633
- Faraday itself does (i.e. with lowercase keys).
634
-
635
- ## 1.7.1 (March 19, 2011)
636
-
637
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.7.0...v1.7.1)
638
-
639
- * Fix Faraday adapter so that it properly normalizes query parameters
640
- in the same way that Faraday itself does.
641
-
642
- ## 1.7.0 (March 1, 2011)
643
-
644
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.6.0...v1.7.0)
645
-
646
- * Use Psych for YAML serialization/deserialization when it is available.
647
- Syck, Ruby's old YAML engine, will remove whitespace from some
648
- strings. Bug reported by [Robert Poor](https://github.com/rdpoor).
649
- * Add new `:update_content_length_header` cassette option. The option
650
- will ensure the `content-length` header value matches the actual
651
- response body length.
652
- * Add new `:once` record mode. It operates like `:new_episodes` except
653
- when the cassette file already exists, in which case it causes
654
- new requests to raise an error. Feature suggested by
655
- [Jamie Cobbett](https://github.com/jamiecobbett).
656
- * Made `:once` the default record mode.
657
- * Add new `filter_sensitive_data` configuration option. Feature
658
- suggested by [Nathaniel Bibler](https://github.com/nbibler).
659
- * Commit to [Semantic Versioning](http://semver.org/). The cucumber
660
- features document the public API for the purposes of semver.
661
- * Add support for CI builds using [travis-ci](http://travis-ci.org/myronmarston/vcr).
662
- * Add support for running tests through `gem test vcr`. Visit
663
- [test.rubygems.org](http://test.rubygems.org/gems/vcr) to see
664
- the results.
665
- * Fix cucumber support to use separate `Before` & `After` hooks rather than
666
- a single `Around` hook because of a bug in cucumber that prevents
667
- background steps from running within the `Around` hook.
668
-
669
- ## 1.6.0 (February 3, 2011)
670
-
671
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.5.1...v1.6.0)
672
-
673
- * Add new `ignore_hosts` configuration option that allows you to ignore
674
- any host (not just localhost aliases, as the `ignore_localhost` option
675
- works). Feature suggested by [Claudio Poli](https://github.com/masterkain).
676
- * Upgraded to the latest Typhoeus (0.2.1).
677
- * General code clean up and refactoring.
678
-
679
- ## 1.5.1 (January 12, 2011)
680
-
681
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.5.0...v1.5.1)
682
-
683
- * Fix response and request serialization so that the headers are raw
684
- strings. This fixes intermittent YAML seg faults for paperclip
685
- uploads to S3. Bug reported by [Rob Slifka](https://github.com/rslifka).
686
-
687
- ## 1.5.0 (January 12, 2011)
688
-
689
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.4.0...v1.5.0)
690
-
691
- * Fix VCR::Cassette so it does not raise an error when a cassette file is
692
- empty. Bug reported and fixed by [Karl Baum](https://github.com/kbaum).
693
- * Lots of code cleanup.
694
- * Fix the stubbing adapters so that they use the cassette instance
695
- rather than the cassette name to create and restore checkpoints.
696
- * Raise an appropriate error when a nested cassette is inserted with the
697
- same name as a cassette that is already in the stack (VCR's design
698
- doesn't allow this and you would get weird errors later on).
699
- * Raise an appropriate error when restoring a stubs checkpoint if the
700
- checkpoint cannot be found.
701
- * Add `before_record` and `before_playback` hooks. Idea and initial
702
- implementation by [Oliver Searle-Barnes](https://github.com/opsb);
703
- futher suggestions, testing and feedback by
704
- [Nathaniel Bibler](https://github.com/nbibler).
705
-
706
- ## 1.4.0 (December 3, 2010)
707
-
708
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.3.3...v1.4.0)
709
-
710
- * Added support for making HTTP requests without a cassette (i.e. if you don't
711
- want to use VCR for all of your test suite). There are a few ways to
712
- enable this:
713
- * In your `VCR.config` block, set `allow_http_connections_when_no_cassette`
714
- to true to allow HTTP requests without a cassette.
715
- * You can temporarily turn off VCR using `VCR.turned_off { ... }`.
716
- * You can toggle VCR off and on with `VCR.turn_off!` and `VCR.turn_on!`.
717
- * Fixed bug with `ignore_localhost` config option. Previously, an error would
718
- be raised if it was set before the `stub_with` option.
719
- * Added VCR::Middleware::Rack (see features/middleware/rack.feature for usage).
720
- * Added support for Faraday (see features/middleware/faraday.feature for usage).
721
-
722
- ## 1.3.3 (November 21, 2010)
723
-
724
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.3.2...v1.3.3)
725
-
726
- * In specs, hit a local sinatra server rather than example.com. This makes
727
- the specs faster and removes an external dependency. The specs can pass
728
- without being online!
729
- * Raise an explicit error when the http stubbing library is not configured
730
- (rather than letting the user get a confusing error later).
731
- * Test against the latest WebMock release (1.6.1) (no changes required).
732
- * Fix a few cucumber scenarios so they pass on rubinius and jruby.
733
-
734
- ## 1.3.2 (November 16, 2010)
735
-
736
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.3.1...v1.3.2)
737
-
738
- * Fix serialized structs so that they are normalized andthey will be the same
739
- regardless of which HTTP library made the request.
740
- * Status "OK " => "OK"
741
- * Body '' => nil
742
- * Headers {} => nil
743
- * Remove extraneous headers added by the HTTP lib (i.e. Typhoeus user agent)
744
- * Rewrite cucumber features in a more documentation-oriented style.
745
-
746
- ## 1.3.1 (November 11, 2010)
747
-
748
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.3.0...v1.3.1)
749
-
750
- * Update WebMock adapter to work with (and require) newly released WebMock 1.6.0.
751
-
752
- ## 1.3.0 (November 11, 2010)
753
-
754
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.2.0...v1.3.0)
755
-
756
- * Moved documentation from README to [Wiki](http://github.com/vcr/vcr/wiki).
757
- * Refactoring and code cleanup.
758
- * Fix InternetConnection.available? so that it memoizes correctly when a connection is not available.
759
- * Fix WebMock version checking to allow newly released 1.5.0 to be used without a warning.
760
- * Add support for [Typhoeus](https://github.com/pauldix/typhoeus). Thanks to
761
- [David Balatero](https://github.com/dbalatero) for making the necessary changes in Typhoeus
762
- to support VCR.
763
- * Remove FakeWeb/WebMock inference logic. You _must_ configure the http stubbing library
764
- explicitly now.
765
-
766
- ## 1.2.0 (October 13, 2010)
767
-
768
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.1.2...v1.2.0)
769
-
770
- * Improved the `:all` record mode so that it keeps previously recorded interactions that do not match the
771
- new recorded interactions. Previously, all of the previously recorded interactions were deleted.
772
- * Added `:re_record_interval` cassette option. This option causes a cassette to be re-recorded when the
773
- existing file is older than the specified interval.
774
- * Improved RSpec support. Added #use_vcr_cassette RSpec macro method that sets up a cassette for an RSpec
775
- example group.
776
- * Fixed VCR/Net::HTTP/WebMock integration so that VCR no longer loads its Net::HTTP monkey patch when
777
- WebMock is used, and relies upon WebMock's after_request callback to record Net::HTTP instead. This
778
- fixes [a bug](http://github.com/vcr/vcr/issues/14) when using WebMock and Open URI.
779
- * Consider 0.0.0.0 to be a localhost alias (previously only "localhost" and 127.0.0.1 were considered).
780
- * Added spec and feature coverage for Curb integration. Works out of the box with no changes required
781
- to VCR due to [Pete Higgins'](http://github.com/phiggins) great work to add Curb support to WebMock.
782
- * Got specs and features to pass on rubinius.
783
- * Changed WebMock version requirement to 1.4.0.
784
-
785
- ## 1.1.2 (September 9, 2010)
786
-
787
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.1.1...v1.1.2)
788
-
789
- * Fixed a minor bug with the WebMock integration: WebMock extends each `Net::HTTPResponse` with an extension
790
- module after reading the body, and VCR was doing the same thing, leading to some slight deviance from
791
- standard Net::HTTP behavior. The fix prevents VCR from adding the same extension to a `Net::HTTPResponse`
792
- that has already been extende by WebMock.
793
- * Fixed a minor bug in the `VCR::Net::HTTPResponse` module so that it correctly handles nil bodies (such as
794
- for a HEAD request).
795
- * Refactored `VCR::Net::HTTPResponse` module so it is implemented in a much simpler manner.
796
- * Updated specs and features so they pass against the latest WebMock release (1.3.5).
797
- * Minor documentation updates.
798
-
799
- ## 1.1.1 (August 26, 2010)
800
-
801
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.1.0...v1.1.1)
802
-
803
- * Updated to use and require FakeWeb 1.3.0. It includes a fix for a bug related to multiple values for the
804
- same response header.
805
- * Use new `FakeWeb::Utility.request_uri_as_string` method rather than our own logic to construct a request uri.
806
- * Use new `FakeWeb.allow_net_connect = /url regex/` feature to power the `ignore_localhost` VCR option rather
807
- then toggling `FakeWeb.allow_net_connect` in our Net::HTTP extension.
808
- * Optimized `VCR.http_stubbing_adapter.stub_requests` a bit.
809
- * Changed the http stubbing adapters to be modules rather than classes. They should never be instantiated and
810
- don't really hold state, so a module is more appropriate.
811
- * Warn when FakeWeb or WebMock are a minor or major version number ahead of the required version, as the new
812
- version isn't known to work with VCR.
813
-
814
- ## 1.1.0 (August 22, 2010)
815
-
816
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.0.3...v1.1.0)
817
-
818
- * Added `:match_requests_on` cassette option, which determines how VCR matches requests.
819
- * Removed VCR::TaskRunner and the corresponding rake task definition. The rake task migrated cassettes from the
820
- 0.3.1 format to the 0.4+ format. If you are still on 0.3.1 or earlier, I recommend you upgrade to 0.4.1 first,
821
- migrate your cassettes and deal with migration warnings, then upgrade to the current release.
822
- * Added some code to VCR::Cassette.new to check the options passed to the cassette and raise an error if any
823
- invalid options are passed.
824
- * Optimized ERB rendering a bit. Rather than creating a new struct subclass for each time we render an ERB
825
- cassette with locals, we keep a cache of reusable struct subclasses based on the desired attributes.
826
- [Benchmarking](http://gist.github.com/512948) reveals this is about 28% faster.
827
- * Upgraded tests to use em-http-request 0.2.10 rather than 0.2.7.
828
-
829
- ## 1.0.3 (August 5, 2010)
830
-
831
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.0.2...v1.0.3)
832
-
833
- * Upgraded VCR specs to RSpec 2.
834
- * Updated `VCR::CucumberTags` so that it uses an `around` hook rather than a `before` hook and an `after` hook.
835
- Around hooks were added to Cucumber in the 0.7.3 release, so you'll have to be on that version or higher to use
836
- the `VCR::CucumberTags` feature.
837
- * Updated the WebMock version requirement to 1.3.3 or greater. 1.3.2 and earlier versions did not properly handle
838
- multiple value for the same response header.
839
- * Miscellaneous documentation updates.
840
-
841
- ## 1.0.2 (July 6, 2010)
842
-
843
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.0.1...v1.0.2)
844
-
845
- * Fixed VCR to work with [rest-client](http://github.com/archiloque/rest-client). Rest-client extends the Net::HTTP
846
- response body string with a module containing additional data, which got serialized to the cassette file YAML
847
- and occasionally caused problems when the YAML was deserialized. Bug reported by
848
- [Thibaud Guillaume-Gentil](http://github.com/thibaudgg).
849
- * Setup bundler to manage development dependencies.
850
-
851
- ## 1.0.1 (July 1, 2010)
852
-
853
- [Full Changelog](http://github.com/vcr/vcr/compare/v1.0.0...v1.0.1)
854
-
855
- * Fixed specs and features so they pass on MRI 1.9.2-preview3 and JRuby 1.5.1.
856
- * Normalized response and request headers so that they are stored the same (i.e. lower case keys, arrays of values)
857
- in the cassette yaml files, regardless of which HTTP library is used. This is the same way Net::HTTP normalizes
858
- HTTP headers.
859
- * Fixed `VCR.use_cassette` so that it doesn't eject a cassette if an exception occurs while inserting one.
860
- * Fixed FakeWeb adapter so that it works for requests that use basic auth. Patch submitted by
861
- [Eric Allam](http://github.com/rubymaverick).
862
-
863
- ## 1.0.0 (June 22, 2010)
864
-
865
- [Full Changelog](http://github.com/vcr/vcr/compare/v0.4.1...v1.0.0)
866
-
867
- * New Features
868
- * Added support for [HTTPClient](http://github.com/nahi/httpclient), [Patron](http://github.com/toland/patron) and
869
- [em-http-request](http://github.com/igrigorik/em-http-request) when WebMock is used. Any future http libraries
870
- WebMock supports should (theoretically, at least) work without any VCR code changes. Thanks to
871
- [Bartosz Blimke](http://github.com/bblimke) for adding the necessary code to WebMock to make this happen!
872
- * Added support for dynamic responses using ERB. A cassette will be evaluated as ERB before the YAML
873
- is deserialized if you pass it an `:erb => true` option. You can pass variables using
874
- `:erb => { :var1 => 'some value', :var2 => 'another value' }`.
875
- * Added `ignore_localhost` configuration setting, which defaults to false. Setting it true does the following:
876
- * Localhost requests will proceed as normal. The "Real HTTP connections are disabled" error will not occur.
877
- * Localhost requests will not be recorded.
878
- * Previously recorded localhost requests will not be replayed.
879
- * Exposed the version number:
880
- * `VCR.version` => string (in the format "major.minor.patch")
881
- * `VCR.version.parts` => array of integers
882
- * `VCR.version.major` => integer
883
- * `VCR.version.minor` => integer
884
- * `VCR.version.patch` => integer
885
- * Added test coverage and documentation of using a regex for non-deterministic URLs (i.e. URLs that include
886
- a timestamp as a query parameter). It turns out this feature worked before, and I just didn't realize it :).
887
-
888
- * Breaking Changes
889
- * The `:allow_real_http => lambda { |uri| ... }` cassette option has been removed. There was no way to get
890
- this to work with the newly supported http libraries without extensive monkeypatching, and it was mostly
891
- useful for localhost requests, which is more easily handled by the new `ignore_localhost` config setting.
892
- * Removed methods and options that had been previously deprecated. If you're upgrading from an old version,
893
- I recommend upgrading to 0.4.1 first, deal with all the deprecation warnings, then upgrade to 1.0.0.
894
-
895
- * Misc Changes:
896
- * Removed dependency on [jeweler](http://github.com/technicalpickles/jeweler). Manage the gemspec by hand instead.
897
- * Removed some extensions that are no longer necessary.
898
-
899
- ## 0.4.1 May 11, 2010
900
-
901
- [Full Changelog](http://github.com/vcr/vcr/compare/v0.4.0...v0.4.1)
902
-
903
- * Fixed a bug: when `Net::HTTPResponse#read_body` was called after VCR had read the body to record a new request,
904
- it raised an error (`IOError: Net::HTTPResponse#read_body called twice`). My fix extends Net::HTTPResponse
905
- so that it no longer raises this error.
906
-
907
- ## 0.4.0 April 28, 2010
908
-
909
- [Full Changelog](http://github.com/vcr/vcr/compare/v0.3.1...v0.4.0)
910
-
911
- * Added support for webmock. All the fakeweb-specific code is now in an adapter (as is the webmock code).
912
-
913
- * Changed the format of the VCR cassettes. The old format was tied directly to Net::HTTP, but webmock supports
914
- other HTTP libraries and I plan to allow VCR to use them in the future. Note that this is a breaking change--your
915
- old VCR cassettes from prior releases will not work with VCR 0.4.0. However, VCR provides a rake task to assist
916
- you in migrating your cassettes to the new format. Simply add `load 'vcr/tasks/vcr.rake'` to your project's Rakefile,
917
- and run:
918
-
919
- $ rake vcr:migrate_cassettes DIR=path/to/cassete/library/directory
920
-
921
- * The new cassette format records more information about the request (i.e. the request headers and body), so that it
922
- can potentially be used with webmock in the future.
923
-
924
- * Made most of `VCR::Cassette`'s methods private. I had forgotten to make the methods private before, and most of them
925
- don't need to be exposed.
926
-
927
- * Automatically disallow http connections using the appropriate setting of the http stubbing library (fakeweb or webmock).
928
- This relieves users from the need to set the option themselves, so they hopefully aren't using either fakeweb or webmock
929
- directly, making it much easier to switch between these.
930
-
931
- * Change documentation from rdoc to markdown format.
932
-
933
- * Lots of other refactoring.
934
-
935
- ## 0.3.1 April 10, 2010
936
-
937
- [Full Changelog](http://github.com/vcr/vcr/compare/v0.3.0...v0.3.1)
938
-
939
- * Fixed a bug: when `Net::HTTP#request` was called with a block that had a return statement, the response was not being recorded.
940
-
941
- ## 0.3.0 March 24, 2010
942
-
943
- [Full Changelog](http://github.com/vcr/vcr/compare/v0.2.0...v0.3.0)
944
-
945
- * Renamed a bunch of methods, replacing them with method names that more clearly fit the VCR/cassette metaphor:
946
- * `VCR.create_cassette!` => `VCR.insert_cassette`
947
- * `VCR.destroy_cassette!` => `VCR.eject_cassette`
948
- * `VCR.with_cassette` => `VCR.use_cassette`
949
- * `VCR::Cassette#destroy!` => `VCR::Cassette#eject`
950
- * `VCR::Cassette#cache_file` => `VCR::Cassette#file`
951
- * `VCR::Config.cache_dir` => `VCR::Config.cassette_library_dir`
952
- * `:unregistered` record mode => `:new_episodes` record mode
953
-
954
- * All the old methods still work, but you'll get deprecation warnings.
955
-
956
- ## 0.2.0 March 9, 2010
957
-
958
- [Full Changelog](http://github.com/vcr/vcr/compare/v0.1.2...v0.2.0)
959
-
960
- * Added `:allow_real_http` cassette option, which allows VCR to work with capybara and a javascript driver.
961
- Bug reported by [Ben Hutton](http://github.com/benhutton).
962
-
963
- * Deprecated the `default_cassette_record_mode` option. Use `default_cassette_options[:record_mode]` instead.
964
-
965
- ## 0.1.2 March 4, 2010
966
-
967
- [Full Changelog](http://github.com/vcr/vcr/compare/v0.1.1...v0.1.2)
968
-
969
- * Added explanatory note about VCR to `FakeWeb::NetConnectNotAllowedError#message`.
970
-
971
- * Got things to work for when a cassette records multiple requests made to the same URL with the same HTTP verb,
972
- but different responses. We have to register an array of responses with fakeweb.
973
-
974
- * Fixed our `Net::HTTP` monkey patch so that it only stores the recorded response once per request.
975
- Internally, `Net::HTTP#request` recursively calls itself (passing slightly different arguments) in certain circumstances.
976
-
977
- ## 0.1.1 February 25, 2010
978
-
979
- [Full Changelog](http://github.com/vcr/vcr/compare/v0.1.0...v0.1.1)
980
-
981
- * Handle asynchronous HTTP requests (such as for mechanize). Bug reported by [Thibaud Guillaume-Gentil](http://github.com/thibaudgg).
982
-
983
- ## 0.1.0 February 25, 2010
984
-
985
- [Full Changelog](http://github.com/vcr/vcr/compare/d2577f79247d7db60bf160881b1b64e9fa10e4fd...v0.1.0)
986
-
987
- * Initial release. Basic recording and replaying of responses works.