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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a848dbfa0ca060e1c78945ad87b11441bb8d6bb
4
- data.tar.gz: b1cf8c05a4db8375f94ecd6fb683ec60500ec582
3
+ metadata.gz: a03428bd10395a06f13dba78ed2d3c0f5a44d365
4
+ data.tar.gz: 39ccbe0eba5a4bc2d1c8dd4f773abdaf2a4494e3
5
5
  SHA512:
6
- metadata.gz: 60873747519ba15c8253e2253dad87f536c76cf5008499fd62a45d16b0ed7626289a05eb5c75b9fb16b97376ea325b8e3fb4d22c89f6a3eda468347fe6dc584c
7
- data.tar.gz: fbc7ad889fe2c9069395b5be431e32120f3788e4e6fd614e6335ef7b319ea5931d8f45ac8f70525a3c462ba19258a073b5711a3b784ac079d0b1b278342b16f9
6
+ metadata.gz: cf391753fa8dce7bbc246b1310e83b7a30407462b69bb5a99e675b07adf3ca5ecf5a54b50e425db533a8d97f0b9b889c263010fbb60e3b2dc23da1e3a2cd6025
7
+ data.tar.gz: dcfad07027cc0a827a62b614c2a8b1f201df578a46b8c8a710758c3103dffa1bfb4276d30908ab091bb55449bbbbe33bd9b85a6a0d1bdc7d069fcec868373b3f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git_reflow (0.6.4)
4
+ git_reflow (0.6.5)
5
5
  colorize (= 0.6.0)
6
6
  github_api (= 0.12.3)
7
7
  gli (= 2.12.2)
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
- deploy_and_cleanup = ask "Would you like to push this branch to your remote repo and cleanup your feature branch? "
103
- if deploy_and_cleanup =~ /^y/i
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}"
@@ -1,3 +1,3 @@
1
1
  module GitReflow
2
- VERSION = "0.6.4"
2
+ VERSION = "0.6.5"
3
3
  end
@@ -281,17 +281,42 @@ describe GitReflow do
281
281
  end
282
282
  end
283
283
 
284
- it "pushes local squash merged base branch to remote repo" do
285
- expect { subject }.to have_run_command("git push origin master")
286
- end
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
- it "deletes the remote feature branch" do
289
- expect { subject }.to have_run_command("git push origin :new-feature")
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
- it "deletes the local feature branch" do
293
- expect { subject }.to have_run_command("git branch -D new-feature")
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
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-04 00:00:00.000000000 Z
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.8
309
+ rubygems_version: 2.4.5.1
310
310
  signing_key:
311
311
  specification_version: 4
312
312
  summary: A better git process