chartmogul-ruby 3.3.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -1
- data/README.md +1 -1
- data/changelog.md +4 -0
- data/chartmogul-ruby.gemspec +1 -1
- data/lib/chartmogul/errors/deprecated_parameter_error.rb +6 -0
- data/lib/chartmogul/resource_path.rb +6 -1
- data/lib/chartmogul/version.rb +1 -1
- data/lib/chartmogul.rb +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66ebd465c81aa14f0e68e406fd7a4b29137d3d019d6ceb4e1da1aaf1d40b0ef4
|
4
|
+
data.tar.gz: 7380c7be4a87d8d8822702eeed51d50dbf36fabbb727d4469239d023282c14eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20c35e5c04d023dce1487916c10a543afe6773c2781ffe10b324045e9c6cad1c7e9b7521d16007fae4ce7345c1f34d06dfd40ed98dd8941ead4f435728ffda06
|
7
|
+
data.tar.gz: fd0be8d9cee2c624e945f33f55effcea1825d7f72913f0d765b97e70084a1ba3fc0561ad0b922f4691e3b2daa3a70a82b87b8d7b44ec72bb69a107e528bfb332
|
data/.github/workflows/test.yml
CHANGED
data/README.md
CHANGED
data/changelog.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# chartmogul-ruby Change Log
|
2
2
|
|
3
|
+
## Version 4.0.0 - November 1 2023
|
4
|
+
- Remove support for old pagination using `page` parameter.
|
5
|
+
- Drop support for Ruby versions below 2.7.
|
6
|
+
|
3
7
|
## Version 3.3.1 - October 27 2023
|
4
8
|
- Add support for cursor based pagination to `.all` endpoints.
|
5
9
|
- Add `.next` pagination method for all supported cursor based endpoints.
|
data/chartmogul-ruby.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.description = 'Official Ruby client for ChartMogul\'s API'
|
15
15
|
spec.homepage = 'https://github.com/chartmogul/chartmogul-ruby'
|
16
16
|
spec.license = 'MIT'
|
17
|
-
spec.required_ruby_version = '>= 2.
|
17
|
+
spec.required_ruby_version = '>= 2.7'
|
18
18
|
|
19
19
|
spec.post_install_message = %q{
|
20
20
|
Starting October 29 2021, we are updating our developer libraries to support the enhanced API Access Management. Please use the same API Key for both API Token and Secret Key.
|
@@ -9,6 +9,8 @@ module ChartMogul
|
|
9
9
|
|
10
10
|
class RequiredParameterMissing < StandardError; end
|
11
11
|
|
12
|
+
DEPRECATED_PARAMETER = 'page'
|
13
|
+
|
12
14
|
def initialize(path)
|
13
15
|
@path = path
|
14
16
|
@named_params = path.scan(/:\w+/).each_with_object({}) do |named_param, hash|
|
@@ -22,7 +24,6 @@ module ChartMogul
|
|
22
24
|
|
23
25
|
# For path = '/hello/:hello_id/say' & params = { hello_id: 1, search: 'cat' }
|
24
26
|
# it will return '/hello/1/say?search=cat'
|
25
|
-
|
26
27
|
def apply_with_get_params(params = {})
|
27
28
|
base_path = apply_named_params(params)
|
28
29
|
get_params = params.reject { |param_name| named_params.values.include?(param_name) }
|
@@ -33,6 +34,10 @@ module ChartMogul
|
|
33
34
|
private
|
34
35
|
|
35
36
|
def apply_named_params(params)
|
37
|
+
if params.keys.map(&:to_s).include?(DEPRECATED_PARAMETER)
|
38
|
+
raise(ChartMogul::DeprecatedParameterError, "#{DEPRECATED_PARAMETER} is deprecated.")
|
39
|
+
end
|
40
|
+
|
36
41
|
path.dup.tap do |path|
|
37
42
|
named_params.each do |named_param, param_key|
|
38
43
|
unless params.key?(param_key)
|
data/lib/chartmogul/version.rb
CHANGED
data/lib/chartmogul.rb
CHANGED
@@ -18,6 +18,7 @@ require 'chartmogul/errors/resource_invalid_error'
|
|
18
18
|
require 'chartmogul/errors/schema_invalid_error'
|
19
19
|
require 'chartmogul/errors/server_error'
|
20
20
|
require 'chartmogul/errors/unauthorized_error'
|
21
|
+
require 'chartmogul/errors/deprecated_parameter_error'
|
21
22
|
|
22
23
|
require 'chartmogul/config_attributes'
|
23
24
|
require 'chartmogul/configuration'
|
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: 4.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: 2023-
|
11
|
+
date: 2023-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -223,6 +223,7 @@ files:
|
|
223
223
|
- lib/chartmogul/enrichment/customer.rb
|
224
224
|
- lib/chartmogul/errors/chartmogul_error.rb
|
225
225
|
- lib/chartmogul/errors/configuration_error.rb
|
226
|
+
- lib/chartmogul/errors/deprecated_parameter_error.rb
|
226
227
|
- lib/chartmogul/errors/forbidden_error.rb
|
227
228
|
- lib/chartmogul/errors/not_found_error.rb
|
228
229
|
- lib/chartmogul/errors/resource_invalid_error.rb
|
@@ -279,7 +280,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
279
280
|
requirements:
|
280
281
|
- - ">="
|
281
282
|
- !ruby/object:Gem::Version
|
282
|
-
version: '2.
|
283
|
+
version: '2.7'
|
283
284
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
284
285
|
requirements:
|
285
286
|
- - ">="
|