ghi 1.0.4 → 1.1.0

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
  SHA1:
3
- metadata.gz: 75facc9ba05f63c8312752888439d3ac0a90bf2d
4
- data.tar.gz: 65bafd63cc2ad57381c8a42d21a79e60568b7898
3
+ metadata.gz: 9847e95dbfc57b67849a8445c2670d12f7b55866
4
+ data.tar.gz: 76918133fbb06be67d41da4f964992ae94f03884
5
5
  SHA512:
6
- metadata.gz: da5675903772e48b527c4a5e90f1468de9e854828dd41a319909a41f9122950b3e359587d6a71053d2a5a2b9394108ad32a6ec98d378a00d68a5995a63d03403
7
- data.tar.gz: dc265a344b40eef3b0ddc66dc1167f24c8a46347903485b2867f858ce14ab932feb02955fc1bf939bcdb79cfda016e744388090285e564b24e3d2b9a8c5b2f7f
6
+ metadata.gz: 314be955e4c20eed7e02539fb5f65e9c5ed04403b92f2ac66d4b5d5528de6addb023041db7a64c90114e7065d8c5d158f5b1b975a23a64afb61542c16450815a
7
+ data.tar.gz: 6058ba70cdb9d2b6bcf8338985db1549437e534c7413f6f75c3ae1a9a4391f1fba57bfc66387e39637fd145b400f5bdb840b40cd0b7bc7326185bb9d40e53fc6
@@ -138,9 +138,9 @@ module GHI
138
138
  if password.nil?
139
139
  raise Authorization::Required, 'Authorization required'
140
140
  end
141
- when Net::HTTPMovedPermanently
142
- return Response.new(http.get(res['location']))
143
- end
141
+ when Net::HTTPMovedPermanently
142
+ return Response.new(http.get(res['location']))
143
+ end
144
144
 
145
145
  raise Error, res
146
146
  end
@@ -36,7 +36,7 @@ EOF
36
36
  assigns[:assignee] = args.pop || Authorization.username
37
37
  end
38
38
  if assigns.key? :assignee
39
- assigns[:assignee].sub! /^@/, ''
39
+ assigns[:assignee].sub! /^@/, '' if assigns[:assignee]
40
40
  assigns[:args].concat(
41
41
  assigns[:assignee] ? %W(-u #{assigns[:assignee]}) : %w(--no-assign)
42
42
  )
@@ -18,7 +18,7 @@ EOF
18
18
  opts.on(
19
19
  '-u', '--[no-]assign [<user>]', 'assign to specified user'
20
20
  ) do |assignee|
21
- assigns[:assignee] = assignee
21
+ assigns[:assignee] = assignee || nil
22
22
  end
23
23
  opts.on '--claim', 'assign to yourself' do
24
24
  assigns[:assignee] = Authorization.username
@@ -2,8 +2,8 @@ module GHI
2
2
  module Commands
3
3
  module Version
4
4
  MAJOR = 1
5
- MINOR = 0
6
- PATCH = 4
5
+ MINOR = 1
6
+ PATCH = 0
7
7
  PRE = nil
8
8
 
9
9
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join '.'
@@ -181,8 +181,9 @@ module GHI
181
181
  issues.map { |i|
182
182
  n, title, labels = i['number'], i['title'], i['labels']
183
183
  l = 9 + nmax + rmax + no_color { format_labels labels }.to_s.length
184
- a = i['assignee'] && i['assignee']['login'] == Authorization.username
185
- l += 2 if a
184
+ a = i['assignee']
185
+ a_is_me = a && a['login'] == Authorization.username
186
+ l += a['login'].to_s.length + 2 if a
186
187
  p = i['pull_request']['html_url'] and l += 2 if i['pull_request']
187
188
  c = i['comments']
188
189
  l += c.to_s.length + 1 unless c == 0
@@ -196,7 +197,7 @@ module GHI
196
197
  (fg(:green) { m['title'] } if m),
197
198
  (fg('aaaaaa') { c } unless c == 0),
198
199
  (fg('aaaaaa') { '↑' } if p),
199
- (fg(:yellow) { '@' } if a),
200
+ (fg(a_is_me ? :yellow : :gray) { "@#{a['login']}" } if a),
200
201
  (fg('aaaaaa') { '‡' } if m)
201
202
  ].compact.join ' '
202
203
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Celis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-28 00:00:00.000000000 Z
11
+ date: 2016-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -73,7 +73,8 @@ files:
73
73
  - lib/ghi/json.rb
74
74
  - lib/ghi/web.rb
75
75
  homepage: https://github.com/stephencelis/ghi
76
- licenses: []
76
+ licenses:
77
+ - MIT
77
78
  metadata: {}
78
79
  post_install_message:
79
80
  rdoc_options: []