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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f421a953099372d3bb6facc4d392a7d7c35eac4
4
- data.tar.gz: bbb5630d7bf4b522bcde98c6fd4aed3cef89a3db
3
+ metadata.gz: 1bed58223a395ca3233765eea016d23dd638ba69
4
+ data.tar.gz: c64a6a7796cc2908d608ec3c7f180a4f3402960a
5
5
  SHA512:
6
- metadata.gz: b999cd12782c11420f2aa58e95e652ee5029735a4eb07284447b6f345b936ea14ec76038e6865be5e26ac9e8ac06916b163994aabcb90eb754dc5755f9ce50f1
7
- data.tar.gz: 04b2b0016dd0483fe0fc20a2064f707aa492b18f93dba58405ce2c194f18ab158efc1c46e6f3a9cd5cb3dc443ff46bec90a7a9d75edafea79eb2fff2aecf682f
6
+ metadata.gz: 5ea374ad23178bf6aa94e6b279d14f918e967386864e70bb09fbd734b0734b398c68510417a6c568044db016053e68492bceec6d5af08daaa003aef62f137ad8
7
+ data.tar.gz: 0019320c90ffa25239df959dd2db9d4662e25a9a4f364b590df555e37fa5a1c669e23cc7ce4de8a0a35983a911d075233047fdc056021dd69eadbc531a3776ea
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git-hooks-helper (0.0.3)
4
+ git-hooks-helper (0.0.5)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -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 = /invalid1\z/.freeze
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
- errors = if lines.size > 0
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
@@ -1,3 +1,3 @@
1
1
  module GitHooksHelper
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  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
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-15 00:00:00.000000000 Z
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: