overcommit 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -51,9 +51,11 @@ module Overcommit
51
51
  end
52
52
 
53
53
  def staged
54
- @staged ||= Utils.modified_files.select do |filename|
55
- filename.end_with?(".#{self.class.filetype}")
56
- end
54
+ @staged ||= Utils.modified_files.map do |filename|
55
+ if self.class.filetype.nil? || filename.end_with?(".#{self.class.filetype}")
56
+ StagedFile.new(filename)
57
+ end
58
+ end.compact
57
59
  end
58
60
 
59
61
  def run_check
@@ -1,3 +1,3 @@
1
1
  module Overcommit
2
- VERSION = '0.1.8'
2
+ VERSION = '0.1.9'
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.8
4
+ version: 0.1.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -34,53 +34,53 @@ 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/scss_lint.rb
63
61
  - lib/overcommit/plugins/pre_commit/css_linter.rb
64
- - lib/overcommit/git_hook.rb
62
+ - lib/overcommit/staged_file.rb
63
+ - lib/overcommit/reporter.rb
64
+ - lib/overcommit/hook_specific_check.rb
65
+ - lib/overcommit/installer.rb
65
66
  - lib/overcommit/errors.rb
66
- - lib/overcommit/cli.rb
67
+ - lib/overcommit/git_hook.rb
67
68
  - lib/overcommit/configuration.rb
68
- - lib/overcommit/version.rb
69
69
  - lib/overcommit/hooks/pre_commit.rb
70
70
  - lib/overcommit/hooks/commit_msg.rb
71
- - lib/overcommit/utils.rb
72
- - lib/overcommit.rb
73
- - bin/overcommit
71
+ - lib/overcommit/logger.rb
72
+ - lib/overcommit/cli.rb
74
73
  - bin/run-hook
75
- - bin/scripts/jshint.js
76
74
  - bin/scripts/index-tags
77
- - bin/scripts/csslint-rhino.js
78
75
  - bin/scripts/gerrit-change-id
76
+ - bin/scripts/jshint.js
77
+ - bin/scripts/csslint-rhino.js
79
78
  - bin/scripts/jshint_runner.js
79
+ - bin/overcommit
80
80
  - bin/hooks/commit-msg
81
- - bin/hooks/pre-commit
82
- - bin/hooks/post-merge
83
81
  - bin/hooks/post-checkout
82
+ - bin/hooks/post-merge
83
+ - bin/hooks/pre-commit
84
84
  - bin/hooks/prepare-commit-msg
85
85
  - config/templates.yml
86
86
  homepage: http://github.com/causes/overcommit