customerx_tracking 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/customerx_tracking/base.rb +5 -12
- data/lib/customerx_tracking/requestor.rb +1 -2
- data/lib/customerx_tracking/version.rb +1 -1
- data/lib/customerx_tracking.rb +0 -8
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9b3ae9f0cfcbe45349c526e4a297800dc868d6ae707ad0731df6f51f579fa5e
|
4
|
+
data.tar.gz: 8b18d6856d5f4fea1ba7ba4557046ac0a273d4046e8e217b4b42d3ce8a627d66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dfc1a8a3cdee7fb6cf70f540effa5fb8c5060bbae48fb657180955680ad97e827d3e21a64030baf3132605772c1c2f9ef8b8eafb23bf674e913744d9b8d35cc
|
7
|
+
data.tar.gz: 274f9f3dcf1e1b5e35be9c1a952d4c48f22dc83733df4c4eb3869a17446d2d71b1b72500d5e2694c3c7cd443ec9f9b02614d8894be535fde4064e59a7fa31fee
|
@@ -5,7 +5,7 @@ module CustomerxTracking
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def authorizations_is_not_present?
|
8
|
-
::CustomerxTracking.
|
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
|
-
|
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 '
|
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
|
data/lib/customerx_tracking.rb
CHANGED
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.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Grassi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -43,7 +43,7 @@ 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.
|
46
|
+
releases_uri: https://github.com/CustomerX-CX/customerx_tracking_client_rb/releases/tag/2.2.0
|
47
47
|
post_install_message:
|
48
48
|
rdoc_options: []
|
49
49
|
require_paths:
|
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: 1.3.6
|
61
61
|
requirements: []
|
62
|
-
rubygems_version: 3.2.
|
62
|
+
rubygems_version: 3.2.3
|
63
63
|
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: CustomerX Tracking REST API Client
|