glimmer 1.0.8 → 1.1.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 +21 -0
- data/README.md +131 -144
- data/VERSION +1 -1
- data/glimmer.gemspec +37 -21
- data/lib/glimmer.rb +13 -2
- data/lib/glimmer/data_binding/model_binding.rb +43 -25
- data/lib/glimmer/data_binding/observable_array.rb +1 -0
- data/lib/glimmer/data_binding/observable_model.rb +1 -0
- data/lib/glimmer/data_binding/observer.rb +4 -0
- data/lib/glimmer/dsl/engine.rb +7 -5
- data/lib/glimmer/ext/module.rb +11 -0
- metadata +19 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8406be710971b09333b5620c761f4f2e8f462386f97c4921f945947ad6592967
|
4
|
+
data.tar.gz: b10c91c73e32356c3a8de92ad19f8364e2b1005fab08a0acc34db42bedadcdb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da71f67bc904f0141492508e3f084386e98bf4a148d24431672bbe96154dab20a08458cc64f647c1ea3d8204e0278d236917568f12b43c50e68e5a05b67304a0
|
7
|
+
data.tar.gz: 1d28c8c659c5a10621085e719586b0e096d17538550b868beb9fc1f31a2ddfa09093ee7832a420c00d0ebd81d5ff3c40f8730d6c96defebbc351c19e1aa6f38e
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,27 @@
|
|
3
3
|
Related Change Logs:
|
4
4
|
- [glimmer-dsl-swt/CHANGELOG.md](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/CHANGELOG.md)
|
5
5
|
|
6
|
+
## 1.1.1
|
7
|
+
|
8
|
+
- Ensured after_read hook truly happens after notifying observers in ModelBinding
|
9
|
+
|
10
|
+
## 1.1.0
|
11
|
+
|
12
|
+
- ModelBinding hooks for before_read, after_read, before_write, after_write
|
13
|
+
|
14
|
+
## 1.0.11
|
15
|
+
|
16
|
+
- Alias unregister as deregister everywhere
|
17
|
+
- Optimize performance of `Glimmer::Config.excluded_keyword_checkers` in glimmer method_missing
|
18
|
+
|
19
|
+
## 1.0.10
|
20
|
+
|
21
|
+
- Avoid using concurrent-ruby in Opal
|
22
|
+
|
23
|
+
## 1.0.9
|
24
|
+
|
25
|
+
- Fixed issue with top-level static expressions sometimes not working (e.g. async_exec in DSL for SWT) with DSL detected as nil
|
26
|
+
|
6
27
|
## 1.0.8
|
7
28
|
|
8
29
|
- Concurrent Array/Hash/Set data structures to better support parallel multi-threading
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 style="position: relative; top: 20px;" />](https://rubygems.org/gems/glimmer) Glimmer
|
1
|
+
# [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 style="position: relative; top: 20px;" />](https://rubygems.org/gems/glimmer) Glimmer - DSL Framework for Ruby GUI and More
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/glimmer.svg)](http://badge.fury.io/rb/glimmer)
|
3
3
|
[![rspec](https://github.com/AndyObtiva/glimmer/workflows/rspec/badge.svg)](https://github.com/AndyObtiva/glimmer/actions?query=workflow%3Arspec)
|
4
4
|
[![Coverage Status](https://coveralls.io/repos/github/AndyObtiva/glimmer/badge.svg?branch=master)](https://coveralls.io/github/AndyObtiva/glimmer?branch=master)
|
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
**(The Original Glimmer Library Since 2007. Beware of Imitators!)**
|
11
11
|
|
12
|
-
[**Glimmer**](https://rubygems.org/gems/glimmer) started out as a [GUI Library](https://github.com/AndyObtiva/glimmer-dsl-swt) and grew into a full-fledged [DSL Framework](#dsl-engine) with support for multiple GUI DSLs. Glimmer's namesake is referring to the Glimmer of Ruby in Graphical User Interfaces (contrary to popular myth perpetrated by [Charles Nutter](http://blog.headius.com/2007/11/tab-sweep.html), Glimmer has nothing to do with the ill-fated Whitney Houston movie, which does not in fact share the same name)
|
12
|
+
[**Glimmer**](https://rubygems.org/gems/glimmer) started out as a [GUI Library](https://github.com/AndyObtiva/glimmer-dsl-swt) and grew into a full-fledged [DSL Framework](#dsl-engine) with support for multiple GUI DSLs. Glimmer's namesake is referring to the Glimmer of Ruby in Graphical User Interfaces (contrary to [popular myth](http://blog.headius.com/2007/11/tab-sweep.html) perpetrated by [Charles Nutter](http://blog.headius.com/2007/11/tab-sweep.html), Glimmer has nothing to do with the ill-fated Whitney Houston movie, which does not in fact share the same name)
|
13
13
|
|
14
14
|
[<img src="https://covers.oreillystatic.com/images/9780596519650/lrg.jpg" width=105 /><br />
|
15
15
|
Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) and [Chalmers/Gothenburg University Software Engineering Master's Lecture Material](http://www.cse.chalmers.se/~bergert/slides/guest_lecture_DSLs.pdf)
|
@@ -32,19 +32,19 @@ Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) an
|
|
32
32
|
- [glimmer-dsl-opal](https://github.com/AndyObtiva/glimmer-dsl-opal): Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps)
|
33
33
|
- [glimmer-dsl-xml](https://github.com/AndyObtiva/glimmer-dsl-xml): Glimmer DSL for XML (& HTML)
|
34
34
|
- [glimmer-dsl-css](https://github.com/AndyObtiva/glimmer-dsl-css): Glimmer DSL for CSS
|
35
|
-
- [glimmer-dsl-tk](https://github.com/AndyObtiva/glimmer-dsl-tk): Glimmer DSL for Tk (Ruby Desktop Development GUI Library)
|
35
|
+
- [glimmer-dsl-tk](https://github.com/AndyObtiva/glimmer-dsl-tk): Glimmer DSL for Tk (MRI Ruby Desktop Development GUI Library)
|
36
36
|
|
37
37
|
[Glimmer and/or Glimmer DSLs receive two updates per month](https://rubygems.org/gems/glimmer-dsl-swt/versions). You can trust [Glimmer](https://rubygems.org/gems/glimmer) with your Ruby development needs.
|
38
38
|
|
39
39
|
## Table of Contents
|
40
40
|
|
41
|
-
- [Glimmer
|
41
|
+
- [Glimmer](#-glimmer---dsl-framework-for-ruby-gui-and-more)
|
42
42
|
- [Official DSLs](#official-dsls)
|
43
43
|
- [Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)](#glimmer-dsl-for-swt-jruby-desktop-development-gui-framework)
|
44
44
|
- [Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps)](#glimmer-dsl-for-opal-pure-ruby-web-gui-and-auto-webifier-of-desktop-apps)
|
45
45
|
- [Glimmer DSL for XML (& HTML)](#glimmer-dsl-for-xml--html)
|
46
46
|
- [Glimmer DSL for CSS](#glimmer-dsl-for-css)
|
47
|
-
- [Glimmer DSL for Tk (Ruby Desktop Development GUI Library)](#glimmer-dsl-for-tk-ruby-desktop-development-gui-library)
|
47
|
+
- [Glimmer DSL for Tk (MRI Ruby Desktop Development GUI Library)](#glimmer-dsl-for-tk-mri-ruby-desktop-development-gui-library)
|
48
48
|
- [DSL Engine](#dsl-engine)
|
49
49
|
- [Multi-DSL Support](#multi-dsl-support)
|
50
50
|
- [Data-Binding Library](#data-binding-library)
|
@@ -76,6 +76,8 @@ To get started, visit the [Glimmer DSL for SWT project page](https://github.com/
|
|
76
76
|
|
77
77
|
##### Hello, World!
|
78
78
|
|
79
|
+
![Hello World](images/glimmer-hello-world.png)
|
80
|
+
|
79
81
|
Glimmer GUI code (from [samples/hello/hello_world.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_world.rb)):
|
80
82
|
```ruby
|
81
83
|
include Glimmer
|
@@ -88,162 +90,141 @@ shell {
|
|
88
90
|
}.open
|
89
91
|
```
|
90
92
|
|
91
|
-
Glimmer
|
93
|
+
##### Glimmer Tetris
|
92
94
|
|
93
|
-
![
|
95
|
+
![Tetris](https://raw.githubusercontent.com/AndyObtiva/glimmer-dsl-swt/v4.18.3.1/images/glimmer-tetris.png)
|
94
96
|
|
95
|
-
|
96
|
-
|
97
|
-
Glimmer GUI code (from [samples/elaborate/tic_tac_toe.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/elaborate/tic_tac_toe.rb)):
|
97
|
+
Glimmer GUI code (from [samples/elaborate/tetris.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/v4.18.3.1/samples/elaborate/tetris.rb)):
|
98
98
|
|
99
99
|
```ruby
|
100
100
|
# ...
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
101
|
+
shell(:no_resize) {
|
102
|
+
grid_layout {
|
103
|
+
num_columns 2
|
104
|
+
make_columns_equal_width false
|
105
|
+
margin_width 0
|
106
|
+
margin_height 0
|
107
|
+
horizontal_spacing 0
|
108
|
+
}
|
109
|
+
|
110
|
+
text 'Glimmer Tetris'
|
111
|
+
minimum_size 475, 500
|
112
|
+
background :gray
|
113
|
+
|
114
|
+
tetris_menu_bar(game: game)
|
115
|
+
|
116
|
+
playfield(game_playfield: game.playfield, playfield_width: playfield_width, playfield_height: playfield_height, block_size: BLOCK_SIZE)
|
117
|
+
|
118
|
+
score_lane(game: game, block_size: BLOCK_SIZE) {
|
119
|
+
layout_data(:fill, :fill, true, true)
|
120
|
+
}
|
121
|
+
|
122
|
+
on_widget_disposed {
|
123
|
+
deregister_observers
|
119
124
|
}
|
120
125
|
}
|
121
126
|
# ...
|
122
127
|
```
|
123
128
|
|
124
|
-
|
125
|
-
|
126
|
-
![Tic Tac Toe](images/glimmer-tic-tac-toe-in-progress.png)
|
129
|
+
##### Hello, Table!
|
127
130
|
|
128
|
-
|
131
|
+
![Hello Table](https://raw.githubusercontent.com/AndyObtiva/glimmer-dsl-swt/master/images/glimmer-hello-table.png)
|
129
132
|
|
130
|
-
Glimmer GUI code (from [samples/
|
133
|
+
Glimmer GUI code (from [samples/hello/hello_table.rb](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/samples/hello/hello_table.rb)):
|
131
134
|
|
132
135
|
```ruby
|
133
136
|
# ...
|
134
137
|
shell {
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
138
|
+
grid_layout
|
139
|
+
|
140
|
+
text 'Hello, Table!'
|
141
|
+
|
142
|
+
label {
|
143
|
+
layout_data :center, :center, true, false
|
144
|
+
|
145
|
+
text 'Baseball Playoff Schedule'
|
146
|
+
font height: 30, style: :bold
|
147
|
+
}
|
148
|
+
|
149
|
+
combo(:read_only) {
|
150
|
+
layout_data :center, :center, true, false
|
151
|
+
selection bind(BaseballGame, :playoff_type)
|
152
|
+
font height: 16
|
153
|
+
}
|
154
|
+
|
155
|
+
table(:editable) { |table_proxy|
|
156
|
+
layout_data :fill, :fill, true, true
|
157
|
+
|
158
|
+
table_column {
|
159
|
+
text 'Game Date'
|
160
|
+
width 150
|
161
|
+
sort_property :date # ensure sorting by real date value (not `game_date` string specified in items below)
|
162
|
+
editor :date_drop_down, property: :date_time
|
163
|
+
}
|
164
|
+
table_column {
|
165
|
+
text 'Game Time'
|
166
|
+
width 150
|
167
|
+
sort_property :time # ensure sorting by real time value (not `game_time` string specified in items below)
|
168
|
+
editor :time, property: :date_time
|
169
|
+
}
|
170
|
+
table_column {
|
171
|
+
text 'Ballpark'
|
172
|
+
width 180
|
173
|
+
editor :none
|
174
|
+
}
|
175
|
+
table_column {
|
176
|
+
text 'Home Team'
|
177
|
+
width 150
|
178
|
+
editor :combo, :read_only # read_only is simply an SWT style passed to combo widget
|
179
|
+
}
|
180
|
+
table_column {
|
181
|
+
text 'Away Team'
|
182
|
+
width 150
|
183
|
+
editor :combo, :read_only # read_only is simply an SWT style passed to combo widget
|
184
|
+
}
|
185
|
+
table_column {
|
186
|
+
text 'Promotion'
|
187
|
+
width 150
|
188
|
+
# default text editor is used here
|
189
|
+
}
|
190
|
+
|
191
|
+
# Data-bind table items (rows) to a model collection property, specifying column properties ordering per nested model
|
192
|
+
items bind(BaseballGame, :schedule), column_properties(:game_date, :game_time, :ballpark, :home_team, :away_team, :promotion)
|
193
|
+
|
194
|
+
# Data-bind table selection
|
195
|
+
selection bind(BaseballGame, :selected_game)
|
196
|
+
|
197
|
+
# Default initial sort property
|
198
|
+
sort_property :date
|
199
|
+
|
200
|
+
# Sort by these additional properties after handling sort by the column the user clicked
|
201
|
+
additional_sort_properties :date, :time, :home_team, :away_team, :ballpark, :promotion
|
202
|
+
|
203
|
+
menu {
|
204
|
+
menu_item {
|
205
|
+
text 'Book'
|
201
206
|
|
202
|
-
|
203
|
-
|
204
|
-
on_widget_selected { @contact_manager_presenter.list }
|
205
|
-
on_key_pressed {|key_event|
|
206
|
-
@contact_manager_presenter.list if key_event.keyCode == swt(:cr)
|
207
|
-
}
|
207
|
+
on_widget_selected {
|
208
|
+
book_selected_game
|
208
209
|
}
|
209
210
|
}
|
210
211
|
}
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
text "First Name"
|
222
|
-
width 80
|
223
|
-
}
|
224
|
-
table_column {
|
225
|
-
text "Last Name"
|
226
|
-
width 80
|
227
|
-
}
|
228
|
-
table_column {
|
229
|
-
text "Email"
|
230
|
-
width 200
|
231
|
-
}
|
232
|
-
items bind(@contact_manager_presenter, :results),
|
233
|
-
column_properties(:first_name, :last_name, :email)
|
234
|
-
on_mouse_up { |event|
|
235
|
-
table_proxy.edit_table_item(event.table_item, event.column_index)
|
236
|
-
}
|
212
|
+
}
|
213
|
+
|
214
|
+
button {
|
215
|
+
text 'Book Selected Game'
|
216
|
+
layout_data :center, :center, true, false
|
217
|
+
font height: 16
|
218
|
+
enabled bind(BaseballGame, :selected_game)
|
219
|
+
|
220
|
+
on_widget_selected {
|
221
|
+
book_selected_game
|
237
222
|
}
|
238
223
|
}
|
239
224
|
}.open
|
240
225
|
# ...
|
241
226
|
```
|
242
227
|
|
243
|
-
Glimmer App:
|
244
|
-
|
245
|
-
![Contact Manager](images/glimmer-contact-manager.png)
|
246
|
-
|
247
228
|
#### Production Desktop Apps Built with Glimmer DSL for SWT
|
248
229
|
|
249
230
|
[<img alt="Are We There Yet Logo" src="https://raw.githubusercontent.com/AndyObtiva/are-we-there-yet/master/are-we-there-yet-logo.svg" width="40" />Are We There Yet?](https://github.com/AndyObtiva/are-we-there-yet) - Small Project Tracking App
|
@@ -254,6 +235,10 @@ Glimmer App:
|
|
254
235
|
|
255
236
|
[![Math Bowling App Screenshot](https://raw.githubusercontent.com/AndyObtiva/MathBowling/master/Math-Bowling-Screenshot.png)](https://github.com/AndyObtiva/MathBowling)
|
256
237
|
|
238
|
+
[<img alt="Garderie Rainbow Daily Agenda Logo" src="https://raw.githubusercontent.com/AndyObtiva/garderie_rainbow_daily_agenda/master/images/garderie_rainbow_daily_agenda_logo.png" width="40" />Garderie Rainbow Daily Agenda](https://github.com/AndyObtiva/garderie_rainbow_daily_agenda) - A child nursery daily agenda reporting desktop app
|
239
|
+
|
240
|
+
[![Garderie Rainbow Daily Agenda App Screenshot](https://raw.githubusercontent.com/AndyObtiva/garderie_rainbow_daily_agenda/master/images/garderie_rainbow_daily_agenda_screenshot.png)](https://github.com/AndyObtiva/garderie_rainbow_daily_agenda)
|
241
|
+
|
257
242
|
### Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps)
|
258
243
|
|
259
244
|
[Glimmer DSL for Opal](https://github.com/AndyObtiva/glimmer-dsl-opal) is an experimental proof-of-concept web GUI adapter for [Glimmer](https://github.com/AndyObtiva/glimmer) desktop apps (i.e. apps built with [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt)). It webifies them via [Rails](https://rubyonrails.org/), allowing Ruby desktop apps to run on the web via [Opal Ruby](https://opalrb.com/) without changing a line of code. Apps may then be custom-styled for the web with standard CSS.
|
@@ -418,9 +403,9 @@ shell {
|
|
418
403
|
caret nil
|
419
404
|
}
|
420
405
|
command_button('AC')
|
421
|
-
operation_button('
|
422
|
-
operation_button('
|
423
|
-
operation_button('
|
406
|
+
operation_button('÷')
|
407
|
+
operation_button('�')
|
408
|
+
operation_button('−')
|
424
409
|
(7..9).each { |number|
|
425
410
|
number_button(number)
|
426
411
|
}
|
@@ -540,13 +525,13 @@ Output:
|
|
540
525
|
body{font-size:1.1em;background:white}body > h1{background-color:red;font-size:2em}
|
541
526
|
```
|
542
527
|
|
543
|
-
### Glimmer DSL for Tk (Ruby Desktop Development GUI Library)
|
528
|
+
### Glimmer DSL for Tk (MRI Ruby Desktop Development GUI Library)
|
544
529
|
|
545
530
|
[Tcl/Tk](https://www.tcl.tk/) has evolved into a practical desktop GUI toolkit due to gaining truely native looking widgets on Mac, Windows, and Linux in [Tk version 8.5](https://www.tcl.tk/software/tcltk/8.5.html#:~:text=Highlights%20of%20Tk%208.5&text=Font%20rendering%3A%20Now%20uses%20anti,and%20window%20layout%2C%20and%20more.).
|
546
531
|
|
547
532
|
Additionally, [Ruby](https://www.ruby-lang.org/en/) 3.0 Ractor (formerly known as [Guilds](https://olivierlacan.com/posts/concurrency-in-ruby-3-with-guilds/)) supports truly parallel multi-threading, making both [MRI](https://github.com/ruby/ruby) and [Tk](https://www.tcl.tk/) finally viable for support in [Glimmer](https://github.com/AndyObtiva/glimmer) (Ruby Desktop Development GUI Library) as an alternative to [JRuby on SWT](https://github.com/AndyObtiva/glimmer-dsl-swt).
|
548
533
|
|
549
|
-
The trade-off is that while [SWT](https://www.eclipse.org/swt/) provides a plethora of high quality reusable widgets for the Enterprise (such as [Nebula](https://www.eclipse.org/nebula/)), [Tk](https://www.tcl.tk/) enables very fast app startup time via [MRI Ruby](https://www.ruby-lang.org/en/).
|
534
|
+
The trade-off is that while [SWT](https://www.eclipse.org/swt/) provides a plethora of high quality reusable widgets for the Enterprise (such as [Nebula](https://www.eclipse.org/nebula/)), [Tk](https://www.tcl.tk/) enables very fast app startup time and a small memory footprint via [MRI Ruby](https://www.ruby-lang.org/en/).
|
550
535
|
|
551
536
|
[Glimmer DSL for Tk](https://github.com/AndyObtiva/glimmer-dsl-tk) aims to provide a DSL similar to the [Glimmer DSL for SWT](https://github.com/AndyObtiva/glimmer-dsl-swt) to enable more productive desktop development in Ruby with:
|
552
537
|
- Declarative DSL syntax that visually maps to the GUI widget hierarchy
|
@@ -852,9 +837,11 @@ Example: `Glimmer::DSL::Engine.enabled_dsls = [:xml, :css]`
|
|
852
837
|
|
853
838
|
## Data-Binding Library
|
854
839
|
|
855
|
-
Data-Binding enables
|
840
|
+
Data-Binding enables mapping GUI properties (like text and color) to Model attributes (like name and age).
|
841
|
+
|
842
|
+
Glimmer enhances observed models automatically (including array operations like `<<` and `reject!`) on first observation. As such, you get automatic observable support, including nested and computed observations. No need to change your model code to data-bind it to the view or add repetitive boilerplate modules. View data-binding is truly decoupled from model logic by being able to observe any model attribute (Ruby attribute reader/writer combo or Ruby attribute reader alone for read-only data-binding when needed)
|
856
843
|
|
857
|
-
|
844
|
+
This relies mainly on the Observer Design Pattern and the MVP (Model-View-Presenter) Architectural Pattern (a variation on MVC)
|
858
845
|
|
859
846
|
These are the main classes concerning data-binding:
|
860
847
|
- `Observer`: Provides general observer support including unique registration and deregistration for cleanup and prevention of memory leaks. Main methods concerned are: `call`, `register` (alias: `observe`), and `unregister` (alias: `unobserve` or `deregister`)
|
@@ -914,8 +901,8 @@ If you would like to contribute to Glimmer, please study up on Glimmer and [SWT]
|
|
914
901
|
|
915
902
|
You may apply for contributing to any of these Glimmer DSL gems whether you prefer to focus on the desktop or web:
|
916
903
|
- [glimmer-dsl-swt](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)
|
917
|
-
- [glimmer-dsl-tk](https://github.com/AndyObtiva/glimmer-dsl-tk): Glimmer DSL for Tk (Ruby Desktop Development GUI Library)
|
918
|
-
- [glimmer-dsl-opal](https://github.com/AndyObtiva/glimmer-dsl-opal): Glimmer DSL for Opal (Web GUI
|
904
|
+
- [glimmer-dsl-tk](https://github.com/AndyObtiva/glimmer-dsl-tk): Glimmer DSL for Tk (MRI Ruby Desktop Development GUI Library)
|
905
|
+
- [glimmer-dsl-opal](https://github.com/AndyObtiva/glimmer-dsl-opal): Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps)
|
919
906
|
- [glimmer-dsl-xml](https://github.com/AndyObtiva/glimmer-dsl-xml): Glimmer DSL for XML (& HTML)
|
920
907
|
- [glimmer-dsl-css](https://github.com/AndyObtiva/glimmer-dsl-css): Glimmer DSL for CSS
|
921
908
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.1
|
data/glimmer.gemspec
CHANGED
@@ -1,20 +1,21 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in
|
3
|
+
# Instead, edit Jeweler::Tasks in rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: glimmer 1.
|
5
|
+
# stub: glimmer 1.1.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "glimmer".freeze
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.1.1"
|
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]
|
13
13
|
s.authors = ["AndyMaleh".freeze]
|
14
|
-
s.date = "2021-
|
14
|
+
s.date = "2021-02-09"
|
15
15
|
s.description = "Glimmer is a Ruby DSL Framework consisting of a DSL Engine and an Observable/Observer/Data-Binding Library. Used in the Glimmer DSL for SWT (JRuby Desktop Development GUI Framework), the Glimmer DSL for Tk (Ruby Desktop Development GUI Library), the Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps), the Glimmer DSL for XML (& HTML), and the Glimmer DSL for CSS.".freeze
|
16
16
|
s.email = "andy.am@gmail.com".freeze
|
17
17
|
s.extra_rdoc_files = [
|
18
|
+
"CHANGELOG.md",
|
18
19
|
"LICENSE.txt",
|
19
20
|
"README.md"
|
20
21
|
]
|
@@ -40,31 +41,46 @@ Gem::Specification.new do |s|
|
|
40
41
|
"lib/glimmer/dsl/static_expression.rb",
|
41
42
|
"lib/glimmer/dsl/top_level_expression.rb",
|
42
43
|
"lib/glimmer/error.rb",
|
44
|
+
"lib/glimmer/ext/module.rb",
|
43
45
|
"lib/glimmer/invalid_keyword_error.rb"
|
44
46
|
]
|
45
47
|
s.homepage = "http://github.com/AndyObtiva/glimmer".freeze
|
46
48
|
s.licenses = ["MIT".freeze]
|
47
|
-
s.rubygems_version = "3.
|
48
|
-
s.summary = "Glimmer
|
49
|
+
s.rubygems_version = "3.0.6".freeze
|
50
|
+
s.summary = "Glimmer - DSL Engine for Ruby GUI and More".freeze
|
49
51
|
|
50
52
|
if s.respond_to? :specification_version then
|
51
53
|
s.specification_version = 4
|
52
|
-
end
|
53
54
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
55
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
56
|
+
s.add_runtime_dependency(%q<array_include_methods>.freeze, [">= 1.0.4", "< 2.0.0"])
|
57
|
+
s.add_runtime_dependency(%q<facets>.freeze, [">= 3.1.0", "< 4.0.0"])
|
58
|
+
s.add_runtime_dependency(%q<concurrent-ruby>.freeze, [">= 1.1.7", "< 2.0.0"])
|
59
|
+
s.add_development_dependency(%q<rspec-mocks>.freeze, ["~> 3.5.0"])
|
60
|
+
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
61
|
+
s.add_development_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.0"])
|
62
|
+
s.add_development_dependency(%q<rake>.freeze, [">= 10.1.0", "< 14.0.0"])
|
63
|
+
s.add_development_dependency(%q<jeweler>.freeze, [">= 2.0.0", "< 3.0.0"])
|
64
|
+
s.add_development_dependency(%q<rdoc>.freeze, [">= 6.2.1", "< 7.0.0"])
|
65
|
+
s.add_development_dependency(%q<coveralls>.freeze, [">= 0"])
|
66
|
+
s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.16.1"])
|
67
|
+
s.add_development_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0"])
|
68
|
+
s.add_development_dependency(%q<rake-tui>.freeze, [">= 0"])
|
69
|
+
else
|
70
|
+
s.add_dependency(%q<array_include_methods>.freeze, [">= 1.0.4", "< 2.0.0"])
|
71
|
+
s.add_dependency(%q<facets>.freeze, [">= 3.1.0", "< 4.0.0"])
|
72
|
+
s.add_dependency(%q<concurrent-ruby>.freeze, [">= 1.1.7", "< 2.0.0"])
|
73
|
+
s.add_dependency(%q<rspec-mocks>.freeze, ["~> 3.5.0"])
|
74
|
+
s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
|
75
|
+
s.add_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.0"])
|
76
|
+
s.add_dependency(%q<rake>.freeze, [">= 10.1.0", "< 14.0.0"])
|
77
|
+
s.add_dependency(%q<jeweler>.freeze, [">= 2.0.0", "< 3.0.0"])
|
78
|
+
s.add_dependency(%q<rdoc>.freeze, [">= 6.2.1", "< 7.0.0"])
|
79
|
+
s.add_dependency(%q<coveralls>.freeze, [">= 0"])
|
80
|
+
s.add_dependency(%q<simplecov>.freeze, ["~> 0.16.1"])
|
81
|
+
s.add_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0"])
|
82
|
+
s.add_dependency(%q<rake-tui>.freeze, [">= 0"])
|
83
|
+
end
|
68
84
|
else
|
69
85
|
s.add_dependency(%q<array_include_methods>.freeze, [">= 1.0.4", "< 2.0.0"])
|
70
86
|
s.add_dependency(%q<facets>.freeze, [">= 3.1.0", "< 4.0.0"])
|
data/lib/glimmer.rb
CHANGED
@@ -22,11 +22,20 @@
|
|
22
22
|
require 'logger'
|
23
23
|
require 'set'
|
24
24
|
require 'array_include_methods'
|
25
|
-
|
25
|
+
if RUBY_ENGINE == 'opal'
|
26
|
+
module Concurrent
|
27
|
+
Array = ::Array
|
28
|
+
Hash = ::Hash
|
29
|
+
Set = ::Set
|
30
|
+
end
|
31
|
+
else
|
32
|
+
require 'concurrent-ruby'
|
33
|
+
end
|
26
34
|
|
27
35
|
$LOAD_PATH.unshift(File.expand_path('..', __FILE__))
|
28
36
|
|
29
37
|
require 'glimmer/config'
|
38
|
+
require 'glimmer/ext/module'
|
30
39
|
|
31
40
|
# Glimmer provides a JRuby Desktop UI DSL + Data-Binding functionality
|
32
41
|
#
|
@@ -57,7 +66,9 @@ module Glimmer
|
|
57
66
|
|
58
67
|
def method_missing(method_symbol, *args, &block)
|
59
68
|
# This if statement speeds up Glimmer in girb or whenever directly including on main object
|
60
|
-
is_excluded = Config.excluded_keyword_checkers.
|
69
|
+
is_excluded = Config.excluded_keyword_checkers.any? do |checker|
|
70
|
+
instance_exec(method_symbol, *args, &checker)
|
71
|
+
end
|
61
72
|
if is_excluded
|
62
73
|
Glimmer::Config.logger.debug "Glimmer excluded keyword: #{method_symbol}" if Glimmer::Config.log_excluded_keywords?
|
63
74
|
super(method_symbol, *args, &block)
|
@@ -49,9 +49,7 @@ module Glimmer
|
|
49
49
|
def nested_models
|
50
50
|
@nested_models = [base_model]
|
51
51
|
model_property_names.reduce(base_model) do |reduced_model, nested_model_property_name|
|
52
|
-
if reduced_model.nil?
|
53
|
-
nil
|
54
|
-
else
|
52
|
+
if !reduced_model.nil?
|
55
53
|
invoke_property_reader(reduced_model, nested_model_property_name).tap do |new_reduced_model|
|
56
54
|
@nested_models << new_reduced_model
|
57
55
|
end
|
@@ -72,21 +70,6 @@ module Glimmer
|
|
72
70
|
nested_property? ? nested_property_name : property_name_expression
|
73
71
|
end
|
74
72
|
|
75
|
-
def convert_on_read(value)
|
76
|
-
apply_converter(@binding_options[:on_read], value)
|
77
|
-
end
|
78
|
-
|
79
|
-
def convert_on_write(value)
|
80
|
-
apply_converter(@binding_options[:on_write], value)
|
81
|
-
end
|
82
|
-
|
83
|
-
def apply_converter(converter, value)
|
84
|
-
return value if converter.nil?
|
85
|
-
return value.send(converter) if (converter.is_a?(String) || converter.is_a?(Symbol)) && value.respond_to?(converter)
|
86
|
-
return converter.call(value) if converter.respond_to?(:call, value)
|
87
|
-
raise Glimmer::Error, "Unsupported bind converter: #{converter.inspect}"
|
88
|
-
end
|
89
|
-
|
90
73
|
# All nested property names
|
91
74
|
# e.g. property name expression "address.state" gives ['address', 'state']
|
92
75
|
# If there are any indexed property names, this returns indexes as properties.
|
@@ -127,7 +110,10 @@ module Glimmer
|
|
127
110
|
property_name => Observer.proc do |new_value|
|
128
111
|
# Ensure reattaching observers when a higher level nested property is updated (e.g. person.address changes reattaches person.address.street observer)
|
129
112
|
add_observer(observer)
|
130
|
-
|
113
|
+
converted_value = evaluate_property
|
114
|
+
observer.call(converted_value).tap do
|
115
|
+
apply_processor(@binding_options[:after_read], converted_value)
|
116
|
+
end
|
131
117
|
end
|
132
118
|
)
|
133
119
|
end
|
@@ -142,7 +128,10 @@ module Glimmer
|
|
142
128
|
add_nested_observers(observer)
|
143
129
|
else
|
144
130
|
model_binding_observer = Observer.proc do |new_value|
|
145
|
-
|
131
|
+
converted_value = evaluate_property
|
132
|
+
observer.call(converted_value).tap do
|
133
|
+
apply_processor(@binding_options[:after_read], converted_value)
|
134
|
+
end
|
146
135
|
end
|
147
136
|
observer_registration = model_binding_observer.observe(model, property_name)
|
148
137
|
my_registration = observer.registration_for(self)
|
@@ -167,7 +156,10 @@ module Glimmer
|
|
167
156
|
@computed_observer_collection ||= Concurrent::Hash.new
|
168
157
|
unless @computed_observer_collection.has_key?(observer)
|
169
158
|
@computed_observer_collection[observer] = Observer.proc do |new_value|
|
170
|
-
|
159
|
+
converted_value = evaluate_property
|
160
|
+
observer.call(converted_value).tap do
|
161
|
+
apply_processor(@binding_options[:after_read], converted_value)
|
162
|
+
end
|
171
163
|
end
|
172
164
|
end
|
173
165
|
@computed_observer_collection[observer]
|
@@ -215,9 +207,10 @@ module Glimmer
|
|
215
207
|
def evaluate_property
|
216
208
|
value = nil
|
217
209
|
value = invoke_property_reader(model, property_name) unless model.nil?
|
210
|
+
apply_processor(@binding_options[:before_read], value)
|
218
211
|
convert_on_read(value)
|
219
212
|
end
|
220
|
-
|
213
|
+
|
221
214
|
def evaluate_options_property
|
222
215
|
model.send(options_property_name) unless model.nil?
|
223
216
|
end
|
@@ -230,6 +223,29 @@ module Glimmer
|
|
230
223
|
property_expression.to_s.start_with?('[')
|
231
224
|
end
|
232
225
|
|
226
|
+
private
|
227
|
+
|
228
|
+
def convert_on_read(value)
|
229
|
+
apply_processor(@binding_options[:on_read], value)
|
230
|
+
end
|
231
|
+
|
232
|
+
def convert_on_write(value)
|
233
|
+
apply_processor(@binding_options[:on_write], value)
|
234
|
+
end
|
235
|
+
|
236
|
+
def apply_processor(processor, value)
|
237
|
+
return value if processor.nil?
|
238
|
+
return value.send(processor) if (processor.is_a?(String) || processor.is_a?(Symbol)) && value.respond_to?(processor)
|
239
|
+
return invoke_proc_with_exact_parameters(processor, value) if processor.respond_to?(:call)
|
240
|
+
raise Glimmer::Error, "Unsupported bind processor: #{processor.inspect}"
|
241
|
+
end
|
242
|
+
|
243
|
+
def invoke_proc_with_exact_parameters(proc_object, *args)
|
244
|
+
return if proc_object.nil?
|
245
|
+
args = args[0...proc_object.parameters.size]
|
246
|
+
proc_object.call(*args)
|
247
|
+
end
|
248
|
+
|
233
249
|
def invoke_property_reader(object, property_expression)
|
234
250
|
if property_indexed?(property_expression)
|
235
251
|
property_method = '[]'
|
@@ -243,15 +259,17 @@ module Glimmer
|
|
243
259
|
|
244
260
|
def invoke_property_writer(object, property_expression, value)
|
245
261
|
raise "Cannot invoke `#{property_expression}` because ModelBinding#binding_options[:read_only]=true" if @binding_options[:read_only]
|
246
|
-
|
262
|
+
apply_processor(@binding_options[:before_write], value)
|
263
|
+
converted_value = convert_on_write(value)
|
247
264
|
if property_indexed?(property_expression)
|
248
265
|
property_method = '[]='
|
249
266
|
property_argument = property_expression[1...-2]
|
250
267
|
property_argument = property_argument.to_i if property_argument.match(/\d+/)
|
251
|
-
object.send(property_method, property_argument,
|
268
|
+
object.send(property_method, property_argument, converted_value)
|
252
269
|
else
|
253
|
-
object.send(property_expression,
|
270
|
+
object.send(property_expression, converted_value)
|
254
271
|
end
|
272
|
+
apply_processor(@binding_options[:after_write], converted_value)
|
255
273
|
end
|
256
274
|
end
|
257
275
|
end
|
@@ -289,6 +289,7 @@ module Glimmer
|
|
289
289
|
return unless old_value.is_a?(ObservableModel) || old_value.is_a?(ObservableArray)
|
290
290
|
property_observer_list.each { |observer| observer.unregister_dependents_with_observable(observer.registration_for(self), old_value) }
|
291
291
|
end
|
292
|
+
alias deregister_dependent_observers unregister_dependent_observers
|
292
293
|
end
|
293
294
|
end
|
294
295
|
end
|
@@ -124,6 +124,7 @@ module Glimmer
|
|
124
124
|
return unless old_value.is_a?(ObservableModel) || old_value.is_a?(ObservableArray)
|
125
125
|
property_observer_list(property_name).each { |observer| observer.unregister_dependents_with_observable(observer.registration_for(self, property_name), old_value) }
|
126
126
|
end
|
127
|
+
alias deregister_dependent_observers unregister_dependent_observers
|
127
128
|
|
128
129
|
def ensure_array_object_observer(property_name, object, old_object = nil)
|
129
130
|
return unless object&.is_a?(Array)
|
@@ -110,6 +110,7 @@ module Glimmer
|
|
110
110
|
end
|
111
111
|
end
|
112
112
|
alias unobserve unregister
|
113
|
+
alias deregister unregister
|
113
114
|
|
114
115
|
def unregister_dependents_with_observable(registration, dependent_observable)
|
115
116
|
thedependents = dependents_for(registration).select do |thedependent|
|
@@ -117,12 +118,15 @@ module Glimmer
|
|
117
118
|
end
|
118
119
|
thedependents.each(&:unregister)
|
119
120
|
end
|
121
|
+
alias unobserve_dependents_with_observable unregister_dependents_with_observable
|
122
|
+
alias deregister_dependents_with_observable unregister_dependents_with_observable
|
120
123
|
|
121
124
|
# cleans up all registrations in observables
|
122
125
|
def unregister_all_observables
|
123
126
|
registrations.each(&:unregister)
|
124
127
|
end
|
125
128
|
alias unobserve_all_observables unregister_all_observables
|
129
|
+
alias deregister_all_observables unregister_all_observables
|
126
130
|
|
127
131
|
# add dependent observer to unregister when unregistering observer
|
128
132
|
def add_dependent(parent_to_dependent_hash)
|
data/lib/glimmer/dsl/engine.rb
CHANGED
@@ -37,10 +37,11 @@ module Glimmer
|
|
37
37
|
STATIC_EXPRESSION_METHOD_FACTORY = lambda do |keyword|
|
38
38
|
lambda do |*args, &block|
|
39
39
|
if Glimmer::DSL::Engine.no_dsls?
|
40
|
-
puts Glimmer::DSL::Engine::MESSAGE_NO_DSLS
|
40
|
+
puts Glimmer::DSL::Engine::MESSAGE_NO_DSLS # TODO consider switching to an error log statement
|
41
41
|
else
|
42
42
|
retrieved_static_expression = Glimmer::DSL::Engine.static_expressions[keyword][Glimmer::DSL::Engine.dsl]
|
43
|
-
|
43
|
+
# TODO consider replacing Glimmer::DSL::Engine.static_expressions[keyword].keys - Glimmer::DSL::Engine.disabled_dsls with Glimmer::DSL::Engine.enabled_static_expression_dsls(keyword)
|
44
|
+
static_expression_dsl = (Glimmer::DSL::Engine.static_expressions[keyword].keys - Glimmer::DSL::Engine.disabled_dsls).first
|
44
45
|
interpretation = nil
|
45
46
|
if retrieved_static_expression.nil? && Glimmer::DSL::Engine.dsl && (static_expression_dsl.nil? || !Glimmer::DSL::Engine.static_expressions[keyword][static_expression_dsl].is_a?(TopLevelExpression))
|
46
47
|
begin
|
@@ -55,8 +56,9 @@ module Glimmer
|
|
55
56
|
raise Glimmer::Error, "Unsupported keyword: #{keyword}" unless static_expression_dsl || retrieved_static_expression
|
56
57
|
Glimmer::DSL::Engine.dsl_stack.push(static_expression_dsl || Glimmer::DSL::Engine.dsl)
|
57
58
|
static_expression = Glimmer::DSL::Engine.static_expressions[keyword][Glimmer::DSL::Engine.dsl]
|
58
|
-
|
59
|
-
|
59
|
+
static_expression_can_interpret = nil
|
60
|
+
if static_expression.nil? || !(static_expression_can_interpret = static_expression.can_interpret?(Glimmer::DSL::Engine.parent, keyword, *args, &block))
|
61
|
+
raise Error, "Invalid use of Glimmer keyword #{keyword} with args #{args} under parent #{Glimmer::DSL::Engine.parent.inspect} with DSL #{Glimmer::DSL::Engine.dsl.inspect} and static expression #{static_expression.inspect} having can_interpret? as #{static_expression_can_interpret.inspect}"
|
60
62
|
else
|
61
63
|
Glimmer::Config.logger.info {"#{static_expression.class.name} will handle expression keyword #{keyword}"}
|
62
64
|
Glimmer::DSL::Engine.interpret_expression(static_expression, keyword, *args, &block)
|
@@ -162,7 +164,7 @@ module Glimmer
|
|
162
164
|
|
163
165
|
# Interprets Glimmer dynamic DSL expression consisting of keyword, args, and block (e.g. shell(:no_resize) { ... })
|
164
166
|
def interpret(keyword, *args, &block)
|
165
|
-
return puts(MESSAGE_NO_DSLS) if no_dsls?
|
167
|
+
return puts(MESSAGE_NO_DSLS) if no_dsls? # TODO consider switching to an error log statement
|
166
168
|
keyword = keyword.to_s
|
167
169
|
dynamic_expression_dsl = (dynamic_expression_chains_of_responsibility.keys - disabled_dsls).first if dsl.nil?
|
168
170
|
# TODO consider pushing this code into interpret_expresion to provide hooks that work around it regardless of static vs dynamic
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Module
|
2
|
+
alias append_features_without_glimmer append_features
|
3
|
+
def append_features(mod)
|
4
|
+
if self == Glimmer && mod == Object
|
5
|
+
Glimmer::Config.logger.debug { 'Appending Glimmer to Singleton Class of main object (not appending to Object everywhere to avoid method pollution)' }
|
6
|
+
TOPLEVEL_BINDING.receiver.singleton_class.include(self)
|
7
|
+
else
|
8
|
+
append_features_without_glimmer(mod)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
metadata
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AndyMaleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: array_include_methods
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
@@ -20,6 +19,7 @@ dependencies:
|
|
20
19
|
- - "<"
|
21
20
|
- !ruby/object:Gem::Version
|
22
21
|
version: 2.0.0
|
22
|
+
name: array_include_methods
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -31,7 +31,6 @@ dependencies:
|
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.0.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name: facets
|
35
34
|
requirement: !ruby/object:Gem::Requirement
|
36
35
|
requirements:
|
37
36
|
- - ">="
|
@@ -40,6 +39,7 @@ dependencies:
|
|
40
39
|
- - "<"
|
41
40
|
- !ruby/object:Gem::Version
|
42
41
|
version: 4.0.0
|
42
|
+
name: facets
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -51,7 +51,6 @@ dependencies:
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: 4.0.0
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
|
-
name: concurrent-ruby
|
55
54
|
requirement: !ruby/object:Gem::Requirement
|
56
55
|
requirements:
|
57
56
|
- - ">="
|
@@ -60,6 +59,7 @@ dependencies:
|
|
60
59
|
- - "<"
|
61
60
|
- !ruby/object:Gem::Version
|
62
61
|
version: 2.0.0
|
62
|
+
name: concurrent-ruby
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -71,12 +71,12 @@ dependencies:
|
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: 2.0.0
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
|
-
name: rspec-mocks
|
75
74
|
requirement: !ruby/object:Gem::Requirement
|
76
75
|
requirements:
|
77
76
|
- - "~>"
|
78
77
|
- !ruby/object:Gem::Version
|
79
78
|
version: 3.5.0
|
79
|
+
name: rspec-mocks
|
80
80
|
type: :development
|
81
81
|
prerelease: false
|
82
82
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -85,12 +85,12 @@ dependencies:
|
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: 3.5.0
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
|
-
name: rspec
|
89
88
|
requirement: !ruby/object:Gem::Requirement
|
90
89
|
requirements:
|
91
90
|
- - "~>"
|
92
91
|
- !ruby/object:Gem::Version
|
93
92
|
version: 3.5.0
|
93
|
+
name: rspec
|
94
94
|
type: :development
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -99,12 +99,12 @@ dependencies:
|
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: 3.5.0
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
|
-
name: puts_debuggerer
|
103
102
|
requirement: !ruby/object:Gem::Requirement
|
104
103
|
requirements:
|
105
104
|
- - "~>"
|
106
105
|
- !ruby/object:Gem::Version
|
107
106
|
version: 0.10.0
|
107
|
+
name: puts_debuggerer
|
108
108
|
type: :development
|
109
109
|
prerelease: false
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -113,7 +113,6 @@ dependencies:
|
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: 0.10.0
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
|
-
name: rake
|
117
116
|
requirement: !ruby/object:Gem::Requirement
|
118
117
|
requirements:
|
119
118
|
- - ">="
|
@@ -122,6 +121,7 @@ dependencies:
|
|
122
121
|
- - "<"
|
123
122
|
- !ruby/object:Gem::Version
|
124
123
|
version: 14.0.0
|
124
|
+
name: rake
|
125
125
|
type: :development
|
126
126
|
prerelease: false
|
127
127
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -133,7 +133,6 @@ dependencies:
|
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: 14.0.0
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
|
-
name: jeweler
|
137
136
|
requirement: !ruby/object:Gem::Requirement
|
138
137
|
requirements:
|
139
138
|
- - ">="
|
@@ -142,6 +141,7 @@ dependencies:
|
|
142
141
|
- - "<"
|
143
142
|
- !ruby/object:Gem::Version
|
144
143
|
version: 3.0.0
|
144
|
+
name: jeweler
|
145
145
|
type: :development
|
146
146
|
prerelease: false
|
147
147
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -153,7 +153,6 @@ dependencies:
|
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: 3.0.0
|
155
155
|
- !ruby/object:Gem::Dependency
|
156
|
-
name: rdoc
|
157
156
|
requirement: !ruby/object:Gem::Requirement
|
158
157
|
requirements:
|
159
158
|
- - ">="
|
@@ -162,6 +161,7 @@ dependencies:
|
|
162
161
|
- - "<"
|
163
162
|
- !ruby/object:Gem::Version
|
164
163
|
version: 7.0.0
|
164
|
+
name: rdoc
|
165
165
|
type: :development
|
166
166
|
prerelease: false
|
167
167
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -173,12 +173,12 @@ dependencies:
|
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: 7.0.0
|
175
175
|
- !ruby/object:Gem::Dependency
|
176
|
-
name: coveralls
|
177
176
|
requirement: !ruby/object:Gem::Requirement
|
178
177
|
requirements:
|
179
178
|
- - ">="
|
180
179
|
- !ruby/object:Gem::Version
|
181
180
|
version: '0'
|
181
|
+
name: coveralls
|
182
182
|
type: :development
|
183
183
|
prerelease: false
|
184
184
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -187,12 +187,12 @@ dependencies:
|
|
187
187
|
- !ruby/object:Gem::Version
|
188
188
|
version: '0'
|
189
189
|
- !ruby/object:Gem::Dependency
|
190
|
-
name: simplecov
|
191
190
|
requirement: !ruby/object:Gem::Requirement
|
192
191
|
requirements:
|
193
192
|
- - "~>"
|
194
193
|
- !ruby/object:Gem::Version
|
195
194
|
version: 0.16.1
|
195
|
+
name: simplecov
|
196
196
|
type: :development
|
197
197
|
prerelease: false
|
198
198
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -201,12 +201,12 @@ dependencies:
|
|
201
201
|
- !ruby/object:Gem::Version
|
202
202
|
version: 0.16.1
|
203
203
|
- !ruby/object:Gem::Dependency
|
204
|
-
name: simplecov-lcov
|
205
204
|
requirement: !ruby/object:Gem::Requirement
|
206
205
|
requirements:
|
207
206
|
- - "~>"
|
208
207
|
- !ruby/object:Gem::Version
|
209
208
|
version: 0.7.0
|
209
|
+
name: simplecov-lcov
|
210
210
|
type: :development
|
211
211
|
prerelease: false
|
212
212
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -215,12 +215,12 @@ dependencies:
|
|
215
215
|
- !ruby/object:Gem::Version
|
216
216
|
version: 0.7.0
|
217
217
|
- !ruby/object:Gem::Dependency
|
218
|
-
name: rake-tui
|
219
218
|
requirement: !ruby/object:Gem::Requirement
|
220
219
|
requirements:
|
221
220
|
- - ">="
|
222
221
|
- !ruby/object:Gem::Version
|
223
222
|
version: '0'
|
223
|
+
name: rake-tui
|
224
224
|
type: :development
|
225
225
|
prerelease: false
|
226
226
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -237,6 +237,7 @@ email: andy.am@gmail.com
|
|
237
237
|
executables: []
|
238
238
|
extensions: []
|
239
239
|
extra_rdoc_files:
|
240
|
+
- CHANGELOG.md
|
240
241
|
- LICENSE.txt
|
241
242
|
- README.md
|
242
243
|
files:
|
@@ -261,6 +262,7 @@ files:
|
|
261
262
|
- lib/glimmer/dsl/static_expression.rb
|
262
263
|
- lib/glimmer/dsl/top_level_expression.rb
|
263
264
|
- lib/glimmer/error.rb
|
265
|
+
- lib/glimmer/ext/module.rb
|
264
266
|
- lib/glimmer/invalid_keyword_error.rb
|
265
267
|
homepage: http://github.com/AndyObtiva/glimmer
|
266
268
|
licenses:
|
@@ -281,8 +283,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
281
283
|
- !ruby/object:Gem::Version
|
282
284
|
version: '0'
|
283
285
|
requirements: []
|
284
|
-
rubygems_version: 3.
|
286
|
+
rubygems_version: 3.0.6
|
285
287
|
signing_key:
|
286
288
|
specification_version: 4
|
287
|
-
summary: Glimmer
|
289
|
+
summary: Glimmer - DSL Engine for Ruby GUI and More
|
288
290
|
test_files: []
|