glimmer-dsl-swt 4.17.2.1 → 4.17.2.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: c16edb19554a8b68798a5b63dc573094b6381c3c7528a490d1094c5b9c28be6a
4
- data.tar.gz: 3c5c5a19894d9dd1dfe00619fbfee22cb109c20c252530bb717898c22f520867
3
+ metadata.gz: d7523b15b5a850c249c3aff9ad499861ee10ecd051de1084221fbbe456237330
4
+ data.tar.gz: 5ac2fcb76137fe377268c8f38fd09f37fe94193351629213a30d1cc8b4b4707b
5
5
  SHA512:
6
- metadata.gz: cd4a6c25743aaec88b0638c1e869fe980f3a3c96f9674fd54497859485690b23a00b128cd7a310a29c6c29182e1f9766f2c847687c218b29dc33cbf19d77936d
7
- data.tar.gz: 35133834f642a0e90c665c5811540c3fa50e22164ee7db560edf7b0243cc5650bcf70ad1d196442a0eb6c090a35a455412131bc50ac97ead0089aba1007a04cd
6
+ metadata.gz: ebf5035466675f7cb5b3151950c7d244a6deda09c0e0a0a7b516ca6a67a673f371377f706ec8377db62c0e1eb5a983789ac1e4e3627a660ba88322596af72388
7
+ data.tar.gz: 14a95141c001e279b305cee7ed90295bc620e1bb08fa897f5e72b90dc283d50abc242b7c71896d65c6c981de6785ab69f2d94c927c5fdc5320e793541f97d1fb
@@ -1,5 +1,10 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.17.2.2
4
+
5
+ - Small updates/refactorings in samples
6
+ - Fix issue with displaying `glimmer` command tasks on Windows
7
+
3
8
  ### 4.17.2.1
4
9
 
