excon 0.13.3 → 0.13.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of excon might be problematic. Click here for more details.

@@ -1,6 +1,11 @@
1
1
  0.13.3 04/05/12
2
2
  ===============
3
3
 
4
+ * fix for file size calculation in 1.8.7
5
+
6
+ 0.13.3 04/05/12
7
+ ===============
8
+
4
9
  * fixes for file like objects which do not respond to binmode
5
10
 
6
11
  0.13.2 03/26/12
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'excon'
16
- s.version = '0.13.3'
17
- s.date = '2012-04-05'
16
+ s.version = '0.13.4'
17
+ s.date = '2012-04-12'
18
18
  s.rubyforge_project = 'excon'
19
19
 
20
20
  ## Make sure your summary is short. The description may be as long
@@ -99,6 +99,7 @@ Gem::Specification.new do |s|
99
99
  lib/excon/ssl_socket.rb
100
100
  tests/bad_tests.rb
101
101
  tests/basic_tests.rb
102
+ tests/data/xs
102
103
  tests/header_tests.rb
103
104
  tests/idempotent_tests.rb
104
105
  tests/instrumentation_tests.rb
@@ -155,7 +155,11 @@ module Excon
155
155
  # IO object: File, Tempfile, etc.
156
156
  body.size
157
157
  else
158
- 0
158
+ begin
159
+ File.size(body) # for 1.8.7 where file does not have size
160
+ rescue
161
+ 0
162
+ end
159
163
  end
160
164
  end
161
165
 
@@ -1,6 +1,6 @@
1
1
  module Excon
2
2
  unless const_defined?(:VERSION)
3
- VERSION = '0.13.3'
3
+ VERSION = '0.13.4'
4
4
  end
5
5
 
6
6
  unless const_defined?(:CHUNK_SIZE)
@@ -0,0 +1 @@
1
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -77,6 +77,12 @@ def basic_tests(url = 'http://127.0.0.1:9292')
77
77
 
78
78
  tests('POST /echo') do
79
79
 
80
+ tests('with file').returns('x' * 100 + "\n") do
81
+ file_path = File.join(File.dirname(__FILE__), "data", "xs")
82
+ response = connection.request(:method => :post, :path => '/echo', :body => File.open(file_path))
83
+ response.body
84
+ end
85
+
80
86
  tests('without request_block').returns('x' * 100) do
81
87
  response = connection.request(:method => :post, :path => '/echo', :body => 'x' * 100)
82
88
  response.body
@@ -95,6 +101,12 @@ def basic_tests(url = 'http://127.0.0.1:9292')
95
101
 
96
102
  tests('PUT /echo') do
97
103
 
104
+ tests('with file').returns('x' * 100 + "\n") do
105
+ file_path = File.join(File.dirname(__FILE__), "data", "xs")
106
+ response = connection.request(:method => :put, :path => '/echo', :body => File.open(file_path))
107
+ response.body
108
+ end
109
+
98
110
  tests('without request_block').returns('x' * 100) do
99
111
  response = connection.request(:method => :put, :path => '/echo', :body => 'x' * 100)
100
112
  response.body
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.3
4
+ version: 0.13.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-04-05 00:00:00.000000000 Z
14
+ date: 2012-04-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
18
- requirement: &70356690131480 !ruby/object:Gem::Requirement
18
+ requirement: &70221725989500 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: '0'
24
24
  type: :development
25
25
  prerelease: false
26
- version_requirements: *70356690131480
26
+ version_requirements: *70221725989500
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: delorean
29
- requirement: &70356690117820 !ruby/object:Gem::Requirement
29
+ requirement: &70221725988940 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
- version_requirements: *70356690117820
37
+ version_requirements: *70221725988940
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: open4
40
- requirement: &70356690116940 !ruby/object:Gem::Requirement
40
+ requirement: &70221725988260 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: '0'
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *70356690116940
48
+ version_requirements: *70221725988260
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: rake
51
- requirement: &70356690115640 !ruby/object:Gem::Requirement
51
+ requirement: &70221725987340 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: '0'
57
57
  type: :development
58
58
  prerelease: false
59
- version_requirements: *70356690115640
59
+ version_requirements: *70221725987340
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: rdoc
62
- requirement: &70356690113980 !ruby/object:Gem::Requirement
62
+ requirement: &70221725985040 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: '0'
68
68
  type: :development
69
69
  prerelease: false
70
- version_requirements: *70356690113980
70
+ version_requirements: *70221725985040
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: shindo
73
- requirement: &70356690112340 !ruby/object:Gem::Requirement
73
+ requirement: &70221726000800 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: '0'
79
79
  type: :development
80
80
  prerelease: false
81
- version_requirements: *70356690112340
81
+ version_requirements: *70221726000800
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: sinatra
84
- requirement: &70356690111200 !ruby/object:Gem::Requirement
84
+ requirement: &70221726000100 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ! '>='
@@ -89,7 +89,7 @@ dependencies:
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
- version_requirements: *70356690111200
92
+ version_requirements: *70221726000100
93
93
  description: EXtended http(s) CONnections
94
94
  email: geemus@gmail.com
95
95
  executables: []
@@ -130,6 +130,7 @@ files:
130
130
  - lib/excon/ssl_socket.rb
131
131
  - tests/bad_tests.rb
132
132
  - tests/basic_tests.rb
133
+ - tests/data/xs
133
134
  - tests/header_tests.rb
134
135
  - tests/idempotent_tests.rb
135
136
  - tests/instrumentation_tests.rb
@@ -162,9 +163,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
163
  - - ! '>='
163
164
  - !ruby/object:Gem::Version
164
165
  version: '0'
165
- segments:
166
- - 0
167
- hash: -2187081886026330056
168
166
  required_rubygems_version: !ruby/object:Gem::Requirement
169
167
  none: false
170
168
  requirements: