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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea367bad5bf63a2fb367feecccda015e8c69f4c8
4
- data.tar.gz: 1a3205112ff51dd8ecdb2ca14a9347396041526c
3
+ metadata.gz: 8b0f7c76664b09561c46dc77c85a51a4f831b629
4
+ data.tar.gz: 141c965e420683c86c8e7dc3fcba4a4846c261f7
5
5
  SHA512:
6
- metadata.gz: ae7f047f3eb3969c1ccfc90c17a670fff0b4c151ec690ecd7d5f37961749627afeb3908144bd1bbc92bf7486a4630d5e462872210064aca51f2533d0be52813e
7
- data.tar.gz: 61b11722e92077a0510c381e124d518bdccb02823cb304b1df312708373140a18b9b82efcb2a5a44bc88c40abc3c7ef627c2ff6a7c0d9e4149e316f93e525999
6
+ metadata.gz: 851ae149946a390782ff7c6b7c82f68a3d624e80cfc3e1470e4b4fbb1db7169dc3153a121197098950b579a8038ea122fa10101bf91ce80af0a9f5189aefcc13
7
+ data.tar.gz: b4c332064b557deafaa2ccafef905b517ead1aace0e101854a7246f90ced331b98572880f0375d3f4e2c6fdc4cd8144e30448e2b79425d6720e5fa199f0d409a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- semaphore_client (2.6.0)
4
+ semaphore_client (2.7.0)
5
5
  faraday
6
6
 
7
7
  GEM
@@ -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
- @verbose = options.fetch(:verbose, false)
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, @verbose, @logger, @auto_paginate)
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, verbose, logger, auto_paginate)
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
- if @verbose
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
@@ -1,3 +1,3 @@
1
1
  class SemaphoreClient
2
- VERSION = "2.6.0"
2
+ VERSION = "2.7.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semaphore_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jovan Ivanović