navi_client 1.3.6 → 1.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9cc81a50f238c043fac068ff8177680c7bfba4af2f595b3d4cc3c7248e0ec8a
4
- data.tar.gz: 73d8ed4bb4c19f3ceb1ee4403e3c07a4863ca381a0c974152b856920ae3baaf3
3
+ metadata.gz: 49675ffc7d89176c662573f31286223970b00f0c077b814bae9504dcc2d7da32
4
+ data.tar.gz: 0f7bc30b427cf4329af368511f3542d373d042b36e403e40730fe078149fda54
5
5
  SHA512:
6
- metadata.gz: 42d2a25b51a0a87c27c5b1c2e4d8183c53edc173061945d9acf82b6ff0e3b97b14253be9b779439422060da9a696bc587306fae5acc05114d52d2a2167e116c5
7
- data.tar.gz: b9cc7a74d4682b8e00a919891f7d8623d44e44f4c424ae43dbc1ffb8795a51af8e6fd1294d3af17a1d625e254bfdb9d553072d59418c58cdc9da3047b6df0cb4
6
+ metadata.gz: 0d6a997f842f9ccc0b857008d7bf3983f0ee92813c1dd0556c182795838bbd6547b91b754c9ad26b121c8199951809aca01aef1f937b05076fc889745e7fd356
7
+ data.tar.gz: 79e349e6b70e72b1c15a503cd951c66c2d919d7d34560fa0f36098c82bc94ed67bc790dd1f9bf1e55dfa9866b1e23ee9ceb0aed6d76a6e76a0cc16d34154463f
@@ -11,8 +11,8 @@ module HTTPService
11
11
  HTTParty.post(go_url, body: { client_id: client_id, client_type: client_type, list_meta_path: filepath, token: token, email: email }.to_json)
12
12
  end
13
13
 
14
- def self.generate_csv(email)
15
- HTTParty.post("https://api2.navihq.com/generate_csv_input?email=#{email}")
14
+ def self.generate_csv(url, token)
15
+ HTTParty.post(url, headers: {"Authorization": token})
16
16
  end
17
17
  end
18
18
  end
@@ -10,7 +10,7 @@ module NaviClient
10
10
  include Client
11
11
  CONFIG_PATH = File.join(ENV['HOME'], '/.navi/config.yml')
12
12
 
13
- def initialize(sso_web_url = 'http://localhost:3008', client_type = "local")
13
+ def initialize(sso_web_url = 'http://localhost:3008', client_type = "local", gen_csv_url = "http://localhost:3020/v2/generate_csv_input")
14
14
  # flag to print Ruby library debug info (very detailed)
15
15
  @net_imap_debug = false
16
16
 
@@ -33,6 +33,7 @@ module NaviClient
33
33
 
34
34
  # client_type
35
35
  @client_type = client_type
36
+ @gen_csv_url = gen_csv_url
36
37
  end
37
38
 
38
39
  #
@@ -142,7 +143,7 @@ module NaviClient
142
143
  retrieve_emails(imap, search_condition, folder) { |mail, i, isLast, id| filenames << process_email(mail, id)}
143
144
  self.send_request(filenames)
144
145
 
145
- HTTPService::NaviAI.generate_csv(username)
146
+ HTTPService::NaviAI.generate_csv("#{@gen_csv_url}?email=#{username}", @token)
146
147
 
147
148
  @logger.debug "Process Completed." if @debug
148
149
 
@@ -168,7 +169,7 @@ module NaviClient
168
169
  end
169
170
 
170
171
  def initate_csv_generation(username)
171
- HTTPService::NaviAI.generate_csv(username)
172
+ HTTPService::NaviAI.generate_csv("#{@gen_csv_url}?email=#{username}", @token)
172
173
  end
173
174
 
174
175
  def config
@@ -1,3 +1,3 @@
1
1
  module NaviClient
2
- VERSION = "1.3.6"
2
+ VERSION = "1.3.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.3.6
4
+ version: 1.3.7
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-03-07 00:00:00.000000000 Z
13
+ date: 2018-03-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  requirements: []
145
145
  rubyforge_project:
146
- rubygems_version: 2.7.4
146
+ rubygems_version: 2.7.3
147
147
  signing_key:
148
148
  specification_version: 4
149
149
  summary: Write a short summary, because Rubygems requires one.