phlex 1.7.0 → 1.8.1
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/.yardopts +1 -1
- data/CHANGELOG.md +14 -1
- data/lib/phlex/sgml.rb +5 -3
- data/lib/phlex/version.rb +1 -1
- 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: 2e7e702f2d22fc85cc0c02a467508f372b1adf091e06756ffa1188f63e48ea81
|
|
4
|
+
data.tar.gz: 386a078fd6d65ac5e84043c3e15fd638b5b5402b55519849147f3ab8f9c22f0b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f9c844aaefa12de8714fa1c4d745a35bb8385f9aca10367b3f14bb60667c2c894c74628649055d4a915a4f7a3c9c2f571b537c8b0097307a4411f8eba61c3774
|
|
7
|
+
data.tar.gz: 2c6fb7d0fff4131faa8fdfd7b5f7c4b44a7af8604026046915cf61f80c2d4c5fe1ff605c7e280d3fef4a0973283643654f2d906a7fca7c6ef32a413a1ee03184
|
data/.yardopts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
--private --
|
|
1
|
+
--private --hide-api private --markup markdown
|
data/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
4
4
|
|
|
5
|
-
## 1.
|
|
5
|
+
## [1.8.1] 2024-04-19
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Rendering a component with a false `render?` predicate should return an empty String rather than `nil`.
|
|
10
|
+
|
|
11
|
+
## [1.8.0] 2024-04-19
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Support `Integer` and `Float` attribute values, and fall back to calling `to_str` on other objects.
|
|
16
|
+
|
|
17
|
+
## [1.7.0] 2024-04-18
|
|
6
18
|
|
|
7
19
|
### Added
|
|
8
20
|
|
|
@@ -19,6 +31,7 @@ All notable changes to this project will be documented in this file. The format
|
|
|
19
31
|
### Removed
|
|
20
32
|
|
|
21
33
|
- Removed the `menuitem` element as it's a deprecated HTML element.
|
|
34
|
+
- Removed the `SGML#text` method. This has been replaced with `SGML#plain`.
|
|
22
35
|
|
|
23
36
|
***
|
|
24
37
|
|
data/lib/phlex/sgml.rb
CHANGED
|
@@ -102,7 +102,7 @@ module Phlex
|
|
|
102
102
|
|
|
103
103
|
block ||= @_content_block
|
|
104
104
|
|
|
105
|
-
return unless render?
|
|
105
|
+
return "" unless render?
|
|
106
106
|
|
|
107
107
|
around_template do
|
|
108
108
|
if block
|
|
@@ -337,7 +337,7 @@ module Phlex
|
|
|
337
337
|
when Symbol
|
|
338
338
|
@_context.target << ERB::Escape.html_escape(content.name)
|
|
339
339
|
when Integer
|
|
340
|
-
@_context.target <<
|
|
340
|
+
@_context.target << content.to_s
|
|
341
341
|
when nil
|
|
342
342
|
nil
|
|
343
343
|
else
|
|
@@ -401,6 +401,8 @@ module Phlex
|
|
|
401
401
|
buffer << " " << name << '="' << ERB::Escape.html_escape(v) << '"'
|
|
402
402
|
when Symbol
|
|
403
403
|
buffer << " " << name << '="' << ERB::Escape.html_escape(v.name) << '"'
|
|
404
|
+
when Integer, Float
|
|
405
|
+
buffer << " " << name << '="' << v.to_s << '"'
|
|
404
406
|
when Hash
|
|
405
407
|
__build_attributes__(
|
|
406
408
|
v.transform_keys { |subkey|
|
|
@@ -415,7 +417,7 @@ module Phlex
|
|
|
415
417
|
when Set
|
|
416
418
|
buffer << " " << name << '="' << ERB::Escape.html_escape(v.to_a.compact.join(" ")) << '"'
|
|
417
419
|
else
|
|
418
|
-
|
|
420
|
+
buffer << " " << name << '="' << ERB::Escape.html_escape(v.to_str) << '"'
|
|
419
421
|
end
|
|
420
422
|
end
|
|
421
423
|
|
data/lib/phlex/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: phlex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.8.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Joel Drapper
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-04-
|
|
11
|
+
date: 2023-04-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: concurrent-ruby
|