overcommit 0.2.6 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/hooks/post-checkout +1 -0
- data/bin/scripts/check-gemfile +9 -0
- data/lib/overcommit/staged_file.rb +2 -2
- data/lib/overcommit/version.rb +1 -1
- metadata +31 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4562478a934a5f5508a128e402c8c9f427b753ef
|
4
|
+
data.tar.gz: bc858f83d829676f7850cb6a5cc3b27f2abcecb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8079c98abe3278a5442e875f409c42f88075413500576ce7b086c4b0e568557bd01b9f8aef2313773135d8402f0f31880edf44407ebfa650aacaf9398300a83
|
7
|
+
data.tar.gz: 3dea86ab44728d7708a7c93845c89911e102ae5da853253eee33ce886fc823ed784e996e256acf392983696c7ecff54fff885c32e637cae5ff161419290c0bc6
|
data/bin/hooks/post-checkout
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
# Executed every time HEAD changes. The current working directory will be set to
|
4
4
|
# the top-level directory of the git repository for which this hook was fired.
|
5
|
+
.git/hooks/scripts/check-gemfile $1 $2
|
5
6
|
|
6
7
|
# Run in the background since even though it takes just over a second for a
|
7
8
|
# large repo, it's a noticeable delay.
|
@@ -0,0 +1,9 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
if [ -e Gemfile.lock ] && which bundle &> /dev/null; then
|
4
|
+
if ! git diff --exit-code $1 $2 -- Gemfile.lock &> /dev/null; then
|
5
|
+
if ! bundle check &> /dev/null; then
|
6
|
+
echo 'NOTE: Gemfile dependencies unsatisfied. You might want to `bundle install`.'
|
7
|
+
fi
|
8
|
+
fi
|
9
|
+
fi
|
@@ -6,7 +6,7 @@ require 'tempfile'
|
|
6
6
|
# to make working with staged files easier.
|
7
7
|
module Overcommit
|
8
8
|
class StagedFile
|
9
|
-
attr_reader :contents
|
9
|
+
attr_reader :contents, :original_path
|
10
10
|
|
11
11
|
def initialize(path)
|
12
12
|
@original_path = path
|
@@ -52,7 +52,7 @@ module Overcommit
|
|
52
52
|
def extract_modified_lines
|
53
53
|
lines = Set.new
|
54
54
|
|
55
|
-
`git diff --cached -U0 -- #{@original_path}`.
|
55
|
+
`git diff --no-ext-diff --cached -U0 -- #{@original_path}`.
|
56
56
|
scan(DIFF_HUNK_REGEX) do |start_line, lines_added|
|
57
57
|
|
58
58
|
lines_added = (lines_added || 1).to_i # When blank, one line was added
|
data/lib/overcommit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: overcommit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Causes Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -31,55 +31,56 @@ executables:
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
-
- lib/overcommit.rb
|
34
|
+
- lib/overcommit/git_hook.rb
|
35
|
+
- lib/overcommit/errors.rb
|
35
36
|
- lib/overcommit/version.rb
|
37
|
+
- lib/overcommit/hook_specific_check.rb
|
38
|
+
- lib/overcommit/staged_file.rb
|
36
39
|
- lib/overcommit/utils.rb
|
40
|
+
- lib/overcommit/plugins/commit_msg/hard_tabs.rb
|
37
41
|
- lib/overcommit/plugins/commit_msg/trailing_period.rb
|
38
|
-
- lib/overcommit/plugins/commit_msg/
|
42
|
+
- lib/overcommit/plugins/commit_msg/text_width.rb
|
39
43
|
- lib/overcommit/plugins/commit_msg/release_note.rb
|
40
44
|
- lib/overcommit/plugins/commit_msg/single_line_subject.rb
|
45
|
+
- lib/overcommit/plugins/commit_msg/change_id.rb
|
41
46
|
- lib/overcommit/plugins/commit_msg/russian_novel.rb
|
42
|
-
- lib/overcommit/plugins/commit_msg/hard_tabs.rb
|
43
|
-
- lib/overcommit/plugins/commit_msg/text_width.rb
|
44
|
-
- lib/overcommit/plugins/pre_commit/js_console_log.rb
|
45
|
-
- lib/overcommit/plugins/pre_commit/haml_style.rb
|
46
47
|
- lib/overcommit/plugins/pre_commit/ruby_syntax.rb
|
48
|
+
- lib/overcommit/plugins/pre_commit/restricted_paths.rb
|
49
|
+
- lib/overcommit/plugins/pre_commit/scss_lint.rb
|
50
|
+
- lib/overcommit/plugins/pre_commit/css_linter.rb
|
47
51
|
- lib/overcommit/plugins/pre_commit/js_syntax.rb
|
48
|
-
- lib/overcommit/plugins/pre_commit/
|
49
|
-
- lib/overcommit/plugins/pre_commit/haml_syntax.rb
|
52
|
+
- lib/overcommit/plugins/pre_commit/python_flake8.rb
|
50
53
|
- lib/overcommit/plugins/pre_commit/causes_email.rb
|
51
|
-
- lib/overcommit/plugins/pre_commit/author_name.rb
|
52
54
|
- lib/overcommit/plugins/pre_commit/whitespace.rb
|
53
|
-
- lib/overcommit/plugins/pre_commit/
|
55
|
+
- lib/overcommit/plugins/pre_commit/yaml_syntax.rb
|
54
56
|
- lib/overcommit/plugins/pre_commit/coffee_lint.rb
|
55
57
|
- lib/overcommit/plugins/pre_commit/test_history.rb
|
56
|
-
- lib/overcommit/plugins/pre_commit/
|
58
|
+
- lib/overcommit/plugins/pre_commit/author_name.rb
|
59
|
+
- lib/overcommit/plugins/pre_commit/haml_style.rb
|
60
|
+
- lib/overcommit/plugins/pre_commit/js_console_log.rb
|
61
|
+
- lib/overcommit/plugins/pre_commit/haml_syntax.rb
|
57
62
|
- lib/overcommit/plugins/pre_commit/ruby_style.rb
|
58
|
-
- lib/overcommit/plugins/pre_commit/scss_lint.rb
|
59
|
-
- lib/overcommit/plugins/pre_commit/css_linter.rb
|
60
|
-
- lib/overcommit/staged_file.rb
|
61
|
-
- lib/overcommit/reporter.rb
|
62
|
-
- lib/overcommit/hook_specific_check.rb
|
63
|
-
- lib/overcommit/installer.rb
|
64
|
-
- lib/overcommit/errors.rb
|
65
|
-
- lib/overcommit/git_hook.rb
|
66
|
-
- lib/overcommit/configuration.rb
|
67
63
|
- lib/overcommit/hooks/pre_commit.rb
|
68
64
|
- lib/overcommit/hooks/commit_msg.rb
|
69
|
-
- lib/overcommit/
|
65
|
+
- lib/overcommit/configuration.rb
|
70
66
|
- lib/overcommit/cli.rb
|
67
|
+
- lib/overcommit/reporter.rb
|
68
|
+
- lib/overcommit/logger.rb
|
69
|
+
- lib/overcommit/installer.rb
|
70
|
+
- lib/overcommit.rb
|
71
71
|
- bin/run-hook
|
72
|
-
- bin/scripts/index-tags
|
73
|
-
- bin/scripts/gerrit-change-id
|
74
|
-
- bin/scripts/jshint.js
|
75
|
-
- bin/scripts/csslint-rhino.js
|
76
|
-
- bin/scripts/jshint_runner.js
|
77
72
|
- bin/overcommit
|
78
|
-
- bin/hooks/commit-msg
|
73
|
+
- bin/hooks/prepare-commit-msg
|
79
74
|
- bin/hooks/post-checkout
|
75
|
+
- bin/hooks/commit-msg
|
80
76
|
- bin/hooks/post-merge
|
81
77
|
- bin/hooks/pre-commit
|
82
|
-
- bin/
|
78
|
+
- bin/scripts/jshint.js
|
79
|
+
- bin/scripts/jshint_runner.js
|
80
|
+
- bin/scripts/check-gemfile
|
81
|
+
- bin/scripts/index-tags
|
82
|
+
- bin/scripts/csslint-rhino.js
|
83
|
+
- bin/scripts/gerrit-change-id
|
83
84
|
- config/templates.yml
|
84
85
|
homepage: http://github.com/causes/overcommit
|
85
86
|
licenses:
|