chartmogul-ruby 2.9.0 → 3.0.0

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: 40f19685adcb71589c00b1fb49b10d174dc75918beaf90b8b57663820d77ea58
4
- data.tar.gz: 2cca1ff4273f7ae537837260b683f25873bb72dc23beb260cef88fe6be2fa922
3
+ metadata.gz: 11764c4ea2047d068ef4a7de177763aad2cffd7bf5db14482bea9c14fbf3f0bb
4
+ data.tar.gz: 70a0fb241323b87f03e67c2a5bf662594f38e567d5ceafbc8c2d7f1b68d1d4b9
5
5
  SHA512:
6
- metadata.gz: b0f481312ddcc98a3db16e3ce30e763b82d81ca8a0d8bc82cf9567f0a5bb69f0f0149c4938277c8d8ae59440b4d58f346cc5c53c15718131e332fdcca214f52a
7
- data.tar.gz: a865cae002eac8073ef58ff40937c32fa4f489e4f1f6fdde8c336dc016f0a80214d27c76ab5ada9dd3fc8fb51d1ded199c092d04f72e66e4ed5546f74875edb4
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 Account Token and Secret Key, available from the administration section of your ChartMogul account.
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.global_account_token = '<Account key goes here>'
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.account_token = '<Account key goes here>'
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.account_token, ChartMogul.secret_key
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,
@@ -2,8 +2,7 @@
2
2
 
3
3
  module ChartMogul
4
4
  class Configuration
5
- attr_accessor :account_token
6
- attr_accessor :secret_key
5
+ attr_accessor :api_key
7
6
  attr_accessor :max_retries
8
7
  attr_accessor :api_base
9
8
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ChartMogul
4
- VERSION = '2.9.0'
4
+ VERSION = '3.0.0'
5
5
  end
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 :account_token
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: 2.9.0
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: 2021-11-19 00:00:00.000000000 Z
11
+ date: 2022-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday