semaphore_client 2.6.0 → 2.7.0
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/Gemfile.lock +1 -1
- data/lib/semaphore_client.rb +2 -3
- data/lib/semaphore_client/http_client.rb +4 -5
- data/lib/semaphore_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b0f7c76664b09561c46dc77c85a51a4f831b629
|
4
|
+
data.tar.gz: 141c965e420683c86c8e7dc3fcba4a4846c261f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 851ae149946a390782ff7c6b7c82f68a3d624e80cfc3e1470e4b4fbb1db7169dc3153a121197098950b579a8038ea122fa10101bf91ce80af0a9f5189aefcc13
|
7
|
+
data.tar.gz: b4c332064b557deafaa2ccafef905b517ead1aace0e101854a7246f90ced331b98572880f0375d3f4e2c6fdc4cd8144e30448e2b79425d6720e5fa199f0d409a
|
data/Gemfile.lock
CHANGED
data/lib/semaphore_client.rb
CHANGED
@@ -31,8 +31,7 @@ class SemaphoreClient
|
|
31
31
|
|
32
32
|
@api_url = options.fetch(:api_url, API_URL)
|
33
33
|
@api_version = options.fetch(:api_version, API_VERSION)
|
34
|
-
@
|
35
|
-
@logger = options.fetch(:logger, Logger.new(STDOUT))
|
34
|
+
@logger = options.fetch(:logger, nil)
|
36
35
|
@auto_paginate = options.fetch(:auto_paginate, false)
|
37
36
|
end
|
38
37
|
|
@@ -67,6 +66,6 @@ class SemaphoreClient
|
|
67
66
|
private
|
68
67
|
|
69
68
|
def http_client
|
70
|
-
@http_client ||= SemaphoreClient::HttpClient.new(@auth_token, @api_url, @api_version, @
|
69
|
+
@http_client ||= SemaphoreClient::HttpClient.new(@auth_token, @api_url, @api_version, @logger, @auto_paginate)
|
71
70
|
end
|
72
71
|
end
|
@@ -25,11 +25,10 @@ class SemaphoreClient
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
def initialize(auth_token, api_url, api_version,
|
28
|
+
def initialize(auth_token, api_url, api_version, logger, auto_paginate)
|
29
29
|
@auth_token = auth_token
|
30
30
|
@api_url = api_url
|
31
31
|
@api_version = api_version
|
32
|
-
@verbose = verbose
|
33
32
|
@logger = logger
|
34
33
|
@auto_paginate = auto_paginate
|
35
34
|
end
|
@@ -90,12 +89,12 @@ class SemaphoreClient
|
|
90
89
|
conn.request :json
|
91
90
|
conn.response :json
|
92
91
|
|
93
|
-
|
92
|
+
conn.use SemaphoreClient::HttpClient::ResponseErrorMiddleware
|
93
|
+
|
94
|
+
if @logger
|
94
95
|
conn.response :logger, @logger, :headers => false, :bodies => true
|
95
96
|
end
|
96
97
|
|
97
|
-
conn.use SemaphoreClient::HttpClient::ResponseErrorMiddleware
|
98
|
-
|
99
98
|
conn.adapter Faraday.default_adapter
|
100
99
|
end
|
101
100
|
end
|