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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9b62d5ba7d60ed7cbcd3dade098f61ff08b286a4
4
- data.tar.gz: 8839cd13c83fab48b9bcd69981b610f5f3a8c5f6
2
+ SHA256:
3
+ metadata.gz: 2164872cd8f38c57307ec65c2834988d49538cec038795797be328bd18e3e1c4
4
+ data.tar.gz: 6f090e38ab9856973b42a8f61bc34fe10fa7df3595dfc3939c0ead7c422d66d1
5
5
  SHA512:
6
- metadata.gz: 5d314e93aa06f42d37d57bbf4ab1f849ef030080ad4d322b1a0ff37b7ab4c9d2901ef72d816c801b9d00a1c0b214edb4e37982fe13416c2aa6156f22c0093b8a
7
- data.tar.gz: 4c959e9053cb049b025e97964d0a95bdf03f6628bed7d8a20e76bc8ee1ec62b1acbc54e669fc015f9d130a7ca938d8254f462ae8275f03a4b2cc14a78c85cbfa
6
+ metadata.gz: 510cbbc03d5d46c0430d7a866166fc089dd253a98584d540d9a46cd2610bb5fc327d39e830c05a939266b330c1048ce9e47a269b39b2c7d35cb0a4ed5d370be0
7
+ data.tar.gz: 3292001c396a698256d7292309e631c6d81bb02f26a4fc1b4763ad537dd97a808aa9abd27b3841091afe9a120dfb5dc868c6dfb8c96cbd6538383e92f2871a91
@@ -3,9 +3,10 @@ dist: trusty
3
3
  language: ruby
4
4
  cache: bundler
5
5
  rvm:
6
- - 2.4.1
7
- - 2.3.4
8
- - 2.2.7
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.1
35
+ - rvm: 2.4.2
35
36
  gemfile: test/gemfiles/Gemfile.rails-4.0.x
36
- - rvm: 2.4.1
37
+ - rvm: 2.4.2
37
38
  gemfile: test/gemfiles/Gemfile.rails-4.1.x
38
- - rvm: 2.4.1
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.1
48
+ - rvm: 2.4.2
42
49
  gemfile: test/gemfiles/Gemfile.rails-edge
43
50
  allow_failures:
44
51
  - rvm: rbx-3
@@ -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
- each_balaned_tokens(all_tokens) do |tokens|
101
+ each_balanced_tokens(all_tokens) do |tokens|
102
102
  key = shift_key!(tokens)
103
- value = tokens.map(&:last).join.strip
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 each_balaned_tokens(tokens, &block)
110
+ def each_balanced_tokens(tokens, &block)
111
111
  attr_tokens = []
112
112
  open_tokens = Hash.new { |h, k| h[k] = 0 }
113
113
 
@@ -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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Haml
3
- VERSION = "5.0.3"
3
+ VERSION = "5.0.4"
4
4
  end
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.3
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-09-07 00:00:00.000000000 Z
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.11
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