overcommit 0.48.0 → 0.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/overcommit/git_repo.rb +8 -1
- data/lib/overcommit/hook/pre_commit/stylelint.rb +1 -1
- data/lib/overcommit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2d560865c5f4d0d10103a9a76e8447e84d93890b768dbcaa689d896fd144c5e
|
4
|
+
data.tar.gz: 96bd78d4139356c2ef0ff89dd64750e8df602b6609bf01249c560c5c0a4c121a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b5dbeccbcaba03c4845367d45cc0ba72fee1af4f523bc315e35118ac7e35444308e5925a3d6c26cd7ecbc9da33ac36863a8b28b7185a770581b252c9248409b
|
7
|
+
data.tar.gz: 398c42bf237a8d7c7d1388dfab5814504a621dcf78fc8ed4557645bf330b71da05ef9d4ee7ef9825e15bf1abd7515a4aa4ca09c84a13c447a4c8ad06b339378d
|
data/lib/overcommit/git_repo.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'iniparse'
|
4
|
+
require 'shellwords'
|
4
5
|
|
5
6
|
module Overcommit
|
6
7
|
# Provide a set of utilities for certain interactions with `git`.
|
@@ -108,7 +109,13 @@ module Overcommit
|
|
108
109
|
# @return [Array<String>] list of absolute file paths
|
109
110
|
def list_files(paths = [], options = {})
|
110
111
|
ref = options[:ref] || 'HEAD'
|
111
|
-
path_list =
|
112
|
+
path_list =
|
113
|
+
if OS.windows?
|
114
|
+
paths = paths.map { |path| path.gsub('"', '""') }
|
115
|
+
paths.empty? ? '' : "\"#{paths.join('" "')}\""
|
116
|
+
else
|
117
|
+
paths.shelljoin
|
118
|
+
end
|
112
119
|
`git ls-tree --name-only #{ref} #{path_list}`.
|
113
120
|
split(/\n/).
|
114
121
|
map { |relative_file| File.expand_path(relative_file) }.
|
@@ -8,7 +8,7 @@ module Overcommit::Hook::PreCommit
|
|
8
8
|
# example of output:
|
9
9
|
# index.css: line 4, col 4, error - Expected indentation of 2 spaces (indentation)
|
10
10
|
|
11
|
-
MESSAGE_REGEX = /^(?<file>.+):\D*(?<line>\d).*$/
|
11
|
+
MESSAGE_REGEX = /^(?<file>.+):\D*(?<line>\d+).*$/
|
12
12
|
|
13
13
|
def run
|
14
14
|
result = execute(command, args: applicable_files)
|
data/lib/overcommit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: overcommit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.48.
|
4
|
+
version: 0.48.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane da Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05
|
11
|
+
date: 2019-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: childprocess
|