glimmer-dsl-opal 0.22.0 → 0.22.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +61 -34
- data/VERSION +1 -1
- data/lib/glimmer-dsl-opal/samples/elaborate/user_profile.rb +78 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b25cb50adf580107747fab7e5e98f1eb5d93bbf91e0a460d8ed1a3bc671bde84
|
4
|
+
data.tar.gz: 12c5551fc10de17736f0186e10582e4fdbb2ec08176e33813d1cc2b77fedc523
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f9940b3b91abb63277fddbb9186996ab5433e512f58981516bdcb24e40504c23c2960a22182fd498a255937478f0dab6e9eb5e2d499200036c619abe7724445
|
7
|
+
data.tar.gz: 10608c56db367b7dea3a0a2c8b55b747eef1a2407c23ee3b88208255fc488462f4e0b6fafb3b7c741d382956ce06982b6913f870d71623f74aa7f236323f0991
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -143,7 +143,7 @@ Hello, Table! Game Booked
|
|
143
143
|
|
144
144
|
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
145
|
|
146
|
-
**Alpha Version** 0.22.
|
146
|
+
**Alpha Version** 0.22.1 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
147
|
|
148
148
|
Other [Glimmer](https://github.com/AndyObtiva/glimmer) DSL gems:
|
149
149
|
- [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)
|
@@ -190,8 +190,9 @@ Other [Glimmer](https://github.com/AndyObtiva/glimmer) DSL gems:
|
|
190
190
|
- [Hello, Dialog!](#hello-dialog)
|
191
191
|
- [Elaborate Samples](#elaborate-samples)
|
192
192
|
- [Login](#login)
|
193
|
-
- [Tic Tac Toe](#tic-tac-toe)
|
194
193
|
- [Contact Manager](#contact-manager)
|
194
|
+
- [Tic Tac Toe](#tic-tac-toe)
|
195
|
+
- [User Profile](#user-profile)
|
195
196
|
- [Weather](#weather)
|
196
197
|
- [External Samples](#external-samples)
|
197
198
|
- [Glimmer Calculator](#glimmer-calculator)
|
@@ -262,7 +263,7 @@ gem 'opal', '1.0.4'
|
|
262
263
|
gem 'opal-rails', '1.1.2'
|
263
264
|
gem 'opal-async', '~> 1.2.0'
|
264
265
|
gem 'opal-jquery', '~> 0.4.4'
|
265
|
-
gem 'glimmer-dsl-opal', '~> 0.22.
|
266
|
+
gem 'glimmer-dsl-opal', '~> 0.22.1'
|
266
267
|
gem 'glimmer-dsl-xml', '~> 1.2.0', require: false
|
267
268
|
gem 'glimmer-dsl-css', '~> 1.2.0', require: false
|
268
269
|
|
@@ -2427,36 +2428,6 @@ You should see "Login" dialog
|
|
2427
2428
|
![Glimmer DSL for Opal Login Filled In](images/glimmer-dsl-opal-login-filled-in.png)
|
2428
2429
|
![Glimmer DSL for Opal Login Logged In](images/glimmer-dsl-opal-login-logged-in.png)
|
2429
2430
|
|
2430
|
-
#### Tic Tac Toe
|
2431
|
-
|
2432
|
-
Add the following require statement to `app/assets/javascripts/application.rb`
|
2433
|
-
|
2434
|
-
```ruby
|
2435
|
-
require 'glimmer-dsl-opal/samples/elaborate/tic_tac_toe'
|
2436
|
-
```
|
2437
|
-
|
2438
|
-
```ruby
|
2439
|
-
Glimmer app on the desktop (using [`glimmer-dsl-swt`](https://github.com/AndyObtiva/glimmer-dsl-swt) gem):
|
2440
|
-
|
2441
|
-
![Glimmer DSL for SWT Tic Tac Toe](https://github.com/AndyObtiva/glimmer-dsl-swt/raw/master/images/glimmer-tic-tac-toe.png)
|
2442
|
-
![Glimmer DSL for SWT Tic Tac Toe In Progress](https://github.com/AndyObtiva/glimmer-dsl-swt/raw/master/images/glimmer-tic-tac-toe-in-progress.png)
|
2443
|
-
![Glimmer DSL for SWT Tic Tac Toe Game Over](https://github.com/AndyObtiva/glimmer-dsl-swt/raw/master/images/glimmer-tic-tac-toe-game-over.png)
|
2444
|
-
|
2445
|
-
Glimmer app on the web (using `glimmer-dsl-opal` gem):
|
2446
|
-
|
2447
|
-
Start the Rails server:
|
2448
|
-
```
|
2449
|
-
rails s
|
2450
|
-
```
|
2451
|
-
|
2452
|
-
Visit `http://localhost:3000`
|
2453
|
-
|
2454
|
-
You should see "Tic Tac Toe"
|
2455
|
-
|
2456
|
-
![Glimmer DSL for Opal Tic Tac Toe](images/glimmer-dsl-opal-tic-tac-toe.png)
|
2457
|
-
![Glimmer DSL for Opal Tic Tac Toe In Progress](images/glimmer-dsl-opal-tic-tac-toe-in-progress.png)
|
2458
|
-
![Glimmer DSL for Opal Tic Tac Toe Game Over](images/glimmer-dsl-opal-tic-tac-toe-game-over.png)
|
2459
|
-
|
2460
2431
|
#### Contact Manager
|
2461
2432
|
|
2462
2433
|
Add the following require statement to `app/assets/javascripts/application.rb`
|
@@ -2496,7 +2467,7 @@ rails s
|
|
2496
2467
|
|
2497
2468
|
Visit `http://localhost:3000`
|
2498
2469
|
|
2499
|
-
You should see "
|
2470
|
+
You should see "Contact Manager"
|
2500
2471
|
|
2501
2472
|
Glimmer DSL for Opal Contact Manager
|
2502
2473
|
|
@@ -2518,6 +2489,62 @@ Glimmer DSL for Opal Contact Manager Edit Done
|
|
2518
2489
|
|
2519
2490
|
![Glimmer DSL for Opal Contact Manager Edit Done](images/glimmer-dsl-opal-contact-manager-edit-done.png)
|
2520
2491
|
|
2492
|
+
#### Tic Tac Toe
|
2493
|
+
|
2494
|
+
Add the following require statement to `app/assets/javascripts/application.rb`
|
2495
|
+
|
2496
|
+
```ruby
|
2497
|
+
require 'glimmer-dsl-opal/samples/elaborate/tic_tac_toe'
|
2498
|
+
```
|
2499
|
+
|
2500
|
+
Glimmer app on the desktop (using [`glimmer-dsl-swt`](https://github.com/AndyObtiva/glimmer-dsl-swt) gem):
|
2501
|
+
|
2502
|
+
![Glimmer DSL for SWT Tic Tac Toe](https://github.com/AndyObtiva/glimmer-dsl-swt/raw/master/images/glimmer-tic-tac-toe.png)
|
2503
|
+
![Glimmer DSL for SWT Tic Tac Toe In Progress](https://github.com/AndyObtiva/glimmer-dsl-swt/raw/master/images/glimmer-tic-tac-toe-in-progress.png)
|
2504
|
+
![Glimmer DSL for SWT Tic Tac Toe Game Over](https://github.com/AndyObtiva/glimmer-dsl-swt/raw/master/images/glimmer-tic-tac-toe-game-over.png)
|
2505
|
+
|
2506
|
+
Glimmer app on the web (using `glimmer-dsl-opal` gem):
|
2507
|
+
|
2508
|
+
Start the Rails server:
|
2509
|
+
```
|
2510
|
+
rails s
|
2511
|
+
```
|
2512
|
+
|
2513
|
+
Visit `http://localhost:3000`
|
2514
|
+
|
2515
|
+
You should see "Tic Tac Toe"
|
2516
|
+
|
2517
|
+
![Glimmer DSL for Opal Tic Tac Toe](images/glimmer-dsl-opal-tic-tac-toe.png)
|
2518
|
+
![Glimmer DSL for Opal Tic Tac Toe In Progress](images/glimmer-dsl-opal-tic-tac-toe-in-progress.png)
|
2519
|
+
![Glimmer DSL for Opal Tic Tac Toe Game Over](images/glimmer-dsl-opal-tic-tac-toe-game-over.png)
|
2520
|
+
|
2521
|
+
#### User Profile
|
2522
|
+
|
2523
|
+
Code: [lib/glimmer-dsl-opal/samples/elaborate/user_profile](lib/glimmer-dsl-opal/samples/elaborate/user_profile.rb)
|
2524
|
+
|
2525
|
+
Add the following require statement to `app/assets/javascripts/application.rb`
|
2526
|
+
|
2527
|
+
```ruby
|
2528
|
+
require 'glimmer-dsl-opal/samples/elaborate/user_profile'
|
2529
|
+
```
|
2530
|
+
|
2531
|
+
Glimmer app on the desktop (using [`glimmer-dsl-swt`](https://github.com/AndyObtiva/glimmer-dsl-swt) gem):
|
2532
|
+
|
2533
|
+
![User Profile](https://github.com/AMaleh/glimmer-dsl-swt/raw/master/images/glimmer-user-profile.png)
|
2534
|
+
|
2535
|
+
Glimmer app on the web (using `glimmer-dsl-opal` gem):
|
2536
|
+
|
2537
|
+
Start the Rails server:
|
2538
|
+
```
|
2539
|
+
rails s
|
2540
|
+
```
|
2541
|
+
|
2542
|
+
Visit `http://localhost:3000`
|
2543
|
+
|
2544
|
+
You should see "User Profile"
|
2545
|
+
|
2546
|
+
![Opal User Profile](/images/glimmer-dsl-opal-user-profile.png)
|
2547
|
+
|
2521
2548
|
#### Weather
|
2522
2549
|
|
2523
2550
|
Code: [lib/glimmer-dsl-opal/samples/elaborate/weather](lib/glimmer-dsl-opal/samples/elaborate/weather.rb)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.22.
|
1
|
+
0.22.1
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# Copyright (c) 2020-2021 Andy Maleh
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# "Software"), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
22
|
+
include Glimmer
|
23
|
+
|
24
|
+
# A version of this was featured in a dzone article as an intro to Glimmer syntax:
|
25
|
+
# https://dzone.com/articles/an-introduction-glimmer
|
26
|
+
shell { |shell_proxy|
|
27
|
+
text "User Profile"
|
28
|
+
|
29
|
+
composite {
|
30
|
+
grid_layout 2, false
|
31
|
+
|
32
|
+
group {
|
33
|
+
text "Name"
|
34
|
+
grid_layout 2, false
|
35
|
+
layout_data :fill, :fill, true, true
|
36
|
+
label {text "First"}; text {text "Bullet"}
|
37
|
+
label {text "Last"}; text {text "Tooth"}
|
38
|
+
}
|
39
|
+
|
40
|
+
group {
|
41
|
+
layout_data :fill, :fill, true, true
|
42
|
+
text "Gender"
|
43
|
+
radio {text "Male"; selection true}
|
44
|
+
radio {text "Female"}
|
45
|
+
}
|
46
|
+
|
47
|
+
group {
|
48
|
+
layout_data :fill, :fill, true, true
|
49
|
+
text "Role"
|
50
|
+
check {text "Student"; selection true}
|
51
|
+
check {text "Employee"; selection true}
|
52
|
+
}
|
53
|
+
|
54
|
+
group {
|
55
|
+
text "Experience"
|
56
|
+
row_layout
|
57
|
+
layout_data :fill, :fill, true, true
|
58
|
+
spinner {selection 5}; label {text "years"}
|
59
|
+
}
|
60
|
+
|
61
|
+
button {
|
62
|
+
text "save"
|
63
|
+
layout_data :right, :center, true, true
|
64
|
+
on_widget_selected {
|
65
|
+
message_box {
|
66
|
+
text 'Profile Saved!'
|
67
|
+
message 'User profile has been saved!'
|
68
|
+
}.open
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
button {
|
73
|
+
text "close"
|
74
|
+
layout_data :left, :center, true, true
|
75
|
+
on_widget_selected { shell_proxy.close }
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}.open
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer-dsl-opal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.22.
|
4
|
+
version: 0.22.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AndyMaleh
|
@@ -283,6 +283,7 @@ files:
|
|
283
283
|
- lib/glimmer-dsl-opal/samples/elaborate/tic_tac_toe.rb
|
284
284
|
- lib/glimmer-dsl-opal/samples/elaborate/tic_tac_toe/board.rb
|
285
285
|
- lib/glimmer-dsl-opal/samples/elaborate/tic_tac_toe/cell.rb
|
286
|
+
- lib/glimmer-dsl-opal/samples/elaborate/user_profile.rb
|
286
287
|
- lib/glimmer-dsl-opal/samples/elaborate/weather.rb
|
287
288
|
- lib/glimmer-dsl-opal/samples/hello/hello_arrow.rb
|
288
289
|
- lib/glimmer-dsl-opal/samples/hello/hello_browser.rb
|