pre-commit 0.22.1 → 0.23.0

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: 2669156646ebc6cf3f749a3bc6a86fc0024fef1c
4
- data.tar.gz: f5bc487a854bdbe768fe4a61a8d9504b945bf197
3
+ metadata.gz: 56459f95e495f7c552ffae3ce9a01df82fae3610
4
+ data.tar.gz: 7e7ecd073b7c05d92ade69067c3e90a9f5594b47
5
5
  SHA512:
6
- metadata.gz: 978f9b16313788521360661d7998284b587a6643f3e32b69604dc395fed26c026044f646cc2cd0cc015d922d9a0a557473e19a1225f6689ea1c969c6af99aeb5
7
- data.tar.gz: 43e979e4c88e9bdd46e1590a74be8726e3c8b237c0f13256cc557a7213c0e725e86613fe8ec70e634c5b6a6e74dd2b38dc21029e8df1362c3faad90bb7e95a7a
6
+ metadata.gz: 549a9b3f4a4d44d4c938048a2b9360c968c7867a636649d56d231be51c045548599fd570795c4f5170983767bd07a4908111425072ed341c6868320c5e679373
7
+ data.tar.gz: 91162e4a907af1b2b2a8d9786faf0e6092dfaa2a0bedcc533cffa2ff3ef6f69339e2beee64bdd28b7b87fe3f6f8a9fe32df498d71c8b86af14cf1c287bf46473
data/README.md CHANGED
@@ -20,6 +20,16 @@ Use the pre-commit command to generate a stub pre-commit hook
20
20
 
21
21
  This creates a .git/hooks/pre-commit script which will check your git config and run checks that are enabled.
22
22
 
23
+ ### RVM
24
+
25
+ If you are using rvm you need to install pre-commit into the ```default``` gemset, because it does not use the ```current``` environment
26
+
27
+ $ rvm default do gem install pre-commit
28
+
29
+ Alternatively you can configure pre-commit to use the ```current``` rvm gemset
30
+
31
+ $ git config pre-commit.ruby "rvm `rvm current` do ruby"
32
+
23
33
  ## Available checks
24
34
 
25
35
  These are the available checks:
@@ -18,7 +18,24 @@ module PreCommit
18
18
  rescue LoadError => e
19
19
  $stderr.puts "Could not find rubocop: #{e}"
20
20
  else
21
- staged_files = staged_files.grep(/\.rb$/)
21
+ allowed_files_regex = /\.gemspec\Z|
22
+ \.podspec\Z|
23
+ \.jbuilder\Z|
24
+ \.rake\Z|
25
+ \.opal\Z|
26
+ \.rb\Z|
27
+ Gemfile\Z|
28
+ Rakefile\Z|
29
+ Capfile\Z|
30
+ Guardfile\Z|
31
+ Podfile\Z|
32
+ Thorfile\Z|
33
+ Vagrantfile\Z|
34
+ Berksfile\Z|
35
+ Cheffile\Z|
36
+ Vagabondfile\Z
37
+ /x
38
+ staged_files = staged_files.grep(allowed_files_regex)
22
39
  return if staged_files.empty?
23
40
 
24
41
  args = config_file_flag + user_supplied_flags + ["--force-exclusion"] + staged_files
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.22.1
4
+ version: 0.23.0
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: 2014-12-30 00:00:00.000000000 Z
11
+ date: 2015-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pluginator