git-pivotal-tracker-centro 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,54 +1,2 @@
1
- v 0.9.2
2
- - verbose is now the default, you can turn it off in your git configuration (pivotal.verbose) or via the --no-verbose command line option
3
-
4
- v 0.9.1
5
- - updating git-accept to work with cards that already accepted in Pivotal
6
-
7
- v 0.9.0
8
- - first release of new command set: accept, block, finish, info, start, unblock
9
-
10
- v 0.8.1
11
- - Improve error reporting when interacting with PivotalTracker
12
- - Add SSL project support [bunnymatic (Mr Rogers)]
13
- - Improve method of collecting story ID from branch name
14
-
15
- v 0.8.0
16
- - Drop home-rolled PivotalTracker API for pivotal-tracker gem
17
- - Add Gemfile for easier development
18
- - Add better test suite with Cucumber and Aruba
19
- - Add option for appending the branch name (rather than prepending) [Addy
20
- Naik]
21
- - Add new `git info` command [Addy Naik]
22
-
23
- v 0.2.3
24
- - Allow the developer to specify the integration branch for git finish [Graeme Mathieson]
25
- - Fixed bug which prevented chores from finishing successfully [Joshua Vial]
26
- - Added option to allow only pickup items already assigned to you [Mark Butcher]
27
- - Fix RestClient version issues
28
-
29
- v 0.2.2
30
- - Added git chore command
31
-
32
- v 0.2.1
33
- - Remove &:to_s shortcut for MRI 1.8.6 compatibility
34
- - Updated to handle RestClient 1.4
35
-
36
- v 0.2.0
37
- - Added git feature and git bug commands
38
- - Deprecated git feature
39
- - Improved XPath reliability for Pivotal API requests [Sam Stokes]
40
-
41
- v 0.1.3
42
- - Fixed bug preventing command line args from being properly interpretted
43
-
44
- v 0.1.2
45
- - Fixed bug introduced in v 0.1.1 which prevented git pick from completing
46
-
47
- v 0.1.1
48
- - Updated git pick to tell Pivotal who owns the picked feature
49
- - Improved Pivotal Tracker framework write ability
50
-
51
- v 0.1.0
52
- - Initial release
53
- - Basic framework for reading from Pivotal Tracker
54
- - git pick utility
1
+ v 1.0.0.rc1
2
+ - Initial release for Centro's work flow
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git-pivotal-tracker-centro (1.0.0.rc1)
4
+ git-pivotal-tracker-centro (1.0.0.rc2)
5
5
  pivotal-tracker
6
6
 
7
7
  GEM
data/Rakefile CHANGED
@@ -42,7 +42,7 @@ task :install do
42
42
  system "gem uninstall -x git-pivotal-tracker-centro"
43
43
 
44
44
  puts "Building..."
45
- system "gem build git-pivotal-tracker-centro.gemspec"
45
+ system "gem build git-pivotal-tracker-centro.gemspec"
46
46
 
47
47
  puts "Installing..."
48
48
  system "gem install git-pivotal-tracker-centro-#{IO.read("VERSION")}"
data/TODO ADDED
@@ -0,0 +1,2 @@
1
+ * Should be able to `git start` or `git start story` without having to specify the type
2
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.rc1
1
+ 1.0.0.rc2
data/lib/commands/pick.rb CHANGED
@@ -59,7 +59,8 @@ module Commands
59
59
  msg += " for #{options[:full_name]}" if options[:only_mine]
60
60
  put "#{msg}..."
61
61
 
62
- conditions = { :story_type => type, :current_state => "unstarted", :limit => 1, :offset => 0 }
62
+ conditions = { :current_state => "unstarted", :limit => 1, :offset => 0 }
63
+ conditions.merge!(:story_type => type) unless type == "story"
63
64
  conditions[:owned_by] = options[:full_name] if options[:only_mine]
64
65
  @story = project.stories.all(conditions).first
65
66
  end
@@ -3,6 +3,7 @@ require 'commands/bug'
3
3
  require 'commands/card'
4
4
  require 'commands/chore'
5
5
  require 'commands/feature'
6
+ require 'commands/story'
6
7
 
7
8
  module Commands
8
9
  class Start
@@ -10,6 +11,7 @@ module Commands
10
11
  "bug" => Commands::Bug,
11
12
  "chore" => Commands::Chore,
12
13
  "feature" => Commands::Feature,
14
+ "story" => Commands::Story,
13
15
  /^\d+$/ => Commands::Card
14
16
  })
15
17
 
@@ -30,7 +32,7 @@ module Commands
30
32
  end
31
33
 
32
34
  def display_usage_instructions_and_quit(identifier)
33
- puts "ERROR: Unknown card identifier given: '#{identifier}'. Valid options are 'bug', 'chore', 'feature', or the card number."
35
+ puts "ERROR: Unknown card identifier given: '#{identifier}'. Valid options are 'story', 'bug', 'chore', 'feature', or the card number."
34
36
  exit 1
35
37
  end
36
38
  end
@@ -0,0 +1,20 @@
1
+ require 'commands/pick'
2
+
3
+ module Commands
4
+ class Story < Pick
5
+
6
+ def type
7
+ "story"
8
+ end
9
+
10
+ def plural_type
11
+ "stories"
12
+ end
13
+
14
+ def branch_suffix
15
+ "story"
16
+ end
17
+
18
+ end
19
+ end
20
+
@@ -4,6 +4,7 @@ require File.join('commands', 'base')
4
4
  require File.join('commands', 'pick')
