ghi 1.0.4 → 1.1.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/lib/ghi/client.rb +3 -3
- data/lib/ghi/commands/assign.rb +1 -1
- data/lib/ghi/commands/edit.rb +1 -1
- data/lib/ghi/commands/version.rb +2 -2
- data/lib/ghi/formatting.rb +4 -3
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9847e95dbfc57b67849a8445c2670d12f7b55866
|
4
|
+
data.tar.gz: 76918133fbb06be67d41da4f964992ae94f03884
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 314be955e4c20eed7e02539fb5f65e9c5ed04403b92f2ac66d4b5d5528de6addb023041db7a64c90114e7065d8c5d158f5b1b975a23a64afb61542c16450815a
|
7
|
+
data.tar.gz: 6058ba70cdb9d2b6bcf8338985db1549437e534c7413f6f75c3ae1a9a4391f1fba57bfc66387e39637fd145b400f5bdb840b40cd0b7bc7326185bb9d40e53fc6
|
data/lib/ghi/client.rb
CHANGED
@@ -138,9 +138,9 @@ module GHI
|
|
138
138
|
if password.nil?
|
139
139
|
raise Authorization::Required, 'Authorization required'
|
140
140
|
end
|
141
|
-
|
142
|
-
|
143
|
-
|
141
|
+
when Net::HTTPMovedPermanently
|
142
|
+
return Response.new(http.get(res['location']))
|
143
|
+
end
|
144
144
|
|
145
145
|
raise Error, res
|
146
146
|
end
|
data/lib/ghi/commands/assign.rb
CHANGED
@@ -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
|
)
|
data/lib/ghi/commands/edit.rb
CHANGED
@@ -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
|
data/lib/ghi/commands/version.rb
CHANGED
data/lib/ghi/formatting.rb
CHANGED
@@ -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']
|
185
|
-
|
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) { '
|
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
|
+
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:
|
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: []
|