ghi 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +12 -0
- data/lib/ghi.rb +1 -1
- data/lib/ghi/cli.rb +15 -9
- metadata +2 -2
data/History.rdoc
CHANGED
data/lib/ghi.rb
CHANGED
data/lib/ghi/cli.rb
CHANGED
@@ -90,7 +90,7 @@ module GHI::CLI #:nodoc:
|
|
90
90
|
if verbosity
|
91
91
|
issues.map { |i| ["=" * 79] + show_format(i) }
|
92
92
|
else
|
93
|
-
issues.map { |i| " #{i.number.to_s.rjust 3}: #{truncate
|
93
|
+
issues.map { |i| " #{i.number.to_s.rjust 3}: #{truncate(i.title, 72)}" }
|
94
94
|
end
|
95
95
|
else
|
96
96
|
"none"
|
@@ -119,13 +119,13 @@ module GHI::CLI #:nodoc:
|
|
119
119
|
|
120
120
|
def show_format(issue, verbose = true)
|
121
121
|
l = []
|
122
|
-
l << " number: #{issue.number}"
|
123
|
-
l << " state: #{issue.state}"
|
124
|
-
l << " title: #{indent(issue.title, 15, 0)}" if issue.title
|
122
|
+
l << " number: #{issue.number}" if issue.number
|
123
|
+
l << " state: #{issue.state}" if issue.state
|
124
|
+
l << " title: #{indent(issue.title, 15, 0).join}" if issue.title
|
125
125
|
l << " user: #{issue.user || GHI.login}"
|
126
|
-
l << " votes: #{issue.votes}"
|
127
|
-
l << " created at: #{issue.created_at}"
|
128
|
-
l << " updated at: #{issue.updated_at}"
|
126
|
+
l << " votes: #{issue.votes}" if issue.votes
|
127
|
+
l << " created at: #{issue.created_at}" if issue.created_at
|
128
|
+
l << " updated at: #{issue.updated_at}" if issue.updated_at
|
129
129
|
return l unless verbose
|
130
130
|
l << ""
|
131
131
|
l += indent(issue.body)[0..-2]
|
@@ -133,7 +133,7 @@ module GHI::CLI #:nodoc:
|
|
133
133
|
|
134
134
|
def action_format(value = nil)
|
135
135
|
key = "#{action.to_s.capitalize.sub(/e?$/, "ed")} issue #{number}"
|
136
|
-
"#{key}: #{truncate
|
136
|
+
"#{key}: #{truncate(value.to_s, 78 - key.length)}"
|
137
137
|
end
|
138
138
|
|
139
139
|
def truncate(string, length)
|
@@ -370,7 +370,13 @@ module GHI::CLI #:nodoc:
|
|
370
370
|
raise OptionParser::MissingArgument
|
371
371
|
else
|
372
372
|
repo = v.split "/"
|
373
|
-
|
373
|
+
if repo.length == 1
|
374
|
+
if @repo && `git remote 2>/dev/null`[/^#{repo}$/]
|
375
|
+
repo << @repo
|
376
|
+
else
|
377
|
+
repo.unshift(GHI.login)
|
378
|
+
end
|
379
|
+
end
|
374
380
|
@user, @repo = repo
|
375
381
|
end
|
376
382
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Celis
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-28 00:00:00 -06:00
|
13
13
|
default_executable: ghi
|
14
14
|
dependencies: []
|
15
15
|
|