navi_client 1.2.7 → 1.2.8

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: 6620842a812ae1698613074e1b9fbbb57701f87f873d9827d2ee6d02f3500fd3
4
- data.tar.gz: 6e837ad901baf1eb552b92f669aafadb1420b766c24adc1b27d45724b3195a73
3
+ metadata.gz: fa9ce982de5cf6d74d32e75d3d549fb06b92ef1bf79b48c68e280aa65fc1ce0f
4
+ data.tar.gz: a104cb1d973c9909c61851d79b059501651bf2c694e4dec0a1ea68424d709f8f
5
5
  SHA512:
6
- metadata.gz: c86ebb246434535d7097ddade2256a5b65c6e2a106c871c0f19ec59c2268771ba75d2665ec253c9a81bdaf1ee157295d559d998ef79ca9f722b61c9f467cb2fe
7
- data.tar.gz: 54828749c7c4b9a6f1417cbe63346fc377693d5a7b0bdb63e4f831c7020b94bca208813f251590d2e1a9f34d9dc996b2605687c8cb7b7ea326340ce3cf39ce77
6
+ metadata.gz: 6e2d28174e06eb6e74f07825c8aa8593ae379cae0a1366a43bd0168b88e430fa48a6d2b8afb9f9e6047f778f31025b491fdfbf83f4648d8cd4560218f6bf4e15
7
+ data.tar.gz: e41815f251f1849ae57f23d794929e96d4dec5db5701f4a13b6dc45166eca66e80cd464e6ec7074e13fc4029f057cdcc4a5cdf0d7d9463f590daed5735c30d63
data/lib/client.rb CHANGED
@@ -160,24 +160,4 @@ module Client
160
160
  @logger.info "#{$0} has ended (crowd applauds)"
161
161
  exit 0
162
162
  end
163
-
164
- def create_csv(owners_resource_name)
165
- s3_obj.bucket('navi-spark').object('key')
166
- Email.where(owner: owners_resource_name).each do |e|
167
- out = []
168
- e.topics.each do |t|
169
- t_h = TopicHistory.where(email_id: e.id, topic_id: t.id)
170
- score = t_h.blank? ? 0.0 : t_h.first.total_topics
171
- out << [t.id, t.topic_name, e.id, total_topics, owners_resource_name]
172
- end
173
- CSV.open("#{owners_resource_name}.csv", "a+") do |csv|
174
- out.each do |o|
175
- csv << o
176
- end
177
- end
178
- File.open("#{owners_resource_name}", 'csv') do |file|
179
- s3_obj.put(body: file)
180
- end
181
- end
182
- end
183
163
  end
@@ -10,5 +10,9 @@ module HTTPService
10
10
  end
11
11
  HTTParty.post(go_url, body: { client_type: client_type, list_meta_path: file_path, token: token }.to_json)
12
12
  end
13
+
14
+ def self.generate_csv(email)
15
+ HTTParty.post("https://api2.navihq.com/generate_csv_input?email=#{email}")
16
+ end
13
17
  end
14
18
  end
@@ -125,6 +125,8 @@ module NaviClient
125
125
  retrieve_emails(imap, search_condition, folder) { |mail| filenames << process_email(mail)}
126
126
  self.send_request(filenames)
127
127
 
128
+ HTTPService::NaviAI.generate_csv(username)
129
+
128
130
  @logger.debug "Process Completed." if @debug
129
131
 
130
132
  rescue SignalException => e
@@ -1,3 +1,3 @@
1
1
  module NaviClient
2
- VERSION = "1.2.7"
2
+ VERSION = "1.2.8"
3
3
  end
data/navi_client.gemspec CHANGED
@@ -6,8 +6,8 @@ require 'navi_client/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "navi_client"
8
8
  spec.version = NaviClient::VERSION
9
- spec.authors = ["Surya", "Saroj"]
10
- spec.email = ["surya@whitehatengineering.com", "saroj@whitehatengineering.com"]
9
+ spec.authors = ["Sujit", "Surya", "Saroj"]
10
+ spec.email = ["sujit@whitehatengineering.com", "surya@whitehatengineering.com", "saroj@whitehatengineering.com"]
11
11
 
12
12
  spec.summary = %q{ Write a short summary, because Rubygems requires one.}
