navi_client 1.1.2 → 1.1.3

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: 9a6bbec2ef3d1ca5f47f404a96c43fde753b614ef34e5e5ce9ac4e9145876f23
4
- data.tar.gz: 46b8c0539a3cd17d216371fd920fbd91afe040e42c4ace4341cf6599950b697a
3
+ metadata.gz: 1282b0cf285364b58187a92348e29425290eb24c948c22f17aa0989b2675d0fb
4
+ data.tar.gz: d89b8c14470e158c7304839b817c82422d3665fc923869ebd0ecb7f18ef6dcf4
5
5
  SHA512:
6
- metadata.gz: 1ac65dc435a9429749cb7d5a3a9f9542f56debd3e5c813ad84a834b2a564dc562424aac671144b7c17631c072c67e9bb8fa59ef02424adff20fe8e226fe709fe
7
- data.tar.gz: 6953de27b5231a4ccf536216d4775594567b10b66afd03d2624999bc4a1bdbcf01ba57a5635fda061b04289706c55bed160e566206ab9e7616076370313d4f22
6
+ metadata.gz: 05e07db107f6c0d991ad61c8f76627673405ee220bc35be53c94e3385e65a1032fc952be26f5ddc2e1695dfce04371f0ebc58015daf1dbead48015f1c7ec166c
7
+ data.tar.gz: c5ec4cc4085184b7e46d4dc7d423a3e93b37c4fbd88a6c605cecf719df0778fa9b7e2234d2991626521ff0331fc9ea79f04409ff079785acefd758f27a4406b7
@@ -38,11 +38,13 @@ module NaviClient
38
38
  end
39
39
 
40
40
  def send_request(in_filenames = [])
41
- download_path = config['s3_download_folder']
42
- filepath = download_path + "/inputs/" + (Time.now.to_f * 1000).to_s
43
- filename = upload_to_s3(filepath, in_filenames.join("\n"))
41
+ unless in_filenames.blank?
42
+ download_path = config['s3_download_folder']
43
+ filepath = download_path + "/inputs/" + (Time.now.to_f * 1000).to_s
44
+ filename = upload_to_s3(filepath, in_filenames.join("\n"))
44
45
 
45
- HTTPService::NaviAI.start(filename, @client_type, @token)
46
+ HTTPService::NaviAI.start(filename, @client_type, @token)
47
+ end
46
48
  end
47
49
 
48
50
  def download(message, custom_uid)
@@ -69,16 +69,18 @@ module NaviClient
69
69
  end
70
70
 
71
71
  def send_request(in_filenames = [])
72
- download_path = config['download_path']
73
- filename = download_path + "inputs/" + (Time.now.to_f * 1000).to_s
72
+ unless in_filenames.blank?
73
+ download_path = config['download_path']
74
+ filename = download_path + "inputs/" + (Time.now.to_f * 1000).to_s
74
75
 
75
- mkdir_if_not_exist(filename)
76
+ mkdir_if_not_exist(filename)
76
77
 
77
- File.open(filename, 'w') do |f|
78
- in_filenames.each { |element| f.puts(element) }
79
- end
78
+ File.open(filename, 'w') do |f|
79
+ in_filenames.each { |element| f.puts(element) }
80
+ end
80
81
 
81
- HTTPService::NaviAI.start(filename, @client_type, @token)
82
+ HTTPService::NaviAI.start(filename, @client_type, @token)
83
+ end
82
84
  end
83
85
 
84
86
  def mkdir_if_not_exist(filepath)
@@ -1,3 +1,3 @@
1
1
  module NaviClient
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: navi_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Surya
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-11 00:00:00.000000000 Z
11
+ date: 2017-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement