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 +4 -4
- data/lib/cloud/navi_cloud_client.rb +10 -2
- data/lib/http_service/naviai.rb +2 -2
- data/lib/local/navi_local_client.rb +1 -1
- data/lib/navi_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d9bbc833c46fc05429522a82871694883ec8b76abbed13202b0d7541eca7761
|
4
|
+
data.tar.gz: 6e24066223a2a3b810dcc95dc660e90717da6d6ec02ed9fcf45383d9be1ad152
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/http_service/naviai.rb
CHANGED
@@ -3,12 +3,12 @@ require "httparty"
|
|
3
3
|
module HTTPService
|
4
4
|
class NaviAI
|
5
5
|
|
6
|
-
def self.start(
|
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:
|
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)
|
data/lib/navi_client/version.rb
CHANGED
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.
|
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-
|
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
|