soaspec 0.2.27 → 0.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/lib/soaspec/o_auth2.rb +5 -2
- data/lib/soaspec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ff6cda10e896b7bffe2e1af83020b86c9e180a802c03faa52758cb119f513cd4
|
|
4
|
+
data.tar.gz: 3cc64688800e7cac5c90602d05cb78262e24389259802883e07ceff03038cb9f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ea53235d5b99cf5bc148c31ce4bf2e41d6ffcacf9dc5124d3218fdef11c947cc968ae9af82bd4609a9d685b9b0103603f9b061cc4b8e05897209ce1d8d9da62f
|
|
7
|
+
data.tar.gz: 1d90c38a4bf0ebebfa460ac305ed13536c3162c8bb4ee8e482d4f75300aa4097c4bd662aed5eb1522517c608bc57a42e2a21a5ebdceb0005e53ef3e9f82f9ed3
|
data/ChangeLog
CHANGED
data/lib/soaspec/o_auth2.rb
CHANGED
|
@@ -11,6 +11,8 @@ module Soaspec
|
|
|
11
11
|
@instance_urls = {}
|
|
12
12
|
# Whether to see params sent to & received from oauth URL
|
|
13
13
|
@request_message = true
|
|
14
|
+
# How many times to attempt to authenticate before raising exception
|
|
15
|
+
@retry_limit = 2
|
|
14
16
|
class << self
|
|
15
17
|
# Default token url used across entire suite
|
|
16
18
|
attr_accessor :token_url
|
|
@@ -27,7 +29,8 @@ module Soaspec
|
|
|
27
29
|
attr_writer :debug_oauth
|
|
28
30
|
# @return [Boolean] Whether to include request message describing OAuth (either full or simplified)
|
|
29
31
|
attr_writer :request_message
|
|
30
|
-
|
|
32
|
+
# @return [Integer] How many times to attempt to authenticate before raising exception
|
|
33
|
+
attr_accessor :retry_limit
|
|
31
34
|
# @return [Boolean] Whether to see params sent to & received from oauth URL
|
|
32
35
|
def debug_oauth?
|
|
33
36
|
@debug_oauth || false
|
|
@@ -99,7 +102,7 @@ module Soaspec
|
|
|
99
102
|
Soaspec::SpecLogger.info(["oauth_error: #{error.message}", "oauth_response: #{error.response}"])
|
|
100
103
|
self.retry_count += 1
|
|
101
104
|
sleep 0.1 # Wait if a bit before retying obtaining access token
|
|
102
|
-
retry if retry_count <
|
|
105
|
+
retry if retry_count < self.class.retry_limit
|
|
103
106
|
raise error
|
|
104
107
|
else
|
|
105
108
|
Soaspec::SpecLogger.info(["response_headers: #{response.headers}", "response_body: #{response.body}"]) if debug_oauth?
|
data/lib/soaspec/version.rb
CHANGED