pre-commit 0.9.1 → 0.9.2

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: 9f77f88e6c0af094767d24fcf57638e6ee76c53c
4
- data.tar.gz: 18b897619fd17d93626612e88bb1b578647bc0fa
3
+ metadata.gz: 3ff1322d028fe5837cfde982be38e20eee79b4a0
4
+ data.tar.gz: 8e5f8efaffab2c8afb5d2fafbdfd1ef30b424569
5
5
  SHA512:
6
- metadata.gz: de510f60565ce61bc92cfcc906bde870b9c26076b9032bd080dff889cace9d8f34646d82ff5221dbcf87ddca72097be9458d5a03a52dfac3ebcebcf5567014c8
7
- data.tar.gz: 75c654038f334d941c0067cf1e3aaf64800981c65c336fec0c533460b09b095394d9a01d19260a162f5c4c68a7a9d24a98bd1e2c2683352f82c32a0b41b6706e
6
+ metadata.gz: ae50c6a33ca6bc51724fd9f04f803281832d58873d38072e2c8b4690805e6d1b4aa1ab980887d8a6e589c4dd18fa400b31320593375f057947acc30449d4abe0
7
+ data.tar.gz: b0d7901498f8aeca050530e769e5c4403678c556cd78fbab6a8a5482f3b53e4ccccaf28e6e4b228b27bfb65a3849ffe6b1660327ba19f2b5b8bd2a654cfc4c07
@@ -1,10 +1,19 @@
1
+ require 'pre-commit/utils'
2
+
1
3
  module PreCommit
2
4
  class DebuggerCheck
3
5
  def self.call(staged_files)
4
- return if staged_files.empty?
5
- errors = `#{Utils.grep} debugger #{staged_files.join(" ")}`.strip
6
+ files = files_to_check(staged_files)
7
+ return if files.empty?
8
+
9
+ errors = `#{Utils.grep} debugger #{files.join(" ")}`.strip
6
10
  return unless $?.success?
11
+
7
12
  "debugger statement(s) found:\n#{errors}"
8
13
  end
14
+
15
+ def self.files_to_check(files)
16
+ files.reject { |file| File.basename(file) =~ /^Gemfile/ }
17
+ end
9
18
  end
10
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pre-commit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shajith Chacko, Josh Lubaway
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-26 00:00:00.000000000 Z
11
+ date: 2013-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs