git_reflow 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.rdoc +8 -0
- data/lib/git_reflow.rb +6 -2
- data/lib/git_reflow/version.rb +1 -1
- data/spec/git_reflow_spec.rb +32 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a03428bd10395a06f13dba78ed2d3c0f5a44d365
|
4
|
+
data.tar.gz: 39ccbe0eba5a4bc2d1c8dd4f773abdaf2a4494e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf391753fa8dce7bbc246b1310e83b7a30407462b69bb5a99e675b07adf3ca5ecf5a54b50e425db533a8d97f0b9b889c263010fbb60e3b2dc23da1e3a2cd6025
|
7
|
+
data.tar.gz: dcfad07027cc0a827a62b614c2a8b1f201df578a46b8c8a710758c3103dffa1bfb4276d30908ab091bb55449bbbbe33bd9b85a6a0d1bdc7d069fcec868373b3f
|
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
@@ -310,6 +310,14 @@ http://reenhanced.com/images/reflow.png
|
|
310
310
|
Squash commits to master mean every commit represents the whole feature, not a "typo fix".
|
311
311
|
|
312
312
|
|
313
|
+
== Configuration
|
314
|
+
|
315
|
+
In order to streamline delivery you can set the following git config to
|
316
|
+
always push the branch after merge and clean up the feature branch.
|
317
|
+
|
318
|
+
git config --global --add "reflow.always-deploy-and-cleanup" "true"
|
319
|
+
|
320
|
+
|
313
321
|
---
|
314
322
|
|
315
323
|
== Contributing
|
data/lib/git_reflow.rb
CHANGED
@@ -99,8 +99,12 @@ module GitReflow
|
|
99
99
|
|
100
100
|
if committed
|
101
101
|
say "Merge complete!", :success
|
102
|
-
|
103
|
-
if
|
102
|
+
|
103
|
+
# check if user always wants to push and cleanup, otherwise ask
|
104
|
+
always_deploy_and_cleanup = GitReflow::Config.get('reflow.always-deploy-and-cleanup') == "true"
|
105
|
+
deploy_and_cleanup = always_deploy_and_cleanup || (ask "Would you like to push this branch to your remote repo and cleanup your feature branch? ") =~ /^y/i
|
106
|
+
|
107
|
+
if deploy_and_cleanup
|
104
108
|
run_command_with_label "git push origin #{options['base']}"
|
105
109
|
run_command_with_label "git push origin :#{feature_branch}"
|
106
110
|
run_command_with_label "git branch -D #{feature_branch}"
|
data/lib/git_reflow/version.rb
CHANGED
data/spec/git_reflow_spec.rb
CHANGED
@@ -281,17 +281,42 @@ describe GitReflow do
|
|
281
281
|
end
|
282
282
|
end
|
283
283
|
|
284
|
-
|
285
|
-
|
286
|
-
|
284
|
+
context "not always" do
|
285
|
+
before do
|
286
|
+
GitReflow::Config.stub(:get) { "false" }
|
287
|
+
end
|
288
|
+
|
289
|
+
it "pushes local squash merged base branch to remote repo" do
|
290
|
+
expect { subject }.to have_run_command("git push origin master")
|
291
|
+
end
|
287
292
|
|
288
|
-
|
289
|
-
|
293
|
+
it "deletes the remote feature branch" do
|
294
|
+
expect { subject }.to have_run_command("git push origin :new-feature")
|
295
|
+
end
|
296
|
+
|
297
|
+
it "deletes the local feature branch" do
|
298
|
+
expect { subject }.to have_run_command("git branch -D new-feature")
|
299
|
+
end
|
290
300
|
end
|
291
301
|
|
292
|
-
|
293
|
-
|
302
|
+
context "always" do
|
303
|
+
before do
|
304
|
+
GitReflow::Config.stub(:get) { "true" }
|
305
|
+
end
|
306
|
+
|
307
|
+
it "pushes local squash merged base branch to remote repo" do
|
308
|
+
expect { subject }.to have_run_command("git push origin master")
|
309
|
+
end
|
310
|
+
|
311
|
+
it "deletes the remote feature branch" do
|
312
|
+
expect { subject }.to have_run_command("git push origin :new-feature")
|
313
|
+
end
|
314
|
+
|
315
|
+
it "deletes the local feature branch" do
|
316
|
+
expect { subject }.to have_run_command("git branch -D new-feature")
|
317
|
+
end
|
294
318
|
end
|
319
|
+
|
295
320
|
end
|
296
321
|
|
297
322
|
context "and not cleaning up feature branch" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git_reflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Valentino Stoll
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-08-
|
13
|
+
date: 2015-08-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: appraisal
|
@@ -306,7 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
306
|
version: '0'
|
307
307
|
requirements: []
|
308
308
|
rubyforge_project:
|
309
|
-
rubygems_version: 2.4.
|
309
|
+
rubygems_version: 2.4.5.1
|
310
310
|
signing_key:
|
311
311
|
specification_version: 4
|
312
312
|
summary: A better git process
|