ghi 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,3 +1,10 @@
1
+ === 0.2.1 / 2009-11-29
2
+
3
+ * 1 bugfix
4
+
5
+ * ANSI format by word break.
6
+
7
+
1
8
  === 0.2.0 / 2009-11-03
2
9
 
3
10
  * Major-minor release!
data/README.rdoc CHANGED
@@ -10,7 +10,7 @@ browser.
10
10
 
11
11
  Get:
12
12
 
13
- % gem install stephencelis-ghi --source=http://gems.github.com
13
+ % gem install ghi
14
14
 
15
15
 
16
16
  Go:
data/lib/ghi/cli.rb CHANGED
@@ -157,8 +157,8 @@ module GHI::CLI #:nodoc:
157
157
 
158
158
  def puts(*args)
159
159
  args = args.flatten.each { |arg|
160
- arg.gsub!(/\B\*(.+)\*\B/) { "\e[1m#$1\e[0m" } # Bold
161
- arg.gsub!(/\B_(.+)_\B/) { "\e[4m#$1\e[0m" } # Underline
160
+ arg.gsub!(/\b\*(.+)\*\b/) { "\e[1m#$1\e[0m" } # Bold
161
+ arg.gsub!(/\b_(.+)_\b/) { "\e[4m#$1\e[0m" } # Underline
162
162
  arg.gsub!(/(state:)?(# Open.*| open)$/) { "#$1\e[32m#$2\e[0m" }
163
163
  arg.gsub!(/(state:)?(# Closed.*| closed)$/) { "#$1\e[31m#$2\e[0m" }
164
164
  marked = [GHI.login, search_term, tag, "(?:#|gh)-\d+"].compact * "|"
data/spec/ghi/cli_spec.rb CHANGED
@@ -13,14 +13,14 @@ describe GHI::CLI::Executable do
13
13
  describe "parsing" do
14
14
  describe "with well-formed arguments" do
15
15
  before :each do
16
- @user, @repo = "localuser", "ghi"
16
+ @user, @repo = "local_user_host", "ghi"
17
17
  @action = @state = @number = @term =
18
18
  @title = @body = @tag = @comment = nil
19
19
  end
20
20
 
21
21
  after :each do
22
22
  @cli.should_receive(@action)
23
- @cli.parse! @args
23
+ @cli.parse! Array(@args)
24
24
  @cli.action.should == @action
25
25
  @cli.state.should == (@state || :open)
26
26
  @cli.number.should == @number
@@ -44,7 +44,16 @@ describe GHI::CLI::Executable do
44
44
 
45
45
  describe "inside a repository" do
46
46
  after :each do
47
- @cli.stub!(:`).and_return "stub@github.com:localuser/ghi.git"
47
+ @cli.stub!(:`).and_return "stub@github.com:#@user/#@repo.git"
48
+ end
49
+
50
+ it "should parse empty as list open" do
51
+ @action, @state = :list, :open
52
+ end
53
+
54
+ it "should parse -l as list open" do
55
+ @args = ["-l"]
56
+ @action, @state = :list, :open
48
57
  end
49
58
 
50
59
  it "should parse -l as list open" do
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.0
4
+ version: 0.2.1
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-11-03 00:00:00 -06:00
12
+ date: 2009-11-29 00:00:00 -05:00
13
13
  default_executable: ghi
14
14
  dependencies: []
15
15