navilocal 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/application/ui/navi/main_runner.rb +27 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb824d3e18e7b2d37ced625268b37279a9768668db6b5b82e6c9f01bbbac3f11
|
4
|
+
data.tar.gz: fc3305d12b85df4c2d12cfdfd9fb79f7d500422f6ccd44aca7e3f2092b6dbb90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89b2a9ac7a0174d934cde92eec53896b0066dfaf91184d2d8373e9597cda32991ddb572f68a5abf89ee8f26259c24813a1ec68c24af213877401c17133cd4e22
|
7
|
+
data.tar.gz: 42ae809aa71c91248d371fe778969ca53d1c9ea7dcbe062e5da7cc083b817572d285fbbc53ffee03dfbcba72af069c349368c532159ef56d09e2acf30c030f29
|
@@ -186,10 +186,34 @@ module NaviClientInstaller
|
|
186
186
|
|
187
187
|
@client.initate_csv_generation(@settings.username)
|
188
188
|
|
189
|
-
|
190
|
-
|
189
|
+
callback = Proc.new do |mail, index, id, complete|
|
190
|
+
# complete = args.first || false
|
191
191
|
|
192
|
+
if complete
|
193
|
+
downloaded+=1
|
194
|
+
@logger.debug "Processing Complete. OK..."
|
195
|
+
else
|
196
|
+
@notifier.label = "Fetching emails..."
|
197
|
+
@logger.debug "processing email##{index + 1} with id #{mail.__id__.to_s} and uuid #{id}"
|
198
|
+
total+=1
|
199
|
+
end
|
200
|
+
@email_indicator.label = "#{downloaded}/#{total}"
|
192
201
|
|
202
|
+
end
|
203
|
+
|
204
|
+
naviai_control = Proc.new do |start|
|
205
|
+
if start
|
206
|
+
@notifier.label = "Parsing the emails..."
|
207
|
+
start_naviai
|
208
|
+
else
|
209
|
+
stop_naviai
|
210
|
+
@logger.debug "Waiting new mails (IDLE loop)..."
|
211
|
+
@notifier.label = "Waiting for the new emails.."
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
@notifier.label = "Waiting for the new emails.."
|
216
|
+
@client.idle_loop(@imap, ['UNSEEN'], folder, @settings.provider, @settings.username, @settings.password, callback, naviai_control)
|
193
217
|
|
194
218
|
else
|
195
219
|
@logger.debug "Failed to connect with your email. Please recheck the configuration."
|
@@ -219,10 +243,9 @@ module NaviClientInstaller
|
|
219
243
|
|
220
244
|
def stop_naviai
|
221
245
|
# kill naviai process
|
222
|
-
naviPid = Integer(%x(lsof -i tcp:9090 | grep naviai | awk {'print $2'})) rescue false
|
223
246
|
begin
|
224
247
|
# Process.kill('QUIT', File.read(navi_path).to_i)
|
225
|
-
%x(
|
248
|
+
%x(lsof -i tcp:9090 | grep naviai | awk {'print $2'} | xargs kill -9)
|
226
249
|
rescue
|
227
250
|
@logger.debug "Could not stop navi ai." unless @logger.nil?
|
228
251
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: navilocal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Msanjib
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.4.
|
47
|
+
version: 1.4.2
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.4.
|
54
|
+
version: 1.4.2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: httparty
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|