glimmer-dsl-opal 0.25.3 → 0.25.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +8 -6
- data/VERSION +1 -1
- data/lib/glimmer-dsl-opal/samples/hello/hello_custom_widget.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d82f0649f5baefa289ee1facb6102608e4d84e5a98e84a775ab1112f1698cc3d
|
4
|
+
data.tar.gz: da29c7ccd153e217867d2dd47afc7611311d79511461bb9395529a6561551cca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 427deabace568823bb59fc9e09dbbbdc7c37c22c25dd131daa41fa61a88cc61a7cc746480d733b2862055fe798a05728ca1a809bacba839068ae346f9ce005da
|
7
|
+
data.tar.gz: bf34f31729b7c49c25442f12292042c92faf9eeb97e02582d87ad25f548a201ba574af4d00d5280166235c157509b95c2e5412a9e06f3f3924ea2738c6a3555a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -12,6 +12,8 @@ Use in one of two ways:
|
|
12
12
|
|
13
13
|
Glimmer DSL for Opal successfully reuses the entire [Glimmer](https://github.com/AndyObtiva/glimmer) core DSL engine in [Opal Ruby](https://opalrb.com/) inside a web browser, and as such inherits the full range of Glimmer desktop [data-binding](https://github.com/AndyObtiva/glimmer#data-binding) capabilities for the web (including Shine syntax using `<=>` and `<=` for bidirectional [two-way] and unidirectional [one-way] data-binding respectively).
|
14
14
|
|
15
|
+
(note that auto-webification of desktop apps that involve multiple threads might involve extra changes to the code to utilize web async calls due to the async nature of transpiled JavaScript code)
|
16
|
+
|
15
17
|
#### Hello, Table! Sample
|
16
18
|
|
17
19
|
Code: [lib/glimmer-dsl-opal/samples/hello/hello_table.rb](lib/glimmer-dsl-opal/samples/hello/hello_table.rb)
|
@@ -143,7 +145,7 @@ Hello, Table! Game Booked
|
|
143
145
|
|
144
146
|
NOTE: Glimmer DSL for Opal is an alpha project. Please help make better by contributing, adopting for small or low risk projects, and providing feedback. It is still an early alpha, so the more feedback and issues you report the better.
|
145
147
|
|
146
|
-
**Alpha Version** 0.25.
|
148
|
+
**Alpha Version** 0.25.4 only supports bare-minimum capabilities for the included [samples](https://github.com/AndyObtiva/glimmer-dsl-opal#samples) (originally written for [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt))
|
147
149
|
|
148
150
|
Other [Glimmer](https://github.com/AndyObtiva/glimmer) DSL gems:
|
149
151
|
- [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)
|
@@ -232,7 +234,7 @@ Alternatively, web developers may directly use [Glimmer DSL for Opal](https://ru
|
|
232
234
|
|
233
235
|
## Pre-requisites
|
234
236
|
|
235
|
-
- Rails 5: [https://github.com/rails/rails/tree/5-2-stable](https://github.com/rails/rails/tree/5-2-stable)
|
237
|
+
- Rails 5.2: [https://github.com/rails/rails/tree/5-2-stable](https://github.com/rails/rails/tree/5-2-stable)
|
236
238
|
- Opal 1.0.4: [https://github.com/opal/opal](https://github.com/opal/opal)
|
237
239
|
- Opal-Rails 1.1.2: [https://github.com/opal/opal-rails](https://github.com/opal/opal-rails)
|
238
240
|
- jQuery 3: [https://code.jquery.com/](https://code.jquery.com/) (jQuery 3.5.1 is included in the [glimmer-dsl-opal](https://rubygems.org/gems/glimmer-dsl-opal) gem)
|
@@ -264,9 +266,9 @@ Add the following to `Gemfile`:
|
|
264
266
|
```
|
265
267
|
gem 'opal', '1.0.4'
|
266
268
|
gem 'opal-rails', '1.1.2'
|
267
|
-
gem 'opal-async', '~> 1.
|
269
|
+
gem 'opal-async', '~> 1.4.0'
|
268
270
|
gem 'opal-jquery', '~> 0.4.4'
|
269
|
-
gem 'glimmer-dsl-opal', '~> 0.25.
|
271
|
+
gem 'glimmer-dsl-opal', '~> 0.25.4'
|
270
272
|
gem 'glimmer-dsl-xml', '~> 1.2.0', require: false
|
271
273
|
gem 'glimmer-dsl-css', '~> 1.2.0', require: false
|
272
274
|
|
@@ -1035,7 +1037,7 @@ Add the following require statement to `app/assets/javascripts/application.rb`
|
|
1035
1037
|
require 'glimmer-dsl-opal/samples/hello/hello_custom_widget'
|
1036
1038
|
```
|
1037
1039
|
|
1038
|
-
Or add the Glimmer code directly if you prefer to play around with it:
|
1040
|
+
Or add the Glimmer code directly if you prefer to play around with it (note that the Opal version needs `Array#async_cycle` from the opal-async gem instead of `Array#cycle` due to the async nature of JavaScript):
|
1039
1041
|
|
1040
1042
|
```ruby
|
1041
1043
|
# This class declares a `greeting_label` custom widget (by convention)
|
@@ -1060,7 +1062,7 @@ class GreetingLabel
|
|
1060
1062
|
return if colors.nil?
|
1061
1063
|
|
1062
1064
|
Thread.new { # imported from Glimmer DSL for SWT. In Opal, avoid Threads and sleep to avoid blocking GUI.
|
1063
|
-
colors.
|
1065
|
+
colors.async_cycle { |color|
|
1064
1066
|
async_exec {
|
1065
1067
|
self.color = color
|
1066
1068
|
}
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.25.
|
1
|
+
0.25.4
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer-dsl-opal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AndyMaleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: glimmer
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.4.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.4.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: to_collection
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|