customerx_tracking 2.1.0 → 2.3.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
  SHA256:
3
- metadata.gz: 5d4e3d43aec5e19517ffd9483fc7baa9f7deb0139f1150b8970ee3d6ff6e9718
4
- data.tar.gz: cda3b742f83cfbc3d604cf8a44d1082ed261edcb1359271f8b63525fca0f2d1b
3
+ metadata.gz: 6353ced020439e2c290919e58a0e379e710d4d2399a261a6c44efcb1bdf0acf3
4
+ data.tar.gz: 2cb699a1b7ee3ffdd07c4c2cba1d976d2a242d5745a2ff441a88b6bb64866e11
5
5
  SHA512:
6
- metadata.gz: 031a7eef2d62b7105266374efaddaea8c5db2fcb5c0d5bfb557b62a66bfbde25db18151c675e17c35a35bfbda76aa4121c596e852906e216656c0783dc270a5d
7
- data.tar.gz: 76a170d6eae62b6d16216d562b50a4fef4c64a9e0aad7ba4cae12da988cdf0f9930d9119725ab74c9860ce0c50964198aed5939f0e55628dca9d934255395437
6
+ metadata.gz: a4f54c8a8ec0ccc6d14097e3bbf8027e71f0dd22cdb5c3ea85b5f1c858cc32927719717081eeca5cf32e6fbc265571d963cc1f46f2c87ff1927bc761b37473f2
7
+ data.tar.gz: 993f4599b1848eff0b929b246c998b1349d20beae0225ce670553b7dbb06bced143763c27b061f16d082f85720f195afdd0a58620856a2eb16da32697a92c0e3
@@ -5,7 +5,7 @@ module CustomerxTracking
5
5
  end
6
6
 
7
7
  def authorizations_is_not_present?
8
- ::CustomerxTracking.authorization.nil? && (::CustomerxTracking.credential.nil? || ::CustomerxTracking.key.nil?)
8
+ ::CustomerxTracking.credential.nil? || ::CustomerxTracking.key.nil?
9
9
  end
10
10
 
11
11
  private
@@ -13,19 +13,12 @@ module CustomerxTracking
13
13
  def faraday_options
14
14
  {
15
15
  headers: {
16
- 'Content-Type' => 'application/json'
17
- }.merge(validate_authorization),
16
+ 'Content-Type' => 'application/json',
17
+ 'credential' => CustomerxTracking.credential,
18
+ 'key'=> CustomerxTracking.key
19
+ },
18
20
  url: ::CustomerxTracking.base_url
19
21
  }
20
22
  end
21
-
22
- def validate_authorization
23
- return { authorization: ::CustomerxTracking.authorization } unless ::CustomerxTracking.authorization.nil?
24
-
25
- {
26
- credential: ::CustomerxTracking.credential,
27
- key: ::CustomerxTracking.key
28
- }
29
- end
30
23
  end
31
24
  end
@@ -2,14 +2,13 @@ module CustomerxTracking
2
2
  class Requestor < Base
3
3
  def initialize
4
4
  super
5
- raise 'authorization or credential and key should be set' if authorizations_is_not_present?
5
+ raise 'credential and key should be set' if authorizations_is_not_present?
6
6
  end
7
7
 
8
8
  def request(meth, params = nil)
9
9
  meth = meth.downcase
10
10
 
11
11
  begin
12
- p JSON.parse(params.to_json)
13
12
  response = connection.method(meth).call do |req|
14
13
  (meth == :get ? (req.params = params) : (req.body = params.to_json)) if params
15
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CustomerxTracking
4
- VERSION = '2.1.0'
4
+ VERSION = '2.3.0'
5
5
  end
@@ -28,14 +28,6 @@ module CustomerxTracking
28
28
  def self.key=(key)
29
29
  @key = key
30
30
  end
31
-
32
- def self.authorization
33
- @authorization
34
- end
35
-
36
- def self.authorization=(authorization)
37
- @authorization = authorization
38
- end
39
31
  end
40
32
 
41
33
  require 'faraday'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: customerx_tracking
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Grassi
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-14 00:00:00.000000000 Z
11
+ date: 2022-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.8'
19
+ version: '2.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.8'
26
+ version: '2.3'
27
27
  description: Ruby wrapper for the REST API at https://www.customerx.cx. Documentation
28
28
  at https://www.customerx.cx/developers.
29
29
  email:
@@ -43,24 +43,24 @@ licenses:
43
43
  metadata:
44
44
  bug_tracker_uri: https://github.com/CustomerX-CX/customerx_tracking_client_rb/issues
45
45
  changelog_uri: https://github.com/CustomerX-CX/customerx_tracking_client_rb/blob/master/CHANGELOG.md
46
- releases_uri: https://github.com/CustomerX-CX/customerx_tracking_client_rb/releases/tag/2.1.0
47
- post_install_message:
46
+ releases_uri: https://github.com/CustomerX-CX/customerx_tracking_client_rb/releases/tag/2.3.0
47
+ post_install_message:
48
48
  rdoc_options: []
49
49
  require_paths:
50
50
  - lib
51
51
  required_ruby_version: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 3.0.0
55
+ version: '2.5'
56
56
  required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '0'
60
+ version: 1.3.6
61
61
  requirements: []
62
- rubygems_version: 3.2.3
63
- signing_key:
62
+ rubygems_version: 3.2.32
63
+ signing_key:
64
64
  specification_version: 4
65
65
  summary: CustomerX Tracking REST API Client
66
66
  test_files: []