heartml 1.0.0.beta20 → 1.0.0.beta21
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/.rubocop.yml +5 -1
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +77 -56
- data/heartml.gemspec +1 -1
- data/lib/heartml/fragment.rb +2 -2
- data/lib/heartml/template_renderer.rb +2 -2
- data/lib/heartml/version.rb +1 -1
- data/lib/heartml.rb +5 -5
- metadata +4 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1735f81c38ee8e708fc5f4427235e9cedf15b85abe5ab8e20f9779e12490cf65
|
|
4
|
+
data.tar.gz: 8dc571fdffd6fb7d9867dccc5c582c3df9b4008ba1f166b804ec26161ae0ede9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ebe339cb299389e2d07f3bfaa3b527b58d638db31ca98dd342ffd005177a29c1699cb7164995a0dd76c1fea6a5127cdcb517590870e9d87253ab53321cbdf86d
|
|
7
|
+
data.tar.gz: 4c6f02662698f7f0d679a4a2f861e3f0f9ba256d2643de584f4754a21592a8859e1fe2405da535bedb1bfbc41c8bc38feea5896631aee3cb571f788eb07389fc
|
data/.rubocop.yml
CHANGED
|
@@ -3,7 +3,7 @@ require:
|
|
|
3
3
|
- rubocop-rake
|
|
4
4
|
|
|
5
5
|
AllCops:
|
|
6
|
-
TargetRubyVersion: 3.
|
|
6
|
+
TargetRubyVersion: 3.2
|
|
7
7
|
NewCops: enable
|
|
8
8
|
|
|
9
9
|
Metrics/MethodLength:
|
|
@@ -12,6 +12,10 @@ Metrics/MethodLength:
|
|
|
12
12
|
Metrics/ModuleLength:
|
|
13
13
|
Enabled: false
|
|
14
14
|
|
|
15
|
+
Naming/PredicateMethod:
|
|
16
|
+
Exclude:
|
|
17
|
+
- test/**/*.rb
|
|
18
|
+
|
|
15
19
|
Style/Documentation:
|
|
16
20
|
Enabled: false
|
|
17
21
|
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [1.0.0.beta21] - 2025-12-12
|
|
6
|
+
|
|
7
|
+
- Tighten Bridgetown feature detection (only check for `Bridgetown::Component`)
|
|
8
|
+
- Updated minimum Ruby version to 3.2
|
|
9
|
+
|
|
5
10
|
## [1.0.0.beta20] - 2025-08-23
|
|
6
11
|
|
|
7
12
|
- Remove support for Rails / ViewComponent
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,107 +1,128 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
heartml (1.0.0.
|
|
4
|
+
heartml (1.0.0.beta21)
|
|
5
5
|
concurrent-ruby (~> 1.2)
|
|
6
6
|
nokolexbor (>= 0.4.2)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
activesupport (7.
|
|
11
|
+
activesupport (7.2.3)
|
|
12
12
|
base64
|
|
13
|
+
benchmark (>= 0.3)
|
|
13
14
|
bigdecimal
|
|
14
|
-
concurrent-ruby (~> 1.0, >= 1.
|
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
15
16
|
connection_pool (>= 2.2.5)
|
|
16
17
|
drb
|
|
17
18
|
i18n (>= 1.6, < 2)
|
|
19
|
+
logger (>= 1.4.2)
|
|
18
20
|
minitest (>= 5.1)
|
|
19
|
-
|
|
20
|
-
tzinfo (~> 2.0)
|
|
21
|
-
ast (2.4.
|
|
21
|
+
securerandom (>= 0.3)
|
|
22
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
23
|
+
ast (2.4.3)
|
|
22
24
|
backport (1.2.0)
|
|
23
|
-
base64 (0.
|
|
24
|
-
benchmark (0.
|
|
25
|
-
bigdecimal (3.1
|
|
26
|
-
concurrent-ruby (1.
|
|
27
|
-
connection_pool (
|
|
28
|
-
diff-lcs (1.
|
|
29
|
-
drb (2.2.
|
|
30
|
-
ruby2_keywords
|
|
31
|
-
e2mmap (0.1.0)
|
|
25
|
+
base64 (0.3.0)
|
|
26
|
+
benchmark (0.5.0)
|
|
27
|
+
bigdecimal (3.3.1)
|
|
28
|
+
concurrent-ruby (1.3.5)
|
|
29
|
+
connection_pool (3.0.2)
|
|
30
|
+
diff-lcs (1.6.2)
|
|
31
|
+
drb (2.2.3)
|
|
32
32
|
hash_with_dot_access (1.2.0)
|
|
33
33
|
activesupport (>= 5.0.0, < 8.0)
|
|
34
|
-
i18n (1.14.
|
|
34
|
+
i18n (1.14.7)
|
|
35
35
|
concurrent-ruby (~> 1.0)
|
|
36
|
-
jaro_winkler (1.
|
|
37
|
-
json (2.
|
|
38
|
-
kramdown (2.
|
|
39
|
-
rexml
|
|
36
|
+
jaro_winkler (1.6.1)
|
|
37
|
+
json (2.18.0)
|
|
38
|
+
kramdown (2.5.1)
|
|
39
|
+
rexml (>= 3.3.9)
|
|
40
40
|
kramdown-parser-gfm (1.1.0)
|
|
41
41
|
kramdown (~> 2.0)
|
|
42
|
-
language_server-protocol (3.17.0.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
language_server-protocol (3.17.0.5)
|
|
43
|
+
lint_roller (1.1.0)
|
|
44
|
+
logger (1.7.0)
|
|
45
|
+
mini_portile2 (2.8.9)
|
|
46
|
+
minitest (5.27.0)
|
|
47
|
+
nokogiri (1.18.10)
|
|
47
48
|
mini_portile2 (~> 2.8.2)
|
|
48
49
|
racc (~> 1.4)
|
|
49
|
-
nokogiri (1.
|
|
50
|
+
nokogiri (1.18.10-arm64-darwin)
|
|
50
51
|
racc (~> 1.4)
|
|
51
|
-
nokogiri (1.
|
|
52
|
+
nokogiri (1.18.10-x86_64-linux-gnu)
|
|
52
53
|
racc (~> 1.4)
|
|
53
|
-
nokolexbor (0.6.
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
nokolexbor (0.6.2)
|
|
55
|
+
nokolexbor (0.6.2-arm64-darwin)
|
|
56
|
+
nokolexbor (0.6.2-x86_64-linux)
|
|
57
|
+
observer (0.1.2)
|
|
58
|
+
ostruct (0.6.3)
|
|
59
|
+
parallel (1.27.0)
|
|
60
|
+
parser (3.3.10.0)
|
|
56
61
|
ast (~> 2.4.1)
|
|
57
62
|
racc
|
|
58
|
-
|
|
63
|
+
prism (1.6.0)
|
|
64
|
+
racc (1.8.1)
|
|
59
65
|
rainbow (3.1.1)
|
|
60
|
-
rake (13.1
|
|
61
|
-
|
|
62
|
-
|
|
66
|
+
rake (13.3.1)
|
|
67
|
+
rbs (3.9.5)
|
|
68
|
+
logger
|
|
69
|
+
regexp_parser (2.11.3)
|
|
70
|
+
reverse_markdown (3.0.1)
|
|
63
71
|
nokogiri
|
|
64
|
-
rexml (3.
|
|
65
|
-
rubocop (1.
|
|
72
|
+
rexml (3.4.4)
|
|
73
|
+
rubocop (1.81.7)
|
|
66
74
|
json (~> 2.3)
|
|
67
|
-
language_server-protocol (
|
|
75
|
+
language_server-protocol (~> 3.17.0.2)
|
|
76
|
+
lint_roller (~> 1.1.0)
|
|
68
77
|
parallel (~> 1.10)
|
|
69
78
|
parser (>= 3.3.0.2)
|
|
70
79
|
rainbow (>= 2.2.2, < 4.0)
|
|
71
|
-
regexp_parser (>=
|
|
72
|
-
|
|
73
|
-
rubocop-ast (>= 1.30.0, < 2.0)
|
|
80
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
81
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
74
82
|
ruby-progressbar (~> 1.7)
|
|
75
|
-
unicode-display_width (>= 2.4.0, <
|
|
76
|
-
rubocop-ast (1.
|
|
77
|
-
parser (>= 3.
|
|
83
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
84
|
+
rubocop-ast (1.48.0)
|
|
85
|
+
parser (>= 3.3.7.2)
|
|
86
|
+
prism (~> 1.4)
|
|
78
87
|
rubocop-minitest (0.22.2)
|
|
79
88
|
rubocop (>= 0.90, < 2.0)
|
|
80
89
|
rubocop-rake (0.6.0)
|
|
81
90
|
rubocop (~> 1.0)
|
|
82
91
|
ruby-progressbar (1.13.0)
|
|
83
|
-
|
|
84
|
-
solargraph (0.
|
|
92
|
+
securerandom (0.4.1)
|
|
93
|
+
solargraph (0.57.0)
|
|
85
94
|
backport (~> 1.2)
|
|
86
|
-
benchmark
|
|
87
|
-
bundler (
|
|
95
|
+
benchmark (~> 0.4)
|
|
96
|
+
bundler (~> 2.0)
|
|
88
97
|
diff-lcs (~> 1.4)
|
|
89
|
-
|
|
90
|
-
jaro_winkler (~> 1.5)
|
|
98
|
+
jaro_winkler (~> 1.6, >= 1.6.1)
|
|
91
99
|
kramdown (~> 2.3)
|
|
92
100
|
kramdown-parser-gfm (~> 1.1)
|
|
101
|
+
logger (~> 1.6)
|
|
102
|
+
observer (~> 0.1)
|
|
103
|
+
ostruct (~> 0.6)
|
|
93
104
|
parser (~> 3.0)
|
|
94
|
-
|
|
95
|
-
|
|
105
|
+
prism (~> 1.4)
|
|
106
|
+
rbs (>= 3.6.1, <= 4.0.0.dev.4)
|
|
107
|
+
reverse_markdown (~> 3.0)
|
|
108
|
+
rubocop (~> 1.76)
|
|
96
109
|
thor (~> 1.0)
|
|
97
110
|
tilt (~> 2.0)
|
|
98
111
|
yard (~> 0.9, >= 0.9.24)
|
|
99
|
-
|
|
100
|
-
|
|
112
|
+
yard-activesupport-concern (~> 0.0)
|
|
113
|
+
yard-solargraph (~> 0.1)
|
|
114
|
+
thor (1.4.0)
|
|
115
|
+
tilt (2.6.1)
|
|
101
116
|
tzinfo (2.0.6)
|
|
102
117
|
concurrent-ruby (~> 1.0)
|
|
103
|
-
unicode-display_width (2.
|
|
104
|
-
|
|
118
|
+
unicode-display_width (3.2.0)
|
|
119
|
+
unicode-emoji (~> 4.1)
|
|
120
|
+
unicode-emoji (4.1.0)
|
|
121
|
+
yard (0.9.38)
|
|
122
|
+
yard-activesupport-concern (0.0.1)
|
|
123
|
+
yard (>= 0.8)
|
|
124
|
+
yard-solargraph (0.1.0)
|
|
125
|
+
yard (~> 0.9)
|
|
105
126
|
|
|
106
127
|
PLATFORMS
|
|
107
128
|
arm64-darwin-21
|
|
@@ -116,7 +137,7 @@ DEPENDENCIES
|
|
|
116
137
|
rubocop (~> 1.21)
|
|
117
138
|
rubocop-minitest (~> 0.22.1)
|
|
118
139
|
rubocop-rake (~> 0.6.0)
|
|
119
|
-
solargraph (~> 0.47
|
|
140
|
+
solargraph (~> 0.47)
|
|
120
141
|
|
|
121
142
|
BUNDLED WITH
|
|
122
143
|
2.3.14
|
data/heartml.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
spec.summary = "Server-rendered web components"
|
|
12
12
|
spec.homepage = "https://codeberg.org/heartml/heartml-ruby#readme"
|
|
13
13
|
spec.license = "MIT"
|
|
14
|
-
spec.required_ruby_version = ">= 3.
|
|
14
|
+
spec.required_ruby_version = ">= 3.2"
|
|
15
15
|
|
|
16
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
17
17
|
spec.metadata["source_code_uri"] = "https://codeberg.org/heartml/heartml-ruby"
|
data/lib/heartml/fragment.rb
CHANGED
|
@@ -13,9 +13,9 @@ module Heartml
|
|
|
13
13
|
# NOTE: for some reason, the traverse method yields node children first, then the
|
|
14
14
|
# parent node. That doesn't work for our case. We want to go strictly in source order.
|
|
15
15
|
# So this is our own implementation of that.
|
|
16
|
-
def traverse(node, &block)
|
|
16
|
+
def traverse(node, &block)
|
|
17
17
|
yield(node)
|
|
18
|
-
node.children.each { |child| traverse(child, &block) }
|
|
18
|
+
node.children.each { |child| traverse(child, &block) }
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def process(fragment = @fragment) # rubocop:disable Metrics
|
data/lib/heartml/version.rb
CHANGED
data/lib/heartml.rb
CHANGED
|
@@ -34,8 +34,8 @@ module Heartml
|
|
|
34
34
|
@registered_elements.each do |component|
|
|
35
35
|
begin
|
|
36
36
|
next if Kernel.const_get(component.to_s) == component # thin out unloaded consts
|
|
37
|
-
rescue NameError
|
|
38
|
-
|
|
37
|
+
rescue NameError # rubocop:disable Lint/SuppressedException
|
|
38
|
+
end
|
|
39
39
|
@registered_elements.delete component
|
|
40
40
|
end
|
|
41
41
|
|
|
@@ -65,7 +65,7 @@ module Heartml
|
|
|
65
65
|
|
|
66
66
|
ServerEffects.included_extras(klass)
|
|
67
67
|
|
|
68
|
-
return unless defined?(Bridgetown) && klass < Bridgetown::Component
|
|
68
|
+
return unless defined?(Bridgetown::Component) && klass < Bridgetown::Component
|
|
69
69
|
|
|
70
70
|
BridgetownRenderer.component_overrides(klass)
|
|
71
71
|
end
|
|
@@ -190,7 +190,7 @@ module Heartml
|
|
|
190
190
|
|
|
191
191
|
tmpl_el = doc.css("> template").find do |node|
|
|
192
192
|
node.attributes.empty? ||
|
|
193
|
-
(node.attributes.
|
|
193
|
+
(node.attributes.one? && node.attributes.any? { |k| k[0] == "data-ssr-only" })
|
|
194
194
|
end
|
|
195
195
|
|
|
196
196
|
if tmpl_el
|
|
@@ -369,4 +369,4 @@ module Heartml
|
|
|
369
369
|
end
|
|
370
370
|
|
|
371
371
|
require_relative "heartml/template_renderer"
|
|
372
|
-
require_relative "heartml/bridgetown_renderer" if defined?(Bridgetown)
|
|
372
|
+
require_relative "heartml/bridgetown_renderer" if defined?(Bridgetown::Component)
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: heartml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.0.
|
|
4
|
+
version: 1.0.0.beta21
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jared White
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
10
|
+
date: 2025-12-12 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: concurrent-ruby
|
|
@@ -38,7 +37,6 @@ dependencies:
|
|
|
38
37
|
- - ">="
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
39
|
version: 0.4.2
|
|
41
|
-
description:
|
|
42
40
|
email:
|
|
43
41
|
- jared@whitefusion.studio
|
|
44
42
|
executables: []
|
|
@@ -70,7 +68,6 @@ metadata:
|
|
|
70
68
|
source_code_uri: https://codeberg.org/heartml/heartml-ruby
|
|
71
69
|
changelog_uri: https://codeberg.org/heartml/heartml-ruby/src/branch/main/CHANGELOG.md
|
|
72
70
|
rubygems_mfa_required: 'true'
|
|
73
|
-
post_install_message:
|
|
74
71
|
rdoc_options: []
|
|
75
72
|
require_paths:
|
|
76
73
|
- lib
|
|
@@ -78,15 +75,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
78
75
|
requirements:
|
|
79
76
|
- - ">="
|
|
80
77
|
- !ruby/object:Gem::Version
|
|
81
|
-
version: '3.
|
|
78
|
+
version: '3.2'
|
|
82
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
80
|
requirements:
|
|
84
81
|
- - ">="
|
|
85
82
|
- !ruby/object:Gem::Version
|
|
86
83
|
version: '0'
|
|
87
84
|
requirements: []
|
|
88
|
-
rubygems_version: 3.
|
|
89
|
-
signing_key:
|
|
85
|
+
rubygems_version: 3.6.2
|
|
90
86
|
specification_version: 4
|
|
91
87
|
summary: Server-rendered web components
|
|
92
88
|
test_files: []
|