iron_worker 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iron_worker/api_client.rb +7 -3
- data/lib/iron_worker/client.rb +4 -0
- data/lib/iron_worker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3515c7363a69a5acd427f505117357437096ce59
|
4
|
+
data.tar.gz: 326738fe398530715be8b102a79fa9f7c6d0d126
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 911e215e413e66144c28bf9f037e7b40f629d8e430600a4c053eaaff58114ac72eb520c9925c0291375ff813a8384d2704509e18606464c0af60be4cc081741b
|
7
|
+
data.tar.gz: 13fe58f06f2e5020cae949ee7cfeb40dc89492e43082524ff847c3ce4ab9f0d463cbb309796330def40f222d17926d8df3acec8b479a94b8c4f041ed1aea2e32
|
@@ -14,19 +14,23 @@ module IronWorker
|
|
14
14
|
:user_agent => IronWorker.full_version
|
15
15
|
}
|
16
16
|
|
17
|
-
super('iron', 'worker', options, default_options, [:project_id, :token, :api_version])
|
17
|
+
super('iron', 'worker', options, default_options, [:project_id, :token, :jwt, :api_version])
|
18
18
|
|
19
19
|
IronCore::Logger.debug 'IronWorker', "nhp.proxy: #{rest.wrapper.http.proxy_uri}" if defined? Net::HTTP::Persistent
|
20
20
|
IronCore::Logger.debug 'IronWorker', "RestClient.proxy: #{RestClient.proxy}" if defined? RestClient
|
21
21
|
IronCore::Logger.debug 'IronWorker', "InternalClient.proxy: #{Rest::InternalClient.proxy}" if defined? Rest::InternalClient
|
22
22
|
|
23
|
-
IronCore::Logger.error 'IronWorker', "Token is not set", IronCore::Error if @token.nil?
|
23
|
+
IronCore::Logger.error 'IronWorker', "Token is not set", IronCore::Error if @token.nil? && @jwt.nil?
|
24
24
|
|
25
25
|
check_id(@project_id, 'project_id')
|
26
26
|
end
|
27
27
|
|
28
28
|
def headers
|
29
|
-
|
29
|
+
if !@jwt.nil?
|
30
|
+
super.merge({'Authorization' => "JWT #{@jwt}"})
|
31
|
+
else
|
32
|
+
super.merge({'Authorization' => "OAuth #{@token}"})
|
33
|
+
end
|
30
34
|
end
|
31
35
|
|
32
36
|
def base_url
|
data/lib/iron_worker/client.rb
CHANGED
data/lib/iron_worker/version.rb
CHANGED