git-hooks-helper 0.0.4 → 0.0.5
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/Gemfile.lock +1 -1
- data/lib/git-hooks-helper/hook.rb +5 -2
- data/lib/git-hooks-helper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bed58223a395ca3233765eea016d23dd638ba69
|
4
|
+
data.tar.gz: c64a6a7796cc2908d608ec3c7f180a4f3402960a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ea374ad23178bf6aa94e6b279d14f918e967386864e70bb09fbd734b0734b398c68510417a6c568044db016053e68492bceec6d5af08daaa003aef62f137ad8
|
7
|
+
data.tar.gz: 0019320c90ffa25239df959dd2db9d4662e25a9a4f364b590df555e37fa5a1c669e23cc7ce4de8a0a35983a911d075233047fdc056021dd69eadbc531a3776ea
|
data/Gemfile.lock
CHANGED
@@ -27,7 +27,7 @@ module GitHooksHelper
|
|
27
27
|
RB_WARNING_REGEXP = /[0-9]+:\s+warning:/.freeze
|
28
28
|
HAML_INVALID_REGEXP = /error/.freeze
|
29
29
|
ERB_INVALID_REGEXP = /invalid\z/.freeze
|
30
|
-
SLIM_INVALID_REGEXP = /
|
30
|
+
SLIM_INVALID_REGEXP = /Slim::Parser/.freeze
|
31
31
|
COLOR_REGEXP = /\e\[(\d+)m/.freeze
|
32
32
|
|
33
33
|
# Set this to true if you want warnings to stop your commit
|
@@ -151,7 +151,10 @@ module GitHooksHelper
|
|
151
151
|
each_changed_file([:slim]) do |file|
|
152
152
|
Open3.popen3("slimrb -c #{file}") do |stdin, stdout, stderr|
|
153
153
|
lines = stderr.read.split("\n")
|
154
|
-
|
154
|
+
# HELP NEEDED HERE.
|
155
|
+
# Somewhy this appears in stderr when runnin in read world:
|
156
|
+
# 'fatal: Not a git repository: '.git''
|
157
|
+
errors = if lines.size > 0 && lines.any?{|line| line =~ SLIM_INVALID_REGEXP}
|
155
158
|
# skip last 2 lines from output. There is only trace info.
|
156
159
|
@result.errors << "#{file} => invalid SLIM syntax\n " + lines[0..-3].join("\n ")
|
157
160
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-hooks-helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martynas Margis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Gem for creating simple pre-commit git hooks in ruby.
|
14
14
|
email:
|