navi_client 1.3.0 → 1.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d7f0b300e28a50b8d6312eeb6dbdedf907258dc7e5d9ad2aa0924320d778b96
4
- data.tar.gz: 915871490b005d069dd60b13dd8631bcf94f043cf35369a789a3483147ffebdb
3
+ metadata.gz: 8d9bbc833c46fc05429522a82871694883ec8b76abbed13202b0d7541eca7761
4
+ data.tar.gz: 6e24066223a2a3b810dcc95dc660e90717da6d6ec02ed9fcf45383d9be1ad152
5
5
  SHA512:
6
- metadata.gz: 3f33f8f26592b20228f839d2bb2c8577ba96b45ce5fd107af931cbe75722a63869463fe86cb860408cec3e4c37b99284ba266a81524ce834cb0627939b92c191
7
- data.tar.gz: 5aeca2910517546ae9ecb4f1880eda75d17c084f51d5868650164fca7fd2cd3f27eefd5ce1789c28c7f68c84f7b2aa09e85fc7442ba2fe82b1f2edbd32bcc32d
6
+ metadata.gz: 98d021f7c375641d79bcb37f2e2ab319a589800e158db453299b082ca1b8f98ed44569c094ca32709b3ef751d6db71ca7ed6ff3226fdbd4fdff577fcd21c73ca
7
+ data.tar.gz: 5e941373fde75fc2018b5a4d61c34c87be675db480468f665c4ccc52b027091c739765df7aa651fa9d47ccf4f0e0b19381269f0e1c9f55ac83bcbbc400d31074
@@ -2,14 +2,22 @@ require Gem::Specification.find_by_name("navi_client").gem_dir+"/lib/client"
2
2
 
3
3
  module NaviClient
4
4
  class Cloud
5
+ include Concurrent::Async
5
6
  include Client
7
+
8
+ attr_reader :id
9
+
6
10
  def initialize(sso_web_url = "http://localhost:3008/")
11
+ super()
12
+
13
+ # client-id used to track the process
14
+ @id = SecureRandom.uuid
15
+
7
16
  # flag to print Ruby library debug info (very detailed)
8
17
  @net_imap_debug = false
9
18
 
10
19
  # flag to mark email as read after gets downloaded.
11
20
  @mark_as_read = false
12
-
13
21
  # flag to turn on/off debug mode.
14
22
  @debug = false
15
23
 
@@ -50,7 +58,7 @@ module NaviClient
50
58
  filepath = download_path + "/inputs/" + (Time.now.to_f * 1000).to_s
51
59
  filename = upload_to_s3(filepath, in_filenames.join("\n"))
52
60
 
53
- HTTPService::NaviAI.start(filename, @client_type, @token)
61
+ HTTPService::NaviAI.start(filepath: filename, client_id: @id, client_type: @client_type, token: @token)
54
62
  end
55
63
  end
56
64
 
@@ -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)
6
+ def self.start(filepath:, client_id: nil, 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 }.to_json)
11
+ HTTParty.post(go_url, body: { client_id: client_id, client_type: client_type, list_meta_path: filepath, token: token }.to_json)
12
12
  end
13
13
 
14
14
  def self.generate_csv(email)
@@ -83,7 +83,7 @@ module NaviClient
83
83
  in_filenames.each { |element| f.puts(element) }
84
84
  end
85
85
 
86
- HTTPService::NaviAI.start(filename, @client_type, @token)
86
+ HTTPService::NaviAI.start(filepath: filename, client_type: @client_type, token: @token)
87
87
  end
88
88
  end
89
89
 
@@ -1,3 +1,3 @@
1
1
  module NaviClient
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
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.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sujit
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2018-02-15 00:00:00.000000000 Z
13
+ date: 2018-02-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  requirement: !ruby/object:Gem::Requirement