5
10
  - Add `--bundler=group` option to `glimmer` command
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 SWT 4.17.2.1
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 SWT 4.17.2.2
2
2
  ## JRuby Desktop Development GUI Library
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
4
4
  [![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
@@ -10,11 +10,9 @@
10
10
 
11
11
  (The Original Glimmer Library Since 2007. Beware of Imitators!)
12
12
 
13
- [**Glimmer**](https://rubygems.org/gems/glimmer) is a native-GUI cross-platform desktop development library written in [JRuby](https://www.jruby.org/), an OS-threaded faster version of [Ruby](https://www.ruby-lang.org/en/). [Glimmer](https://rubygems.org/gems/glimmer)'s main innovation is a declarative [Ruby DSL](#glimmer-dsl-syntax) that enables productive and efficient authoring of desktop application user-interfaces while relying on the robust [Eclipse SWT library](https://www.eclipse.org/swt/). [Glimmer](https://rubygems.org/gems/glimmer) additionally innovates by having built-in [data-binding](#data-binding) support, which greatly facilitates synchronizing the GUI with domain models, thus achieving true decoupling of object oriented components and enabling developers to solve business problems (test-first) without worrying about GUI concerns. To get started quickly, [Glimmer](https://rubygems.org/gems/glimmer) offers [scaffolding](#scaffolding) options for [Apps](#in-production), [Gems](#custom-shell-gem), and [Custom Widgets](#custom-widgets). [Glimmer](https://rubygems.org/gems/glimmer) also includes native-executable [packaging](#packaging--distribution) support, sorely lacking in other libraries, thus enabling the delivery of desktop apps written in [Ruby](https://www.ruby-lang.org/en/) as truly native DMG/PKG/APP files on the [Mac](https://www.apple.com/ca/macos) + [App Store](https://developer.apple.com/macos/distribution/) and MSI/EXE files on [Windows](https://www.microsoft.com/en-ca/windows).
13
+ [**Glimmer**](https://rubygems.org/gems/glimmer) is a native-GUI cross-platform desktop development library written in [JRuby](https://www.jruby.org/), an OS-threaded faster version of [Ruby](https://www.ruby-lang.org/en/). [Glimmer](https://rubygems.org/gems/glimmer)'s main innovation is a declarative [Ruby DSL](#glimmer-dsl-syntax) that enables productive and efficient authoring of desktop application user-interfaces while relying on the robust [Eclipse SWT library](https://www.eclipse.org/swt/). [Glimmer](https://rubygems.org/gems/glimmer) additionally innovates by having built-in [data-binding](#data-binding) support, which greatly facilitates synchronizing the GUI with domain models, thus achieving true decoupling of object oriented components and enabling developers to solve business problems (test-first) without worrying about GUI concerns. To get started quickly, [Glimmer](https://rubygems.org/gems/glimmer) offers [scaffolding](#scaffolding) options for [Apps](#in-production), [Gems](#custom-shell-gem), and [Custom Widgets](#custom-widgets). [Glimmer](https://rubygems.org/gems/glimmer) also includes native-executable [packaging](#packaging--distribution) support, sorely lacking in other libraries, thus enabling the delivery of desktop apps written in [Ruby](https://www.ruby-lang.org/en/) as truly native DMG/PKG/APP files on the [Mac](https://www.apple.com/ca/macos) + [App Store](https://developer.apple.com/macos/distribution/), MSI/EXE files on [Windows](https://www.microsoft.com/en-ca/windows), and [Gem Packaged Shell Scripts](#custom-shell-gem) on [Linux](https://www.linux.org/).
14
14
 
15
- [Glimmer receives two updates per month](https://rubygems.org/gems/glimmer-dsl-swt/versions). You can trust [Glimmer](https://rubygems.org/gems/glimmer) with your Ruby desktop GUI development needs.
16
-
17
- NOTE: Glimmer is in beta mode. Please make better by providing feedback and [contributing](#contributing) when possible. The more feedback and issues you report the better.
15
+ [Glimmer receives two updates per month](https://rubygems.org/gems/glimmer-dsl-swt/versions). You can trust [Glimmer](https://rubygems.org/gems/glimmer) with your Ruby desktop GUI development needs. Please make [Glimmer](https://rubygems.org/gems/glimmer) even better by providing feedback and [contributing](#contributing) when possible.
18
16
 
19
17
  [<img src="https://covers.oreillystatic.com/images/9780596519650/lrg.jpg" width=105 /><br />
20
18
  Featured in<br />JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do)
@@ -430,7 +428,7 @@ jgem install glimmer-dsl-swt
430
428
 
431
429
  Or this command if you want a specific version:
432
430
  ```
433
- jgem install glimmer-dsl-swt -v 4.17.2.1
431
+ jgem install glimmer-dsl-swt -v 4.17.2.2
434
432
  ```
435
433
 
436
434
  Note: Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT.
@@ -507,7 +505,7 @@ bin/glimmer sample:run[hello_world]
507
505
  Below are the full usage instructions that come up when running `glimmer` without args.
508
506
 
509
507
  ```
510
- Glimmer (Ruby Desktop Development GUI Library) - JRuby Gem: glimmer-dsl-swt v4.17.2.1
508
+ Glimmer (Ruby Desktop Development GUI Library) - JRuby Gem: glimmer-dsl-swt v4.17.2.2
511
509
 
512
510
  Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
513
511
 
@@ -622,7 +620,7 @@ This will run the hello_tab sample and output its code:
622
620
  ```
623
621
  $ glimmer sample:run[hello_tab]
624
622
 
625
- # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.2.1/samples/hello/hello_tab.rb
623
+ # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.2.2/samples/hello/hello_tab.rb
626
624
 
627
625
  class HelloTab
628
626
  include Glimmer
@@ -667,7 +665,7 @@ Example:
667
665
  ```
668
666
  $ glimmer sample:code[tic_tac_toe]
669
667
 
670
- # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.2.1/samples/elaborate/tic_tac_toe.rb
668
+ # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.2.2/samples/elaborate/tic_tac_toe.rb
671
669
 
672
670
  require_relative "tic_tac_toe/board"
673
671
 
@@ -728,7 +726,7 @@ TicTacToe.new.open
728
726
  # # #
729
727
 
730
728
 
731
- # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.2.1/samples/elaborate/tic_tac_toe/cell.rb
729
+ # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.2.2/samples/elaborate/tic_tac_toe/cell.rb
732
730
 
733
731
  class TicTacToe
734
732
  class Cell
@@ -761,7 +759,7 @@ end
761
759
  # # #
762
760
 
763
761
 
764
- # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.2.1/samples/elaborate/tic_tac_toe/board.rb
762
+ # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.2.2/samples/elaborate/tic_tac_toe/board.rb
765
763
 
766
764
  require_relative 'cell'
767
765
 
@@ -946,7 +944,7 @@ $ glimmer scaffold[greeter]
946
944
  create spec/spec_helper.rb
947
945
  create spec/greeter_spec.rb
948
946
  create .rspec
949
- Jeweler has prepared your gem in ./greeter
947
+ Juwelier has prepared your gem in ./greeter
950
948
  Created greeter/.gitignore
951
949
  Created greeter/.ruby-version
952
950
  Created greeter/.ruby-gemset
@@ -1017,7 +1015,7 @@ glimmer scaffold:cw[name]
1017
1015
  #### Custom Shell Gem
1018
1016
 
1019
1017
  Custom shell gems are self-contained Glimmer apps as well as reusable custom shells.
1020
- They have everything scaffolded Glimmer apps come with in addition to gem content like a [jeweler](https://github.com/technicalpickles/jeweler) Rakefile that can build gemspec and release gems.
1018
+ They have everything scaffolded Glimmer apps come with in addition to gem content like a [Juwelier](https://rubygems.org/gems/juwelier) Rakefile that can build gemspec and release gems.
1021
1019
  Unlike scaffolded Glimmer apps, custom shell gem content lives under the `lib` directory (not `app`).
1022
1020
  They can be packaged as both a native executable (e.g. Mac DMG/PKG/APP) and a Ruby gem.
1023
1021
  Of course, you can just build a Ruby gem and disregard native executable packaging if you do not need it.
@@ -1191,17 +1189,21 @@ Output:
1191
1189
 
1192
1190
  Name Gem Version Author Description
1193
1191
 
1194
- Css glimmer-dsl-css 0.2.0 AndyMaleh Glimmer DSL for CSS
1195
- Opal glimmer-dsl-opal 0.1.0 AndyMaleh Glimmer DSL for Opal
1196
- Swt glimmer-dsl-swt 4.17.2.1 AndyMaleh Glimmer DSL for SWT
1192
+ Css glimmer-dsl-css 1.1.0 AndyMaleh Glimmer DSL for CSS
1193
+ Opal glimmer-dsl-opal 0.3.0 AndyMaleh Glimmer DSL for Opal
1194
+ Swt glimmer-dsl-swt 4.17.2.2 AndyMaleh Glimmer DSL for SWT
1197
1195
  Tk glimmer-dsl-tk 0.0.5 AndyMaleh Glimmer DSL for Tk
1198
- Xml glimmer-dsl-xml 0.2.0 AndyMaleh Glimmer DSL for XML
1196
+ Xml glimmer-dsl-xml 1.1.0 AndyMaleh Glimmer DSL for XML
1199
1197
  ```
1200
1198
 
1201
1199
  ### Packaging
1202
1200
 
1201
+ Glimmer supports packaging applications as native files on Mac and Windows.
1202
+
1203
1203
  Glimmer packaging tasks are detailed under [Packaging & Distribution](#packaging--distribution).
1204
1204
 
1205
+ On Linux, the Glimmer [Custom Shell Gem](#custom-shell-gem) approach provides a [Gem Packaged Shell Script](#custom-shell-gem) (e.g. `calculator` command becomes available after installing the [glimmer-cs-calculator](https://github.com/AndyObtiva/glimmer-cs-calculator) gem)
1206
+
1205
1207
  ### Raw JRuby Command
1206
1208
 
1207
1209
  If there is a need to run Glimmer directly via the `jruby` command, you
@@ -2632,12 +2634,43 @@ end
2632
2634
 
2633
2635
  ### Custom Widgets
2634
2636
 
2635
- Glimmer supports creating custom widgets with minimal code, which automatically extends Glimmer's DSL syntax with an underscored lowercase keyword.
2637
+ Custom widgets are brand new Glimmer DSL keywords that represent aggregates of existing widgets (e.g. `address_form`), customized existing widgets (e.g. `greeting_label`), or brand new widgets (e.g. `oscilloscope`)
2636
2638
 
2637
- Simply create a new class that includes `Glimmer::UI::CustomWidget` and put Glimmer DSL code in its `#body` block (its return value is stored in `#body_root` attribute). Glimmer will then automatically recognize this class by convention when it encounters a keyword matching the class name converted to underscored lowercase (and namespace double-colons `::` replaced with double-underscores `__`)
2639
+ Glimmer supports two ways of creating custom widgets with minimal code:
2640
+ 1. Method-based Custom Widgets (for single-view-internal reuse): Extract a method containing Glimmer DSL widget syntax. Useful for quickly eliminating redundant code within a single view.
2641
+ 2. Class-based Custom Widgets (for multiple-view-external reuse): Create a class that includes the `Glimmer::UI::CustomWidget` module and Glimmer DSL widget syntax in a `body {}` block. This will automatically extend Glimmer's DSL syntax with an underscored lowercase keyword matching the class name by convention. Useful in making a custom widget available in many views.
2642
+
2643
+ Approach #1 is a casual Ruby-based approach. Approach #2 is the official Glimmer approach. Typically, when referring to Custom Widgets, we are talking about Class-based Custom Widgets.
2644
+
2645
+ A developer might start with approach #1 to eliminate duplication in a view and later upgrade it to approach #2 when needing to export a custom widget to make it available in many views.
2646
+
2647
+ Class-based Custom Widgets offer a number of benefits over method-based custom widgets, such as built-in support for passing SWT style, nested block of extra widgets and properties, and `before_body`/`after_body` hooks.
2638
2648
 
2639
2649
  #### Simple Example
2640
2650
 
2651
+ ##### Method-Based Custom Widget Example
2652
+
2653
+ (you may copy/paste in [`girb`](#girb-glimmer-irb-command))
2654
+
2655
+ Definition and usage in the same file:
2656
+ ```ruby
2657
+ def red_label(label_text)
2658
+ label {
2659
+ text label_text
2660
+ background :red
2661
+ }
2662
+ end
2663
+
2664
+ shell {
2665
+ red_label('Red Label')
2666
+ }.open
2667
+ ```
2668
+
2669
+
2670
+ ##### Class-Based Custom Widget Example
2671
+
2672
+ Simply create a new class that includes `Glimmer::UI::CustomWidget` and put Glimmer DSL code in its `#body` block (its return value is stored in `#body_root` attribute). Glimmer will then automatically recognize this class by convention when it encounters a keyword matching the class name converted to underscored lowercase (and namespace double-colons `::` replaced with double-underscores `__`)
2673
+
2641
2674
  (you may copy/paste in [`girb`](#girb-glimmer-irb-command))
2642
2675
 
2643
2676
  Definition:
@@ -2656,13 +2689,14 @@ end
2656
2689
  Usage:
2657
2690
  ```ruby
2658
2691
  shell {
2659
- red_label {
2660
- text 'Red Label'
2692
+ red_label(:center) {
2693
+ text 'Red Label'
2694
+ foreground :green
2661
2695
  }
2662
2696
  }.open
2663
2697
  ```
2664
2698
 
2665
- As you can see, `RedLabel` became Glimmer DSL keyword: `red_label`
2699
+ As you can see, `RedLabel` became the Glimmer DSL keyword `red_label` and worked just like a standard label by taking in SWT style and nested properties. As such, it is a first-class citizen of the Glimmer GUI DSL.
2666
2700
 
2667
2701
  #### Custom Widget Lifecycle Hooks
2668
2702
 
@@ -3775,7 +3809,7 @@ Gladiator is a good demonstration of:
3775
3809
 
3776
3810
  #### Timer
3777
3811
 
3778
- [<img alt="Glimmer Timer Icon" src="https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-timer/master/images/glimmer-timer-logo.png" height=40 /> Timer](https://github.com/AndyObtiva/glimmer-cs-timer) is a sample app demonstrating data-binding and multi-threading in a desktop application.
3812
+ [<img alt="Glimmer Timer Icon" src="https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-timer/master/images/glimmer-timer-logo.png" height=40 /> Timer](https://github.com/AndyObtiva/glimmer-cs-timer) is a sample app demonstrating data-binding, multi-threading, and Java (Sound) library integration in a desktop application.
3779
3813
 
3780
3814
  [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer-cs-timer/master/glimmer-timer-screenshot.png" />](https://github.com/AndyObtiva/glimmer-cs-timer)
3781
3815
 
@@ -3799,6 +3833,8 @@ If you have a Glimmer app you would like referenced here, please mention in a Pu
3799
3833
 
3800
3834
  ## Packaging & Distribution
3801
3835
 
3836
+ Note: this section mostly applies to Mac and Windows. On Linux, the Glimmer [Custom Shell Gem](#custom-shell-gem) approach provides a [Gem Packaged Shell Script](#custom-shell-gem) (e.g. `calculator` command becomes available after installing the [glimmer-cs-calculator](https://github.com/AndyObtiva/glimmer-cs-calculator) gem)
3837
+
3802
3838
  Glimmer simplifies the process of native-executable packaging and distribution on Mac and Windows via a single `glimmer package` command:
3803
3839
 
3804
3840
  ```
@@ -3823,7 +3859,7 @@ require 'glimmer/rake_task'
3823
3859
  ```
3824
3860
 
3825
3861
  The Glimmer packaging process done in the `glimmer package` command consists of the following steps:
3826
- 1. Generate gemspec via Jeweler (`rake gemspec:generate`): Having a gemspec is required by the [`jar-dependencies`](https://github.com/mkristian/jar-dependencies) JRuby gem, used by JRuby libraries to declare JAR dependencies.
3862
+ 1. Generate gemspec via [Juwelier](https://rubygems.org/gems/juwelier) (`rake gemspec:generate`): Having a gemspec is required by the [`jar-dependencies`](https://github.com/mkristian/jar-dependencies) JRuby gem, used by JRuby libraries to declare JAR dependencies.
3827
3863
  1. Lock JAR versions (`glimmer package:lock_jars`): This locks versions of JAR dependencies leveraged by the `jar-dependencies` JRuby gem, downloading them into the `./vendor` directory so they would get inside the top-level Glimmer app/gem JAR file.
3828
3864
  1. Generate [Warbler](https://github.com/jruby/warbler) config (`glimmer package:config`): Generates initial Warbler config file (under `./config/warble.rb`) to use for generating JAR file.
3829
3865
  1. Generate JAR file using [Warbler](https://github.com/jruby/warbler) (`glimmer package:jar`): Enables bundling a Glimmer app into a JAR file under the `./dist` directory
@@ -3981,7 +4017,7 @@ Glimmer already supports automatic (and manual) app updates via the Mac App Stor
3981
4017
  ## Glimmer Supporting Libraries
3982
4018
 
3983
4019
  Here is a list of notable 3rd party gems used by Glimmer:
3984
- - [jeweler](https://github.com/technicalpickles/jeweler): generates app gems during [Glimmer Scaffolding](#scaffolding)
4020
+ - [juwelier](https://rubygems.org/gems/juwelier): generates app gems during [Glimmer Scaffolding](#scaffolding)
3985
4021
  - [logging](https://github.com/TwP/logging): provides extra logging capabilities not available in Ruby Logger such as multi-threaded buffered asynchronous logging (to avoid affecting app performance) and support for multiple appenders such as stdout, syslog, and log files (the last one is needed on Windows where syslog is not supported)
3986
4022
  - [nested_inherited_jruby_include_package](https://github.com/AndyObtiva/nested_inherited_jruby_include_package): makes included [SWT](https://www.eclipse.org/swt/)/[Java](https://www.java.com/en/) packages available to all classes/modules that mix in the Glimmer module without having to manually reimport
3987
4023
  - [os](https://github.com/rdp/os): provides OS detection capabilities (e.g. `OS.mac?` or `OS.windows?`) to write cross-platform code inexpensively
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.17.2.1
1
+ 4.17.2.2
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: glimmer-dsl-swt 4.17.2.1 ruby lib
5
+ # stub: glimmer-dsl-swt 4.17.2.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer-dsl-swt".freeze
9
- s.version = "4.17.2.1"
9
+ s.version = "4.17.2.2"
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 = "2020-10-02"
14
+ s.date = "2020-10-14"
15
15
  s.description = "Glimmer DSL for SWT (JRuby Desktop Development GUI Library)".freeze
16
16
  s.email = "andy.am@gmail.com".freeze
17
17
  s.executables = ["glimmer".freeze, "girb".freeze]
@@ -145,10 +145,10 @@ Gem::Specification.new do |s|
145
145
  end
146
146
 
147
147
  if s.respond_to? :add_runtime_dependency then
148
- s.add_runtime_dependency(%q<glimmer>.freeze, ["~> 1.0.0"])
148
+ s.add_runtime_dependency(%q<glimmer>.freeze, ["~> 1.0.1"])
149
149
  s.add_runtime_dependency(%q<super_module>.freeze, ["~> 1.4.1"])
150
150
  s.add_runtime_dependency(%q<nested_inherited_jruby_include_package>.freeze, ["~> 0.3.0"])
151
- s.add_runtime_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.1"])
151
+ s.add_runtime_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.2"])
152
152
  s.add_runtime_dependency(%q<rake-tui>.freeze, [">= 0.2.3", "< 2.0.0"])
153
153
  s.add_runtime_dependency(%q<git-glimmer>.freeze, ["= 1.7.0"])
154
154
  s.add_runtime_dependency(%q<logging>.freeze, [">= 2.3.0", "< 3.0.0"])
@@ -164,10 +164,10 @@ Gem::Specification.new do |s|
164
164
  s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.16.1"])
165
165
  s.add_development_dependency(%q<simplecov-lcov>.freeze, ["~> 0.7.0"])
166
166
  else
167
- s.add_dependency(%q<glimmer>.freeze, ["~> 1.0.0"])
167
+ s.add_dependency(%q<glimmer>.freeze, ["~> 1.0.1"])
168
168
  s.add_dependency(%q<super_module>.freeze, ["~> 1.4.1"])
169
169
  s.add_dependency(%q<nested_inherited_jruby_include_package>.freeze, ["~> 0.3.0"])
170
- s.add_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.1"])
170
+ s.add_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.2"])
171
171
  s.add_dependency(%q<rake-tui>.freeze, [">= 0.2.3", "< 2.0.0"])
172
172
  s.add_dependency(%q<git-glimmer>.freeze, ["= 1.7.0"])
173
173
  s.add_dependency(%q<logging>.freeze, [">= 2.3.0", "< 3.0.0"])
@@ -203,6 +203,9 @@ module Glimmer
203
203
 
204
204
  def display_tasks
205
205
  if OS.windows?
206
+ require 'rake'
207
+ Rake::TaskManager.record_task_metadata = true
208
+ require_relative 'rake_task'
206
209
  tasks = Rake.application.tasks
207
210
  task_lines = tasks.reject do |task|
208
211
  task.comment.nil?
@@ -210,8 +213,6 @@ module Glimmer
210
213
  max_task_size = tasks.map(&:name_with_args).map(&:size).max + 1
211
214
  task_name = task.name_with_args.sub('glimmer:', '')
212
215
  line = "glimmer #{task_name.ljust(max_task_size)} # #{task.comment}"
213
- bound = TTY::Screen.width - 6
214
- line.size <= bound ? line : "#{line[0..(bound - 3)]}..."
215
216
  end
216
217
  puts task_lines.to_a
217
218
  else
@@ -124,105 +124,8 @@ class ContactManager
124
124
  Jason
125
125
  Emma
126
126
  Olivia
127
- Ava
128
- Isabella
129
- Sophia
130
- Charlotte
131
- Mia
132
- Amelia
133
- Harper
134
- Evelyn
135
- Abigail
136
- Emily
137
- Elizabeth
138
- Mila
139
- Ella
140
- Avery
141
- Sofia
142
- Camila
143
- Aria
144
- Scarlett
145
- Victoria
146
- Madison
147
- Luna
148
- Grace
149
- Chloe
150
- Penelope
151
- Layla
152
- Riley
153
- Zoey
154
- Nora
155
- Lily
156
- Eleanor
157
- Hannah
158
- Lillian
159
- Addison
160
- Aubrey
161
- Ellie
162
- Stella
163
- Natalie
164
- Zoe
165
- Leah
166
- Hazel
167
- Violet
168
- Aurora
169
- Savannah
170
- Audrey
171
- Brooklyn
172
- Bella
173
- Claire
174
- Skylar
175
- Lucy
176
- Paisley
177
- Everly
178
- Anna
179
- Caroline
180
- Nova
181
- Genesis
182
- Emilia
183
- Kennedy
184
- Samantha
185
- Maya
186
- Willow
187
- Kinsley
188
- Naomi
189
- Aaliyah
190
- Elena
191
- Sarah
192
- Ariana
193
- Allison
194
- Gabriella
195
- Alice
196
- Madelyn
197
- Cora
198
- Ruby
199
- Eva
200
- Serenity
201
- Autumn
202
- Adeline
203
- Hailey
204
- Gianna
205
- Valentina
206
- Isla
207
- Eliana
208
- Quinn
209
- Nevaeh
210
- Ivy
211
- Sadie
212
- Piper
213
- Lydia
214
- Alexa
215
- Josephine
216
- Emery
217
- Julia
218
- Delilah
219
- Arianna
220
- Vivian
221
- Kaylee
222
- Sophie
223
- Brielle
224
- Madeline
225
127
  ]
128
+
226
129
  NAMES_LAST = %w[
227
130
  Smith
228
131
  Johnson
@@ -235,8 +138,9 @@ class ContactManager
235
138
  Anderson
236
139
  Taylor
237
140
  ]
141
+
238
142
  def initialize(contacts = nil)
239
- @contacts = contacts || 1000.times.map do |n|
143
+ @contacts = contacts || 100.times.map do |n|
240
144
  random_first_name_index = (rand*NAMES_FIRST.size).to_i
241
145
  random_last_name_index = (rand*NAMES_LAST.size).to_i
242
146
  first_name = NAMES_FIRST[random_first_name_index]
@@ -23,30 +23,34 @@ class Person
23
23
  attr_accessor :country, :country_options
24
24
 
25
25
  def initialize
26
- self.country_options=["", "Canada", "US", "Mexico"]
27
- self.country = "Canada"
26
+ self.country_options = ['', 'Canada', 'US', 'Mexico']
27
+ reset_country
28
28
  end
29
29
 
30
30
  def reset_country
31
- self.country = "Canada"
31
+ self.country = 'Canada'
32
32
  end
33
33
  end
34
34
 
35
35
  class HelloCombo
36
36
  include Glimmer
37
+
37
38
  def launch
38
39
  person = Person.new
39
40
 
40
41
  shell {
41
- fill_layout :vertical
42
- text 'Hello, Combo!'
42
+ row_layout(:vertical) {
43
+ pack false
44
+ }
45
+
46
+ text 'Hello, Combo!'
43
47
 
44
48
  combo(:read_only) {
45
49
  selection bind(person, :country)
46
50
  }
47
51
 
48
52
  button {
49
- text "Reset Selection"
53
+ text 'Reset Selection'
50
54
 
51
55
  on_widget_selected do
52
56
  person.reset_country
@@ -1,3 +1,24 @@
1
+ # Copyright (c) 2007-2020 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
+
1
22
  require 'date'
2
23
 
3
24
  # This class declares an `email_shell` custom shell, aka custom window (by convention)
@@ -53,7 +74,7 @@ class EmailShell
53
74
  label {
54
75
  layout_data(:fill, :fill, true, true) {
55
76
  horizontal_span 2
56
- verticalIndent 10
77
+ vertical_indent 10
57
78
  }
58
79
 
59
80
  background :white
@@ -1,3 +1,24 @@
1
+ # Copyright (c) 2007-2020 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
+
1
22
  # This class declares a `greeting_label` custom widget (by convention)
2
23
  class GreetingLabel
3
24
  include Glimmer::UI::CustomWidget
@@ -21,20 +21,25 @@
21
21
 
22
22
  class HelloTab
23
23
  include Glimmer
24
+
24
25
  def launch
25
26
  shell {
26
- text "Hello, Tab!"
27
+ text 'Hello, Tab!'
28
+
27
29
  tab_folder {
28
30
  tab_item {
29
- text "English"
31
+ text 'English'
32
+
30
33
  label {
31
- text "Hello, World!"
34
+ text 'Hello, World!'
32
35
  }
33
36
  }
37
+
34
38
  tab_item {
35
- text "French"
39
+ text 'French'
40
+
36
41
  label {
37
- text "Bonjour, Univers!"
42
+ text 'Bonjour, Univers!'
38
43
  }
39
44
  }
40
45
  }
@@ -22,8 +22,8 @@
22
22
  include Glimmer
23
23
 
24
24
  shell {
25
- text "Glimmer"
25
+ text 'Glimmer'
26
26
  label {
27
- text "Hello, World!"
27
+ text 'Hello, World!'
28
28
  }
29
29
  }.open
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-swt
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.17.2.1
4
+ version: 4.17.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-02 00:00:00.000000000 Z
11
+ date: 2020-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 1.0.0
18
+ version: 1.0.1
19
19
  name: glimmer
20
20
  prerelease: false
21
21
  type: :runtime
@@ -23,7 +23,7 @@ dependencies:
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0
26
+ version: 1.0.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
@@ -57,7 +57,7 @@ dependencies:
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 0.10.1
60
+ version: 0.10.2
61
61
  name: puts_debuggerer
62
62
  prerelease: false
63
63
  type: :runtime
@@ -65,7 +65,7 @@ dependencies:
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.10.1
68
+ version: 0.10.2
69
69
  - !ruby/object:Gem::Dependency
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements: