rake_commit 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rake_commit/commit.rb +6 -2
- data/lib/rake_commit/git.rb +10 -1
- 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: 1b9f0d0536a6adc348294e3f4688fa2e99a6457f
|
4
|
+
data.tar.gz: dcf39345cbf7250a4334b1ceee434f6cbabe50a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c785b500149d04b184feac3458d6fd684b35bd157f4e0432213e48dcc1358fee7fe4d786b89107c697b705b92f63e237759ee4d91913d7ba158f1ca1cb256a64
|
7
|
+
data.tar.gz: 03fd8ef87657c12ef3ef413afc8ae454eac7c5731319095663548b0585717ee3442912e4028eb37ac3553d1714046e2f51c96532430ec0cbcd4e957c40f8ca2a
|
data/lib/rake_commit/commit.rb
CHANGED
@@ -30,7 +30,7 @@ module RakeCommit
|
|
30
30
|
if git_svn?
|
31
31
|
RakeCommit::GitSvn.new(options[:prompt_exclusions]).commit
|
32
32
|
elsif git?
|
33
|
-
RakeCommit::Git.new(options[:collapse_commits], options[:incremental], options[:prompt_exclusions], options[:precommit]).commit
|
33
|
+
RakeCommit::Git.new(options[:collapse_commits], options[:rebase_only], options[:incremental], options[:prompt_exclusions], options[:precommit]).commit
|
34
34
|
else
|
35
35
|
RakeCommit::Svn.new(options[:prompt_exclusions]).commit
|
36
36
|
end
|
@@ -46,9 +46,13 @@ module RakeCommit
|
|
46
46
|
opts.on("-i", "--incremental", "Prompt for a local commit") do
|
47
47
|
options[:incremental] = true
|
48
48
|
end
|
49
|
-
opts.on("-n", "--no-collapse", "Run the build and push without collapsing commits") do
|
49
|
+
opts.on("-n", "--no-collapse", "Run the build and push without pulling or collapsing commits") do
|
50
50
|
options[:collapse_commits] = false
|
51
51
|
end
|
52
|
+
opts.on("-r", "--rebase-only", "Pull and rebase (without collapsing existing commits), then build and push") do
|
53
|
+
options[:collapse_commits] = false
|
54
|
+
options[:rebase_only] = true
|
55
|
+
end
|
52
56
|
opts.on("-w", "--without-prompt PROMPT", "Skips the given prompt (author, feature, message)") do |prompt_exclusion|
|
53
57
|
options[:prompt_exclusions] << prompt_exclusion
|
54
58
|
end
|
data/lib/rake_commit/git.rb
CHANGED
@@ -3,8 +3,9 @@ require 'shellwords'
|
|
3
3
|
module RakeCommit
|
4
4
|
class Git
|
5
5
|
|
6
|
-
def initialize(collapse_commits = true, incremental = false, prompt_exclusions = [], precommit = nil)
|
6
|
+
def initialize(collapse_commits = true, rebase_only = false, incremental = false, prompt_exclusions = [], precommit = nil)
|
7
7
|
@collapse_commits = collapse_commits
|
8
|
+
@rebase_only = rebase_only
|
8
9
|
@incremental = incremental
|
9
10
|
@prompt_exclusions = prompt_exclusions
|
10
11
|
@precommit = precommit
|
@@ -20,6 +21,10 @@ module RakeCommit
|
|
20
21
|
else
|
21
22
|
if collapse_git_commits?
|
22
23
|
return unless collapse_git_commits
|
24
|
+
elsif rebase_only?
|
25
|
+
add
|
26
|
+
incremental_commit unless nothing_to_commit?
|
27
|
+
pull_rebase rescue return false
|
23
28
|
end
|
24
29
|
RakeCommit::Shell.system("rake")
|
25
30
|
push
|
@@ -38,6 +43,10 @@ module RakeCommit
|
|
38
43
|
input == "y"
|
39
44
|
end
|
40
45
|
|
46
|
+
def rebase_only?
|
47
|
+
!!@rebase_only
|
48
|
+
end
|
49
|
+
|
41
50
|
def rebase_continue
|
42
51
|
RakeCommit::Shell.system("git rebase --continue")
|
43
52
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake_commit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Gross
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: See http://github.com/pgr0ss/rake_commit
|
14
14
|
email: pgross@gmail.com
|
@@ -49,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
49
49
|
version: '0'
|
50
50
|
requirements: []
|
51
51
|
rubyforge_project: rake_commit
|
52
|
-
rubygems_version: 2.2.
|
52
|
+
rubygems_version: 2.2.2
|
53
53
|
signing_key:
|
54
54
|
specification_version: 4
|
55
55
|
summary: A gem which helps with checking in code
|