overcommit 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
data/lib/overcommit/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: overcommit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 1
|
10
|
+
version: 0.4.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Causes Engineering
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-11-
|
18
|
+
date: 2013-11-08 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -82,7 +82,6 @@ files:
|
|
82
82
|
- lib/overcommit/plugins/pre_commit/python_flake8.rb
|
83
83
|
- lib/overcommit/plugins/pre_commit/coffee_lint.rb
|
84
84
|
- lib/overcommit/plugins/pre_commit/test_history.rb
|
85
|
-
- lib/overcommit/plugins/pre_commit/restricted_paths.rb
|
86
85
|
- lib/overcommit/plugins/pre_commit/ruby_style.rb
|
87
86
|
- lib/overcommit/plugins/pre_commit/scss_lint.rb
|
88
87
|
- lib/overcommit/plugins/pre_commit/css_linter.rb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Overcommit::GitHook
|
2
|
-
class RestrictedPaths < HookSpecificCheck
|
3
|
-
include HookRegistry
|
4
|
-
RESTRICTED_PATHS = %w[vendor config]
|
5
|
-
|
6
|
-
def run_check
|
7
|
-
RESTRICTED_PATHS.each do |path|
|
8
|
-
if !system("git diff --cached --quiet -- #{path}")
|
9
|
-
return :stop, "changes staged under #{path}"
|
10
|
-
end
|
11
|
-
end
|
12
|
-
return :good
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|