iron_worker 3.2.1 → 3.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbcc76f9fbeaae2a63cf9f7733418b995596c012
4
- data.tar.gz: 3323244da00020b183e541d74616059cccd3987a
3
+ metadata.gz: 3515c7363a69a5acd427f505117357437096ce59
4
+ data.tar.gz: 326738fe398530715be8b102a79fa9f7c6d0d126
5
5
  SHA512:
6
- metadata.gz: cf016bd8d4128cffdadf8c9e6462150fcf3880ddb126d3223092f52fda6a0fb94051fd4039e649737259b1077a39211607d70c58fef3304b6a141dfa4751558d
7
- data.tar.gz: 48e063b2098e2c265c1a821acd06bfe87f5601d67bb64b692637f8a0a3180f7926f95b7750bc83cc611c7950b4c1cf7a34a3ff9e6d9e5908e49a27a129c236f0
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
- super.merge({'Authorization' => "OAuth #{@token}"})
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
@@ -41,6 +41,10 @@ module IronWorker
41
41
  @api.token
42
42
  end
43
43
 
44
+ def jwt
45
+ @api.jwt
46
+ end
47
+
44
48
  def project_id
45
49
  @api.project_id
46
50
  end
@@ -1,5 +1,5 @@
1
1
  module IronWorker
2
- VERSION = "3.2.1"
2
+ VERSION = "3.2.2"
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Reeder