navi_client 1.3.4 → 1.3.5
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/client.rb +13 -9
- data/lib/navi_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de9744ecb25c95e3ec1cdc5e415be213bb9473c31663ccdde2267541fd155220
|
4
|
+
data.tar.gz: 3e05e44ac7d3fc125d5edc67a687689b239f39db713429c684e63fd0dcf28b6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e445f4e29e03cb548a2a0f026ce766e5613bcb8b218b56e5f9e36f8ab8b058b23a8b5b9f1e63b0cf86a65571a5ef2b0675b6955234575cf11c0e04e29acd33c
|
7
|
+
data.tar.gz: bc5112e0b67c2e5430e516dc504b369d6cabc1f5b85254942307d58b70410d01b33c784325cc2d297b2be599f84111ab96c0271d0e8351fd6d966da1214cf98c
|
data/lib/client.rb
CHANGED
@@ -45,7 +45,7 @@ module Client
|
|
45
45
|
@logger.debug("imap capabilities: #{capabilities.join(',')}") if @debug
|
46
46
|
|
47
47
|
if @client_type == 'local'
|
48
|
-
unless capabilities.include? "IDLE"
|
48
|
+
unless capabilities.include? "IDLE" && @debug
|
49
49
|
@logger.info "'IDLE' IMAP capability not available in server: #{server}"
|
50
50
|
imap.disconnect
|
51
51
|
exit
|
@@ -85,12 +85,14 @@ module Client
|
|
85
85
|
|
86
86
|
message_ids = message_ids - message_ids_saved
|
87
87
|
|
88
|
-
if
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
88
|
+
if @debug
|
89
|
+
if message_ids.empty?
|
90
|
+
@logger.info "No new emails found..."
|
91
|
+
elsif message_ids_saved.any?
|
92
|
+
@logger.info "Found emails saved in your #{@client_type}. Downloading only #{message_ids.count} new emails..."
|
93
|
+
else
|
94
|
+
@logger.info "Downloading #{message_ids.count} emails."
|
95
|
+
end
|
94
96
|
end
|
95
97
|
|
96
98
|
message_ids.each_with_index do |message_id, i|
|
@@ -210,8 +212,10 @@ module Client
|
|
210
212
|
end
|
211
213
|
|
212
214
|
else
|
213
|
-
@
|
214
|
-
|
215
|
+
if @debug
|
216
|
+
@logger.info "Logging to Loggly disabled"
|
217
|
+
@logger.info messageBody
|
218
|
+
end
|
215
219
|
end
|
216
220
|
|
217
221
|
end
|
data/lib/navi_client/version.rb
CHANGED