5
5
  require File.join('commands', 'card')
6
6
  require File.join('commands', 'feature')
7
+ require File.join('commands', 'story')
7
8
  require File.join('commands', 'bug')
8
9
  require File.join('commands', 'chore')
9
10
  require File.join('commands', 'finish')
data/readme.markdown CHANGED
@@ -85,11 +85,9 @@ When on a feature/bug/chore branch, this command will display the story informat
85
85
 
86
86
  ## Installation
87
87
 
88
- _This section is out of date and applies to the original project. It needs to be updated._
89
-
90
88
  To install git-pivotal, simply run
91
89
 
92
- [sudo] gem install git-pivotal
90
+ gem install git-pivotal-tracker-centro
93
91
 
94
92
  ## Configuration
95
93
 
@@ -0,0 +1,36 @@
1
+ #!/bin/sh
2
+ #
3
+ # This hook script will automatically add the Pivotal Tracker ID
4
+ # to the beginning of the git commit message (in the format of
5
+ # [#12345678]) if it is not already there.
6
+ #
7
+ # The script pulls the ID from the beginning of the branch name. If
8
+ # the branch name does not start with the Pivotal Tracker ID, then
9
+ # this script will do nothing.
10
+ #
11
+ # Specifying the Pivotal Tracker ID in the git commit message allows
12
+ # Pivotal to list all commits associated with a story when the
13
+ # story is viewed.
14
+ #
15
+ # To enble this script, copy it into your repo's .git/hooks directory.
16
+ #
17
+
18
+ COMMIT_MSG_FILE=$1
19
+ CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
20
+ TRACKER_ID=`echo $CURRENT_BRANCH | egrep -o '^\d+'`
21
+
22
+ # Make sure the branch name starts with what looks like a tracker ID
23
+ if [ "$TRACKER_ID" != "" ]; then
24
+
25
+ # If we could not find the tracker ID in the commit message in the
26
+ # proper format, then add it.
27
+ grep -q "\[#$TRACKER_ID\]" $COMMIT_MSG_FILE
28
+ if [ $? -eq 1 ]; then
29
+ sed "1s/^/[#$TRACKER_ID] /" $COMMIT_MSG_FILE > /tmp/tracker_git_commit_msg
30
+ mv /tmp/tracker_git_commit_msg $COMMIT_MSG_FILE
31
+ fi
32
+ fi
33
+
34
+ # Explicitly exit 0 to make sure we don't accidentally abort the commit
35
+ exit 0
36
+
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+
3
+ describe Commands::Story do
4
+
5
+ before(:each) do
6
+ # stub out git config requests
7
+ Commands::Story.any_instance.stubs(:get).with { |v| v =~ /git config/ }.returns("")
8
+
9
+ @story = Commands::Story.new
10
+ end
11
+
12
+ it "should specify its story type" do
13
+ @story.type.should == "story"
14
+ end
15
+
16
+ it "should specify a plural for its story types" do
17
+ @story.plural_type.should == "stories"
18
+ end
19
+
20
+ it "should specify its branch suffix" do
21
+ @story.branch_suffix.should == "story"
22
+ end
23
+
24
+ end
25
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-pivotal-tracker-centro
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc1
4
+ version: 1.0.0.rc2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-11-09 00:00:00.000000000 Z
15
+ date: 2012-11-16 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: pivotal-tracker
@@ -160,6 +160,7 @@ files:
160
160
  - Gemfile.lock
161
161
  - LICENSE
162
162
  - Rakefile
163
+ - TODO
163
164
  - VERSION
164
165
  - bin/git-finish
165
166
  - bin/git-info
@@ -207,8 +208,10 @@ files:
207
208
  - lib/commands/map.rb
208
209
  - lib/commands/pick.rb
209
210
  - lib/commands/start.rb
211
+ - lib/commands/story.rb
210
212
  - lib/git-pivotal-tracker.rb
211
213
  - readme.markdown
214
+ - scripts/git_hooks/commit-msg.add_pivotal_id_to_commit
212
215
  - spec/commands/base_spec.rb
213
216
  - spec/commands/bug_spec.rb
214
217
  - spec/commands/chore_spec.rb
@@ -216,6 +219,7 @@ files:
216
219
  - spec/commands/finish_spec.rb
217
220
  - spec/commands/map_spec.rb
218
221
  - spec/commands/start_spec.rb
222
+ - spec/commands/story_spec.rb
219
223
  - spec/factories.rb
220
224
  - spec/factory.rb
221
225
  - spec/spec_helper.rb
@@ -231,9 +235,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
231
235
  - - ! '>='
232
236
  - !ruby/object:Gem::Version
233
237
  version: '0'
234
- segments:
235
- - 0
236
- hash: 3181363981249985797
237
238
  required_rubygems_version: !ruby/object:Gem::Requirement
238
239
  none: false
239
240
  requirements:
@@ -286,6 +287,7 @@ test_files:
286
287
  - spec/commands/finish_spec.rb
287
288
  - spec/commands/map_spec.rb
288
289
  - spec/commands/start_spec.rb
290
+ - spec/commands/story_spec.rb
289
291
  - spec/factories.rb
290
292
  - spec/factory.rb
291
293
  - spec/spec_helper.rb