haml 7.0.2 → 7.2.0
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/CHANGELOG.md +9 -0
- data/haml.gemspec +1 -1
- data/lib/haml/attribute_builder.rb +8 -8
- data/lib/haml/attribute_compiler.rb +1 -1
- data/lib/haml/version.rb +1 -1
- data/lib/haml.rb +1 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 666a9c4513f3c1450ac36b92fefcff06d9a69aae9cc60840eb0182dbe53e2995
|
|
4
|
+
data.tar.gz: 709a5f0d8ad693be7bb7b2750d84fb1025d77ada780f045071e69bf16abfa76a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5baeb23700d275b2a6c678b807756ff3536d638b782c4a26f44236fd3b9e9037d6b46c5c09b76b87e19f3cffaa668c5f221a395b8f2ba37a9a026c17ebc2fccc
|
|
7
|
+
data.tar.gz: cd428da5241f00f831080af924ef7fd2a066699c9805272727dbe32eb7672c90d6fbd1bbf6d3cae8dffc99f472d8dfb721b6558d78e64808b2a1319b7a78aa01
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Haml Changelog
|
|
2
2
|
|
|
3
|
+
## 7.2.0
|
|
4
|
+
|
|
5
|
+
* Do not require rails when haml is required https://github.com/haml/haml/pull/1201
|
|
6
|
+
* Point `changelog_uri` to GitHub Releases https://github.com/haml/haml/pull/1202
|
|
7
|
+
|
|
8
|
+
## 7.1.0
|
|
9
|
+
|
|
10
|
+
* Support xhtml format for boolean nested data attributes https://github.com/haml/haml/pull/1200
|
|
11
|
+
|
|
3
12
|
## 7.0.2
|
|
4
13
|
|
|
5
14
|
* Replace usages of `=~` with `.match?` where possible https://github.com/haml/haml/pull/1196
|
data/haml.gemspec
CHANGED
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
|
|
22
22
|
spec.metadata = { 'rubygems_mfa_required' => 'true' }
|
|
23
23
|
|
|
24
|
-
spec.metadata["changelog_uri"] =
|
|
24
|
+
spec.metadata["changelog_uri"] = "https://github.com/haml/haml/releases"
|
|
25
25
|
spec.metadata["source_code_uri"] = "https://github.com/haml/haml"
|
|
26
26
|
|
|
27
27
|
spec.required_ruby_version = '>= 3.2.0'
|
|
@@ -16,9 +16,9 @@ module Haml::AttributeBuilder
|
|
|
16
16
|
when 'class'
|
|
17
17
|
buf << " class=#{quote}#{build_class(escape_attrs, *hash[key])}#{quote}"
|
|
18
18
|
when 'data'
|
|
19
|
-
buf << build_data(escape_attrs, quote, *hash[key])
|
|
19
|
+
buf << build_data(escape_attrs, quote, format, *hash[key])
|
|
20
20
|
when 'aria'
|
|
21
|
-
buf << build_aria(escape_attrs, quote, *hash[key])
|
|
21
|
+
buf << build_aria(escape_attrs, quote, format, *hash[key])
|
|
22
22
|
when *Haml::BOOLEAN_ATTRIBUTES, /\Adata-/, /\Aaria-/
|
|
23
23
|
build_boolean!(escape_attrs, quote, format, buf, key, hash[key])
|
|
24
24
|
else
|
|
@@ -62,17 +62,17 @@ module Haml::AttributeBuilder
|
|
|
62
62
|
escape_html(escape_attrs, classes.map(&:to_s).uniq.join(' '))
|
|
63
63
|
end
|
|
64
64
|
|
|
65
|
-
def build_data(escape_attrs, quote, *hashes)
|
|
66
|
-
build_data_attribute(:data, escape_attrs, quote, *hashes)
|
|
65
|
+
def build_data(escape_attrs, quote, format, *hashes)
|
|
66
|
+
build_data_attribute(:data, escape_attrs, quote, format, *hashes)
|
|
67
67
|
end
|
|
68
68
|
|
|
69
|
-
def build_aria(escape_attrs, quote, *hashes)
|
|
70
|
-
build_data_attribute(:aria, escape_attrs, quote, *hashes)
|
|
69
|
+
def build_aria(escape_attrs, quote, format, *hashes)
|
|
70
|
+
build_data_attribute(:aria, escape_attrs, quote, format, *hashes)
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
private
|
|
74
74
|
|
|
75
|
-
def build_data_attribute(key, escape_attrs, quote, *hashes)
|
|
75
|
+
def build_data_attribute(key, escape_attrs, quote, format, *hashes)
|
|
76
76
|
attrs = []
|
|
77
77
|
if hashes.size > 1 && hashes.all? { |h| h.is_a?(Hash) }
|
|
78
78
|
data_value = merge_all_attrs(hashes)
|
|
@@ -84,7 +84,7 @@ module Haml::AttributeBuilder
|
|
|
84
84
|
hash.sort_by(&:first).each do |key, value|
|
|
85
85
|
case value
|
|
86
86
|
when true
|
|
87
|
-
|
|
87
|
+
build_boolean!(escape_attrs, quote, format, attrs, key, value)
|
|
88
88
|
when nil, false
|
|
89
89
|
# noop
|
|
90
90
|
else
|
|
@@ -85,7 +85,7 @@ module Haml
|
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
def compile_data!(temple, key, values)
|
|
88
|
-
args = [@escape_attrs.inspect, "#{@quote.inspect}.freeze", values.map { |v| literal_for(v) }]
|
|
88
|
+
args = [@escape_attrs.inspect, "#{@quote.inspect}.freeze", @format.inspect, values.map { |v| literal_for(v) }]
|
|
89
89
|
build_code = "::Haml::AttributeBuilder.build_#{key}(#{args.join(', ')})"
|
|
90
90
|
|
|
91
91
|
if values.all? { |type, exp| type == :static || Temple::StaticAnalyzer.static?(exp) }
|
data/lib/haml/version.rb
CHANGED
data/lib/haml.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: 7.0
|
|
4
|
+
version: 7.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Natalie Weizenbaum
|
|
@@ -308,7 +308,7 @@ licenses:
|
|
|
308
308
|
- MIT
|
|
309
309
|
metadata:
|
|
310
310
|
rubygems_mfa_required: 'true'
|
|
311
|
-
changelog_uri: https://
|
|
311
|
+
changelog_uri: https://github.com/haml/haml/releases
|
|
312
312
|
source_code_uri: https://github.com/haml/haml
|
|
313
313
|
rdoc_options: []
|
|
314
314
|
require_paths:
|