pivotal-github 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0ec9bc112f32b279089cbca37fa39bcd8a72bc07
4
+ data.tar.gz: dc07621e400fc821a175df1e928ff4c31e6c4193
5
+ SHA512:
6
+ metadata.gz: 0580d4c0e1175daf5cee0f09c69561bca87c6c2eefc20065666424d52c9e0391f0dbb8ff609aefcf9f9fee00fee561c6731b8af98025ca812b9f9f108076623d
7
+ data.tar.gz: c731e0102496125328146b8514c3c366306e32c0a063df1abd120ca4ea76d7f6f0e4add67489998db5a11397ccb201cf76010ddf52d8fbb4437cd38739989f7d
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-1.9.3-p392
1
+ ruby-2.0.0
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source 'https://rubygems.org'
2
+ ruby '2.0.0'
2
3
 
3
- gem 'rspec', '~> 2.12.0'
4
+ gem 'rspec', '~> 2.13.0'
4
5
  gem 'httparty', '~> 0.10.0'
5
6
 
6
7
  # Specify your gem's dependencies in pivotal-github.gemspec
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # pivotal-github
2
2
 
3
- The `pivotal-github` gem facilitates a [Pivotal Tracker](http://pivotaltracker.com/)–[GitHub](http://github.com/) workflow inspired by the workflow used by [Logical Reality](http://lrdesign.com/). (Despite its name, `pivotal-github` also works fine with [BitBucket](http://bitbucket.com/); see **Configuration** below.) As per usual, there are several projects (notably [git-flow](https://github.com/nvie/gitflow) and [git-pivotal](https://github.com/trydionel/git-pivotal)) that implement similar solutions, but none met my exact needs, so I rolled my own.
3
+ The `pivotal-github` gem facilitates a [Pivotal Tracker](http://pivotaltracker.com/)–[GitHub](http://github.com/) workflow inspired by the workflow used by [Logical Reality](http://lrdesign.com/). (Despite its name, `pivotal-github` also works fine with [Bitbucket](http://bitbucket.com/); see **Configuration** below.) As per usual, there are several projects (notably [git-flow](https://github.com/nvie/gitflow) and [git-pivotal](https://github.com/trydionel/git-pivotal)) that implement similar solutions, but none met my exact needs, so I rolled my own.
4
4
 
5
5
  ## Installation
6
6
 
@@ -14,7 +14,7 @@ The full workflow described herein requires some of the Git utilities from [git-
14
14
 
15
15
  The `pivotal-github` gem adds several additional Git commands to the local environment. The main addition, `git story-commit`, automatically incorporates the Pivotal Tracker story id(s) into the commit messages, while adding options to mark the story **Finished** or **Delivered**.
16
16
 
17
- The `git story-commit` command makes the assumption that any string of digits in the branch name is a story id. This means that the branch names `6283185-add-markdown-support`, `6283185_add_markdown_support`, and `add-markdown-support-6283185` all correspond to story id `6283185`, while `add-things-6283185-3141592` corresponds to both `6283185` *and* `3141592`.
17
+ The `git story-commit` command makes the assumption that any string of eight or more digits in the branch name is a story id. (As of this writing, Pivotal Tracker ids are eight digits long, so shorter digit strings aren't valid ids.) This means that the branch names `62831853-add-markdown-support`, `62831853_add_markdown_support`, `add-markdown-support-62831853`, and `rails_4_0_62831853` all correspond to story id `62831853`, while `add-things-62831853-31415926` corresponds to both `62831853` *and* `31415926`.
18
18
 
19
19
  The full set of commands is as follows:
20
20
 
@@ -22,16 +22,16 @@ The full set of commands is as follows:
22
22
 
23
23
  `git story-commit` makes a standard `git commit` with the story number added to the commit message. This automatically adds a link at Pivotal Tracker between the story and the diff when the branch gets pushed up to GitHub.
24
24
 
25
- For example, when on a branch called `add-markdown-support-6283185`, the `git story-commit` command automatically adds `[#6283185]` to the commit message:
25
+ For example, when on a branch called `add-markdown-support-62831853`, the `git story-commit` command automatically adds `[#62831853]` to the commit message:
26
26
 
27
27
  $ git story-commit -am "Add foo bars"
28
- [add-markdown-support-6283185 6f56414] Add foo bars
28
+ [add-markdown-support-62831853 6f56414] Add foo bars
29
29
 
30
30
  The commit message is multiline and includes the story id:
31
31
 
32
32
  Add foo bars
33
33
 
34
- [#6283185]
34
+ [#62831853]
35
35
 
36
36
  (Previous versions of `pivotal-github` put the story id on the same line as the commit summary (per the usage at the [Pivotal Tracker API](https://www.pivotaltracker.com/help/api?version=v3)), but placing it in a separate line gives the user direct control over the length of the message. It also looks less cluttered.)
37
37
 
@@ -43,7 +43,7 @@ This gives the message
43
43
 
44
44
  Remove baz quuxes
45
45
 
46
- [Finishes #6283185]
46
+ [Finishes #62831853]
47
47
 
48
48
  To mark a story as **Delivered**, add the `-d` flag:
49
49
 
@@ -53,22 +53,22 @@ The message in this case is
53
53
 
54
54
  Remove baz quuxes
55
55
 
56
- [Delivers #6283185]
56
+ [Delivers #62831853]
57
57
 
58
58
  Either the `-f` flag or the `-d` flag can be combined with other flags, yielding commands like
59
59
 
60
60
  $ git story-commit -dam "Remove baz quuxes"
61
61
 
62
- `git story commit` supports multiple story numbers as well. For example, with a branch called `add-things-6283185-3141592`, we could deliver both stories as follows:
62
+ `git story commit` supports multiple story numbers as well. For example, with a branch called `add-things-62831853-31415926`, we could deliver both stories as follows:
63
63
 
64
64
  $ git story-commit -dam "Remove baz quuxes"
65
- [add-things-6283185-3141592 7g56429] Remove baz quuxes
65
+ [add-things-62831853-31415926 7g56429] Remove baz quuxes
66
66
 
67
67
  The message here is
68
68
 
69
69
  Remove baz quuxes
70
70
 
71
- [Delivers #6283185 #3141592]
71
+ [Delivers #62831853 #31415926]
72
72
 
73
73
  #### Options
74
74
 
@@ -84,10 +84,10 @@ Additionally, `git story-commit` accepts any options valid for `git commit`. (`g
84
84
 
85
85
  ### git story-merge
86
86
 
87
- `git story-merge` merges the current branch into `master`. On a branch called `add-markdown-support-6283185`, `git story-merge` is equivalent to the following:
87
+ `git story-merge` merges the current branch into `master`. On a branch called `add-markdown-support-62831853`, `git story-merge` is equivalent to the following:
88
88
 
89
89
  $ git checkout master
90
- $ git merge --no-ff --log add-markdown-support-6283185
90
+ $ git merge --no-ff --log add-markdown-support-62831853
91
91
 
92
92
  Note that this effectively changes the default merge behavior from fast-forward to no-fast-forward, which makes it possible to use `git log` to see which of the commit objects together have implemented a story. As noted in [A successful Git branching model](http://nvie.com/posts/a-successful-git-branching-model/),
93
93
 
@@ -110,11 +110,11 @@ Additionally, `git story-merge` accepts any options valid for `git merge`.
110
110
 
111
111
  ### git story-pull-request
112
112
 
113
- `git story-pull-request` opens the proper remote URI to issue a pull request for the current branch (OS X–only):
113
+ `git story-pull-request` opens the proper remote URL to issue a pull request for the current branch (OS X–only):
114
114
 
115
115
  $ git story-pull-request
116
116
 
117
- By default, `git story-pull-request` issues a `git push-branch` as well, just in case the local branch hasn't yet been pushed up to the remote repository.
117
+ By default, `git story-pull-request` issues a `git push-branch` as well (from [git-utils](https://github.com/mhartl/git-utils)), just in case the local branch hasn't yet been pushed up to the remote repository.
118
118
 
119
119
  As with `git story-merge`, by default `git story-pull-request` exits with a warning if the most recent commit doesn't finish the story.
120
120
 
@@ -126,14 +126,14 @@ As with `git story-merge`, by default `git story-pull-request` exits with a warn
126
126
 
127
127
  ### story-open
128
128
 
129
- The `story-open` command (*note*: no `git`) opens the current story in the default browser (OS X–only):
129
+ The `story-open` command (no `git`) opens the current story in the default browser (OS X–only):
130
130
 
131
131
  $ story-open
132
132
 
133
133
 
134
134
  ## Configuration
135
135
 
136
- In order to use the `pivotal-github` gem, you need to configure a post-receive hook for your repository. At GitHub, navigate to `Settings > Service Hooks > Pivotal Tracker` and paste in your Pivotal Tracker API token. (To find your Pivotal Tracker API token, go to your user profile and scroll to the bottom.) Be sure to check the **Active** box to activate the post-receive hook. At BitBucket, click on the gear icon to view the settings, click on `Services`, select `Pivotal Tracker`, and paste in your Pivotal Tracker API key.
136
+ In order to use the `pivotal-github` gem, you need to configure a post-receive hook for your repository. At GitHub, navigate to `Settings > Service Hooks > Pivotal Tracker` and paste in your Pivotal Tracker API token. (To find your Pivotal Tracker API token, go to your user profile and scroll to the bottom.) Be sure to check the **Active** box to activate the post-receive hook. At Bitbucket, click on the gear icon to view the settings, click on `Services`, select `Pivotal Tracker`, and paste in your Pivotal Tracker API key.
137
137
 
138
138
  The `pivotal-github` command names follow the Git convention of being verbose (e.g., unlike Subversion, Git doesn't natively support `co` for `checkout`), but I recommend setting up aliases as necessary. Here are some suggestions, formatted so that they can be pasted directly into a terminal window:
139
139
 
@@ -147,7 +147,7 @@ I also recommend setting up an alias for `git push-branch` from [git-utils](http
147
147
 
148
148
  A single-developer workflow would then look like this:
149
149
 
150
- $ git co -b add-markdown-support-6283185
150
+ $ git co -b add-markdown-support-62831853
151
151
  $ git pb
152
152
  <work>
153
153
  $ git sc -am "Added foo"
@@ -161,6 +161,8 @@ A single-developer workflow would then look like this:
161
161
  $ git rebase master
162
162
  $ git sm
163
163
 
164
+ Here `git sync` is also from [git-utils](https://github.com/mhartl/git-utils).
165
+
164
166
  ## Workflow with integrated code reivew
165
167
 
166
168
  The `pivotal-github` gem is degined to support a workflow involving integrated code review, which has the usual benefits: at least two pairs of eyes see any committed code, and at least two brains know basically what the committed code does. The cost is that having a second developer involved can slow you down. I suggest using your judgment to determine which workflow makes the most sense on a story-by-story basis.
@@ -170,11 +172,11 @@ Here's the process in detail:
170
172
  ### Developer #1 (Alice)
171
173
 
172
174
  1. Start an issue at [Pivotal Tracker](http://pivotaltracker.com/) and copy the story id to your buffer
173
- 2. Create a branch in the local Git repository containing the story id and a brief description: `git checkout -b add-markdown-support-6283185`
175
+ 2. Create a branch in the local Git repository containing the story id and a brief description: `git checkout -b add-markdown-support-62831853`
174
176
  3. Create a remote branch at [GitHub](http://github.com/) using `git push-branch`
175
177
  3. Use `git story-commit` to make commits, which includes the story number in the commit message: `git story-commit -am "Add syntax highlighting"`
176
178
  4. Continue pushing up after each commit using `git push` as usual
177
- 4. When done with the story, add `-f` to mark the story as **Finished** using `git story-commit -f -am "Add paragraph breaks"` or as **Delivered** using `git story-commit -d -am "Add paragraph breaks"`
179
+ 4. When done with the story, add `-f` to mark the story as **Finished** using `git story-commit -fam "Add paragraph breaks"` or as **Delivered** using `git story-commit -dam "Add paragraph breaks"`
178
180
  4. Rebase against `master` using `git sync` followed by `git rebase master` or `git rebase master --interactive` (optionally squashing commit messages as described in the article [A Git Workflow for Agile Teams](http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html))
179
181
  4. Push up with `git push`
180
182
  6. At the GitHub page for the repo, select **Branches** and submit a pull request
@@ -27,12 +27,12 @@ class Command
27
27
 
28
28
  # Returns the story id (or ids).
29
29
  # We extract the story id(s) from the branch name, so that, e.g.,
30
- # the branch `add-markdown-support-6283185` gives story_id '6283185'.
30
+ # the branch `add-markdown-support-62831853` gives story_id '62831853'.
31
31
  # New as of version 0.7, we support multiple story ids in a single
32
- # branch name, so that `add-markdown-support-6283185-3141592` can be used
33
- # to update story 6283185 and story 3141592 simultaneously.
32
+ # branch name, so that `add-markdown-support-62831853-31415926` can be used
33
+ # to update story 62831853 and story 31415926 simultaneously.
34
34
  def story_ids
35
- story_branch.scan(/\d+/)
35
+ story_branch.scan(/[0-9]{8,}/)
36
36
  end
37
37
 
38
38
  # Returns the single story id for the common case of one id.
@@ -38,8 +38,8 @@ class StoryCommit < Command
38
38
 
39
39
  # Returns the story ids formatted for story commits.
40
40
  # For single-id stories, this is just the number preceded by '#', as in
41
- # '#6283185'. For multiple-id stories, each story id is precede by '#', as in
42
- # '#6283185 #3141592'
41
+ # '#62831853'. For multiple-id stories, each story id is precede by '#', as in
42
+ # '#62831853 #31415926'
43
43
  def message_ids
44
44
  story_ids.map { |id| "##{id}" }.join(' ')
45
45
  end
@@ -3,7 +3,7 @@ require 'pivotal-github/command'
3
3
  class StoryOpen < Command
4
4
 
5
5
  # Returns a command appropriate for executing at the command line
6
- # I.e., 'open https://www.pivotaltracker.com/story/show/6283185'
6
+ # I.e., 'open https://www.pivotaltracker.com/story/show/62831853'
7
7
  def cmd
8
8
  story_ids.map do |id|
9
9
  "open https://www.pivotaltracker.com/story/show/#{id}"
@@ -16,7 +16,7 @@ class StoryPullRequest < FinishedCommand
16
16
  end
17
17
 
18
18
  # Returns a command appropriate for executing at the command line
19
- # I.e., 'open https://www.pivotaltracker.com/story/show/6283185'
19
+ # I.e., 'open https://www.pivotaltracker.com/story/show/62831853'
20
20
  def cmd
21
21
  "git pull-request"
22
22
  end
@@ -1,5 +1,5 @@
1
1
  module Pivotal
2
2
  module Github
3
- VERSION = "0.8.0"
3
+ VERSION = "0.8.1"
4
4
  end
5
5
  end
@@ -2,20 +2,33 @@ require 'spec_helper'
2
2
 
3
3
  describe Command do
4
4
  let(:command) { Command.new }
5
- before { command.stub(:story_branch).and_return('6283185-tau-manifesto') }
5
+ before { command.stub(:story_branch).and_return('62831853-tau-manifesto') }
6
6
  subject { command }
7
7
 
8
8
  it { should respond_to(:cmd) }
9
9
  it { should respond_to(:args) }
10
10
  it { should respond_to(:options) }
11
11
  it { should respond_to(:parse) }
12
+ it { should respond_to(:story_id) }
12
13
  it { should respond_to(:story_ids) }
13
- its(:story_ids) { should eq ['6283185']}
14
+
15
+ its(:story_id) { should eq '62831853' }
16
+ its(:story_ids) { should eq ['62831853'] }
14
17
 
15
18
  describe "branches with multiple stories" do
16
19
  before do
17
- command.stub(:story_branch).and_return('6283185-tau-manifesto-3141592')
20
+ command.stub(:story_branch).and_return('62831853-tau-manifesto-31415926')
18
21
  end
19
- its(:story_ids) { should eq ['6283185', '3141592'] }
22
+ its(:story_ids) { should eq ['62831853', '31415926'] }
23
+ end
24
+
25
+ describe "when the branch name has other digit strings shorter than 8" do
26
+ before { command.stub(:story_branch).and_return('3141592-62831853') }
27
+ its(:story_id) { should eq '62831853' }
28
+ end
29
+
30
+ describe "with a story id with more than 8 digits" do
31
+ before { command.stub(:story_branch).and_return('628318530-tau-manifesto') }
32
+ its(:story_id) { should eq '628318530' }
20
33
  end
21
34
  end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe StoryCommit do
4
4
 
5
5
  let(:command) { StoryCommit.new(['-m', 'msg', '-a', '-z', '--foo']) }
6
- before { command.stub(:story_branch).and_return('6283185-tau-manifesto') }
6
+ before { command.stub(:story_branch).and_return('62831853-tau-manifesto') }
7
7
  subject { command }
8
8
 
9
9
  it { should respond_to(:message) }
@@ -11,7 +11,7 @@ describe StoryCommit do
11
11
  shared_examples "story-commit with known options" do
12
12
  subject { command }
13
13
 
14
- its(:cmd) { should =~ /git commit/ }
14
+ its(:cmd) { should match /git commit/ }
15
15
  its(:message) { should_not be_empty }
16
16
  its(:message?) { should be_true }
17
17
  its(:all?) { should be_true }
@@ -19,7 +19,7 @@ describe StoryCommit do
19
19
  describe "parse" do
20
20
  subject { command.options }
21
21
 
22
- its(:message) { should == 'msg' }
22
+ its(:message) { should eq 'msg' }
23
23
  its(:all) { should be_true }
24
24
  end
25
25
  end
@@ -46,21 +46,21 @@ describe StoryCommit do
46
46
 
47
47
  describe '#story_id' do
48
48
  subject { command.story_id }
49
- it { should == '6283185' }
49
+ it { should eq '62831853' }
50
50
  end
51
51
 
52
52
  describe "command with message" do
53
53
  its(:cmd) do
54
- should == %(git commit -a -m "msg" -m "[##{command.story_id}]" -z --foo)
54
+ should eq %(git commit -a -m "msg" -m "[##{command.story_id}]" -z --foo)
55
55
  end
56
56
 
57
57
  describe "when used with branches containing multiple stories" do
58
58
  before do
59
- command.stub(:story_branch).and_return('6283185-tau-manifesto-3141592')
59
+ command.stub(:story_branch).and_return('62831853-tau-manifesto-31415926')
60
60
  end
61
61
  its(:cmd) do
62
- delivered_ids = '#6283185 #3141592'
63
- should == %(git commit -a -m "msg" -m "[#{delivered_ids}]" -z --foo)
62
+ delivered_ids = '#62831853 #31415926'
63
+ should eq %(git commit -a -m "msg" -m "[#{delivered_ids}]" -z --foo)
64
64
  end
65
65
  end
66
66
  end
@@ -68,23 +68,23 @@ describe StoryCommit do
68
68
  describe "command with no message" do
69
69
  let(:command) { StoryCommit.new(['-a', '-z', '--foo']) }
70
70
  its(:cmd) do
71
- should == %(git commit -a -m "[##{command.story_id}]" -z --foo)
71
+ should eq %(git commit -a -m "[##{command.story_id}]" -z --foo)
72
72
  end
73
73
  end
74
74
 
75
75
  describe "command with finish flag" do
76
76
  let(:command) { StoryCommit.new(['-m', 'msg', '-f']) }
77
77
  its(:cmd) do
78
- should == %(git commit -m "msg" -m "[Finishes ##{command.story_id}]")
78
+ should eq %(git commit -m "msg" -m "[Finishes ##{command.story_id}]")
79
79
  end
80
80
 
81
81
  describe "when used with branches containing multiple stories" do
82
82
  before do
83
- command.stub(:story_branch).and_return('6283185-tau-manifesto-3141592')
83
+ command.stub(:story_branch).and_return('62831853-tau-manifesto-31415926')
84
84
  end
85
85
  its(:cmd) do
86
- delivered_ids = '#6283185 #3141592'
87
- should == %(git commit -m "msg" -m "[Finishes #{delivered_ids}]")
86
+ delivered_ids = '#62831853 #31415926'
87
+ should eq %(git commit -m "msg" -m "[Finishes #{delivered_ids}]")
88
88
  end
89
89
  end
90
90
  end
@@ -92,16 +92,16 @@ describe StoryCommit do
92
92
  describe "command with deliver flag" do
93
93
  let(:command) { StoryCommit.new(['-m', 'msg', '-d']) }
94
94
  its(:cmd) do
95
- should == %(git commit -m "msg" -m "[Delivers ##{command.story_id}]")
95
+ should eq %(git commit -m "msg" -m "[Delivers ##{command.story_id}]")
96
96
  end
97
97
 
98
98
  describe "when used with branches containing multiple stories" do
99
99
  before do
100
- command.stub(:story_branch).and_return('6283185-tau-manifesto-3141592')
100
+ command.stub(:story_branch).and_return('62831853-tau-manifesto-31415926')
101
101
  end
102
102
  its(:cmd) do
103
- delivered_ids = '#6283185 #3141592'
104
- should == %(git commit -m "msg" -m "[Delivers #{delivered_ids}]")
103
+ delivered_ids = '#62831853 #31415926'
104
+ should eq %(git commit -m "msg" -m "[Delivers #{delivered_ids}]")
105
105
  end
106
106
  end
107
107
  end
@@ -109,16 +109,16 @@ describe StoryCommit do
109
109
  describe "command with no story id" do
110
110
  before { command.stub(:story_branch).and_return('tau-manifesto') }
111
111
  its(:cmd) do
112
- should == %(git commit -a -m "msg" -z --foo)
112
+ should eq %(git commit -a -m "msg" -z --foo)
113
113
  end
114
114
  end
115
115
 
116
116
  describe "command-line command" do
117
117
  let(:command) { `bin/git-story-commit -a -m "msg" -z --debug` }
118
118
  subject { command }
119
- it { should =~ /git commit -a -m/ }
120
- it { should =~ /msg/ }
121
- it { should =~ /-z/ }
122
- it { should_not =~ /--debug/ }
119
+ it { should match /git commit -a -m/ }
120
+ it { should match /msg/ }
121
+ it { should match /-z/ }
122
+ it { should_not match /--debug/ }
123
123
  end
124
124
  end
@@ -3,10 +3,10 @@ require 'spec_helper'
3
3
  describe StoryMerge do
4
4
 
5
5
  let(:command) { StoryMerge.new }
6
- before { command.stub(:story_branch).and_return('6283185-tau-manifesto') }
6
+ before { command.stub(:story_branch).and_return('62831853-tau-manifesto') }
7
7
  subject { command }
8
8
 
9
- its(:cmd) { should =~ /git merge/ }
9
+ its(:cmd) { should match /git merge/ }
10
10
 
11
11
  shared_examples "story-merge with known options" do
12
12
  subject { command }
@@ -16,24 +16,24 @@ describe StoryMerge do
16
16
  end
17
17
 
18
18
  describe "with no options" do
19
- its(:cmd) { should =~ /git checkout master/ }
20
- its(:cmd) { should =~ /git merge --no-ff --log #{command.story_branch}/ }
19
+ its(:cmd) { should match /git checkout master/ }
20
+ its(:cmd) { should match /git merge --no-ff --log #{command.story_branch}/ }
21
21
  end
22
22
 
23
23
  describe "with a custom development branch" do
24
24
  let(:command) { StoryMerge.new(['-d', 'develop']) }
25
- its(:cmd) { should =~ /git checkout develop/ }
25
+ its(:cmd) { should match /git checkout develop/ }
26
26
  end
27
27
 
28
28
  describe "with some unknown options" do
29
29
  let(:command) { StoryMerge.new(['-d', 'develop', '-a', '-z', '--foo']) }
30
30
  it_should_behave_like "story-merge with known options"
31
- its(:cmd) { should =~ /-a -z --foo/ }
31
+ its(:cmd) { should match /-a -z --foo/ }
32
32
  end
33
33
 
34
34
  describe "command-line command" do
35
35
  subject { `bin/git-story-merge --debug -ff -d develop` }
36
- it { should =~ /git checkout develop/ }
37
- it { should =~ /git merge --no-ff --log -ff/ }
36
+ it { should match /git checkout develop/ }
37
+ it { should match /git merge --no-ff --log -ff/ }
38
38
  end
39
39
  end
@@ -4,8 +4,8 @@ describe StoryOpen do
4
4
 
5
5
  let(:command) { StoryOpen.new }
6
6
  let(:uri) { "https://www.pivotaltracker.com/story/show/#{command.story_id}" }
7
- before { command.stub(:story_branch).and_return('6283185-tau-manifesto') }
7
+ before { command.stub(:story_branch).and_return('62831853-tau-manifesto') }
8
8
  subject { command }
9
9
 
10
- its(:cmd) { should == "open #{uri}" }
10
+ its(:cmd) { should eq "open #{uri}" }
11
11
  end
@@ -3,14 +3,14 @@ require 'spec_helper'
3
3
  describe StoryPullRequest do
4
4
 
5
5
  let(:command) { StoryPullRequest.new }
6
- before { command.stub(:story_branch).and_return('6283185-tau-manifesto') }
6
+ before { command.stub(:story_branch).and_return('62831853-tau-manifesto') }
7
7
  before do
8
8
  command.stub(:remote_location).
9
9
  and_return('https://github.com/mhartl/foo')
10
10
  end
11
11
  subject { command }
12
12
 
13
- its(:cmd) { should =~ /git pull-request/ }
13
+ its(:cmd) { should match /git pull-request/ }
14
14
 
15
15
  describe 'origin uri parsing' do
16
16
  let(:correct_origin) { 'https://github.com/mhartl/foo' }
@@ -32,7 +32,7 @@ describe StoryPullRequest do
32
32
 
33
33
  describe "command-line command" do
34
34
  subject { `bin/git-story-pull-request --debug` }
35
- it { should_not =~ /\.git/ }
36
- it { should =~ /git pull-request/ }
35
+ it { should_not match /\.git/ }
36
+ it { should match /git pull-request/ }
37
37
  end
38
38
  end
data/spec/spec_helper.rb CHANGED
@@ -4,4 +4,9 @@ RSpec.configure do |config|
4
4
  config.treat_symbols_as_metadata_keys_with_true_values = true
5
5
  config.run_all_when_everything_filtered = true
6
6
  config.filter_run :focus
7
+
8
+ # Disallow the old-style 'object.should' syntax.
9
+ config.expect_with :rspec do |c|
10
+ c.syntax = :expect
11
+ end
7
12
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pivotal-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
5
- prerelease:
4
+ version: 0.8.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Michael Hartl
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-04 00:00:00.000000000 Z
11
+ date: 2013-06-06 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: Add commands for Pivotal Tracker-GitHub integration
15
14
  email:
@@ -53,27 +52,26 @@ files:
53
52
  - spec/spec_helper.rb
54
53
  homepage: https://github.com/mhartl/pivotal-github
55
54
  licenses: []
55
+ metadata: {}
56
56
  post_install_message:
57
57
  rdoc_options: []
58
58
  require_paths:
59
59
  - lib
60
60
  required_ruby_version: !ruby/object:Gem::Requirement
61
- none: false
62
61
  requirements:
63
- - - ! '>='
62
+ - - '>='
64
63
  - !ruby/object:Gem::Version
65
64
  version: '0'
66
65
  required_rubygems_version: !ruby/object:Gem::Requirement
67
- none: false
68
66
  requirements:
69
- - - ! '>='
67
+ - - '>='
70
68
  - !ruby/object:Gem::Version
71
69
  version: '0'
72
70
  requirements: []
73
71
  rubyforge_project:
74
- rubygems_version: 1.8.25
72
+ rubygems_version: 2.0.3
75
73
  signing_key:
76
- specification_version: 3
74
+ specification_version: 4
77
75
  summary: See the README for full documentation
78
76
  test_files:
79
77
  - spec/commands/command_spec.rb