biff 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/VERSION +1 -1
  4. data/bin/biff.5m.rb +3 -7
  5. data/lib/biff.rb +6 -6
  6. metadata +2 -3
  7. data/bin/setup +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 764dc7f862bfed11324c0de3ac43841347c6574e
4
- data.tar.gz: 9583d5ea0182e7a32bf92ac40f60dbf681ef00f3
3
+ metadata.gz: 0da6aff1a04c3f31827aab85246b86b37d9a01ec
4
+ data.tar.gz: ea755b8c05cc961eade23a301ecc0c66ca668771
5
5
  SHA512:
6
- metadata.gz: 8d26d37abc4b03c7e39edcd0983b92bd2c4657de5490f6f21d41c2ee1227939ed7bf13018756679fd2c92e0b1124c1bf154fd31a68a5442db15c6ade8e38bd2f
7
- data.tar.gz: b4c08d4620cc717e8c2d5e5b0f3282a0d9f0dd2e3053492ae06cbd1b69ba933c3f33cf3b7d71545731a3cda0c08ffd2b7b685e0e52f3e780137196e63d3d8d3b
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 `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
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.2.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></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
- '%*.*s%s: %-*.*s%s',
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.2.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-13 00:00:00.000000000 Z
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
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here