glimmer-dsl-libui 0.0.11 → 0.0.12
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/README.md +17 -10
- data/VERSION +1 -1
- data/examples/meta_example.rb +13 -2
- data/glimmer-dsl-libui.gemspec +0 -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: 8be478e9d224fabeac6b2d42b7ccae6f7063491c88b1ea14e90cf1665e379bdf
|
4
|
+
data.tar.gz: b8b9b58fe072ec1973263ae20dbbe5407d7dceb30290420dd6734397cd850918
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 534bf3ffa94019746c5a1291af5d8a676766221ea299e627cbb38dd1e3814f941688b8cf0182f243b942e73180f2f642c93598ca4d03a3a2df36cc249459316a
|
7
|
+
data.tar.gz: 3d6a77dcaffdedc6149d2efdb05df1e01f6499114054d5d43f83d576abeed0791d7cc6138335087fbfbd4d29bd481b1c016e71fe4c40af963218fd6e5227b3be
|
data/CHANGELOG.md
CHANGED
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 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for LibUI 0.0.
|
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 LibUI 0.0.12
|
2
2
|
## Prerequisite-Free Ruby Desktop Development GUI Library
|
3
3
|
[](http://badge.fury.io/rb/glimmer-dsl-libui)
|
4
4
|
[](https://codeclimate.com/github/AndyObtiva/glimmer-dsl-libui/maintainability)
|
@@ -43,7 +43,7 @@ Other [Glimmer](https://rubygems.org/gems/glimmer) DSL gems you might be interes
|
|
43
43
|
|
44
44
|
## Table of Contents
|
45
45
|
|
46
|
-
- [Glimmer DSL for LibUI 0.0.
|
46
|
+
- [Glimmer DSL for LibUI 0.0.12](#-glimmer-dsl-for-libui-0012)
|
47
47
|
- [Glimmer GUI DSL Concepts](#glimmer-gui-dsl-concepts)
|
48
48
|
- [Usage](#usage)
|
49
49
|
- [API](#api)
|
@@ -152,7 +152,7 @@ gem install glimmer-dsl-libui
|
|
152
152
|
Or install via Bundler `Gemfile`:
|
153
153
|
|
154
154
|
```ruby
|
155
|
-
gem 'glimmer-dsl-libui', '~> 0.0.
|
155
|
+
gem 'glimmer-dsl-libui', '~> 0.0.12'
|
156
156
|
```
|
157
157
|
|
158
158
|
Add `require 'glimmer-dsl-libui'` at the top, and then `include Glimmer` into the top-level main object for testing or into an actual class for serious usage.
|
@@ -315,7 +315,7 @@ Gotcha: On the Mac, when you close a window opened in `girb`, it remains open un
|
|
315
315
|
|
316
316
|
These examples include reimplementions of the examples in the [LibUI](https://github.com/kojix2/LibUI) project utilizing the [Glimmer GUI DSL](#glimmer-gui-dsl-concepts) as well as brand new examples.
|
317
317
|
|
318
|
-
To browse all examples, simply launch the [Meta-Example](examples/meta_example.rb), which lists all examples and displays each example's code when selected.
|
318
|
+
To browse all examples, simply launch the [Meta-Example](examples/meta_example.rb), which lists all examples and displays each example's code when selected. It also enables code editing to facilitate experimentation and learning.
|
319
319
|
|
320
320
|
[examples/meta_example.rb](examples/meta_example.rb)
|
321
321
|
|
@@ -362,11 +362,11 @@ class MetaExample
|
|
362
362
|
File.join(File.expand_path('.', __dir__), "#{example.underscore}.rb")
|
363
363
|
end
|
364
364
|
|
365
|
+
def glimmer_dsl_libui_file
|
366
|
+
File.expand_path('../lib/glimmer-dsl-libui', __dir__)
|
367
|
+
end
|
368
|
+
|
365
369
|
def launch
|
366
|
-
menu('File') {
|
367
|
-
quit_menu_item
|
368
|
-
}
|
369
|
-
|
370
370
|
window('Meta-Example', 700, 500) { |w|
|
371
371
|
margined true
|
372
372
|
|
@@ -385,13 +385,20 @@ class MetaExample
|
|
385
385
|
stretchy false
|
386
386
|
|
387
387
|
on_clicked do
|
388
|
-
|
388
|
+
begin
|
389
|
+
meta_example_file = File.join(Dir.home, '.meta_example.rb')
|
390
|
+
File.write(meta_example_file, @nwme.text)
|
391
|
+
result = `ruby -r #{glimmer_dsl_libui_file} #{meta_example_file} 2>&1`
|
392
|
+
msg_box(w, 'Error Running Example', result) if result.include?('error')
|
393
|
+
rescue => e
|
394
|
+
puts 'Unable to write code changes! Running original example...'
|
395
|
+
system "ruby -r #{glimmer_dsl_libui_file} #{file_path_for(@examples[@rbs.selected])}"
|
396
|
+
end
|
389
397
|
end
|
390
398
|
}
|
391
399
|
}
|
392
400
|
vertical_box {
|
393
401
|
@nwme = non_wrapping_multiline_entry {
|
394
|
-
read_only true
|
395
402
|
text File.read(file_path_for(@examples[@rbs.selected]))
|
396
403
|
}
|
397
404
|
}
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.12
|
data/examples/meta_example.rb
CHANGED
@@ -20,6 +20,10 @@ class MetaExample
|
|
20
20
|
File.join(File.expand_path('.', __dir__), "#{example.underscore}.rb")
|
21
21
|
end
|
22
22
|
|
23
|
+
def glimmer_dsl_libui_file
|
24
|
+
File.expand_path('../lib/glimmer-dsl-libui', __dir__)
|
25
|
+
end
|
26
|
+
|
23
27
|
def launch
|
24
28
|
window('Meta-Example', 700, 500) { |w|
|
25
29
|
margined true
|
@@ -39,13 +43,20 @@ class MetaExample
|
|
39
43
|
stretchy false
|
40
44
|
|
41
45
|
on_clicked do
|
42
|
-
|
46
|
+
begin
|
47
|
+
meta_example_file = File.join(Dir.home, '.meta_example.rb')
|
48
|
+
File.write(meta_example_file, @nwme.text)
|
49
|
+
result = `ruby -r #{glimmer_dsl_libui_file} #{meta_example_file} 2>&1`
|
50
|
+
msg_box(w, 'Error Running Example', result) if result.include?('error')
|
51
|
+
rescue => e
|
52
|
+
puts 'Unable to write code changes! Running original example...'
|
53
|
+
system "ruby -r #{glimmer_dsl_libui_file} #{file_path_for(@examples[@rbs.selected])}"
|
54
|
+
end
|
43
55
|
end
|
44
56
|
}
|
45
57
|
}
|
46
58
|
vertical_box {
|
47
59
|
@nwme = non_wrapping_multiline_entry {
|
48
|
-
read_only true
|
49
60
|
text File.read(file_path_for(@examples[@rbs.selected]))
|
50
61
|
}
|
51
62
|
}
|
data/glimmer-dsl-libui.gemspec
CHANGED
Binary file
|