navi_client 1.1.6 → 1.1.7

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
  SHA256:
3
- metadata.gz: 3fccf176e1090d7acc43337b68d54b077a31b90305cceb797ae0a39d6ae4239c
4
- data.tar.gz: 2d97634446bc3f46401b15306f83a60f07f306d3f9e66d14dac9518528a5ee10
3
+ metadata.gz: 77d9a804a7dfe610613f578bf9b1c0f20b4c9456292532a5dc3a6a2056ad9193
4
+ data.tar.gz: c8ccdbb6a82dee0d807049024bb9af985fb0fd95fecd08bc8b15caa647669217
5
5
  SHA512:
6
- metadata.gz: e02db07cd0b3be65a8a6c4e0a6853fee763da68aa7efbe64cc981e516fcfedf2f5d02e1e7b892ea1189e523961eb80cefa55dcf2c06e3b1cd4383751aa66ea59
7
- data.tar.gz: ca54affdc411e2e4965a06f3aeb17f6a4c08787ecabe00dd78cc6f265ed5e934b29e911e23732761aa7809ce696b16b5d651a0f664975a9d6cd405f59d0235ce
6
+ metadata.gz: eeb3417a1638e21dc767101cfc01872d508c288b42d7359068ae4a661543bb98d6d0b2318f05fa6b725250a0cb0929709436377440fdee0d3ed13c0df124eca2
7
+ data.tar.gz: baaeb601a245008e72e24b3f8a25764ebb1851d535651acdc4046b1421bb26b4a268af5013b581974d7eadca03454eaa2de9c34c7f7d5706246628049e31fd9f
@@ -3,7 +3,7 @@ require Gem::Specification.find_by_name("navi_client").gem_dir+"/lib/client"
3
3
  module NaviClient
4
4
  class Cloud
5
5
  include Client
6
- def initialize(sso_web_url = "http://localhost:3008/", current_user)
6
+ def initialize(sso_web_url = "http://localhost:3008/")
7
7
  # flag to print Ruby library debug info (very detailed)
8
8
  @net_imap_debug = false
9
9
 
@@ -19,7 +19,6 @@ module NaviClient
19
19
  @sso_web_url = sso_web_url
20
20
  # authentication token received from sso_web used to authenticate the request to database_api
21
21
  @token = nil
22
- @current_user = current_user
23
22
 
24
23
  # client_type
25
24
  @client_type = "cloud"
@@ -44,7 +43,7 @@ module NaviClient
44
43
  filepath = download_path + "/inputs/" + (Time.now.to_f * 1000).to_s
45
44
  filename = upload_to_s3(filepath, in_filenames.join("\n"))
46
45
 
47
- HTTPService::NaviAI.start(filename, @client_type, @token, @current_user)
46
+ HTTPService::NaviAI.start(filename, @client_type, @token)
48
47
  end
49
48
  end
50
49
 
@@ -3,12 +3,12 @@ require "httparty"
3
3
  module HTTPService
4
4
  class NaviAI
5
5
 
6
- def self.start(file_path, client_type, token, current_user=nil)
6
+ def self.start(file_path, client_type, token)
7
7
  go_url = 'http://localhost:9090/v2/metas'
8
8
  if client_type == 'cloud'
9
9
  go_url = 'http://34.214.134.104:9090/v2/metas'
10
10
  end
11
- HTTParty.post(go_url, body: { client_type: client_type, list_meta_path: file_path, token: token, current_user: current_user }.to_json)
11
+ HTTParty.post(go_url, body: { client_type: client_type, list_meta_path: file_path, token: token }.to_json)
12
12
  end
13
13
  end
14
14
  end
@@ -33,13 +33,14 @@ module NaviClient
33
33
  def login
34
34
  url = "#{@sso_web_url}/oauth/token"
35
35
  provider_url = url
36
- @token = HTTParty.post(provider_url,
36
+ token = HTTParty.post(provider_url,
37
37
  body: {
38
38
  client_id: config["uid"], # get from sso_web application
39
39
  client_secret: config["secret_key"],
40
40
  grant_type: "client_credentials"
41
41
  }
42
42
  )['access_token']
43
+ @token = "Token: #{token}##{config['username']}"
43
44
  end
44
45
 
45
46
  def download(message, custom_uid)
@@ -1,3 +1,3 @@
1
1
  module NaviClient
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: navi_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Surya