trophonius 1.4.5.4 → 1.4.5.5
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 +4 -4
- data/lib/trophonius_connection.rb +7 -4
- 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: eecfcdce6515f91456cd8e482da0eec5104f2e8fde6b3625baf0db732bc12969
|
|
4
|
+
data.tar.gz: 6b79cbc8b44fe728171a3123d12def4f4df2eaf8f43c66b8201564ed14e12cae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a048ab92bfc7971e9d0f80a33e45ba7dc689cbff9d711863cdc5aa0308b29bec48412d9bda6adacb38e267b552a0345a6eb3f8214fa383ecacaaabcf8410db20
|
|
7
|
+
data.tar.gz: 885bee6b19febf90d566c64b7e2fc714d9323efabe10bc0a47fab0a10ae823aec84b5935a3555834e83363e9378322314f2623c727bba1dde2c48d302971c8ad
|
|
@@ -14,7 +14,6 @@ module Trophonius
|
|
|
14
14
|
Trophonius::RedisManager.set_key(key: 'token', value: setup_connection)
|
|
15
15
|
Trophonius::RedisManager.set_key(key: 'last_connection', value: Time.now)
|
|
16
16
|
Trophonius::RedisManager.get_key(key: 'token')
|
|
17
|
-
|
|
18
17
|
else
|
|
19
18
|
@token = setup_connection
|
|
20
19
|
@last_connection = Time.now
|
|
@@ -157,11 +156,15 @@ module Trophonius
|
|
|
157
156
|
request =
|
|
158
157
|
Typhoeus::Request.new(
|
|
159
158
|
url,
|
|
160
|
-
method: :get, body: {}, params: {}, headers: { 'Content-Type' => 'application/json', Authorization: "Bearer #{
|
|
159
|
+
method: :get, body: {}, params: {}, headers: { 'Content-Type' => 'application/json', Authorization: "Bearer #{token}" }
|
|
161
160
|
)
|
|
162
161
|
temp = request.run
|
|
163
|
-
JSON.parse(temp.response_body)
|
|
164
|
-
|
|
162
|
+
json_parsed = JSON.parse(temp.response_body)
|
|
163
|
+
|
|
164
|
+
json_parsed['messages'][0]['code'] == '0'
|
|
165
|
+
rescue StandardError => e
|
|
166
|
+
puts e
|
|
167
|
+
puts e.backtrace
|
|
165
168
|
false
|
|
166
169
|
end
|
|
167
170
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: trophonius
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.5.
|
|
4
|
+
version: 1.4.5.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kempen Automatisering
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-12-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: redis
|