trophonius 1.4.5.4 → 1.4.5.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trophonius_connection.rb +7 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5423635ca9e7c80d1880ae65a0dec526eb4eb7ba3b56c96ed58937c07c3a0481
4
- data.tar.gz: 1db6ebebe107ba8c46e962f1ac79a46eaf22a4e82dc89831f623c8eee20593bd
3
+ metadata.gz: eecfcdce6515f91456cd8e482da0eec5104f2e8fde6b3625baf0db732bc12969
4
+ data.tar.gz: 6b79cbc8b44fe728171a3123d12def4f4df2eaf8f43c66b8201564ed14e12cae
5
5
  SHA512:
6
- metadata.gz: 4532263579437b372761bd83e5c98a0bcdec5ac7552d0201056e5ce28d9c4f37cc0ad8f7f4505ccf221e62177a9498665d917bfc89c0501a30d89376b16f6f35
7
- data.tar.gz: 27cf9b5dfa0ee4098116b76bb1390f400bbf85415d5f0e23b2bd278da52e495ff3a07cecb0a48d34f1397434fd655a5f6f1367f48019d52c90e25cce4de1aa22
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 #{@token}" }
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)['messages'][0]['code'] == '0'
164
- rescue StandardError
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
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-17 00:00:00.000000000 Z
11
+ date: 2022-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis