glimmer-dsl-libui 0.9.0 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e8beebaf4e3c91450a4ae20b619b63a6303e67c82ae6a678f5f509f69a4310c
4
- data.tar.gz: c2a4f231d85faf7a70fbc96572458b53007b1cd3865f2fe330fca379fd379c74
3
+ metadata.gz: c3ad3f4e1a2e367a8e95fba05f1b539f2aa865dfab7e2234541933be97dda171
4
+ data.tar.gz: 44255036ce4a887224c84f861d0654483bada4ff8ed3c2a1c4192083a19cf45b
5
5
  SHA512:
6
- metadata.gz: ec4010baf04afde8b8c2312c081af0ae748748869ee19dbdf1bb5ea92d627abbd5d89d87db8a135ba158b56fc4bb28291f2e572e728aaad728c3ca43dcfe5ed2
7
- data.tar.gz: b4e2c8f38655b60b35a12fd55a634ef706c838a28d622677f86159c931b2ef548f744cf804b26b11d0a696b8fa2a6e4d44fa5118582af44814dee8b3db15a435
6
+ metadata.gz: e018c132e8b838ce839adeaae9d812d52ab8be960b87a8d3e5c85cf8045d988b83495640fb4bef7cb778960d2f25b7da8fcf4d659bd8ada7ed8277d26cc9ff9f
7
+ data.tar.gz: 3fb97e3a7946c9690c0bd48fdbee89d65f99833b11bd9b033c21b099e51f394b98d1aa96c4c51b9e0445c309a5b28f4f272c53174617e20b4e578dc602338c5a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.9.2
4
+
5
+ - Add `glimmer` commands `glimmer package:gem`, `glimmer package:gemspec`, and `glimmer package:clean`
6
+
7
+ ## 0.9.1
8
+
9
+ - Scaffold an application via Glimmer Command: `glimmer scaffold[app_name]`
10
+ - Hide unsupported Scaffolding tasks in Glimmer Command
11
+ - Add missing Glimmer Command gem dependencies: `rake`, `rake-tui`, `text-table`, `puts_debuggerer`
12
+
3
13
  ## 0.9.0
4
14
 
5
15
  - Support `glimmer` command to more conveniently run applications (`glimmer app_path`) and examples (`glimmer examples`)
