glimmer-dsl-web 0.8.2 → 0.8.3
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 +5 -0
- data/LICENSE.txt +1 -1
- data/README.md +7 -3
- data/VERSION +1 -1
- data/glimmer-dsl-web.gemspec +2 -2
- data/lib/glimmer/web/component.rb +5 -0
- data/lib/glimmer/web/element_proxy.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2875fc22d0ceddd1882af12356ce4d9cbacb2cc8bc77b11fd0a3b736b621e37b
|
|
4
|
+
data.tar.gz: 8476f4388e5f02088328865b2a5609dad2306d5e0dc2412d4ee74cd1377bbf41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b971fce2ac7742dc27ee0b75ea79c21e699fe2bce442f962ee0f1ecfabb437af31863174523b0dc3a15266130efadae6e17ea4ad16055e66d741323656c3e623
|
|
7
|
+
data.tar.gz: af8aa0386ddef4569f621aa2db14174684a9f09f1fc256f6c3ee424accfe3fa2506aa949b07b7c65233105617cb91ef1127ba43b3b8734a90e8363d6aa341290
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 0.8.3
|
|
4
|
+
|
|
5
|
+
- Raise an error when attempting to define a component that shadows an HTML element
|
|
6
|
+
- Raise an error when attempting to define a component slot that shadows an HTML element
|
|
7
|
+
|
|
3
8
|
## 0.8.2
|
|
4
9
|
|
|
5
10
|
- Support value-less boolean attributes in HTML elements (e.g. input(:required, :autofocus, id: 'name-field') / p('Hello', :hidden, id: 'product-description')), by passing as symbols before the attributes hash, but after content string if any
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
# [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for Web 0.8.
|
|
1
|
+
# [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for Web 0.8.3 (Beta)
|
|
2
2
|
## Ruby-in-the-Browser Web Frontend Framework
|
|
3
3
|
### The "Rails" of Frontend Frameworks!!! ([Fukuoka Award Winning](https://andymaleh.blogspot.com/2025/01/glimmer-dsl-for-web-wins-in-fukuoka.html))
|
|
4
4
|
#### Finally, Ruby Developer Productivity, Happiness, and Fun in the Frontend!!!
|
|
5
5
|
[](http://badge.fury.io/rb/glimmer-dsl-web)
|
|
6
6
|
[](https://gitter.im/AndyObtiva/glimmer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
7
7
|
|
|
8
|
+
**UPCOMING APRIL 17, 2026 WORKSHOP: "Building Rails SPAs in Frontend Ruby with Glimmer DSL for Web" at [wroclove.rb 2026 Ruby Conference](https://wrocloverb.com/), in Wroclaw, Poland**
|
|
9
|
+
|
|
10
|
+
**UPCOMING MAY 30, 2026 TALK: "Frontend Ruby on Rails with Glimmer DSL for Web" at [RubyConf Austria 2026](https://rubyconf.at/), in Vienna, Austria**
|
|
11
|
+
|
|
8
12
|
**(Based on Original [Glimmer](https://github.com/AndyObtiva/glimmer) Library Handling World’s Ruby GUI Needs Since 2007. Beware of Imitators!)**
|
|
9
13
|
|
|
10
14
|
**([Fukuoka Prefecture Future IT Initiative 2025 Money Forward Award Winner](https://andymaleh.blogspot.com/2025/01/glimmer-dsl-for-web-wins-in-fukuoka.html)) [(Award Announcement)](https://digitalfukuoka.jp/news/info/528/)**
|
|
@@ -1418,7 +1422,7 @@ rails new glimmer_app_server
|
|
|
1418
1422
|
Add the following to `Gemfile`:
|
|
1419
1423
|
|
|
1420
1424
|
```
|
|
1421
|
-
gem 'glimmer-dsl-web', '~> 0.8.
|
|
1425
|
+
gem 'glimmer-dsl-web', '~> 0.8.3'
|
|
1422
1426
|
```
|
|
1423
1427
|
|
|
1424
1428
|
Run:
|
|
@@ -4873,7 +4877,7 @@ These features have been suggested. You might see them in a future version of Gl
|
|
|
4873
4877
|
|
|
4874
4878
|
[MIT](https://opensource.org/licenses/MIT)
|
|
4875
4879
|
|
|
4876
|
-
Copyright (c) 2023-
|
|
4880
|
+
Copyright (c) 2023-2026 - Andy Maleh.
|
|
4877
4881
|
See [LICENSE.txt](LICENSE.txt) for further details.
|
|
4878
4882
|
|
|
4879
4883
|
--
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.8.
|
|
1
|
+
0.8.3
|
data/glimmer-dsl-web.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: glimmer-dsl-web 0.8.
|
|
5
|
+
# stub: glimmer-dsl-web 0.8.3 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "glimmer-dsl-web".freeze
|
|
9
|
-
s.version = "0.8.
|
|
9
|
+
s.version = "0.8.3".freeze
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.require_paths = ["lib".freeze]
|
|
@@ -171,6 +171,11 @@ module Glimmer
|
|
|
171
171
|
class << self
|
|
172
172
|
def included(klass)
|
|
173
173
|
if !klass.ancestors.include?(GlimmerSupersedable)
|
|
174
|
+
if !klass.to_s.include?('::') && Glimmer::Web::ElementProxy::ELEMENT_KEYWORDS.include?(klass.to_s.underscore)
|
|
175
|
+
raise "Cannot define the Glimmer::Web::Component class \"#{klass.to_s}\" because it shadows the HTML element \"#{klass.to_s.underscore}\"! " +
|
|
176
|
+
"Either rename the class (e.g. \"MyApp#{klass.to_s}\") to avoid conflicting with an existing HTML element name or " +
|
|
177
|
+
"nest it within a namespace module/class (e.g. \"MyApp::#{klass.to_s}\")!"
|
|
178
|
+
end
|
|
174
179
|
klass.extend(ClassMethods)
|
|
175
180
|
klass.include(Glimmer)
|
|
176
181
|
klass.prepend(GlimmerSupersedable)
|
|
@@ -221,6 +221,7 @@ module Glimmer
|
|
|
221
221
|
end
|
|
222
222
|
@slot = options['slot'] || options[:slot]
|
|
223
223
|
@slot = @slot.to_sym if @slot
|
|
224
|
+
validate_slot!
|
|
224
225
|
ancestor_component.slot_elements[@slot] = self if @slot && ancestor_component
|
|
225
226
|
@args = args
|
|
226
227
|
@block = block
|
|
@@ -1116,6 +1117,15 @@ module Glimmer
|
|
|
1116
1117
|
style_value.to_s
|
|
1117
1118
|
end
|
|
1118
1119
|
end
|
|
1120
|
+
|
|
1121
|
+
def validate_slot!
|
|
1122
|
+
slot_name = @slot.to_s
|
|
1123
|
+
if Glimmer::Web::ElementProxy::ELEMENT_KEYWORDS.include?(slot_name)
|
|
1124
|
+
raise "Cannot define the Component Slot \"#{slot_name}\" because it shadows the HTML element \"#{slot_name}\"! " +
|
|
1125
|
+
"Rename the Component Slot (e.g. \"my_app_#{slot_name}\") to avoid conflicting with an existing HTML element name!"
|
|
1126
|
+
end
|
|
1127
|
+
end
|
|
1128
|
+
|
|
1119
1129
|
end
|
|
1120
1130
|
end
|
|
1121
1131
|
end
|