vcr 1.7.2 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +7 -1
- data/lib/vcr/http_stubbing_adapters/faraday.rb +2 -2
- data/lib/vcr/middleware/faraday.rb +6 -16
- data/lib/vcr/version.rb +1 -1
- data/spec/support/http_library_adapters.rb +2 -2
- data/spec/support/shared_example_groups/http_library.rb +0 -1
- data/spec/vcr/http_stubbing_adapters/faraday_spec.rb +3 -3
- data/vcr.gemspec +1 -1
- metadata +9 -9
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
## In git
|
2
2
|
|
3
|
-
[Full Changelog](http://github.com/myronmarston/vcr/compare/v1.
|
3
|
+
[Full Changelog](http://github.com/myronmarston/vcr/compare/v1.8.0...master)
|
4
|
+
|
5
|
+
## 1.8.0 (March 31, 2011)
|
6
|
+
|
7
|
+
[Full Changelog](http://github.com/myronmarston/vcr/compare/v1.7.2...v1.8.0)
|
8
|
+
|
9
|
+
* Updated Faraday middleware to work with newly released Faraday 0.6.0.
|
4
10
|
|
5
11
|
## 1.7.2 (March 26, 2011)
|
6
12
|
|
@@ -16,13 +16,13 @@ module VCR
|
|
16
16
|
if VCR::HttpStubbingAdapters::Faraday.uri_should_be_ignored?(request.uri)
|
17
17
|
@app.call(env)
|
18
18
|
elsif response = VCR::HttpStubbingAdapters::Faraday.stubbed_response_for(request_matcher)
|
19
|
-
env.
|
20
|
-
|
21
|
-
|
22
|
-
:body => response.body
|
23
|
-
)
|
19
|
+
headers = env[:response_headers] ||= ::Faraday::Utils::Headers.new
|
20
|
+
headers.update response.headers if response.headers
|
21
|
+
env.update :status => response.status.code, :body => response.body
|
24
22
|
|
25
|
-
|
23
|
+
faraday_response = ::Faraday::Response.new
|
24
|
+
faraday_response.finish(env) unless env[:parallel_manager]
|
25
|
+
env[:response] = faraday_response
|
26
26
|
elsif VCR::HttpStubbingAdapters::Faraday.http_connections_allowed?
|
27
27
|
response = @app.call(env)
|
28
28
|
|
@@ -63,16 +63,6 @@ module VCR
|
|
63
63
|
'1.1'
|
64
64
|
)
|
65
65
|
end
|
66
|
-
|
67
|
-
def normalized_headers(headers)
|
68
|
-
hash = {}
|
69
|
-
|
70
|
-
headers.each do |key, values|
|
71
|
-
hash[key] = values.join(', ')
|
72
|
-
end if headers
|
73
|
-
|
74
|
-
hash
|
75
|
-
end
|
76
66
|
end
|
77
67
|
end
|
78
68
|
end
|
data/lib/vcr/version.rb
CHANGED
@@ -127,8 +127,8 @@ end
|
|
127
127
|
end
|
128
128
|
|
129
129
|
def get_header(header_key, response)
|
130
|
-
|
131
|
-
|
130
|
+
value = response.headers[header_key]
|
131
|
+
value.split(', ') if value
|
132
132
|
end
|
133
133
|
|
134
134
|
def make_http_request(method, url, body = nil, headers = {})
|
@@ -7,9 +7,9 @@ describe VCR::HttpStubbingAdapters::Faraday, :without_monkey_patches => :all do
|
|
7
7
|
:status_message_not_exposed, :does_not_support_rotating_responses
|
8
8
|
|
9
9
|
it_performs('version checking',
|
10
|
-
:valid => %w[ 0.
|
11
|
-
:too_low => %w[ 0.5.
|
12
|
-
:too_high => %w[ 0.
|
10
|
+
:valid => %w[ 0.6.0 0.6.10 ],
|
11
|
+
:too_low => %w[ 0.5.9 0.4.99 ],
|
12
|
+
:too_high => %w[ 0.7.0 1.0.0 ]
|
13
13
|
) do
|
14
14
|
before(:each) { @orig_version = Faraday::VERSION }
|
15
15
|
after(:each) { Faraday::VERSION = @orig_version }
|
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: 55
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 8
|
9
|
+
- 0
|
10
|
+
version: 1.8.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Myron Marston
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-31 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -27,12 +27,12 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ~>
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
30
|
+
hash: 7
|
31
31
|
segments:
|
32
32
|
- 0
|
33
|
-
-
|
34
|
-
-
|
35
|
-
version: 0.
|
33
|
+
- 6
|
34
|
+
- 0
|
35
|
+
version: 0.6.0
|
36
36
|
requirement: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
prerelease: false
|