overcommit 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,20 @@
1
+ module Overcommit::GitHook
2
+ class RubyStyle < HookSpecificCheck
3
+ include HookRegistry
4
+ file_type :rb
5
+
6
+ def run_check
7
+ unless in_path?('rubocop')
8
+ return :warn, 'rubocop not installed -- run `gem install rubocop`'
9
+ end
10
+
11
+ paths = staged.map { |s| s.path }.join(' ')
12
+
13
+ output = `rubocop #{paths} 2>&1`
14
+ return :good if $?.success?
15
+
16
+ staged.each { |s| output = s.filter_string(output) }
17
+ return :bad, output
18
+ end
19
+ end
20
+ end
@@ -1,3 +1,3 @@
1
1
  module Overcommit
2
- VERSION = '0.1.10'
2
+ VERSION = '0.1.11'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overcommit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-20 00:00:00.000000000 Z
12
+ date: 2013-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -34,53 +34,54 @@ executables:
34
34
  extensions: []
35
35
  extra_rdoc_files: []
36
36
  files:
37
- - lib/overcommit/logger.rb
38
- - lib/overcommit/installer.rb
39
- - lib/overcommit/hook_specific_check.rb
40
- - lib/overcommit/reporter.rb
41
- - lib/overcommit/staged_file.rb
42
- - lib/overcommit/plugins/commit_msg/hard_tabs.rb
43
- - lib/overcommit/plugins/commit_msg/russian_novel.rb
37
+ - lib/overcommit.rb
38
+ - lib/overcommit/version.rb
39
+ - lib/overcommit/utils.rb
40
+ - lib/overcommit/plugins/commit_msg/trailing_period.rb
41
+ - lib/overcommit/plugins/commit_msg/change_id.rb
44
42
  - lib/overcommit/plugins/commit_msg/release_note.rb
45
43
  - lib/overcommit/plugins/commit_msg/single_line_subject.rb
46
- - lib/overcommit/plugins/commit_msg/change_id.rb
44
+ - lib/overcommit/plugins/commit_msg/russian_novel.rb
45
+ - lib/overcommit/plugins/commit_msg/hard_tabs.rb
47
46
  - lib/overcommit/plugins/commit_msg/text_width.rb
48
- - lib/overcommit/plugins/commit_msg/trailing_period.rb
47
+ - lib/overcommit/plugins/pre_commit/erb_syntax.rb
48
+ - lib/overcommit/plugins/pre_commit/js_console_log.rb
49
+ - lib/overcommit/plugins/pre_commit/ruby_syntax.rb
49
50
  - lib/overcommit/plugins/pre_commit/js_syntax.rb
50
- - lib/overcommit/plugins/pre_commit/test_history.rb
51
51
  - lib/overcommit/plugins/pre_commit/yaml_syntax.rb
52
- - lib/overcommit/plugins/pre_commit/python_flake8.rb
52
+ - lib/overcommit/plugins/pre_commit/haml_syntax.rb
53
53
  - lib/overcommit/plugins/pre_commit/causes_email.rb
54
- - lib/overcommit/plugins/pre_commit/js_console_log.rb
55
54
  - lib/overcommit/plugins/pre_commit/author_name.rb
56
- - lib/overcommit/plugins/pre_commit/erb_syntax.rb
57
- - lib/overcommit/plugins/pre_commit/scss_lint.rb
58
- - lib/overcommit/plugins/pre_commit/coffee_lint.rb
59
- - lib/overcommit/plugins/pre_commit/haml_syntax.rb
60
55
  - lib/overcommit/plugins/pre_commit/whitespace.rb
56
+ - lib/overcommit/plugins/pre_commit/python_flake8.rb
57
+ - lib/overcommit/plugins/pre_commit/coffee_lint.rb
58
+ - lib/overcommit/plugins/pre_commit/test_history.rb
61
59
  - lib/overcommit/plugins/pre_commit/restricted_paths.rb
62
- - lib/overcommit/plugins/pre_commit/ruby_syntax.rb
60
+ - lib/overcommit/plugins/pre_commit/ruby_style.rb
61
+ - lib/overcommit/plugins/pre_commit/scss_lint.rb
63
62
  - lib/overcommit/plugins/pre_commit/css_linter.rb
64
- - lib/overcommit/git_hook.rb
63
+ - lib/overcommit/staged_file.rb
64
+ - lib/overcommit/reporter.rb
65
+ - lib/overcommit/hook_specific_check.rb
66
+ - lib/overcommit/installer.rb
65
67
  - lib/overcommit/errors.rb
66
- - lib/overcommit/cli.rb
68
+ - lib/overcommit/git_hook.rb
67
69
  - lib/overcommit/configuration.rb
68
- - lib/overcommit/version.rb
69
70
  - lib/overcommit/hooks/pre_commit.rb
70
71
  - lib/overcommit/hooks/commit_msg.rb
71
- - lib/overcommit/utils.rb
72
- - lib/overcommit.rb
73
- - bin/overcommit
72
+ - lib/overcommit/logger.rb
73
+ - lib/overcommit/cli.rb
74
74
  - bin/run-hook
75
- - bin/scripts/jshint.js
76
75
  - bin/scripts/index-tags
77
- - bin/scripts/csslint-rhino.js
78
76
  - bin/scripts/gerrit-change-id
77
+ - bin/scripts/jshint.js
78
+ - bin/scripts/csslint-rhino.js
79
79
  - bin/scripts/jshint_runner.js
80
+ - bin/overcommit
80
81
  - bin/hooks/commit-msg
81
- - bin/hooks/pre-commit
82
- - bin/hooks/post-merge
83
82
  - bin/hooks/post-checkout
83
+ - bin/hooks/post-merge
84
+ - bin/hooks/pre-commit
84
85
  - bin/hooks/prepare-commit-msg
85
86
  - config/templates.yml
86
87
  homepage: http://github.com/causes/overcommit