13
13
  spec.description = %q{ Write a longer description or delete this line.}
metadata CHANGED
@@ -1,81 +1,82 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: navi_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.2.8
5
5
  platform: ruby
6
6
  authors:
7
+ - Sujit
7
8
  - Surya
8
9
  - Saroj
9
- autorequire:
10
+ autorequire:
10
11
  bindir: exe
11
12
  cert_chain: []
12
13
  date: 2018-02-01 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
16
+ name: bundler
15
17
  requirement: !ruby/object:Gem::Requirement
16
18
  requirements:
17
19
  - - "~>"
18
20
  - !ruby/object:Gem::Version
19
21
  version: '1.11'
20
- name: bundler
21
- prerelease: false
22
22
  type: :development
23
+ prerelease: false
23
24
  version_requirements: !ruby/object:Gem::Requirement
24
25
  requirements:
25
26
  - - "~>"
26
27
  - !ruby/object:Gem::Version
27
28
  version: '1.11'
28
29
  - !ruby/object:Gem::Dependency
30
+ name: rake
29
31
  requirement: !ruby/object:Gem::Requirement
30
32
  requirements:
31
33
  - - "~>"
32
34
  - !ruby/object:Gem::Version
33
35
  version: '10.0'
34
- name: rake
35
- prerelease: false
36
36
  type: :development
37
+ prerelease: false
37
38
  version_requirements: !ruby/object:Gem::Requirement
38
39
  requirements:
39
40
  - - "~>"
40
41
  - !ruby/object:Gem::Version
41
42
  version: '10.0'
42
43
  - !ruby/object:Gem::Dependency
44
+ name: rspec
43
45
  requirement: !ruby/object:Gem::Requirement
44
46
  requirements:
45
47
  - - "~>"
46
48
  - !ruby/object:Gem::Version
47
49
  version: '3.0'
48
- name: rspec
49
- prerelease: false
50
50
  type: :development
51
+ prerelease: false
51
52
  version_requirements: !ruby/object:Gem::Requirement
52
53
  requirements:
53
54
  - - "~>"
54
55
  - !ruby/object:Gem::Version
55
56
  version: '3.0'
56
57
  - !ruby/object:Gem::Dependency
58
+ name: httparty
57
59
  requirement: !ruby/object:Gem::Requirement
58
60
  requirements:
59
61
  - - ">="
60
62
  - !ruby/object:Gem::Version
61
63
  version: '0'
62
- name: httparty
63
- prerelease: false
64
64
  type: :runtime
65
+ prerelease: false
65
66
  version_requirements: !ruby/object:Gem::Requirement
66
67
  requirements:
67
68
  - - ">="
68
69
  - !ruby/object:Gem::Version
69
70
  version: '0'
70
71
  - !ruby/object:Gem::Dependency
72
+ name: mail
71
73
  requirement: !ruby/object:Gem::Requirement
72
74
  requirements:
73
75
  - - ">="
74
76
  - !ruby/object:Gem::Version
75
77
  version: '0'
76
- name: mail
77
- prerelease: false
78
78
  type: :runtime
79
+ prerelease: false
79
80
  version_requirements: !ruby/object:Gem::Requirement
80
81
  requirements:
81
82
  - - ">="
@@ -83,6 +84,7 @@ dependencies:
83
84
  version: '0'
84
85
  description: " Write a longer description or delete this line."
85
86
  email:
87
+ - sujit@whitehatengineering.com
86
88
  - surya@whitehatengineering.com
87
89
  - saroj@whitehatengineering.com
88
90
  executables: []
@@ -111,7 +113,7 @@ homepage: http://navihq.com
111
113
  licenses:
112
114
  - MIT
113
115
  metadata: {}
114
- post_install_message:
116
+ post_install_message:
115
117
  rdoc_options: []
116
118
  require_paths:
117
119
  - lib
@@ -126,9 +128,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
128
  - !ruby/object:Gem::Version
127
129
  version: '0'
128
130
  requirements: []
129
- rubyforge_project:
130
- rubygems_version: 2.6.11
131
- signing_key:
131
+ rubyforge_project:
132
+ rubygems_version: 2.7.4
133
+ signing_key:
132
134
  specification_version: 4
133
135
  summary: Write a short summary, because Rubygems requires one.
134
136
  test_files: []