haml 5.0.3 → 5.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +14 -7
- data/CHANGELOG.md +8 -0
- data/lib/haml/attribute_parser.rb +3 -3
- data/lib/haml/exec.rb +1 -1
- data/lib/haml/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2164872cd8f38c57307ec65c2834988d49538cec038795797be328bd18e3e1c4
|
4
|
+
data.tar.gz: 6f090e38ab9856973b42a8f61bc34fe10fa7df3595dfc3939c0ead7c422d66d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 510cbbc03d5d46c0430d7a866166fc089dd253a98584d540d9a46cd2610bb5fc327d39e830c05a939266b330c1048ce9e47a269b39b2c7d35cb0a4ed5d370be0
|
7
|
+
data.tar.gz: 3292001c396a698256d7292309e631c6d81bb02f26a4fc1b4763ad537dd97a808aa9abd27b3841091afe9a120dfb5dc868c6dfb8c96cbd6538383e92f2871a91
|
data/.travis.yml
CHANGED
@@ -3,9 +3,10 @@ dist: trusty
|
|
3
3
|
language: ruby
|
4
4
|
cache: bundler
|
5
5
|
rvm:
|
6
|
-
-
|
7
|
-
- 2.
|
8
|
-
- 2.
|
6
|
+
- ruby-head
|
7
|
+
- 2.4.2
|
8
|
+
- 2.3.5
|
9
|
+
- 2.2.8
|
9
10
|
- 2.1.10
|
10
11
|
- 2.0.0
|
11
12
|
- jruby-9.1.12.0
|
@@ -31,14 +32,20 @@ matrix:
|
|
31
32
|
gemfile: test/gemfiles/Gemfile.rails-5.0.x
|
32
33
|
- rvm: 2.1.10
|
33
34
|
gemfile: test/gemfiles/Gemfile.rails-5.0.x.erubi
|
34
|
-
- rvm: 2.4.
|
35
|
+
- rvm: 2.4.2
|
35
36
|
gemfile: test/gemfiles/Gemfile.rails-4.0.x
|
36
|
-
- rvm: 2.4.
|
37
|
+
- rvm: 2.4.2
|
37
38
|
gemfile: test/gemfiles/Gemfile.rails-4.1.x
|
38
|
-
- rvm: 2.4.
|
39
|
+
- rvm: 2.4.2
|
40
|
+
gemfile: test/gemfiles/Gemfile.rails-4.2.x
|
41
|
+
- rvm: ruby-head
|
42
|
+
gemfile: test/gemfiles/Gemfile.rails-4.0.x
|
43
|
+
- rvm: ruby-head
|
44
|
+
gemfile: test/gemfiles/Gemfile.rails-4.1.x
|
45
|
+
- rvm: ruby-head
|
39
46
|
gemfile: test/gemfiles/Gemfile.rails-4.2.x
|
40
47
|
include:
|
41
|
-
- rvm: 2.4.
|
48
|
+
- rvm: 2.4.2
|
42
49
|
gemfile: test/gemfiles/Gemfile.rails-edge
|
43
50
|
allow_failures:
|
44
51
|
- rvm: rbx-3
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# Haml Changelog
|
2
2
|
|
3
|
+
## 5.0.4
|
4
|
+
|
5
|
+
Released on October 13, 2017
|
6
|
+
([diff](https://github.com/haml/haml/compare/v5.0.3...v5.0.4)).
|
7
|
+
|
8
|
+
* Fix `haml -c --stdin` regression in 5.0.2. [#958](https://github.com/haml/haml/pull/958) (thanks [Timo Göllner](https://github.com/TeaMoe))
|
9
|
+
* Ruby 2.5 support (it wasn't working due to Ripper API change). (Akira Matsuda)
|
10
|
+
|
3
11
|
## 5.0.3
|
4
12
|
|
5
13
|
Released on September 7, 2017
|
@@ -98,16 +98,16 @@ module Haml
|
|
98
98
|
all_tokens = Ripper.lex(hash_literal.strip)
|
99
99
|
all_tokens = all_tokens[1...-1] || [] # strip tokens for brackets
|
100
100
|
|
101
|
-
|
101
|
+
each_balanced_tokens(all_tokens) do |tokens|
|
102
102
|
key = shift_key!(tokens)
|
103
|
-
value = tokens.map
|
103
|
+
value = tokens.map {|t| t[2] }.join.strip
|
104
104
|
block.call(key, value)
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
108
|
# @param [Array] tokens - Ripper tokens
|
109
109
|
# @param [Proc] block - that takes balanced Ripper tokens as arguments
|
110
|
-
def
|
110
|
+
def each_balanced_tokens(tokens, &block)
|
111
111
|
attr_tokens = []
|
112
112
|
open_tokens = Hash.new { |h, k| h[k] = 0 }
|
113
113
|
|
data/lib/haml/exec.rb
CHANGED
@@ -338,7 +338,7 @@ END
|
|
338
338
|
|
339
339
|
def validate_ruby(code)
|
340
340
|
begin
|
341
|
-
eval("BEGIN {return nil}; #{code}", binding, @options[:filename])
|
341
|
+
eval("BEGIN {return nil}; #{code}", binding, @options[:filename] || "")
|
342
342
|
rescue ::SyntaxError # Not to be confused with Haml::SyntaxError
|
343
343
|
$!
|
344
344
|
end
|
data/lib/haml/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Natalie Weizenbaum
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-
|
14
|
+
date: 2017-10-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: temple
|
@@ -180,9 +180,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
version: '0'
|
181
181
|
requirements: []
|
182
182
|
rubyforge_project:
|
183
|
-
rubygems_version: 2.6.
|
183
|
+
rubygems_version: 2.6.14
|
184
184
|
signing_key:
|
185
185
|
specification_version: 4
|
186
186
|
summary: An elegant, structured (X)HTML/XML templating engine.
|
187
187
|
test_files: []
|
188
|
-
has_rdoc: false
|