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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffbc74c18b780690aa2bc17d03f761587e25af5f
4
- data.tar.gz: 63e054091b6b4ce79382cc006ad6ced1a1854feb
3
+ metadata.gz: 4562478a934a5f5508a128e402c8c9f427b753ef
4
+ data.tar.gz: bc858f83d829676f7850cb6a5cc3b27f2abcecb4
5
5
  SHA512:
6
- metadata.gz: 44b1113f451e96e94a147eaef737b0a42f728bb360a9e738da18d723ea6df2f86a435e163fee99989d27c94e3e11d9833c2bef53599ffc238499f8bd36744db9
7
- data.tar.gz: 5048811fc9f795f457be2e98bc27465063beb295495954cc50038d196fce4e77f36b6529de78b83d4d2529349cb0164212282203f87ba4b7745d26a4c9badec9
6
+ metadata.gz: d8079c98abe3278a5442e875f409c42f88075413500576ce7b086c4b0e568557bd01b9f8aef2313773135d8402f0f31880edf44407ebfa650aacaf9398300a83
7
+ data.tar.gz: 3dea86ab44728d7708a7c93845c89911e102ae5da853253eee33ce886fc823ed784e996e256acf392983696c7ecff54fff885c32e637cae5ff161419290c0bc6
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Overcommit
2
- VERSION = '0.2.6'
2
+ VERSION = '0.3.0'
3
3
  end
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.2.6
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-09-15 00:00:00.000000000 Z
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/change_id.rb
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/yaml_syntax.rb
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/python_flake8.rb
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/restricted_paths.rb
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/logger.rb
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/hooks/prepare-commit-msg
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: