github-pivotal-flow 1.0.2 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cece2a251f6cd78582155921715f4591ef7a825b
4
- data.tar.gz: e5c6ec83aef54e82c8c628382289d11545ad8664
3
+ metadata.gz: d28bd67dcb12ae8b5703b61c8622e682e9db5a2d
4
+ data.tar.gz: ad959917dd3928902a45fc8ed02d4a6b0909e105
5
5
  SHA512:
6
- metadata.gz: f53421dd4465a18089d0356ea510c440684d7d952575de790d1f8f873421f0a5f0f4da9c1b3a5e11c0a639fa03476995384b49d68838d0da2a77052672227793
7
- data.tar.gz: 70a2342c1e95eab672bc824a9fa0ae27256003e943ea18a3b8a4def9891cfb38d933fcd1cf3dee0d9c38175b436c01d358e49dd92dba5d82e223c6a64e5a9b4f
6
+ metadata.gz: 040c6e3b6be5d5111279f614ca37f07cff8eaae20023611f6c2be7c1b7ed044baf19dd264601e867b4a7ad8d3cce51f82eac88a3d4ae7b50dc04f977d1da0853
7
+ data.tar.gz: 5d75d84e6e0e1e1024277f07552741545996220d45054919cf87c5ec81f0106e055e0032389480122fd5bc68d9102bd1dca4b2453273ae0fa717011579b4c941
@@ -30,6 +30,7 @@ module GithubPivotalFlow
30
30
  def self.create_branch(branch_name, start_point = nil, options = {})
31
31
  return if branch_exists?(branch_name)
32
32
  command = "git branch --quiet"
33
+ command << " --track" if options[:track]
33
34
  command << " --set-upstream" if options[:set_upstream]
34
35
  exec "#{command} #{[branch_name, start_point].compact.join(' ')}"
35
36
  puts 'OK'
@@ -96,7 +97,7 @@ module GithubPivotalFlow
96
97
 
97
98
  print "Pushing to #{remote}... "
98
99
  command = "git push --quiet"
99
- command << " -u" if options[:set_upstream]
100
+ command << " --set-upstream" if options[:set_upstream]
100
101
  exec "#{command} #{remote} " + refs.join(' ')
101
102
  puts 'OK'
102
103
  end
@@ -79,18 +79,16 @@ module GithubPivotalFlow
79
79
  puts 'OK'
80
80
  end
81
81
 
82
- def create_branch!(commit_message = nil, options = {})
83
- commit_message ||= "Starting [#{story_type} ##{id}]: #{escape_quotes(name)}"
84
- commit_message << " [ci skip]" unless options[:run_ci]
85
- print "Creating branch for story with branch name #{branch_name} from #{root_branch_name}... "
82
+ def create_branch!(options = {})
86
83
  Git.checkout(root_branch_name)
87
84
  root_origin = Git.get_remote
85
+ remote_branch_name = [root_origin, root_branch_name].join('/')
86
+ print "Creating branch for story with branch name #{branch_name} from #{remote_branch_name}... "
88
87
  Git.pull_remote
89
- Git.create_branch(branch_name, root_branch_name, set_upstream: true)
88
+ Git.create_branch(branch_name, remote_branch_name, track: true)
90
89
  Git.checkout(branch_name)
91
90
  Git.set_config('root-branch', root_branch_name, :branch)
92
91
  Git.set_config('root-remote', root_origin, :branch)
93
- Git.commit(commit_message: commit_message, allow_empty: true)
94
92
  end
95
93
 
96
94
  def merge_to_root!(commit_message = nil, options = {})
@@ -1,3 +1,3 @@
1
1
  module GithubPivotalFlow
2
- VERSION = '1.0.2'
2
+ VERSION = '1.1'
3
3
  end
@@ -181,7 +181,7 @@ module GithubPivotalFlow
181
181
  end
182
182
 
183
183
  it 'supports passing in the set_upstream option after a ref' do
184
- expect(Shell).to receive(:exec).with('git push --quiet -u origin foo', true)
184
+ expect(Shell).to receive(:exec).with('git push --quiet --set-upstream origin foo', true)
185
185
 
186
186
  Git.push 'foo', set_upstream: true
187
187
  end
@@ -138,28 +138,20 @@ module GithubPivotalFlow
138
138
  allow(@story).to receive(:branch_prefix).and_return('feature/')
139
139
  expect(@story).to receive(:ask).with("Enter branch name (feature/<branch-name>): ").and_return('super-branch')
140
140
 
141
- @story.create_branch!('Message')
141
+ @story.create_branch!
142
142
  end
143
143
 
144
- it 'includes a tag to skip the ci build for the initial blank commit' do
144
+ it 'does not create an initial commit' do
145
145
  allow(@story).to receive(:branch_name).and_return('feature/123456-my_branch')
146
- expect(Git).to receive(:commit).with(hash_including(commit_message: 'Message [ci skip]')).and_return(true)
146
+ expect(Git).to_not receive(:commit)
147
147
 
148
- @story.create_branch!('Message')
148
+ @story.create_branch!
149
149
  end
150
150
 
151
151
  it 'does not push the local branch' do
152
152
  allow(@story).to receive(:branch_name).and_return('feature/123456-my_branch')
153
153
  expect(Git).to_not receive(:push)
154
154
 
155
- @story.create_branch!('Message')
156
- end
157
-
158
- it 'supports stories with quotes in their name' do
159
- allow(@story).to receive(:name).and_return('Fancy story with "quotes"')
160
- allow(@story).to receive(:branch_name).and_return('feature/123456-my_branch')
161
- expect(Git).to receive(:commit).with(hash_including(commit_message: 'Starting [feature #123456]: Fancy story with \"quotes\" [ci skip]'))
162
-
163
155
  @story.create_branch!
164
156
  end
165
157
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-pivotal-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donald Piret
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-02 00:00:00.000000000 Z
11
+ date: 2014-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 3.0.0.rc1
103
+ version: '3.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 3.0.0.rc1
110
+ version: '3.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec-mocks
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 3.0.0.rc1
117
+ version: '3.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 3.0.0.rc1
124
+ version: '3.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: simplecov
127
127
  requirement: !ruby/object:Gem::Requirement