excon 0.0.8 → 0.0.10
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.
- data/VERSION +1 -1
- data/excon.gemspec +2 -2
- data/lib/excon/connection.rb +23 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.10
|
data/excon.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{excon}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.10"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Wesley Beary"]
|
12
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-12-03}
|
13
13
|
s.description = %q{speed, persistence, http(s)}
|
14
14
|
s.email = %q{wbeary@engineyard.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/excon/connection.rb
CHANGED
@@ -87,6 +87,18 @@ unless Excon.mocking?
|
|
87
87
|
else
|
88
88
|
response
|
89
89
|
end
|
90
|
+
|
91
|
+
rescue => request_error
|
92
|
+
if params[:idempotent] &&
|
93
|
+
(!request_error.is_a?(Excon::Errors::Error) || response.status != 404)
|
94
|
+
retries_remaining ||= 4
|
95
|
+
retries_remaining -= 1
|
96
|
+
if retries_remaining > 0
|
97
|
+
retry
|
98
|
+
end
|
99
|
+
else
|
100
|
+
raise(request_error)
|
101
|
+
end
|
90
102
|
end
|
91
103
|
|
92
104
|
private
|
@@ -140,6 +152,17 @@ else
|
|
140
152
|
else
|
141
153
|
response
|
142
154
|
end
|
155
|
+
|
156
|
+
rescue => request_error
|
157
|
+
if params[:idempotent]
|
158
|
+
retries_remaining ||= 3
|
159
|
+
retries_remaining -= 1
|
160
|
+
if retries_remaining > 0
|
161
|
+
retry
|
162
|
+
end
|
163
|
+
else
|
164
|
+
raise(request_error)
|
165
|
+
end
|
143
166
|
end
|
144
167
|
|
145
168
|
end
|
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.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wesley Beary
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-03 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|