data/README.md CHANGED
@@ -1,5 +1,5 @@
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 ([Fukuoka Award Winning](http://www.digitalfukuoka.jp/topics/187?locale=ja))
2
- ## Prerequisite-Free Ruby Desktop Development Cross-Platform Native GUI Library
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.9.2
2
+ ## Prerequisite-Free Ruby Desktop Development Cross-Platform Native GUI Library ([Fukuoka Award Winning](http://www.digitalfukuoka.jp/topics/187?locale=ja))
3
3
  ### The Quickest Way From Zero To GUI
4
4
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-libui.svg)](http://badge.fury.io/rb/glimmer-dsl-libui)
5
5
  [![Join the chat at https://gitter.im/AndyObtiva/glimmer](https://badges.gitter.im/AndyObtiva/glimmer.svg)](https://gitter.im/AndyObtiva/glimmer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -28,7 +28,7 @@ The main trade-off in using [Glimmer DSL for LibUI](https://rubygems.org/gems/gl
28
28
  - Requiring the [least amount of syntax](#glimmer-gui-dsl-concepts) possible to build GUI
29
29
  - [Custom Control](#custom-keywords) support
30
30
  - [Bidirectional/Unidirectional Data-Binding](#data-binding) to declaratively wire and automatically synchronize GUI Views with Models
31
- - [Far Future Plan] Scaffolding for new custom controls, apps, and gems
31
+ - [Scaffolding](scaffold-application) for new custom controls, apps, and gems
32
32
  - [Far Future Plan] Native-Executable packaging on Mac, Windows, and Linux.
33
33
 
34
34
  Hello, World!
@@ -347,6 +347,10 @@ Learn more about the differences between various [Glimmer](https://github.com/An
347
347
  - [Experimentation Usage](#experimentation-usage)
348
348
  - [Prototyping Usage](#prototyping-usage)
349
349
  - [Serious Usage](#serious-usage)
350
+ - [Glimmer Command](#glimmer-command)
351
+ - [Run Application](#run-application)
352
+ - [Run Examples](#run-examples)
353
+ - [Scaffold Application](#scaffold-application)
350
354
  - [Girb (Glimmer IRB)](#girb-glimmer-irb)
351
355
  - [Glimmer GUI DSL Concepts](#glimmer-gui-dsl-concepts)
352
356
  - [API](#api)
@@ -417,7 +421,7 @@ gem install glimmer-dsl-libui
417
421
  Or install via Bundler `Gemfile`:
418
422
 
419
423
  ```ruby
420
- gem 'glimmer-dsl-libui', '~> 0.9.0'
424
+ gem 'glimmer-dsl-libui', '~> 0.9.2'
421
425
  ```
422
426
 
423
427
  Test that installation worked by running the [Glimmer Meta-Example](#examples):
@@ -525,9 +529,7 @@ If you are new to [Glimmer DSL for LibUI](https://rubygems.org/gems/glimmer-dsl-
525
529
 
526
530
  ## Glimmer Command
527
531
 
528
- The `glimmer` command allows you to conveniently:
529
- - Run Glimmer DSL for LibUI applications (via `glimmer [app_path]`)
530
- - Run Glimmer DSL for LibUI included examples (via `glimmer examples`, which brings up the [Glimmer Meta-Example](https://github.com/AndyObtiva/glimmer-dsl-libui/blob/master/examples/meta_example.rb))
532
+ The `glimmer` command allows you to conveniently run applications (`glimmer app_path`), run examples (`glimmer examples`), and scaffold applications (`glimmer "scaffold[app_name]"`).
531
533
 
532
534
  You can bring up usage instructions by running the `glimmer` command without arguments:
533
535
 
@@ -581,6 +583,144 @@ On Windows and ARM64 machines, it simply lists the available Glimmer tasks at th
581
583
 
582
584
  Note: If you encounter an issue running the `glimmer` command, run `bundle exec glimmer` instead.
583
585
 
586
+ ### Run Application
587
+
588
+ Run Glimmer DSL for LibUI applications via this command:
589
+
590
+ ```
591
+ glimmer app_path
592
+ ```
593
+
594
+ For example, from a cloned glimmer-dsl-libui repository:
595
+
596
+ ```
597
+ glimmer examples/basic_window.rb
598
+ ```
599
+
600
+ Mac | Windows | Linux
601
+ ----|---------|------
602
+ ![glimmer-dsl-libui-mac-basic-window.png](/images/glimmer-dsl-libui-mac-basic-window.png) | ![glimmer-dsl-libui-windows-basic-window.png](/images/glimmer-dsl-libui-windows-basic-window.png) | ![glimmer-dsl-libui-linux-basic-window.png](/images/glimmer-dsl-libui-linux-basic-window.png)
603
+
604
+ ### Run Examples
605
+
606
+ Run Glimmer DSL for LibUI included examples via this command:
607
+
608
+ ```
609
+ glimmer examples
610
+ ```
611
+
612
+ That brings up the [Glimmer Meta-Example](https://github.com/AndyObtiva/glimmer-dsl-libui/blob/master/examples/meta_example.rb))
613
+
614
+ Mac | Windows | Linux
615
+ ----|---------|------
616
+ ![glimmer-dsl-libui-mac-meta-example.png](images/glimmer-dsl-libui-mac-meta-example.png) | ![glimmer-dsl-libui-windows-meta-example.png](images/glimmer-dsl-libui-windows-meta-example.png) | ![glimmer-dsl-libui-linux-meta-example.png](images/glimmer-dsl-libui-linux-meta-example.png)
617
+
618
+ ### Scaffold Application
619
+
620
+ Application scaffolding enables automatically generating the directories/files of a new desktop GUI application that follows the MVC architecture and can be packaged as a Ruby gem that includes a binary script for running the app conveniently.
621
+
622
+ Scaffold Glimmer DSL for LibUI application with this command:
623
+
624
+ ```
625
+ glimmer "scaffold[app_name]"
626
+ ```
627
+
628
+ That will generate the general MVC structure of a new Glimmer DSL for LibUI application.
629
+
630
+ For example, if we run:
631
+
632
+ ```
633
+ glimmer "scaffold[hello_world]"
634
+ ```
635
+
636
+ The following files are generated and reported by the `glimmer` command:
637
+
638
+ ```
639
+ Created hello_world/.gitignore
640
+ Created hello_world/.ruby-version
641
+ Created hello_world/.ruby-gemset
642
+ Created hello_world/VERSION
643
+ Created hello_world/LICENSE.txt
644
+ Created hello_world/Gemfile
645
+ Created hello_world/Rakefile
646
+ Created hello_world/app/hello_world.rb
647
+ Created hello_world/app/hello_world/view/hello_world.rb
648
+ Created hello_world/icons/windows/Hello World.ico
649
+ Created hello_world/icons/macosx/Hello World.icns
650
+ Created hello_world/icons/linux/Hello World.png
651
+ Created hello_world/app/hello_world/launch.rb
652
+ Created hello_world/bin/hello_world
653
+ ```
654
+
655
+ They include a basic Hello, World! application with menus and about/preferences dialogs.
656
+
657
+ Views live under `app/app_name/view` (e.g. `app/hello_world/view`)
658
+ Models live under `app/app_name/model` (e.g. `app/hello_world/model`)
659
+
660
+ Once you step into the application directory, you can run it in one of multiple ways:
661
+
662
+ ```
663
+ bin/app_name
664
+ ```
665
+
666
+ For example:
667
+
668
+ ```
669
+ bin/hello_world
670
+ ```
671
+
672
+ Or using the Glimmer generic command for running applications, which will automatically detect the application running script:
673
+
674
+ ```
675
+ glimmer run
676
+ ```
677
+
678
+ ![glimmer-dsl-libui-mac-scaffold-app-initial-screen.png](images/glimmer-dsl-libui-mac-scaffold-app-initial-screen.png)
679
+
680
+ ![glimmer-dsl-libui-mac-scaffold-app-preferences.png](images/glimmer-dsl-libui-mac-scaffold-app-preferences.png)
681
+
682
+ ![glimmer-dsl-libui-mac-scaffold-app-changed-greeting.png](images/glimmer-dsl-libui-mac-scaffold-app-changed-greeting.png)
683
+
684
+ The application comes with `juwelier` for auto-generating an application gem from its `Rakefile` gem configuration.
685
+
686
+ You can package the newly scaffolded app as a Ruby gem by running this command:
687
+
688
+ ```
689
+ glimmer package:gem
690
+ ```
691
+
692
+ Or by using the raw rake command:
693
+
694
+ ```
695
+ rake build
696
+ ```
697
+
698
+ You can generate the application gemspec explicitly if needed with this command (though it is not needed to build the gem):
699
+
700
+ ```
701
+ glimmer package:gemspec
702
+ ```
703
+
704
+ Or by using the raw rake command:
705
+
706
+ ```
707
+ rake gemspec:generate
708
+ ```
709
+
710
+ Once you install the gem (e.g. `gem install hello_world`), you can simply run the app with its binary script:
711
+
712
+ ```
713
+ app_name
714
+ ```
715
+
716
+ For example:
717
+
718
+ ```
719
+ hello_world
720
+ ```
721
+
722
+ ![glimmer-dsl-libui-mac-scaffold-app-initial-screen.png](images/glimmer-dsl-libui-mac-scaffold-app-initial-screen.png)
723
+
584
724
  ## Girb (Glimmer IRB)
585
725
 
586
726
  You can run the `girb` command (`bin/girb` if you cloned the project locally) to do some quick and dirty experimentation and learning:
data/RUBY_VERSION ADDED
@@ -0,0 +1 @@
1
+ 3.2.2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0
1
+ 0.9.2
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,43 @@
1
+ # Copyright (c) 2021-2023 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
+ require 'os'
23
+
24
+ module Glimmer
25
+ module RakeTask
26
+ module Package
27
+ class << self
28
+ def clean
29
+ require 'fileutils'
30
+ FileUtils.rm_rf('pkg')
31
+ end
32
+
33
+ def gemspec
34
+ system 'rake gemspec:generate'
35
+ end
36
+
37
+ def gem
38
+ system 'rake build'
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end