haml_lint 0.14.0 → 0.14.1

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: fdd406c711a12f70bba2b26982550e7f190b2c61
4
- data.tar.gz: 2cd4a631a543de9987408c30a4367d18bff33d6b
3
+ metadata.gz: 350f098b45d24d55363ac279caf35694dfbdcfda
4
+ data.tar.gz: 76c0227e9aeb398ac1397003f9c1bc943c99cf02
5
5
  SHA512:
6
- metadata.gz: 89371444076d421e9589f2b34b3867b6b0387f0f07af00f119a520d20b296b3a77088e425e36cf5b29a1b043cd24e4987b15557a9bc8c0e502985b5c124d0014
7
- data.tar.gz: 3053c5a7d28d8cc7e242bb0346cc83e8e6a65935dad36042678eedd2d8a21f8784085c67887a528baec7698fae8e2ceb958a76e5ce787e251c41b2ffa6f346ef
6
+ metadata.gz: 4c9fd9c3c414411cd8a40d0334ca2f716259874a765f3c3ebf0ba3b8513c1993fb3147706986a1b6f234713a1e22be660e6d16081514cea582e68a4aade5dda9
7
+ data.tar.gz: 32549d3f2c75d75451637be9dcd46b27ceb76db5e0255365ff9cc0a2ffc89e6dccfd2f424501fc6fb07bcb1277bc14fb35fecc5011c3d907ffde3e3bee7cabf9
@@ -32,15 +32,16 @@ module HamlLint
32
32
  def outputs_string_literal?(script_node)
33
33
  tree = parse_ruby(script_node.script)
34
34
  [:str, :dstr].include?(tree.type) &&
35
- starts_with_reserved_character?(tree.children.first)
35
+ !starts_with_reserved_character?(tree.children.first)
36
36
  rescue ::Parser::SyntaxError # rubocop:disable Lint/HandleExceptions
37
37
  # Gracefully ignore syntax errors, as that's managed by a different linter
38
38
  end
39
39
 
40
40
  # Returns whether a string starts with a character that would otherwise be
41
41
  # given special treatment, thus making enclosing it in a string necessary.
42
- def starts_with_reserved_character?(string)
43
- string !~ %r{\A\s*[/#-=%~]}
42
+ def starts_with_reserved_character?(stringish)
43
+ string = stringish.respond_to?(:children) ? stringish.children.first : stringish
44
+ string =~ %r{\A\s*[/#-=%~]}
44
45
  end
45
46
  end
46
47
  end
@@ -1,4 +1,4 @@
1
1
  # Defines the gem version.
2
2
  module HamlLint
3
- VERSION = '0.14.0'
3
+ VERSION = '0.14.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brigade Engineering
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-09 00:00:00.000000000 Z
12
+ date: 2015-06-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: haml