vcr 1.10.2 → 1.10.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  ## In git
2
2
 
3
- [Full Changelog](http://github.com/myronmarston/vcr/compare/v1.10.2...master)
3
+ [Full Changelog](http://github.com/myronmarston/vcr/compare/v1.10.3...master)
4
+
5
+ ## 1.10.3 (July 21, 2011)
6
+
7
+ [Full Changelog](http://github.com/myronmarston/vcr/compare/v1.10.2...v1.10.3)
8
+
9
+ * Fix `:update_content_length_header` option so no error is raised if
10
+ a response body is nil. Bug reported by [jg](https://github.com/jg).
4
11
 
5
12
  ## 1.10.2 (July 16, 2011)
6
13
 
data/README.md CHANGED
@@ -137,11 +137,13 @@ Thanks also to the following people who have contributed patches or helpful sugg
137
137
  * [Aaron Brethorst](http://github.com/aaronbrethorst)
138
138
  * [Bartosz Blimke](http://github.com/bblimke)
139
139
  * [Ben Hutton](http://github.com/benhutton)
140
+ * [Bradley Isotope](https://github.com/bradleyisotope)
140
141
  * [Eric Allam](http://github.com/rubymaverick)
141
142
  * [Justin Smestad](https://github.com/jsmestad)
142
143
  * [Karl Baum](https://github.com/kbaum)
143
144
  * [Nathaniel Bibler](https://github.com/nbibler)
144
145
  * [Oliver Searle-Barnes](https://github.com/opsb)
146
+ * [Wesley Beary](https://github.com/geemus)
145
147
 
146
148
  ## Copyright
147
149
 
@@ -13,7 +13,7 @@ module VCR
13
13
  end
14
14
 
15
15
  def update_content_length_header
16
- headers['content-length'] &&= [body.length.to_s]
16
+ headers['content-length'] &&= [body ? body.length.to_s : '0']
17
17
  end
18
18
  end
19
19
  end
data/lib/vcr/version.rb CHANGED
@@ -3,7 +3,7 @@ module VCR
3
3
 
4
4
  def version
5
5
  @version ||= begin
6
- string = '1.10.2'
6
+ string = '1.10.3'
7
7
 
8
8
  def string.parts
9
9
  split('.').map { |p| p.to_i }
@@ -57,5 +57,12 @@ describe VCR::Response do
57
57
  inst.update_content_length_header
58
58
  }.to change { inst.headers['content-length'] }.from(['3']).to(['8'])
59
59
  end
60
+
61
+ it 'sets the content_length header to 0 if the response body is nil' do
62
+ inst = instance(nil, '3')
63
+ expect {
64
+ inst.update_content_length_header
65
+ }.to change { inst.headers['content-length'] }.from(['3']).to(['0'])
66
+ end
60
67
  end
61
68
  end
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: 59
4
+ hash: 57
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 10
9
- - 2
10
- version: 1.10.2
9
+ - 3
10
+ version: 1.10.3
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-07-16 00:00:00 -07:00
18
+ date: 2011-07-21 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency