pv 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -23,6 +23,7 @@ Or, run `pv config`.
23
23
 
24
24
  Here are all of the commands PV can do:
25
25
 
26
+ ![pv log](http://i.imgur.com/JJKDu.png)
26
27
  ### pv
27
28
 
28
29
  Simply running `pv` will open your `$PAGER` with the stories
@@ -31,6 +32,7 @@ title and the ID:
31
32
 
32
33
  123456 My spoon is too big. (A Banana)
33
34
 
35
+ ![pv show](http://i.imgur.com/hIKrs.png)
34
36
  ### pv show 123456
35
37
 
36
38
  Show the entire story's details, including tasks. Again, this is
@@ -45,7 +47,6 @@ viewed in your `$PAGER`...
45
47
 
46
48
  I AM A BANANA!
47
49
 
48
-
49
50
  ### pv edit 123456 -s {start|finish|deliver|accept|reject|restart|close} -m "message"
50
51
 
51
52
  Edits the status of a given story on Pivotal Tracker, with an optional message. The
@@ -55,6 +56,7 @@ message is appended to the story in comments.
55
56
 
56
57
  Easier-to-remember aliases for the above command.
57
58
 
59
+ ![pv help](http://i.imgur.com/RxzuQ.png)
58
60
  ### pv help
59
61
 
60
62
  Show a command manual.
@@ -0,0 +1,11 @@
1
+ class String
2
+ def titleize
3
+ self.split(" ").reduce("") { |phrase,token|
4
+ phrase += token[0].upcase + token[1..-1] + " "
5
+ }.strip
6
+ end
7
+
8
+ def blank?
9
+ self == ""
10
+ end
11
+ end
data/lib/pv/command.rb CHANGED
@@ -42,20 +42,7 @@ module Pv
42
42
 
43
43
  desc :help, "Show all commands"
44
44
  def help
45
- say <<-TEXT
46
-
47
- pv: pivotal tracker in the shell
48
-
49
- A simple command-line interface for Pivotal Tracker.
50
- Configure in ~/.pv:
51
-
52
- username: 'your-username'
53
- password: 'secret'
54
- project_id: 123456
55
-
56
- Then use the following commands to manage your project:
57
- TEXT
58
- say "\n"
45
+ say IO.read("#{Pv.root}/lib/templates/help.txt")
59
46
  super
60
47
  end
61
48
  end
data/lib/pv/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pv
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/pv.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'core_ext/string'
2
+
1
3
  require 'pv/configuration'
2
4
  require 'pv/command'
3
5
  require 'pv/version'
@@ -0,0 +1,11 @@
1
+
2
+ pv: pivotal tracker in the shell
3
+
4
+ A simple command-line interface for Pivotal Tracker.
5
+ Configure in ~/.pv:
6
+
7
+ username: 'your-username'
8
+ password: 'secret'
9
+ project_id: 123456
10
+
11
+ Then use the following commands to manage your project:
@@ -0,0 +1,43 @@
1
+ require 'core_ext/string'
2
+
3
+ describe String do
4
+ describe "titleization" do
5
+ it "capitalizes each word" do
6
+ subject = "not yet started"
7
+
8
+ subject.titleize.should == "Not Yet Started"
9
+ end
10
+
11
+ it "returns the same string if no words are found" do
12
+ subject = " "
13
+
14
+ subject.titleize.should be_blank
15
+ end
16
+
17
+ it "does nothing with non alphanumerics" do
18
+ subject = "^@#%@#^@%#^@#%&"
19
+
20
+ subject.titleize.should == subject
21
+ end
22
+ end
23
+
24
+ describe "checking for blankness" do
25
+ it "returns 'true' when no data is present" do
26
+ subject = ""
27
+
28
+ subject.should be_blank
29
+ end
30
+
31
+ it "returns 'false' if characters exist" do
32
+ subject = "1"
33
+
34
+ subject.should_not be_blank
35
+ end
36
+
37
+ it "returns 'true' if spaces exist" do
38
+ subject = " "
39
+
40
+ subject.should be_blank
41
+ end
42
+ end
43
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-18 00:00:00.000000000 Z
12
+ date: 2012-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pivotal-tracker
@@ -90,16 +90,19 @@ files:
90
90
  - README.md
91
91
  - Rakefile
92
92
  - bin/pv
93
+ - lib/core_ext/string.rb
93
94
  - lib/pv.rb
94
95
  - lib/pv/bug_tracker.rb
95
96
  - lib/pv/command.rb
96
97
  - lib/pv/configuration.rb
97
98
  - lib/pv/story.rb
98
99
  - lib/pv/version.rb
100
+ - lib/templates/help.txt
99
101
  - lib/templates/story.txt.erb
100
102
  - pv.gemspec
101
103
  - spec/bug_tracker_spec.rb
102
104
  - spec/configuration_spec.rb
105
+ - spec/extensions/string_spec.rb
103
106
  - spec/fixtures/cassettes/pivotal_client_connection.yml
104
107
  - spec/fixtures/cassettes/pivotal_find_story.yml
105
108
  - spec/fixtures/cassettes/pivotal_project_stories_search.yml
@@ -126,13 +129,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
129
  version: '0'
127
130
  requirements: []
128
131
  rubyforge_project:
129
- rubygems_version: 1.8.23
132
+ rubygems_version: 1.8.24
130
133
  signing_key:
131
134
  specification_version: 3
132
135
  summary: A command-line interface to Pivotal Tracker.
133
136
  test_files:
134
137
  - spec/bug_tracker_spec.rb
135
138
  - spec/configuration_spec.rb
139
+ - spec/extensions/string_spec.rb
136
140
  - spec/fixtures/cassettes/pivotal_client_connection.yml
137
141
  - spec/fixtures/cassettes/pivotal_find_story.yml
138
142
  - spec/fixtures/cassettes/pivotal_project_stories_search.yml