fulfil-io 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e82498f50af6f27434982cbeb6bb3faec54a085e999f4d86293d4378afb801a
4
- data.tar.gz: d2596d9afedaf2f67aa3f573c139d1c5a03b706e638fdf2407fc482f25336d6f
3
+ metadata.gz: 4c465ec839e9c594b602b0e70f3058214630c38e6b8544ed456a16e5c518aeac
4
+ data.tar.gz: 22d0df9435f0f5432bf16193b40f25cd6f681c796c163f5aac6c6439e940c8c5
5
5
  SHA512:
6
- metadata.gz: 67ad033ab2a666abc04747a37e1d4859690158cfdf1c6455cdc3e3383ccfd6aa74b556def1b02e7584945120b426357ed4a85fa1f1feaa74ad118fbe6161280c
7
- data.tar.gz: 1ade1a109a650b56c76fcaea49ed71d92b87d8f87e6659748ea5c739d6e6f1715ec6099835f2faefd7c515e8482054d580c17b0fcb74342c2cc214d40fabaeee
6
+ metadata.gz: dfa7f4dde51c08ff6f4b33520817db32a374b99dc41543926256277cb70ead338cd24987c1cefde9100a53492c848e6c87ce7e19308be7d2e5188b9b26060f9e
7
+ data.tar.gz: 4462c5a7b4526802270e1eb80941077faa956b6822e5fe034b84cbdb72021f50d610e461b22419ea4b8d3aa9d1c90be529ab3ad36fbb9b91308de084b4853414
data/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ ## 0.8.1
2
+
3
+ * Add logger to configuration by @cdmwebs in https://github.com/knowndecimal/fulfil/pull/49
4
+
5
+ ## 0.8.0
6
+
7
+ * Add rubocop by @stefanvermaas in https://github.com/knowndecimal/fulfil/pull/35
8
+ * Remove _now from testing example by @swanny85 in https://github.com/knowndecimal/fulfil/pull/32
9
+ * Add SimpleCov for test coverage by @cdmwebs in https://github.com/knowndecimal/fulfil/pull/38
10
+ * Add support for Fulfil sale duplication by @swanny85 in https://github.com/knowndecimal/fulfil/pull/48
11
+
12
+ ## 0.6.1
13
+
14
+ * Fixes a typo in the examples of the readme by @stefanvermaas in https://github.com/knowndecimal/fulfil/pull/25
15
+ * Fix requiring gemfiles manually by @stefanvermaas in https://github.com/knowndecimal/fulfil/pull/27
16
+
17
+ ## 0.6.0
18
+
19
+ * Streamline the usage of environment variables. by @stefanvermaas in https://github.com/knowndecimal/fulfil/pull/18
20
+ * Update http requirement from ~> 4.4.1 to >= 4.4.1, < 5.1.0 by @dependabot in https://github.com/knowndecimal/fulfil/pull/12
21
+ * Remove extremely precise User-Agent from mocks. by @stefanvermaas in https://github.com/knowndecimal/fulfil/pull/20
22
+ * Use GitHub Actions instead of Travis CI and Circle CI by @stefanvermaas in https://github.com/knowndecimal/fulfil/pull/21
23
+ * Remove persistent connection and client caching by @stefanvermaas in https://github.com/knowndecimal/fulfil/pull/22
24
+ * Add rate limit detection by @stefanvermaas in https://github.com/knowndecimal/fulfil/pull/24
25
+
26
+ ## 0.5.0
27
+
28
+ * Better response parsing and error handling.
29
+ * Documentation updates.
30
+ * Add release script.
31
+
1
32
  ## 0.4.9
2
33
 
3
34
  * Add client tests and stub with Webmock.
data/lib/fulfil/client.rb CHANGED
@@ -175,7 +175,7 @@ module Fulfil
175
175
  end
176
176
 
177
177
  def client
178
- client = HTTP.use(logging: @debug ? { logger: Logger.new($stdout) } : {})
178
+ client = HTTP.use(logging: @debug ? { logger: config.logger } : {})
179
179
  client = client.auth("Bearer #{@token}") if @token
180
180
  client.headers(@headers)
181
181
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'logger'
4
+
3
5
  module Fulfil
4
6
  # The `Fulfil::Configuration` contains the available configuration options
5
7
  # for the `Fulfil` gem.
@@ -22,9 +24,21 @@ module Fulfil
22
24
  # @return [Proc, nil]
23
25
  attr_accessor :rate_limit_notification_handler
24
26
 
27
+ # Allows the client to configure a logger. Logs are output to $stderr by default.
28
+ #
29
+ # @example Use a logger to log the API rate limit hits
30
+ # Fulfil.configure do |config|
31
+ # config.logger = Logger.new($stderr)
32
+ # end
33
+ #
34
+ # @return [Logger, nil]
35
+ #
36
+ attr_accessor :logger
37
+
25
38
  def initialize
26
39
  @retry_on_rate_limit = false
27
40
  @retry_on_rate_limit_wait = 1
41
+ @logger = Logger.new($stderr)
28
42
  end
29
43
 
30
44
  def retry_on_rate_limit?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Fulfil
4
- VERSION = '0.8.0'
4
+ VERSION = '0.8.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fulfil-io
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Moore
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-04-20 00:00:00.000000000 Z
13
+ date: 2023-12-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: http
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  requirements: []
82
- rubygems_version: 3.3.12
82
+ rubygems_version: 3.3.7
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: Interact with the Fulfil.io API