catfriend 0.18 → 0.19

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
  SHA1:
3
- metadata.gz: bf790e35894bdf6de7a9450951dca7930b8601fa
4
- data.tar.gz: 81180fcbf3e255cf107e66c7971b0804fc30bc19
3
+ metadata.gz: 70a3c7bfef9dea8ae908b9bd4f8ad5c152446c41
4
+ data.tar.gz: 6210b287d37486075d732b501e579d6263488ddc
5
5
  SHA512:
6
- metadata.gz: f43f0bc6d274435e575efdc2f5ccf5611ea375c29e539253be4cb1282026c842613e49d857296bfffe3497fa49a707723eea31ba2a573aea687c32b7f5109dc3
7
- data.tar.gz: 32d5d40171b60f2dbff8e9a9210de7e48d9586d0e65351721c22729a02678f494e3a53baa41f028cd2019322742468d1144e210f33cdff83c0989d8584fdb291
6
+ metadata.gz: d685013b3804d4fb0dd950717c68714dde0836acd46568d70101ce314d0562eb221b7f3222ae66cef4bed99ea0a92e6fe74112d84cfb0d31ec53d548d7498158
7
+ data.tar.gz: 4df0662912069f5f075281ec1d553198da65e1d1d2d45f07cbec13ec88318b86dd8c7f89c76d63a5411a81c964f196a688be20fc45dfb9b2bcf6e6af36aecb7b
@@ -97,7 +97,7 @@ def self.main args
97
97
  work_accounts = false
98
98
  foreground = false
99
99
  Catfriend.verbose = false
100
- done_action = false
100
+ return_code = nil
101
101
  begin
102
102
  OptionParser.new do |opts|
103
103
  opts.banner = "usage: #{APP_NAME} [options]"
@@ -113,17 +113,18 @@ def self.main args
113
113
  end
114
114
 
115
115
  opts.on("-s", "--stop", "shut down running server") do
116
- done_action = true
117
116
  dbus = DBus.new
118
117
  if dbus.send_shutdown
119
118
  puts "sent shutdown signal"
119
+ return_code = 0
120
120
  else
121
121
  puts "could not send shutdown signal, no server running?"
122
+ return_code = 1
122
123
  end
123
124
  end
124
125
  end.parse!
125
126
 
126
- return 0 if done_action
127
+ return return_code unless return_code.nil?
127
128
 
128
129
  Catfriend.verbose = false unless foreground
129
130
 
@@ -79,7 +79,7 @@ class ImapServer
79
79
 
80
80
  if r.instance_of? Net::IMAP::UntaggedResponse
81
81
  case r.name
82
- when 'EXISTS', 'EXPUNGE'
82
+ when 'EXISTS', 'EXPUNGE', 'FETCH'
83
83
  @imap.idle_done
84
84
  end
85
85
  end
@@ -88,11 +88,13 @@ class ImapServer
88
88
  end
89
89
  end
90
90
 
91
- Catfriend.whisper "idle loop over"
92
91
  count = get_unseen_count
93
92
  if count != @message_count
94
93
  notify_message(count) if count > @message_count
95
94
  @message_count = count
95
+ Catfriend.whisper "message count changed to #@message_count"
96
+ else
97
+ Catfriend.whisper "message count unchanged from #@message_count"
96
98
  end
97
99
  rescue Net::IMAP::Error, IOError
98
100
  # reconnect and carry on
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: catfriend
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.18'
4
+ version: '0.19'
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Pike
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-11 00:00:00.000000000 Z
11
+ date: 2014-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libnotify