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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9cb0e0c631018645fad2ce7443c3749db7b54a139de4d8e2c681db5fd5ec1222
4
- data.tar.gz: 0ec3d5d13bfe57e25d731f90484c32fba31dcaf1f939d306edafdce30d38bda9
3
+ metadata.gz: ff6cda10e896b7bffe2e1af83020b86c9e180a802c03faa52758cb119f513cd4
4
+ data.tar.gz: 3cc64688800e7cac5c90602d05cb78262e24389259802883e07ceff03038cb9f
5
5
  SHA512:
6
- metadata.gz: c56d1eca2314f67639f83e6448a0b959c5407db48dc340e1fcc7a85bcfcb134d962cea3eb53c4f1be404db66da4ed6f90d9db8b7d1641d8acee498a0a8d81556
7
- data.tar.gz: b6535e8af22f4558800cfda7ede70b6fb72f6414eaf716c4d7f6eb62ee2d4e879b41ee472fd51ca62276413fec17a4944096bb73c8dd842f681acbefeaca23ca
6
+ metadata.gz: ea53235d5b99cf5bc148c31ce4bf2e41d6ffcacf9dc5124d3218fdef11c947cc968ae9af82bd4609a9d685b9b0103603f9b061cc4b8e05897209ce1d8d9da62f
7
+ data.tar.gz: 1d90c38a4bf0ebebfa460ac305ed13536c3162c8bb4ee8e482d4f75300aa4097c4bd662aed5eb1522517c608bc57a42e2a21a5ebdceb0005e53ef3e9f82f9ed3
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Version 0.2.28
2
+ * Enhancement
3
+ * Ability to change OAuth2 retry limit as retrying too many times can cause a lock out
4
+
1
5
  Version 0.2.27
2
6
  * Enhancement
3
7
  * Enable ability to perform action right after response is retrieved. This could be used to
@@ -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 < 3
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?
@@ -1,4 +1,4 @@
1
1
  module Soaspec
2
2
  # @return [String] Version of the gem
3
- VERSION = '0.2.27'.freeze
3
+ VERSION = '0.2.28'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soaspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.27
4
+ version: 0.2.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - SamuelGarrattIQA