vcr 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +3 -3
- data/benchmarks/http_stubbing_libraries.rb +1 -1
- data/lib/vcr/http_stubbing_adapters/common.rb +4 -2
- data/lib/vcr/http_stubbing_adapters/webmock.rb +9 -6
- data/lib/vcr/version.rb +1 -1
- data/spec/http_stubbing_adapters/webmock_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- data/vcr.gemspec +1 -1
- metadata +7 -7
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.3.1 (November 11, 2010)
|
4
|
+
|
5
|
+
[Full Changelog](http://github.com/myronmarston/vcr/compare/v1.3.0...v.1.3.1)
|
6
|
+
|
7
|
+
* Update WebMock adapter to work with (and require) newly released WebMock 1.6.0.
|
8
|
+
|
3
9
|
## 1.3.0 (November 11, 2010)
|
4
10
|
|
5
11
|
[Full Changelog](http://github.com/myronmarston/vcr/compare/v1.2.0...v.1.3.0)
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
vcr (1.3.
|
4
|
+
vcr (1.3.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: http://rubygems.org/
|
@@ -83,7 +83,7 @@ GEM
|
|
83
83
|
thor (0.14.4)
|
84
84
|
timecop (0.3.5)
|
85
85
|
typhoeus (0.2.0)
|
86
|
-
webmock (1.
|
86
|
+
webmock (1.6.0)
|
87
87
|
addressable (>= 2.2.2)
|
88
88
|
crack (>= 0.1.7)
|
89
89
|
|
@@ -113,4 +113,4 @@ DEPENDENCIES
|
|
113
113
|
timecop (~> 0.3.5)
|
114
114
|
typhoeus (~> 0.2.0)
|
115
115
|
vcr!
|
116
|
-
webmock (
|
116
|
+
webmock (~> 1.6.0)
|
@@ -11,12 +11,14 @@ module VCR
|
|
11
11
|
def self.add_vcr_info_to_exception_message(exception_klass)
|
12
12
|
exception_klass.class_eval do
|
13
13
|
def message
|
14
|
-
super + ".
|
15
|
-
"For more details, visit the VCR wiki at: http://github.com/myronmarston/vcr/wiki"
|
14
|
+
super + ". " + VCR::HttpStubbingAdapters::Common::RECORDING_INSTRUCTIONS
|
16
15
|
end
|
17
16
|
end
|
18
17
|
end
|
19
18
|
|
19
|
+
RECORDING_INSTRUCTIONS = "You can use VCR to automatically record this request and replay it later. " +
|
20
|
+
"For more details, visit the VCR wiki at: http://github.com/myronmarston/vcr/wiki"
|
21
|
+
|
20
22
|
def check_version!
|
21
23
|
version_too_low, version_too_high = compare_version
|
22
24
|
|
@@ -6,8 +6,8 @@ module VCR
|
|
6
6
|
include VCR::HttpStubbingAdapters::Common
|
7
7
|
extend self
|
8
8
|
|
9
|
-
MINIMUM_VERSION = '1.
|
10
|
-
MAXIMUM_VERSION = '1.
|
9
|
+
MINIMUM_VERSION = '1.6.0'
|
10
|
+
MAXIMUM_VERSION = '1.6'
|
11
11
|
|
12
12
|
def http_connections_allowed=(value)
|
13
13
|
::WebMock::Config.instance.allow_net_connect = value
|
@@ -37,11 +37,11 @@ module VCR
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def create_stubs_checkpoint(checkpoint_name)
|
40
|
-
checkpoints[checkpoint_name] = ::WebMock::
|
40
|
+
checkpoints[checkpoint_name] = ::WebMock::StubRegistry.instance.request_stubs.dup
|
41
41
|
end
|
42
42
|
|
43
43
|
def restore_stubs_checkpoint(checkpoint_name)
|
44
|
-
::WebMock::
|
44
|
+
::WebMock::StubRegistry.instance.request_stubs = checkpoints.delete(checkpoint_name)
|
45
45
|
end
|
46
46
|
|
47
47
|
private
|
@@ -94,5 +94,8 @@ WebMock.after_request(:real_requests_only => true) do |request, response|
|
|
94
94
|
VCR.record_http_interaction(http_interaction)
|
95
95
|
end
|
96
96
|
|
97
|
-
|
98
|
-
|
97
|
+
WebMock::NetConnectNotAllowedError.class_eval do
|
98
|
+
def stubbing_instructions(*args)
|
99
|
+
'. ' + VCR::HttpStubbingAdapters::Common::RECORDING_INSTRUCTIONS
|
100
|
+
end
|
101
|
+
end
|
data/lib/vcr/version.rb
CHANGED
@@ -8,9 +8,9 @@ describe VCR::HttpStubbingAdapters::WebMock do
|
|
8
8
|
[:method, :uri, :host, :path, :body, :headers]
|
9
9
|
|
10
10
|
it_performs('version checking',
|
11
|
-
:valid => %w[ 1.
|
11
|
+
:valid => %w[ 1.6.0 1.6.99 ],
|
12
12
|
:too_low => %w[ 0.9.9 0.9.10 0.1.30 1.0.30 1.2.9 1.3.9 ],
|
13
|
-
:too_high => %w[ 1.
|
13
|
+
:too_high => %w[ 1.7.0 1.10.0 2.0.0 ]
|
14
14
|
) do
|
15
15
|
def stub_version(version)
|
16
16
|
WebMock.stub(:version).and_return(version)
|
data/spec/spec_helper.rb
CHANGED
data/vcr.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 1.3.
|
9
|
+
- 1
|
10
|
+
version: 1.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Myron Marston
|
@@ -167,14 +167,14 @@ dependencies:
|
|
167
167
|
version_requirements: &id010 !ruby/object:Gem::Requirement
|
168
168
|
none: false
|
169
169
|
requirements:
|
170
|
-
- -
|
170
|
+
- - ~>
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
hash:
|
172
|
+
hash: 15
|
173
173
|
segments:
|
174
174
|
- 1
|
175
|
-
-
|
175
|
+
- 6
|
176
176
|
- 0
|
177
|
-
version: 1.
|
177
|
+
version: 1.6.0
|
178
178
|
requirement: *id010
|
179
179
|
type: :development
|
180
180
|
name: webmock
|