innologix 0.0.30 → 0.0.31

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: fc21c1a276cad74bff00fad1c1238528ea128818
4
- data.tar.gz: a52f12e42798a4fddd0477d53d2792e4e76d1fbd
3
+ metadata.gz: 9a3c24d538842108e42c61511ba0e185ff14c15d
4
+ data.tar.gz: de8b4128e9e2a15a2860a7afbb33ef8998689f47
5
5
  SHA512:
6
- metadata.gz: 65417ea54393d822339afb376e56009a08b1363a39817631fd6ceae6f0ba424e8d207a6d94140f0705852011725a0ae35785716874f93069c79d28ff4e07f7df
7
- data.tar.gz: e577c1f759250e8cc72c8f1009531a916817b4915154f69ffd1481fbbaf89d3e2ace1036b5bf89cf59e5cde78fa0063e1cae99ed88d93394ebb85ea0a83e2413
6
+ metadata.gz: c9f78fd4aeb4737e1f43d7622659b7fd746825966851c3417928ada5f89ad9b13ac337006e46acadb202b9e376968157e74a22c5d060df7bd77fd9a6fae60277
7
+ data.tar.gz: 014e5d4037558f45d3080a6dc0e3e5a7be11fd0348ac300ed54bcd1eaef25ac5c93dc7aa6d71f410dc4d810493f026a744df6d8c8662fe04c2fd549efe33f2f9
@@ -1,6 +1,14 @@
1
1
  module Innologix
2
2
  class Client
3
- attr_accessor :client_id, :client_secret, :innologix_url, :access_token, :auth, :logger, :sso_url, :timeout, :default_headers
3
+ attr_accessor :client_id,
4
+ :client_secret,
5
+ :innologix_url,
6
+ :access_token,
7
+ :auth,
8
+ :logger,
9
+ :sso_url,
10
+ :timeout,
11
+ :default_headers
4
12
 
5
13
  def initialize (options = {})
6
14
  @client_id = options[:client_id] || Innologix.config['client_id']
@@ -10,10 +18,15 @@ module Innologix
10
18
  @timeout = options[:timeout] || Innologix.config['timeout']
11
19
  @default_headers = {:'Content-Type' => "application/json",
12
20
  :'Authorization' => 'Bearer ' + current_token}
13
-
14
21
  return true
15
22
  end
16
23
 
24
+ def self.set_user_id(user_id)
25
+ @default.default_headers = {:'Content-Type' => "application/json",
26
+ :'X-User-ID' => user_id,
27
+ :'Authorization' => 'Bearer ' + @default.access_token}
28
+ end
29
+
17
30
  def self.default
18
31
  @default ||= Client.new
19
32
  end
@@ -1,3 +1,3 @@
1
1
  module Innologix
2
- VERSION = "0.0.30"
2
+ VERSION = "0.0.31"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: innologix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.30
4
+ version: 0.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - SkyLab Innogram