unleashed 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/unleashed/client.rb +11 -1
- data/lib/unleashed/version.rb +1 -1
- 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: 64bf42de94dbe048a5de0a81983e05e92ae7199df7c9f1d31b3af12759af408c
|
4
|
+
data.tar.gz: 10dfcd117b381f209e2e740a1a290e264ebb903d4c5121ba926aa01e440d05ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b4186e4593a6eab6fd8225c3abc7ae16ad3c65e1dece3753d42a76483ae3682d52c142fa3cb66ba46631a001423e65a56e0d928a04de26772b74ca9203735a1
|
7
|
+
data.tar.gz: e0f30e55e86a48cf1d37a357de098788a3f7d059d9af542f0fe862891f96c45a9e3f4c3d397444eaa49b950ca33eb44bce9f1525e37051a98e59460deae22411
|
data/CHANGELOG.md
CHANGED
data/lib/unleashed/client.rb
CHANGED
@@ -50,6 +50,16 @@ module Unleashed
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
+
def hmac_input(params_hash)
|
54
|
+
hmac_input_a = []
|
55
|
+
|
56
|
+
params_hash.each do |k, v|
|
57
|
+
hmac_input_a << "#{k}=#{v}"
|
58
|
+
end
|
59
|
+
|
60
|
+
hmac_input_a.join('&')
|
61
|
+
end
|
62
|
+
|
53
63
|
# Create a signature for request
|
54
64
|
def signature(params = '')
|
55
65
|
hash = OpenSSL::HMAC.digest('sha256', @api_key, params)
|
@@ -61,7 +71,7 @@ module Unleashed
|
|
61
71
|
request.headers['Accept'] = 'application/json'
|
62
72
|
request.headers['Content-Type'] = 'application/json'
|
63
73
|
request.headers['api-auth-id'] = @api_id
|
64
|
-
request.headers['api-auth-signature'] = signature(request.params
|
74
|
+
request.headers['api-auth-signature'] = signature(hmac_input(request.params))
|
65
75
|
request
|
66
76
|
end
|
67
77
|
|
data/lib/unleashed/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unleashed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nhan Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|