bsm-sso-client 0.7.12 → 0.7.13
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bsm/sso/client/abstract_resource.rb +20 -0
- metadata +4 -4
@@ -3,6 +3,26 @@ require 'active_support/json'
|
|
3
3
|
require 'active_support/core_ext/object/to_query'
|
4
4
|
require 'active_support/core_ext/hash/keys'
|
5
5
|
|
6
|
+
module Excon
|
7
|
+
module Middleware
|
8
|
+
class Idempotent < Excon::Middleware::Base
|
9
|
+
def error_call(datum)
|
10
|
+
if datum[:idempotent] && [Excon::Errors::Timeout, Excon::Errors::SocketError,
|
11
|
+
Excon::Errors::HTTPStatusError].any? {|ex| datum[:error].kind_of?(ex) } && datum[:retries_remaining] > 1
|
12
|
+
# reduces remaining retries, reset connection, and restart request_call
|
13
|
+
datum[:retries_remaining] -= 1
|
14
|
+
datum[:connection].reset
|
15
|
+
datum.delete(:response)
|
16
|
+
datum.delete(:error)
|
17
|
+
datum[:connection].request(datum)
|
18
|
+
else
|
19
|
+
@stack.error_call(datum)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end if Excon::VERSION < "0.20.1"
|
25
|
+
|
6
26
|
class Bsm::Sso::Client::AbstractResource < Hash
|
7
27
|
|
8
28
|
class << self
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bsm-sso-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
requirements:
|
83
83
|
- - ! '>='
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 0.
|
85
|
+
version: 0.20.0
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -90,7 +90,7 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - ! '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: 0.
|
93
|
+
version: 0.20.0
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
95
|
name: cancan
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|