overcommit 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/overcommit +3 -4
- data/config/default.yml +139 -0
- data/lib/overcommit.rb +7 -5
- data/lib/overcommit/cli.rb +59 -64
- data/lib/overcommit/configuration.rb +108 -34
- data/lib/overcommit/configuration_loader.rb +47 -0
- data/lib/overcommit/constants.rb +7 -0
- data/lib/overcommit/exceptions.rb +16 -0
- data/lib/overcommit/hook/base.rb +91 -0
- data/lib/overcommit/hook/commit_msg/base.rb +11 -0
- data/lib/overcommit/hook/commit_msg/gerrit_change_id.rb +18 -0
- data/lib/overcommit/{plugins → hook}/commit_msg/hard_tabs.rb +5 -6
- data/lib/overcommit/hook/commit_msg/russian_novel.rb +14 -0
- data/lib/overcommit/hook/commit_msg/single_line_subject.rb +12 -0
- data/lib/overcommit/hook/commit_msg/text_width.rb +20 -0
- data/lib/overcommit/hook/commit_msg/trailing_period.rb +12 -0
- data/lib/overcommit/hook/post_checkout/base.rb +11 -0
- data/lib/overcommit/hook/post_checkout/bundle_check.rb +29 -0
- data/lib/overcommit/hook/post_checkout/index_tags.rb +24 -0
- data/lib/overcommit/hook/pre_commit/author_email.rb +17 -0
- data/lib/overcommit/hook/pre_commit/author_name.rb +17 -0
- data/lib/overcommit/hook/pre_commit/base.rb +10 -0
- data/lib/overcommit/hook/pre_commit/bundle_check.rb +30 -0
- data/lib/overcommit/hook/pre_commit/coffee_lint.rb +14 -0
- data/lib/overcommit/hook/pre_commit/css_lint.rb +16 -0
- data/lib/overcommit/hook/pre_commit/haml_lint.rb +26 -0
- data/lib/overcommit/hook/pre_commit/hard_tabs.rb +16 -0
- data/lib/overcommit/hook/pre_commit/image_optim.rb +41 -0
- data/lib/overcommit/hook/pre_commit/js_hint.rb +15 -0
- data/lib/overcommit/hook/pre_commit/jscs.rb +31 -0
- data/lib/overcommit/hook/pre_commit/python_flake8.rb +14 -0
- data/lib/overcommit/hook/pre_commit/rubocop.rb +26 -0
- data/lib/overcommit/hook/pre_commit/scss_lint.rb +26 -0
- data/lib/overcommit/hook/pre_commit/trailing_whitespace.rb +15 -0
- data/lib/overcommit/hook/pre_commit/yaml_syntax.rb +22 -0
- data/lib/overcommit/hook_context.rb +16 -0
- data/lib/overcommit/hook_context/base.rb +68 -0
- data/lib/overcommit/hook_context/commit_msg.rb +32 -0
- data/lib/overcommit/hook_context/post_checkout.rb +24 -0
- data/lib/overcommit/hook_context/pre_commit.rb +96 -0
- data/lib/overcommit/hook_runner.rb +150 -0
- data/lib/overcommit/installer.rb +61 -68
- data/lib/overcommit/logger.rb +16 -13
- data/lib/overcommit/utils.rb +63 -38
- data/lib/overcommit/version.rb +1 -1
- data/{bin/scripts → libexec}/gerrit-change-id +0 -0
- data/{bin/scripts → libexec}/index-tags +1 -3
- data/template-dir/hooks/commit-msg +83 -0
- data/template-dir/hooks/overcommit-hook +83 -0
- data/template-dir/hooks/post-checkout +83 -0
- data/template-dir/hooks/pre-commit +83 -0
- metadata +76 -57
- data/bin/hooks/commit-msg +0 -8
- data/bin/hooks/post-checkout +0 -9
- data/bin/hooks/post-merge +0 -23
- data/bin/hooks/pre-commit +0 -8
- data/bin/hooks/prepare-commit-msg +0 -159
- data/bin/run-hook +0 -8
- data/bin/scripts/check-gemfile +0 -9
- data/bin/scripts/csslint-rhino.js +0 -9080
- data/bin/scripts/jshint.js +0 -5921
- data/bin/scripts/jshint_runner.js +0 -42
- data/lib/overcommit/errors.rb +0 -3
- data/lib/overcommit/git_hook.rb +0 -89
- data/lib/overcommit/hook_specific_check.rb +0 -110
- data/lib/overcommit/hooks/commit_msg.rb +0 -7
- data/lib/overcommit/hooks/pre_commit.rb +0 -9
- data/lib/overcommit/plugins/commit_msg/change_id.rb +0 -15
- data/lib/overcommit/plugins/commit_msg/release_note.rb +0 -25
- data/lib/overcommit/plugins/commit_msg/russian_novel.rb +0 -16
- data/lib/overcommit/plugins/commit_msg/single_line_subject.rb +0 -13
- data/lib/overcommit/plugins/commit_msg/text_width.rb +0 -20
- data/lib/overcommit/plugins/commit_msg/trailing_period.rb +0 -13
- data/lib/overcommit/plugins/pre_commit/author_name.rb +0 -16
- data/lib/overcommit/plugins/pre_commit/causes_email.rb +0 -15
- data/lib/overcommit/plugins/pre_commit/coffee_lint.rb +0 -16
- data/lib/overcommit/plugins/pre_commit/css_linter.rb +0 -17
- data/lib/overcommit/plugins/pre_commit/haml_style.rb +0 -34
- data/lib/overcommit/plugins/pre_commit/haml_syntax.rb +0 -24
- data/lib/overcommit/plugins/pre_commit/image_optimization.rb +0 -50
- data/lib/overcommit/plugins/pre_commit/js_console_log.rb +0 -16
- data/lib/overcommit/plugins/pre_commit/js_syntax.rb +0 -30
- data/lib/overcommit/plugins/pre_commit/python_flake8.rb +0 -15
- data/lib/overcommit/plugins/pre_commit/ruby_style.rb +0 -67
- data/lib/overcommit/plugins/pre_commit/ruby_syntax.rb +0 -19
- data/lib/overcommit/plugins/pre_commit/scss_lint.rb +0 -66
- data/lib/overcommit/plugins/pre_commit/test_history.rb +0 -58
- data/lib/overcommit/plugins/pre_commit/whitespace.rb +0 -21
- data/lib/overcommit/plugins/pre_commit/yaml_syntax.rb +0 -22
- data/lib/overcommit/reporter.rb +0 -90
- data/lib/overcommit/staged_file.rb +0 -86
data/lib/overcommit/version.rb
CHANGED
File without changes
|
@@ -6,13 +6,11 @@
|
|
6
6
|
|
7
7
|
set -e
|
8
8
|
|
9
|
-
ctags --version &> /dev/null || exit 0
|
10
|
-
|
11
9
|
trap "rm -f .git/tags.$$" EXIT
|
12
10
|
err_file=.git/ctags.err
|
13
11
|
if ctags --tag-relative -Rf.git/tags.$$ --exclude=.git "$@" 2>${err_file}; then
|
14
12
|
mv .git/tags.$$ .git/tags
|
15
|
-
[ -e ${err_file} ] && rm ${err_file}
|
13
|
+
[ -e ${err_file} ] && rm -f ${err_file}
|
16
14
|
else
|
17
15
|
# Ignore STDERR unless `ctags` returned a non-zero exit code
|
18
16
|
cat ${err_file}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Entrypoint for Overcommit hook integration. Installing Overcommit will result
|
4
|
+
# in all of your git hooks being symlinked to this file, allowing the framework
|
5
|
+
# to manage your hooks for you.
|
6
|
+
|
7
|
+
# Required for Ruby 1.8 compatibility (for older OSX versions)
|
8
|
+
if RUBY_VERSION.split('.')[0..1] == ['1', '8']
|
9
|
+
require 'rubygems'
|
10
|
+
end
|
11
|
+
|
12
|
+
hook_type = File.basename($0)
|
13
|
+
if hook_type == 'overcommit-hook'
|
14
|
+
puts "Don't run `overcommit-hook` directly; it is intended to be symlinked " <<
|
15
|
+
"by each hook in a repository's .git/hooks directory."
|
16
|
+
exit 64 # EX_USAGE
|
17
|
+
end
|
18
|
+
|
19
|
+
begin
|
20
|
+
require 'overcommit'
|
21
|
+
rescue LoadError
|
22
|
+
puts 'Overcommit is not installed. Install it to manage git hooks for ' <<
|
23
|
+
'this repository? (y/n)'
|
24
|
+
|
25
|
+
# If the hook isn't interactive, we need to map STDIN to keyboard manually
|
26
|
+
STDIN.reopen('/dev/tty') if STDIN.eof?
|
27
|
+
|
28
|
+
if (answer = gets) && answer.strip.downcase.start_with?('y')
|
29
|
+
if system('gem install overcommit')
|
30
|
+
Gem.clear_paths # Reset load paths so newly installed gem is found
|
31
|
+
require 'overcommit'
|
32
|
+
else
|
33
|
+
puts 'Unable to install Overcommit -- try running `gem install overcommit`'
|
34
|
+
exit 69 # EX_UNAVAILABLE
|
35
|
+
end
|
36
|
+
else
|
37
|
+
puts 'You chose not to install Overcommit'
|
38
|
+
puts "No hooks were run for '#{hook_type}'"
|
39
|
+
exit
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
if Gem::Version.new(Overcommit::VERSION) < Gem::Version.new('0.6.0')
|
44
|
+
puts "Installed version of Overcommit (#{Overcommit::VERSION}) is " <<
|
45
|
+
"incompatible with the installed hooks.\n" <<
|
46
|
+
'Run `gem install overcommit && overcommit --install` to ensure ' <<
|
47
|
+
"you're up-to-date."
|
48
|
+
exit 64 # EX_USAGE
|
49
|
+
end
|
50
|
+
|
51
|
+
begin
|
52
|
+
hook_type_class = Overcommit::Utils.camel_case(hook_type)
|
53
|
+
|
54
|
+
config = Overcommit::ConfigurationLoader.load_repo_config
|
55
|
+
config.apply_environment!(hook_type_class, ENV)
|
56
|
+
|
57
|
+
# Ensure this script and all symlinks are always up-to-date (it's cheap to do)
|
58
|
+
Overcommit::Installer.new(Overcommit::Logger.silent).
|
59
|
+
run(Overcommit::Utils.repo_root, :action => :install)
|
60
|
+
|
61
|
+
context = Overcommit::HookContext.create(hook_type_class, config, ARGV, STDIN)
|
62
|
+
logger = Overcommit::Logger.new(STDOUT)
|
63
|
+
runner = Overcommit::HookRunner.new(config, logger, context)
|
64
|
+
|
65
|
+
status = runner.run
|
66
|
+
|
67
|
+
exit(status ? 0 : 65) # 65 = EX_DATAERR
|
68
|
+
rescue Overcommit::Exceptions::ConfigurationError => error
|
69
|
+
puts error
|
70
|
+
exit 78 # EX_CONFIG
|
71
|
+
rescue Overcommit::Exceptions::HookContextLoadError => error
|
72
|
+
puts error
|
73
|
+
puts 'Are you running an old version of Overcommit?'
|
74
|
+
exit 69 # EX_UNAVAILABLE
|
75
|
+
rescue Overcommit::Exceptions::InvalidGitRepo => error
|
76
|
+
puts error
|
77
|
+
exit 64 # EX_USAGE
|
78
|
+
rescue => error
|
79
|
+
puts error.message
|
80
|
+
puts error.backtrace
|
81
|
+
puts "Report this bug at #{Overcommit::BUG_REPORT_URL}"
|
82
|
+
exit 70 # EX_SOFTWARE
|
83
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Entrypoint for Overcommit hook integration. Installing Overcommit will result
|
4
|
+
# in all of your git hooks being symlinked to this file, allowing the framework
|
5
|
+
# to manage your hooks for you.
|
6
|
+
|
7
|
+
# Required for Ruby 1.8 compatibility (for older OSX versions)
|
8
|
+
if RUBY_VERSION.split('.')[0..1] == ['1', '8']
|
9
|
+
require 'rubygems'
|
10
|
+
end
|
11
|
+
|
12
|
+
hook_type = File.basename($0)
|
13
|
+
if hook_type == 'overcommit-hook'
|
14
|
+
puts "Don't run `overcommit-hook` directly; it is intended to be symlinked " <<
|
15
|
+
"by each hook in a repository's .git/hooks directory."
|
16
|
+
exit 64 # EX_USAGE
|
17
|
+
end
|
18
|
+
|
19
|
+
begin
|
20
|
+
require 'overcommit'
|
21
|
+
rescue LoadError
|
22
|
+
puts 'Overcommit is not installed. Install it to manage git hooks for ' <<
|
23
|
+
'this repository? (y/n)'
|
24
|
+
|
25
|
+
# If the hook isn't interactive, we need to map STDIN to keyboard manually
|
26
|
+
STDIN.reopen('/dev/tty') if STDIN.eof?
|
27
|
+
|
28
|
+
if (answer = gets) && answer.strip.downcase.start_with?('y')
|
29
|
+
if system('gem install overcommit')
|
30
|
+
Gem.clear_paths # Reset load paths so newly installed gem is found
|
31
|
+
require 'overcommit'
|
32
|
+
else
|
33
|
+
puts 'Unable to install Overcommit -- try running `gem install overcommit`'
|
34
|
+
exit 69 # EX_UNAVAILABLE
|
35
|
+
end
|
36
|
+
else
|
37
|
+
puts 'You chose not to install Overcommit'
|
38
|
+
puts "No hooks were run for '#{hook_type}'"
|
39
|
+
exit
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
if Gem::Version.new(Overcommit::VERSION) < Gem::Version.new('0.6.0')
|
44
|
+
puts "Installed version of Overcommit (#{Overcommit::VERSION}) is " <<
|
45
|
+
"incompatible with the installed hooks.\n" <<
|
46
|
+
'Run `gem install overcommit && overcommit --install` to ensure ' <<
|
47
|
+
"you're up-to-date."
|
48
|
+
exit 64 # EX_USAGE
|
49
|
+
end
|
50
|
+
|
51
|
+
begin
|
52
|
+
hook_type_class = Overcommit::Utils.camel_case(hook_type)
|
53
|
+
|
54
|
+
config = Overcommit::ConfigurationLoader.load_repo_config
|
55
|
+
config.apply_environment!(hook_type_class, ENV)
|
56
|
+
|
57
|
+
# Ensure this script and all symlinks are always up-to-date (it's cheap to do)
|
58
|
+
Overcommit::Installer.new(Overcommit::Logger.silent).
|
59
|
+
run(Overcommit::Utils.repo_root, :action => :install)
|
60
|
+
|
61
|
+
context = Overcommit::HookContext.create(hook_type_class, config, ARGV, STDIN)
|
62
|
+
logger = Overcommit::Logger.new(STDOUT)
|
63
|
+
runner = Overcommit::HookRunner.new(config, logger, context)
|
64
|
+
|
65
|
+
status = runner.run
|
66
|
+
|
67
|
+
exit(status ? 0 : 65) # 65 = EX_DATAERR
|
68
|
+
rescue Overcommit::Exceptions::ConfigurationError => error
|
69
|
+
puts error
|
70
|
+
exit 78 # EX_CONFIG
|
71
|
+
rescue Overcommit::Exceptions::HookContextLoadError => error
|
72
|
+
puts error
|
73
|
+
puts 'Are you running an old version of Overcommit?'
|
74
|
+
exit 69 # EX_UNAVAILABLE
|
75
|
+
rescue Overcommit::Exceptions::InvalidGitRepo => error
|
76
|
+
puts error
|
77
|
+
exit 64 # EX_USAGE
|
78
|
+
rescue => error
|
79
|
+
puts error.message
|
80
|
+
puts error.backtrace
|
81
|
+
puts "Report this bug at #{Overcommit::BUG_REPORT_URL}"
|
82
|
+
exit 70 # EX_SOFTWARE
|
83
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Entrypoint for Overcommit hook integration. Installing Overcommit will result
|
4
|
+
# in all of your git hooks being symlinked to this file, allowing the framework
|
5
|
+
# to manage your hooks for you.
|
6
|
+
|
7
|
+
# Required for Ruby 1.8 compatibility (for older OSX versions)
|
8
|
+
if RUBY_VERSION.split('.')[0..1] == ['1', '8']
|
9
|
+
require 'rubygems'
|
10
|
+
end
|
11
|
+
|
12
|
+
hook_type = File.basename($0)
|
13
|
+
if hook_type == 'overcommit-hook'
|
14
|
+
puts "Don't run `overcommit-hook` directly; it is intended to be symlinked " <<
|
15
|
+
"by each hook in a repository's .git/hooks directory."
|
16
|
+
exit 64 # EX_USAGE
|
17
|
+
end
|
18
|
+
|
19
|
+
begin
|
20
|
+
require 'overcommit'
|
21
|
+
rescue LoadError
|
22
|
+
puts 'Overcommit is not installed. Install it to manage git hooks for ' <<
|
23
|
+
'this repository? (y/n)'
|
24
|
+
|
25
|
+
# If the hook isn't interactive, we need to map STDIN to keyboard manually
|
26
|
+
STDIN.reopen('/dev/tty') if STDIN.eof?
|
27
|
+
|
28
|
+
if (answer = gets) && answer.strip.downcase.start_with?('y')
|
29
|
+
if system('gem install overcommit')
|
30
|
+
Gem.clear_paths # Reset load paths so newly installed gem is found
|
31
|
+
require 'overcommit'
|
32
|
+
else
|
33
|
+
puts 'Unable to install Overcommit -- try running `gem install overcommit`'
|
34
|
+
exit 69 # EX_UNAVAILABLE
|
35
|
+
end
|
36
|
+
else
|
37
|
+
puts 'You chose not to install Overcommit'
|
38
|
+
puts "No hooks were run for '#{hook_type}'"
|
39
|
+
exit
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
if Gem::Version.new(Overcommit::VERSION) < Gem::Version.new('0.6.0')
|
44
|
+
puts "Installed version of Overcommit (#{Overcommit::VERSION}) is " <<
|
45
|
+
"incompatible with the installed hooks.\n" <<
|
46
|
+
'Run `gem install overcommit && overcommit --install` to ensure ' <<
|
47
|
+
"you're up-to-date."
|
48
|
+
exit 64 # EX_USAGE
|
49
|
+
end
|
50
|
+
|
51
|
+
begin
|
52
|
+
hook_type_class = Overcommit::Utils.camel_case(hook_type)
|
53
|
+
|
54
|
+
config = Overcommit::ConfigurationLoader.load_repo_config
|
55
|
+
config.apply_environment!(hook_type_class, ENV)
|
56
|
+
|
57
|
+
# Ensure this script and all symlinks are always up-to-date (it's cheap to do)
|
58
|
+
Overcommit::Installer.new(Overcommit::Logger.silent).
|
59
|
+
run(Overcommit::Utils.repo_root, :action => :install)
|
60
|
+
|
61
|
+
context = Overcommit::HookContext.create(hook_type_class, config, ARGV, STDIN)
|
62
|
+
logger = Overcommit::Logger.new(STDOUT)
|
63
|
+
runner = Overcommit::HookRunner.new(config, logger, context)
|
64
|
+
|
65
|
+
status = runner.run
|
66
|
+
|
67
|
+
exit(status ? 0 : 65) # 65 = EX_DATAERR
|
68
|
+
rescue Overcommit::Exceptions::ConfigurationError => error
|
69
|
+
puts error
|
70
|
+
exit 78 # EX_CONFIG
|
71
|
+
rescue Overcommit::Exceptions::HookContextLoadError => error
|
72
|
+
puts error
|
73
|
+
puts 'Are you running an old version of Overcommit?'
|
74
|
+
exit 69 # EX_UNAVAILABLE
|
75
|
+
rescue Overcommit::Exceptions::InvalidGitRepo => error
|
76
|
+
puts error
|
77
|
+
exit 64 # EX_USAGE
|
78
|
+
rescue => error
|
79
|
+
puts error.message
|
80
|
+
puts error.backtrace
|
81
|
+
puts "Report this bug at #{Overcommit::BUG_REPORT_URL}"
|
82
|
+
exit 70 # EX_SOFTWARE
|
83
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# Entrypoint for Overcommit hook integration. Installing Overcommit will result
|
4
|
+
# in all of your git hooks being symlinked to this file, allowing the framework
|
5
|
+
# to manage your hooks for you.
|
6
|
+
|
7
|
+
# Required for Ruby 1.8 compatibility (for older OSX versions)
|
8
|
+
if RUBY_VERSION.split('.')[0..1] == ['1', '8']
|
9
|
+
require 'rubygems'
|
10
|
+
end
|
11
|
+
|
12
|
+
hook_type = File.basename($0)
|
13
|
+
if hook_type == 'overcommit-hook'
|
14
|
+
puts "Don't run `overcommit-hook` directly; it is intended to be symlinked " <<
|
15
|
+
"by each hook in a repository's .git/hooks directory."
|
16
|
+
exit 64 # EX_USAGE
|
17
|
+
end
|
18
|
+
|
19
|
+
begin
|
20
|
+
require 'overcommit'
|
21
|
+
rescue LoadError
|
22
|
+
puts 'Overcommit is not installed. Install it to manage git hooks for ' <<
|
23
|
+
'this repository? (y/n)'
|
24
|
+
|
25
|
+
# If the hook isn't interactive, we need to map STDIN to keyboard manually
|
26
|
+
STDIN.reopen('/dev/tty') if STDIN.eof?
|
27
|
+
|
28
|
+
if (answer = gets) && answer.strip.downcase.start_with?('y')
|
29
|
+
if system('gem install overcommit')
|
30
|
+
Gem.clear_paths # Reset load paths so newly installed gem is found
|
31
|
+
require 'overcommit'
|
32
|
+
else
|
33
|
+
puts 'Unable to install Overcommit -- try running `gem install overcommit`'
|
34
|
+
exit 69 # EX_UNAVAILABLE
|
35
|
+
end
|
36
|
+
else
|
37
|
+
puts 'You chose not to install Overcommit'
|
38
|
+
puts "No hooks were run for '#{hook_type}'"
|
39
|
+
exit
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
if Gem::Version.new(Overcommit::VERSION) < Gem::Version.new('0.6.0')
|
44
|
+
puts "Installed version of Overcommit (#{Overcommit::VERSION}) is " <<
|
45
|
+
"incompatible with the installed hooks.\n" <<
|
46
|
+
'Run `gem install overcommit && overcommit --install` to ensure ' <<
|
47
|
+
"you're up-to-date."
|
48
|
+
exit 64 # EX_USAGE
|
49
|
+
end
|
50
|
+
|
51
|
+
begin
|
52
|
+
hook_type_class = Overcommit::Utils.camel_case(hook_type)
|
53
|
+
|
54
|
+
config = Overcommit::ConfigurationLoader.load_repo_config
|
55
|
+
config.apply_environment!(hook_type_class, ENV)
|
56
|
+
|
57
|
+
# Ensure this script and all symlinks are always up-to-date (it's cheap to do)
|
58
|
+
Overcommit::Installer.new(Overcommit::Logger.silent).
|
59
|
+
run(Overcommit::Utils.repo_root, :action => :install)
|
60
|
+
|
61
|
+
context = Overcommit::HookContext.create(hook_type_class, config, ARGV, STDIN)
|
62
|
+
logger = Overcommit::Logger.new(STDOUT)
|
63
|
+
runner = Overcommit::HookRunner.new(config, logger, context)
|
64
|
+
|
65
|
+
status = runner.run
|
66
|
+
|
67
|
+
exit(status ? 0 : 65) # 65 = EX_DATAERR
|
68
|
+
rescue Overcommit::Exceptions::ConfigurationError => error
|
69
|
+
puts error
|
70
|
+
exit 78 # EX_CONFIG
|
71
|
+
rescue Overcommit::Exceptions::HookContextLoadError => error
|
72
|
+
puts error
|
73
|
+
puts 'Are you running an old version of Overcommit?'
|
74
|
+
exit 69 # EX_UNAVAILABLE
|
75
|
+
rescue Overcommit::Exceptions::InvalidGitRepo => error
|
76
|
+
puts error
|
77
|
+
exit 64 # EX_USAGE
|
78
|
+
rescue => error
|
79
|
+
puts error.message
|
80
|
+
puts error.backtrace
|
81
|
+
puts "Report this bug at #{Overcommit::BUG_REPORT_URL}"
|
82
|
+
exit 70 # EX_SOFTWARE
|
83
|
+
end
|
metadata
CHANGED
@@ -1,106 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: overcommit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Causes Engineering
|
8
|
+
- Shane da Silva
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2014-02-20 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: wopen3
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - '>='
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - '>='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
13
28
|
- !ruby/object:Gem::Dependency
|
14
29
|
name: rspec
|
15
30
|
requirement: !ruby/object:Gem::Requirement
|
16
31
|
requirements:
|
17
32
|
- - '='
|
18
33
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
34
|
+
version: 2.14.1
|
20
35
|
type: :development
|
21
36
|
prerelease: false
|
22
37
|
version_requirements: !ruby/object:Gem::Requirement
|
23
38
|
requirements:
|
24
39
|
- - '='
|
25
40
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
41
|
+
version: 2.14.1
|
27
42
|
- !ruby/object:Gem::Dependency
|
28
43
|
name: image_optim
|
29
44
|
requirement: !ruby/object:Gem::Requirement
|
30
45
|
requirements:
|
31
46
|
- - '='
|
32
47
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
48
|
+
version: 0.10.2
|
34
49
|
type: :development
|
35
50
|
prerelease: false
|
36
51
|
version_requirements: !ruby/object:Gem::Requirement
|
37
52
|
requirements:
|
38
53
|
- - '='
|
39
54
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
41
|
-
description:
|
42
|
-
email:
|
55
|
+
version: 0.10.2
|
56
|
+
description: Utility to install, configure, and extend Git hooks
|
57
|
+
email:
|
58
|
+
- eng@causes.com
|
59
|
+
- shane@causes.com
|
43
60
|
executables:
|
44
61
|
- overcommit
|
45
62
|
extensions: []
|
46
63
|
extra_rdoc_files: []
|
47
64
|
files:
|
65
|
+
- bin/overcommit
|
66
|
+
- config/default.yml
|
67
|
+
- config/templates.yml
|
48
68
|
- lib/overcommit.rb
|
49
69
|
- lib/overcommit/version.rb
|
70
|
+
- lib/overcommit/hook_context.rb
|
71
|
+
- lib/overcommit/constants.rb
|
50
72
|
- lib/overcommit/utils.rb
|
51
|
-
- lib/overcommit/
|
52
|
-
- lib/overcommit/
|
53
|
-
- lib/overcommit/
|
54
|
-
- lib/overcommit/
|
55
|
-
- lib/overcommit/
|
56
|
-
- lib/overcommit/
|
57
|
-
- lib/overcommit/
|
58
|
-
- lib/overcommit/
|
59
|
-
- lib/overcommit/
|
60
|
-
- lib/overcommit/
|
61
|
-
- lib/overcommit/
|
62
|
-
- lib/overcommit/
|
63
|
-
- lib/overcommit/
|
64
|
-
- lib/overcommit/
|
65
|
-
- lib/overcommit/
|
66
|
-
- lib/overcommit/
|
67
|
-
- lib/overcommit/
|
68
|
-
- lib/overcommit/
|
69
|
-
- lib/overcommit/
|
70
|
-
- lib/overcommit/
|
71
|
-
- lib/overcommit/
|
72
|
-
- lib/overcommit/
|
73
|
-
- lib/overcommit/
|
74
|
-
- lib/overcommit/
|
75
|
-
- lib/overcommit/
|
76
|
-
- lib/overcommit/
|
73
|
+
- lib/overcommit/hook_runner.rb
|
74
|
+
- lib/overcommit/hook/commit_msg/trailing_period.rb
|
75
|
+
- lib/overcommit/hook/commit_msg/gerrit_change_id.rb
|
76
|
+
- lib/overcommit/hook/commit_msg/single_line_subject.rb
|
77
|
+
- lib/overcommit/hook/commit_msg/russian_novel.rb
|
78
|
+
- lib/overcommit/hook/commit_msg/hard_tabs.rb
|
79
|
+
- lib/overcommit/hook/commit_msg/text_width.rb
|
80
|
+
- lib/overcommit/hook/commit_msg/base.rb
|
81
|
+
- lib/overcommit/hook/post_checkout/bundle_check.rb
|
82
|
+
- lib/overcommit/hook/post_checkout/index_tags.rb
|
83
|
+
- lib/overcommit/hook/post_checkout/base.rb
|
84
|
+
- lib/overcommit/hook/base.rb
|
85
|
+
- lib/overcommit/hook/pre_commit/author_email.rb
|
86
|
+
- lib/overcommit/hook/pre_commit/image_optim.rb
|
87
|
+
- lib/overcommit/hook/pre_commit/css_lint.rb
|
88
|
+
- lib/overcommit/hook/pre_commit/bundle_check.rb
|
89
|
+
- lib/overcommit/hook/pre_commit/yaml_syntax.rb
|
90
|
+
- lib/overcommit/hook/pre_commit/trailing_whitespace.rb
|
91
|
+
- lib/overcommit/hook/pre_commit/author_name.rb
|
92
|
+
- lib/overcommit/hook/pre_commit/rubocop.rb
|
93
|
+
- lib/overcommit/hook/pre_commit/python_flake8.rb
|
94
|
+
- lib/overcommit/hook/pre_commit/js_hint.rb
|
95
|
+
- lib/overcommit/hook/pre_commit/hard_tabs.rb
|
96
|
+
- lib/overcommit/hook/pre_commit/haml_lint.rb
|
97
|
+
- lib/overcommit/hook/pre_commit/coffee_lint.rb
|
98
|
+
- lib/overcommit/hook/pre_commit/jscs.rb
|
99
|
+
- lib/overcommit/hook/pre_commit/scss_lint.rb
|
100
|
+
- lib/overcommit/hook/pre_commit/base.rb
|
101
|
+
- lib/overcommit/hook_context/pre_commit.rb
|
102
|
+
- lib/overcommit/hook_context/commit_msg.rb
|
103
|
+
- lib/overcommit/hook_context/base.rb
|
104
|
+
- lib/overcommit/hook_context/post_checkout.rb
|
77
105
|
- lib/overcommit/installer.rb
|
78
|
-
- lib/overcommit/
|
79
|
-
- lib/overcommit/
|
106
|
+
- lib/overcommit/configuration_loader.rb
|
107
|
+
- lib/overcommit/exceptions.rb
|
80
108
|
- lib/overcommit/configuration.rb
|
81
|
-
- lib/overcommit/hooks/pre_commit.rb
|
82
|
-
- lib/overcommit/hooks/commit_msg.rb
|
83
109
|
- lib/overcommit/logger.rb
|
84
110
|
- lib/overcommit/cli.rb
|
85
|
-
-
|
86
|
-
-
|
87
|
-
-
|
88
|
-
-
|
89
|
-
-
|
90
|
-
-
|
91
|
-
|
92
|
-
- bin/overcommit
|
93
|
-
- bin/hooks/commit-msg
|
94
|
-
- bin/hooks/post-checkout
|
95
|
-
- bin/hooks/post-merge
|
96
|
-
- bin/hooks/pre-commit
|
97
|
-
- bin/hooks/prepare-commit-msg
|
98
|
-
- config/templates.yml
|
99
|
-
homepage: http://github.com/causes/overcommit
|
111
|
+
- libexec/index-tags
|
112
|
+
- libexec/gerrit-change-id
|
113
|
+
- template-dir/hooks/commit-msg
|
114
|
+
- template-dir/hooks/post-checkout
|
115
|
+
- template-dir/hooks/overcommit-hook
|
116
|
+
- template-dir/hooks/pre-commit
|
117
|
+
homepage: https://github.com/causes/overcommit
|
100
118
|
licenses:
|
101
119
|
- MIT
|
102
120
|
metadata: {}
|
103
|
-
post_install_message:
|
121
|
+
post_install_message: Install hooks by running `overcommit --install` in your Git
|
122
|
+
repository
|
104
123
|
rdoc_options: []
|
105
124
|
require_paths:
|
106
125
|
- lib
|
@@ -108,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
108
127
|
requirements:
|
109
128
|
- - '>='
|
110
129
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
130
|
+
version: 1.8.7
|
112
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
132
|
requirements:
|
114
133
|
- - '>='
|
@@ -116,9 +135,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
135
|
version: '0'
|
117
136
|
requirements: []
|
118
137
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.0.
|
138
|
+
rubygems_version: 2.0.14
|
120
139
|
signing_key:
|
121
140
|
specification_version: 4
|
122
|
-
summary:
|
141
|
+
summary: Git hook manager
|
123
142
|
test_files: []
|
124
143
|
has_rdoc:
|