biff 0.2.0 → 0.3.0
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/README.md +1 -1
- data/VERSION +1 -1
- data/bin/biff.5m.rb +3 -7
- data/lib/biff.rb +6 -6
- metadata +2 -3
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0da6aff1a04c3f31827aab85246b86b37d9a01ec
|
4
|
+
data.tar.gz: ea755b8c05cc961eade23a301ecc0c66ca668771
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81c38ac5eb631c9fd901d0905977bea38789ba1c972ac1d1146007f8be1794641e5485848dafd5911db1fafaf076981087d6992cfa43786eff72346da30af726
|
7
|
+
data.tar.gz: 4b1d2de44bb119f6a8c4eed863ff7d040259efdbfcf1107633fe2ec141c771ce96cd4e8c61cfdeef6bfedbc48841c1a0e180d91be1a09dfeafea64a688d7b1c6
|
data/README.md
CHANGED
@@ -42,7 +42,7 @@ exec $RBENV_ROOT/shims/biff.5m.rb
|
|
42
42
|
```
|
43
43
|
## Development
|
44
44
|
|
45
|
-
After checking out the repo, run `
|
45
|
+
After checking out the repo, run `bundle install` to install dependencies. You can run `bin/console` for an interactive prompt that will allow you to experiment.
|
46
46
|
|
47
47
|
To install this gem onto your local machine, run `bundle exec rake install`.
|
48
48
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/bin/biff.5m.rb
CHANGED
@@ -3,13 +3,9 @@
|
|
3
3
|
# <bitbar.version>v0.1</bitbar.version>
|
4
4
|
# <bitbar.author>Rick Frankel</bitbar.author>
|
5
5
|
# <bitbar.author.github>cybercode</bitbar.author.github>
|
6
|
-
# <bitbar.desc>
|
7
|
-
# Get Inbox counts (unseen/all) for multiple mailboxes.
|
8
|
-
# Expects ~/.biff.yaml config file
|
9
|
-
# </bitbar.desc>
|
10
|
-
# <bitbar.image></bitbar.image>
|
6
|
+
# <bitbar.desc>Get Inbox counts and unsheed headers for multiple mailboxes. Expects ~/.biff.yaml config file</bitbar.desc>
|
11
7
|
# <bitbar.dependencies>ruby, biff rubygem (gem install biff)</bitbar.dependencies>
|
12
|
-
# <bitbar.abouturl
|
8
|
+
# <bitbar.abouturl>https://github.com/cybercode/Biff</bitbar.abouturl>
|
13
9
|
|
14
10
|
require 'biff/cli'
|
15
11
|
|
@@ -33,7 +29,7 @@ def report(cli)
|
|
33
29
|
puts "#{s.name} #{s.unseen}/#{s.all}#{attrs}"
|
34
30
|
if s.unseen.positive?
|
35
31
|
cli.servers[s.name].unseen_headers.map do |h|
|
36
|
-
puts h
|
32
|
+
puts "#{h}|font='Menlo Regular' size=12"
|
37
33
|
end
|
38
34
|
end
|
39
35
|
puts '---'
|
data/lib/biff.rb
CHANGED
@@ -16,11 +16,6 @@ class Biff
|
|
16
16
|
@config['tls'] || true
|
17
17
|
)
|
18
18
|
Net::IMAP.debug = @config['debug']
|
19
|
-
|
20
|
-
return if @imap.capability.include?('IDLE')
|
21
|
-
|
22
|
-
$stderr.puts "ERR #{config['name']} #{@config['host']} unsupported"
|
23
|
-
exit 1
|
24
19
|
end
|
25
20
|
|
26
21
|
def open
|
@@ -36,6 +31,11 @@ class Biff
|
|
36
31
|
end
|
37
32
|
|
38
33
|
def listen
|
34
|
+
unless @imap.capability.include?('IDLE')
|
35
|
+
$stderr.puts "ERR #{config['name']} #{@config['host']} unsupported"
|
36
|
+
exit 1
|
37
|
+
end
|
38
|
+
|
39
39
|
@idling = true
|
40
40
|
|
41
41
|
while @idling
|
@@ -99,7 +99,7 @@ class Biff
|
|
99
99
|
# rubocop doesn't understand '*.*' width.precision
|
100
100
|
# rubocop:disable Lint/FormatParameterMismatch
|
101
101
|
sprintf(
|
102
|
-
'
|
102
|
+
'%-*.*s%s %-*.*s%s',
|
103
103
|
nl, nl, name, name.length > NAME_MAX ? '…' : '',
|
104
104
|
sl, sl, subject, subject.length > SUBJ_MAX ? '…' : '',
|
105
105
|
)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rick Frankel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: version
|
@@ -112,7 +112,6 @@ files:
|
|
112
112
|
- bin/biff.5m.rb
|
113
113
|
- bin/biffer
|
114
114
|
- bin/console
|
115
|
-
- bin/setup
|
116
115
|
- lib/biff.rb
|
117
116
|
- lib/biff/cli.rb
|
118
117
|
- lib/biff/options.rb
|