git-hooks 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/git_hooks/pre_commit/rubocop.rb +5 -1
- data/lib/git_hooks/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 587587daeb1f31d5403c88ee666acb9daab9b61e
|
4
|
+
data.tar.gz: 6a6a8fec7c3b4e5521714cbb60a4a39c6affbdc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad395057c328251a5405bbda59c3e820e36719dde4ab97439d39ab659af13463bebeb840e68e46d91b8d825324b431c8dbbab41f73d4d1a8b0fc781a99971ba2
|
7
|
+
data.tar.gz: e5f914bf2a87e60e9575761f1439ae59f8846f81ddf4c0bdd45453c49468550a37dc597e5d8a8f0908e0b2f4204290cd32b342cf01d7f4a405dcbaaecfb4f84b
|
@@ -18,7 +18,11 @@ module GitHooks
|
|
18
18
|
|
19
19
|
def run_rubocop
|
20
20
|
files = changed_ruby_files
|
21
|
-
|
21
|
+
if files.any?
|
22
|
+
system("rubocop #{files.join(' ')} --force-exclusion")
|
23
|
+
else
|
24
|
+
true
|
25
|
+
end
|
22
26
|
end
|
23
27
|
end
|
24
28
|
end
|
data/lib/git_hooks/version.rb
CHANGED