chartmogul-ruby 2.9.0 → 3.0.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/README.md +4 -6
- data/changelog.md +3 -0
- data/lib/chartmogul/api_resource.rb +1 -1
- data/lib/chartmogul/configuration.rb +1 -2
- data/lib/chartmogul/version.rb +1 -1
- data/lib/chartmogul.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11764c4ea2047d068ef4a7de177763aad2cffd7bf5db14482bea9c14fbf3f0bb
|
4
|
+
data.tar.gz: 70a0fb241323b87f03e67c2a5bf662594f38e567d5ceafbc8c2d7f1b68d1d4b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7103c010405cc5bf453885fe6f96950aea533c01024f420426bf89521a64d1a1ab1a7122651d913be5e95eed14fa3c4f64a41875f439a351ba81c798b9fca8c
|
7
|
+
data.tar.gz: f392443972c1cc32d0a1000cb6e7ac65622cacd20908489f10ad5e691434f9f538f39ed922528da5d94b482d570c127c8b14046490263aca3ded0f8b01745fab
|
data/README.md
CHANGED
@@ -51,21 +51,19 @@ This gem supports Ruby 2.3 and above.
|
|
51
51
|
|
52
52
|
## Configuration
|
53
53
|
|
54
|
-
Configure `chartmogul-ruby` with your
|
54
|
+
Configure `chartmogul-ruby` with your API Key, available from the administration section of your ChartMogul account.
|
55
55
|
You can either do this in the global scope for the whole runtime (eg. in initializer):
|
56
56
|
|
57
57
|
```ruby
|
58
|
-
ChartMogul.
|
59
|
-
ChartMogul.global_secret_key = '<Secret key goes here>'
|
58
|
+
ChartMogul.global_api_key = '<API key goes here>'
|
60
59
|
```
|
61
60
|
|
62
61
|
Or in a thread-safe scope for the current thread only (eg. different accounts in different async jobs):
|
63
62
|
```ruby
|
64
|
-
ChartMogul.
|
65
|
-
ChartMogul.secret_key = '<Secret key goes here>'
|
63
|
+
ChartMogul.api_key = '<API key goes here>'
|
66
64
|
```
|
67
65
|
|
68
|
-
Thread-safe configuration is used if available, otherwise global is used.
|
66
|
+
Thread-safe configuration is used if available, otherwise global is used.
|
69
67
|
|
70
68
|
Test your authentication:
|
71
69
|
```ruby
|
data/changelog.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# chartmogul-ruby Change Log
|
2
2
|
|
3
|
+
## Version 3.0.0 - 29 October 2021
|
4
|
+
- Update ChartMogul::Configuration to use `api_key` instead of `account_token`& `secret_key` combo for authentication
|
5
|
+
|
3
6
|
## Version 2.9.0 - 3 Nov 2021
|
4
7
|
- Adds post install message informing about authentication changes *& deprecation warning.
|
5
8
|
|
@@ -90,7 +90,7 @@ module ChartMogul
|
|
90
90
|
|
91
91
|
def self.build_connection
|
92
92
|
Faraday.new(url: ChartMogul.api_base) do |faraday|
|
93
|
-
faraday.use Faraday::Request::BasicAuthentication, ChartMogul.
|
93
|
+
faraday.use Faraday::Request::BasicAuthentication, ChartMogul.api_key, ''
|
94
94
|
faraday.use Faraday::Response::RaiseError
|
95
95
|
faraday.request :retry, max: ChartMogul.max_retries, retry_statuses: RETRY_STATUSES,
|
96
96
|
max_interval: MAX_INTERVAL, backoff_factor: BACKOFF_FACTOR,
|
data/lib/chartmogul/version.rb
CHANGED
data/lib/chartmogul.rb
CHANGED
@@ -92,8 +92,7 @@ module ChartMogul
|
|
92
92
|
Thread.current[CONFIG_THREAD_KEY] ||= ChartMogul::Configuration.new
|
93
93
|
end
|
94
94
|
|
95
|
-
config_accessor :
|
96
|
-
config_accessor :secret_key
|
95
|
+
config_accessor :api_key
|
97
96
|
config_accessor :max_retries, MAX_RETRIES
|
98
97
|
config_accessor :api_base, API_BASE
|
99
98
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chartmogul-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Petr Kopac
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|