pre-commit 0.24.0 → 0.25.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: b7ea99f3d301a99ec233fe182ef6c28e38584ca4
4
- data.tar.gz: b3bacc10c1f8c848a52491ec0f7d4816804cf1b7
3
+ metadata.gz: ad0dbfc8f0447821ef6ab7b8eebd87c8eb971ccb
4
+ data.tar.gz: 5f283c26e2dcc6b989792d942d003e84a5790238
5
5
  SHA512:
6
- metadata.gz: 4ca0eaaf5dc427420f1ced3a4c765034b182443f6ec941aef2b82e0fd550dde887f753ab2f71206adb504c239023610e17ac0fa4067c6ea1bc35c3ae4ff68e40
7
- data.tar.gz: f0a2a71ef8721284d77ccf35be3c7a8221f284397ad516e3dc384aa8861aba216793b1fca4c469c4b9ddfd39ebd755bf530551c5048f4cc1cfefa620ea059bd1
6
+ metadata.gz: 5dac4c312e6ece25f11376d47ee85db10d4cabcde95940a852eddea61d8a9d32fc50bf7e3017560d42c7823e128a28d526ad6cebe4665501e32f7f2374a8532a
7
+ data.tar.gz: a1e5ff9c4b2d201674a41bba59417a390d2e8d4e95d7efb05863f2096ecde9ea11ff63c6cf603bb48a832127a675015c3d37ad0f154c9e8083ef660ff2c20892
data/bin/pre-commit CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  require 'pre-commit/cli'
4
4
 
5
- if !File.exists?(".git")
6
- abort "No .git directory found."
7
- end
5
+ # Change directory to the root of the git repository.
6
+ repo_root = `git rev-parse --show-toplevel`.strip
7
+ abort "No .git directory found." unless File.directory?(repo_root)
8
+ Dir.chdir repo_root
8
9
 
9
10
  PreCommit::Cli.new(*ARGV).execute or exit 1
@@ -6,7 +6,7 @@ module PreCommit
6
6
  class Rubocop < Plugin
7
7
 
8
8
  WHITELIST = [
9
- ".gemspec", ".jbuilder", ".opal", ".podspec", ".rake", ".rb",
9
+ "\\.gemspec", "\\.jbuilder", "\\.opal", "\\.podspec", "\\.rake", "\\.rb",
10
10
  "Berksfile", "Capfile", "Cheffile", "Gemfile", "Guardfile", "Podfile",
11
11
  "Rakefile", "Thorfile", "Vagabondfile", "Vagrantfile"
12
12
  ]
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.24.0
4
+ version: 0.25.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: 2015-08-10 00:00:00.000000000 Z
11
+ date: 2015-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pluginator
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  version: '0'
202
202
  requirements: []
203
203
  rubyforge_project:
204
- rubygems_version: 2.2.3
204
+ rubygems_version: 2.2.2
205
205
  signing_key:
206
206
  specification_version: 3
207
207
  summary: A slightly better git pre-commit hook