rxg_client 1.0.0 → 1.0.1
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/rxg_client.rb +5 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bef3b2acf98fd65afe6eb1147133d1d9bbe5cfd86d8e1a3e0a71ec90069d04af
|
4
|
+
data.tar.gz: bfd2186b41c7220bf278e0aac274056abb8d778a2fffe8b909b8350991f7d6ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9cf653e5dc2909c2ca35cd7540bf5ad9078d3cc22002e75c4c31641f1e7d68133ab9a27b23e7ea9415fa787c24c8e42864d363e2f89004d9203963146d2e14a
|
7
|
+
data.tar.gz: 89c833d17d2061e306d343e2609bdc396e199935a7454958826fd4cd3ffb60866d3c4ef574727927578d041265815fcc15566ac2449ee2cf86638f9878ffbb8c
|
data/lib/rxg_client.rb
CHANGED
@@ -49,15 +49,15 @@ class RxgClient
|
|
49
49
|
case auth_method
|
50
50
|
when :headers # compatible with rXg version 11.442 or later
|
51
51
|
if fleet
|
52
|
-
self.class.headers
|
52
|
+
self.class.headers({ 'fleetkey' => self.api_key })
|
53
53
|
else
|
54
|
-
self.class.headers
|
54
|
+
self.class.headers({ 'api_key' => self.api_key })
|
55
55
|
end
|
56
56
|
when :query
|
57
57
|
if fleet
|
58
|
-
self.class.headers
|
58
|
+
self.class.headers({ 'fleetkey' => self.api_key })
|
59
59
|
else
|
60
|
-
self.class.default_params
|
60
|
+
self.class.default_params({ 'api_key' => self.api_key })
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
@@ -157,12 +157,11 @@ class RxgClient
|
|
157
157
|
end
|
158
158
|
|
159
159
|
# The listed methods will be rescued from all StandardError exceptions, and the code within
|
160
|
-
# the block will be executed.
|
160
|
+
# the block will be executed.
|
161
161
|
rescue_from StandardError, :create, :list, :show, :update, :destroy, :execute, :search do |exception, instance|
|
162
162
|
puts exception.message
|
163
163
|
|
164
164
|
raise exception if instance.raise_exceptions
|
165
165
|
end
|
166
166
|
|
167
|
-
|
168
167
|
end
|