navi_client 1.3.4 → 1.3.5

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: 35a451ff83ce2920c09bcdafee34f8e4d22f9d11a44bc4bec4989954ff4ba56f
4
- data.tar.gz: 3190e61415272e72b9a8cd0a093346689d090b31065de1d76f1ee32eae897ed3
3
+ metadata.gz: de9744ecb25c95e3ec1cdc5e415be213bb9473c31663ccdde2267541fd155220
4
+ data.tar.gz: 3e05e44ac7d3fc125d5edc67a687689b239f39db713429c684e63fd0dcf28b6b
5
5
  SHA512:
6
- metadata.gz: 7019517eeb16bcf04bbe60603021fd8d47a16a871e9989c68b835e7e1d170318ed971ef8cbe5628ba29afc474ffa0cd2c822da17449b2a678c880640ab5e1d0b
7
- data.tar.gz: f2db4f8ab1f38fdc531a0b34e2729d34621485545cb2afbf889904a8e81ae8867d79779faf027be8f36734cfa638eae4a716cef316447d9279d34c020cd1cd39
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 message_ids.empty?
89
- @logger.info "No new emails found..."
90
- elsif message_ids_saved.any?
91
- @logger.info "Found emails saved in your #{@client_type}. Downloading only #{message_ids.count} new emails..."
92
- else
93
- @logger.info "Downloading #{message_ids.count} emails."
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
- @logger.info "Logging to Loggly disabled"
214
- @logger.info messageBody
215
+ if @debug
216
+ @logger.info "Logging to Loggly disabled"
217
+ @logger.info messageBody
218
+ end
215
219
  end
216
220
 
217
221
  end
@@ -1,3 +1,3 @@
1
1
  module NaviClient
2
- VERSION = "1.3.4"
2
+ VERSION = "1.3.5"
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.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sujit