rake_commit 1.1.0 → 1.2.0
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 +4 -4
- data/lib/rake_commit/commit.rb +6 -2
- data/lib/rake_commit/git.rb +4 -3
- 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: 8ea1f63f9545e05c6ac0a8ea9da6c7bc97748667
|
4
|
+
data.tar.gz: 7850c7d442419a515964e4e47cbcff9f64d85cbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5241e7795d91d35c00ed80c63bc78e96682c4be76fc7944d00f641e4da72a1af2ffe1147b23b2f1713fe8e64239e12d0c641906ca6527ecebc4eb1d08521cef
|
7
|
+
data.tar.gz: 910b3d3d580b38e8f13f4287d1dac46ff04e1b91f97521ebd41c0200cdebb9d26fb9f4261324f1bc42df26c15e6fccfb6f055ea3fcc1ba50ba0279df96855de8
|
data/lib/rake_commit/commit.rb
CHANGED
@@ -18,7 +18,8 @@ module RakeCommit
|
|
18
18
|
options = {
|
19
19
|
:collapse_commits => true,
|
20
20
|
:incremental => false,
|
21
|
-
:prompt_exclusions => []
|
21
|
+
:prompt_exclusions => [],
|
22
|
+
:build_command => "rake"
|
22
23
|
}
|
23
24
|
|
24
25
|
if File.exists?(".rake_commit")
|
@@ -30,7 +31,7 @@ module RakeCommit
|
|
30
31
|
if git_svn?
|
31
32
|
RakeCommit::GitSvn.new(options[:prompt_exclusions]).commit
|
32
33
|
elsif git?
|
33
|
-
RakeCommit::Git.new(options[:collapse_commits], options[:rebase_only], options[:incremental], options[:prompt_exclusions], options[:precommit]).commit
|
34
|
+
RakeCommit::Git.new(options[:build_command], options[:collapse_commits], options[:rebase_only], options[:incremental], options[:prompt_exclusions], options[:precommit]).commit
|
34
35
|
else
|
35
36
|
RakeCommit::Svn.new(options[:prompt_exclusions]).commit
|
36
37
|
end
|
@@ -59,6 +60,9 @@ module RakeCommit
|
|
59
60
|
opts.on("-p", "--precommit SCRIPT", "command to run before commiting changes") do |command|
|
60
61
|
options[:precommit] = command
|
61
62
|
end
|
63
|
+
opts.on("-b", "--build-command SCRIPT", "the command that verifies the commit, defaults to rake") do |command|
|
64
|
+
options[:build_command] = command
|
65
|
+
end
|
62
66
|
end
|
63
67
|
|
64
68
|
parser.parse(args)
|
data/lib/rake_commit/git.rb
CHANGED
@@ -3,7 +3,8 @@ require 'shellwords'
|
|
3
3
|
module RakeCommit
|
4
4
|
class Git
|
5
5
|
|
6
|
-
def initialize(collapse_commits = true, rebase_only = false, incremental = false, prompt_exclusions = [], precommit = nil)
|
6
|
+
def initialize(build_command, collapse_commits = true, rebase_only = false, incremental = false, prompt_exclusions = [], precommit = nil)
|
7
|
+
@build_command = build_command
|
7
8
|
@collapse_commits = collapse_commits
|
8
9
|
@rebase_only = rebase_only
|
9
10
|
@incremental = incremental
|
@@ -16,7 +17,7 @@ module RakeCommit
|
|
16
17
|
incremental_commit
|
17
18
|
elsif rebase_in_progress?
|
18
19
|
rebase_continue
|
19
|
-
RakeCommit::Shell.system(
|
20
|
+
RakeCommit::Shell.system(@build_command)
|
20
21
|
push
|
21
22
|
else
|
22
23
|
if collapse_git_commits?
|
@@ -26,7 +27,7 @@ module RakeCommit
|
|
26
27
|
incremental_commit unless nothing_to_commit?
|
27
28
|
pull_rebase rescue return false
|
28
29
|
end
|
29
|
-
RakeCommit::Shell.system(
|
30
|
+
RakeCommit::Shell.system(@build_command)
|
30
31
|
push
|
31
32
|
end
|
32
33
|
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.
|
4
|
+
version: 1.2.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:
|
11
|
+
date: 2015-03-18 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.
|
52
|
+
rubygems_version: 2.4.6
|
53
53
|
signing_key:
|
54
54
|
specification_version: 4
|
55
55
|
summary: A gem which helps with checking in code
|