stephencelis-ghi 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/History.rdoc +9 -1
  2. data/README.rdoc +30 -13
  3. data/lib/ghi/cli.rb +9 -9
  4. data/lib/ghi.rb +1 -1
  5. metadata +1 -1
data/History.rdoc CHANGED
@@ -1,4 +1,12 @@
1
- === 0.0.5 / 2009/04/25
1
+ === 0.0.6 / 2009-04-25
2
+
3
+ * 2 minor enhancements
4
+
5
+ * Accept comments as arguments in more places.
6
+ * Update error message to accommodate both issues and comments.
7
+
8
+
9
+ === 0.0.5 / 2009-04-25
2
10
 
3
11
  * 3 major enhancements
4
12
 
data/README.rdoc CHANGED
@@ -3,7 +3,8 @@
3
3
  http://github.com/stephencelis/ghi
4
4
 
5
5
 
6
- GitHub Issues on the command line. Use your `$EDITOR`, not your browser.
6
+ GitHub Issues on the command line. Use your <tt>$EDITOR</tt>, not your
7
+ browser.
7
8
 
8
9
  == HOW?
9
10
 
@@ -22,25 +23,32 @@ Go:
22
23
  -c, --closed, --close [number]
23
24
  -e, --edit [number]
24
25
  -r, --repo, --repository [name]
25
- --claim [number]
26
+ -m, --comment [number|comment]
27
+ --claim [number]
26
28
 
27
29
 
28
30
  == EXAMPLE?
29
31
 
30
- `ghi` works simply from within the directory. Some short examples:
32
+ ghi works simply from within the directory. Some short examples:
31
33
 
32
- ghi -l # Lists all open issues
33
- ghi -lc # Lists all closed issues
34
- ghi -l "doesn't work" # Searches for all open issues matching "doesn't work"
35
- ghi -l invalid -c # Searches for all closed issues matching "invalid"
36
- ghi -o # Opens a new issue (in your $EDITOR)
37
- ghi -e1 # Edits issue number 1 (in your $EDITOR)
38
- ghi -c1 # Closes issue 1
39
- ghi -o1 # Reopens 1
40
- ghi --claim 1 # Tags issue 1 with your GitHub username
34
+ ghi -l # Lists all open issues
35
+ ghi -lc # Lists all closed issues
36
+ ghi -l "doesn't work" # Searches for open issues matching "doesn't work"
37
+ ghi -l invalid -c # Searches for closed issues matching "invalid"
38
+ ghi -o # Opens a new issue (in your $EDITOR)
39
+ ghi -o "New issue" # Opens a new issue with the title "New issue"
40
+ ghi -o "Title" -m "Body" # Opens a new issue with specified title and body
41
+ ghi -e1 # Edits issue number 1 (in your $EDITOR)
42
+ ghi -e1 -m "New body" # Edits issue number 1 with the specified body
43
+ ghi -c1 # Closes issue 1
44
+ ghi -c1 -m # Closes issue with comment (from your $EDITOR)
45
+ ghi -c1 -m "Comment" # Closes issue with specified comment
46
+ ghi -o1 # Reopens 1 (accepts comments, too)
47
+ ghi -m1 # Comments on issue 1 (in your $EDITOR)
48
+ ghi --claim 1 # Tags issue 1 with your GitHub username
41
49
 
42
50
 
43
- `ghi` also works anywhere:
51
+ ghi also works anywhere:
44
52
 
45
53
  ghi -rghi -l # Your fork of "ghi"
46
54
  ghi -rstephencelis/ghi -l # Mine: "stephencelis/ghi"
@@ -49,3 +57,12 @@ Go:
49
57
  == CONTRIBUTORS
50
58
 
51
59
  * Jamie Macey (http://blog.tracefunc.com)
60
+
61
+
62
+ === CONTRIBUTE?
63
+
64
+ ghi is not under currently under the control of any gem packaging system. To
65
+ build, use RubyGems:
66
+
67
+ % gem build ghi.gemspec
68
+ % sudo gem install ghi*.gem
data/lib/ghi/cli.rb CHANGED
@@ -52,7 +52,7 @@ module GHI::CLI #:nodoc:
52
52
  @message = File.readlines(file.path).find_all { |l| !l.match(/^#/) }
53
53
 
54
54
  if message.to_s =~ /\A\s*\Z/
55
- raise GHI::API::InvalidRequest, "can't file empty issue"
55
+ raise GHI::API::InvalidRequest, "can't file empty message"
56
56
  end
57
57
  raise GHI::API::InvalidRequest, "no change" if issue == message
58
58
  end
@@ -316,22 +316,22 @@ module GHI::CLI #:nodoc:
316
316
 
317
317
  def close
318
318
  issue = api.close number
319
- if @comment
320
- body ||= gets_from_editor issue
321
- comment = api.comment number, body
319
+ if @comment || new_body = body
320
+ new_body ||= gets_from_editor issue
321
+ comment = api.comment number, new_body
322
322
  end
323
323
  puts action_format(issue.title)
324
- puts "comment #{comment["status"]}" if comment
324
+ puts "(comment #{comment["status"]})" if comment
325
325
  end
326
326
 
327
327
  def reopen
328
328
  issue = api.reopen number
329
- if @comment
330
- body ||= gets_from_editor issue
331
- comment = api.comment number, body
329
+ if @comment || new_body = body
330
+ new_body ||= gets_from_editor issue
331
+ comment = api.comment number, new_body
332
332
  end
333
333
  puts action_format(issue.title)
334
- puts "comment #{comment["status"]}" if comment
334
+ puts "(comment #{comment["status"]})" if comment
335
335
  end
336
336
 
337
337
  def label
data/lib/ghi.rb CHANGED
@@ -2,7 +2,7 @@ require "net/http"
2
2
  require "yaml"
3
3
 
4
4
  module GHI
5
- VERSION = "0.0.5"
5
+ VERSION = "0.0.6"
6
6
 
7
7
  def self.login
8
8
  return @login if defined? @login
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stephencelis-ghi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Celis