glimmer-dsl-swt 4.17.1.1 → 4.17.2.0

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: 509796d9977c2f59c3a9044abbf668fbb3899c22741f108cc69e06cbdaa02ef4
4
- data.tar.gz: 7b10e588ced2fee9df89d2c180fd6994d3b60b72107db9b97d90a13082e0e86c
3
+ metadata.gz: a632c93d02fd21c0de17a1d631befd7731af8cfb7abf8724d73a053296838064
4
+ data.tar.gz: ee501db9d342c5dffa2fbc789f59df68088dd00c89bb27034800c18f1f327ee1
5
5
  SHA512:
6
- metadata.gz: e0f1fb23814413a61a74fbd47eed5ca3152b759bedf0e8b9dc5e2d43b56e41aaae5f3a2478a837f54cbd1df93ea84e0b4b8904ddd9424dd446f6b5d47fb7c464
7
- data.tar.gz: 30f8dc1a5795d7840618ffe28115d8b39f6f9e4549a5504156a7df02a90a7fa5a4caccfd75f10c864701a46cc0bb3cfe471e4965501c4fad085348c7d92ce1cd
6
+ metadata.gz: 5a556565e268e0d681b2d2985d2eadc295607dfa70b08dafbbb7682e6e55460ce707ba170e15d184f295b46235db92351143a438d53acd2fb0d46ec6b4f6e252
7
+ data.tar.gz: 827f6459043b84f7370e5e4f71ac3dac570a1ade25e1005ca8978340ff5bdead383244b77e4884166f1d9eb0dd76c4797cc793365fc8c4ee35c64b0233fd6da4
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ### 4.17.2.0
4
+
5
+ - `glimmer` command --bundler option to run with bundler/setup (instead of picking gems directly)
6
+ - Remove Gemfile dependency on Juwelier since it does not relate to GUI (delaying install of it till scaffolding)
7
+ - Remove Gemfile dependency on Warbler since it does not relate to GUI (delaying install of it till packaging)
8
+ - Move Package and Scaffold classes under Glimmer::RakeTask (Glimmer::Package.javapackager_extra_args is now Glimmer::RakeTask::Package.javapackager_extra_args)
9
+ - Fixed issue with scaffolding spec/spec_helper.rb with Juwelier (since it changed from Jeweler)
10
+
3
11
  ### 4.17.1.1
4
12
 
5
13
  - Fixed issue with showing glimmer command tasks twice
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.1.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.0
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)
@@ -416,6 +416,8 @@ If you intend to build a Glimmer app from scratch with [scaffolding](#scaffoldin
416
416
 
417
417
  Otherwise, Option 2 ([Bundler](#option-2-bundler)) can be followed in rare cases where you want to build an app without [scaffolding](#scaffolding).
418
418
 
419
+ Note: if you encounter any [issues](https://github.com/AndyObtiva/glimmer-dsl-swt/issues), please [report](https://github.com/AndyObtiva/glimmer-dsl-swt/issues) and then go back in the list of [Glimmer Releases](https://rubygems.org/gems/glimmer-dsl-swt/versions) until you find one that works for you.
420
+
419
421
  ### Option 1: Direct Install
420
422
  (Use for [Scaffolding](#scaffolding))
421
423
 
@@ -426,7 +428,7 @@ jgem install glimmer-dsl-swt
426
428
 
427
429
  Or this command if you want a specific version:
428
430
  ```
429
- jgem install glimmer-dsl-swt -v 4.17.1.1
431
+ jgem install glimmer-dsl-swt -v 4.17.2.0
430
432
  ```
431
433
 
432
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.
@@ -474,6 +476,8 @@ On Windows, it simply lists the available Glimmer tasks at the end (courtsey of
474
476
 
475
477
  If you are new to Glimmer, you may read the Basic Usage section and skip the rest until you have gone through [Girb (Glimmer irb) Command](#girb-glimmer-irb-command), [Glimmer GUI DSL Syntax](#glimmer-gui-dsl-syntax), and [Samples](#samples).
476
478
 
479
+ Note: If you encounter an issue running the `glimmer` command, run `bundle exec glimmer` instead.
480
+
477
481
  ### Basic Usage
478
482
 
479
483
  ```
@@ -501,7 +505,7 @@ bin/glimmer sample:run[hello_world]
501
505
  Below are the full usage instructions that come up when running `glimmer` without args.
502
506
 
503
507
  ```
504
- Glimmer (Ruby Desktop Development GUI Library) - JRuby Gem: glimmer-dsl-swt v4.17.1.1
508
+ Glimmer (Ruby Desktop Development GUI Library) - JRuby Gem: glimmer-dsl-swt v4.17.2.0
505
509
 
506
510
  Usage: glimmer [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
507
511
 
@@ -614,7 +618,7 @@ This will run the hello_tab sample and output its code:
614
618
  ```
615
619
  $ glimmer sample:run[hello_tab]
616
620
 
617
- # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.1.1/samples/hello/hello_tab.rb
621
+ # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.2.0/samples/hello/hello_tab.rb
618
622
 
619
623
  class HelloTab
620
624
  include Glimmer
@@ -659,7 +663,7 @@ Example:
659
663
  ```
660
664
  $ glimmer sample:code[tic_tac_toe]
661
665
 
662
- # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.1.1/samples/elaborate/tic_tac_toe.rb
666
+ # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.2.0/samples/elaborate/tic_tac_toe.rb
663
667
 
664
668
  require_relative "tic_tac_toe/board"
665
669
 
@@ -720,7 +724,7 @@ TicTacToe.new.open
720
724
  # # #
721
725
 
722
726
 
723
- # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.1.1/samples/elaborate/tic_tac_toe/cell.rb
727
+ # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.2.0/samples/elaborate/tic_tac_toe/cell.rb
724
728
 
725
729
  class TicTacToe
726
730
  class Cell
@@ -753,7 +757,7 @@ end
753
757
  # # #
754
758
 
755
759
 
756
- # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.1.1/samples/elaborate/tic_tac_toe/board.rb
760
+ # /Users/User/.rvm/gems/jruby-9.2.13.0@glimmerapp/gems/glimmer-dsl-swt-4.17.2.0/samples/elaborate/tic_tac_toe/board.rb
757
761
 
758
762
  require_relative 'cell'
759
763
 
@@ -1139,6 +1143,28 @@ Output:
1139
1143
 
1140
1144
  ```
1141
1145
 
1146
+ Example:
1147
+
1148
+ Check all custom widgets for Glimmer.
1149
+
1150
+ ```
1151
+ glimmer list:gems:cw
1152
+ ```
1153
+
1154
+ Output:
1155
+
1156
+ ```
1157
+
1158
+ Glimmer Custom Widget Gems at rubygems.org:
1159
+
1160
+ Name Gem Version Author Description
1161
+
1162
+ Browser (Chromium) glimmer-cw-browser-chromium 1.0.0 Andy Maleh Chromium Browser - Glimmer Custom Widget
1163
+ Cdatetime (Nebula) glimmer-cw-cdatetime-nebula 1.5.0.0.1 Andy Maleh Nebula CDateTime Widget - Glimmer Custom Widget
1164
+ Video glimmer-cw-video 1.0.0 Andy Maleh Glimmer Custom Widget - Video
1165
+
1166
+ ```
1167
+
1142
1168
  #### Listing DSL Gems
1143
1169
 
1144
1170
  The following command lists available Glimmer [DSL Gems](#multi-dsl-support) (prefixed with "glimmer-dsl-" by convention) created by the the Glimmer community and published on [rubygems.org](http://www.rubygems.org):
@@ -1163,7 +1189,7 @@ Output:
1163
1189
 
1164
1190
  Css glimmer-dsl-css 0.2.0 AndyMaleh Glimmer DSL for CSS
1165
1191
  Opal glimmer-dsl-opal 0.1.0 AndyMaleh Glimmer DSL for Opal
1166
- Swt glimmer-dsl-swt 4.17.1.1 AndyMaleh Glimmer DSL for SWT
1192
+ Swt glimmer-dsl-swt 4.17.2.0 AndyMaleh Glimmer DSL for SWT
1167
1193
  Tk glimmer-dsl-tk 0.0.5 AndyMaleh Glimmer DSL for Tk
1168
1194
  Xml glimmer-dsl-xml 0.2.0 AndyMaleh Glimmer DSL for XML
1169
1195
  ```
@@ -2895,8 +2921,9 @@ Optional steps:
2895
2921
 
2896
2922
  #### Multi-DSL Support
2897
2923
 
2898
- Glimmer is a DSL engine that supports multiple DSLs (Domain Specific Languages):
2899
- - [SWT](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (Desktop GUI)
2924
+ Glimmer is a DSL Framework that supports multiple DSLs (Domain Specific Languages):
2925
+ - [SWT](https://github.com/AndyObtiva/glimmer-dsl-swt): Glimmer DSL for SWT (JRuby Desktop Development GUI Library)
2926
+ - [Tk](https://github.com/AndyObtiva/glimmer-dsl-tk): Glimmer DSL for Tk (Ruby Desktop Development GUI Library)
2900
2927
  - [Opal](https://github.com/AndyObtiva/glimmer-dsl-opal): Glimmer DSL for Opal (Web GUI Adapter for Desktop Apps)
2901
2928
  - [XML](https://github.com/AndyObtiva/glimmer-dsl-xml): Glimmer DSL for XML (& HTML) - Useful with [SWT Browser Widget](#browser-widget)
2902
2929
  - [CSS](https://github.com/AndyObtiva/glimmer-dsl-css): Glimmer DSL for CSS (Cascading Style Sheets) - Useful with [SWT Browser Widget](#browser-widget)
@@ -3765,7 +3792,7 @@ The JAR file name will match your application local directory name (e.g. `MathBo
3765
3792
  The DMG file name will match the humanized local directory name + dash + application version (e.g. `Math Bowling-1.0.dmg` for `~/code/MathBowling` with version 1.0 or unspecified)
3766
3793
 
3767
3794
  The `glimmer package` command will automatically set "mac.CFBundleIdentifier" to ="org.#{project_name}.application.#{project_name}".
3768
- You may override by configuring as an extra argument for javapackger (e.g. Glimmer::Package.javapackager_extra_args = " -Bmac.CFBundleIdentifier=org.andymaleh.application.MathBowling")
3795
+ You may override by configuring as an extra argument for javapackger (e.g. Glimmer::RakeTask::Package.javapackager_extra_args = " -Bmac.CFBundleIdentifier=org.andymaleh.application.MathBowling")
3769
3796
 
3770
3797
  ### Packaging Defaults
3771
3798
 
@@ -3793,7 +3820,7 @@ require_relative '../app/my_application.rb'
3793
3820
  - Include DMG Background Icon (Optional): Simply place a .png file under `package/macosx/{HumanAppName}-background.png`
3794
3821
  - Include Version (Optional): Create a `VERSION` file in your application and fill it your app version on one line (e.g. `1.1.0`)
3795
3822
  - Include License (Optional): Create a `LICENSE.txt` file in your application and fill it up with your license (e.g. MIT). It will show up to people when installing your app. Note that, you may optionally also specify license type, but you'd have to do so manually via `-BlicenseType=MIT` shown in an [example below](#javapackager-extra-arguments).
3796
- - Extra args (Optional): You may optionally add the following to `Rakefile` to configure extra arguments for javapackager: `Glimmer::Packager.javapackager_extra_args = "..."` (Useful to avoid re-entering extra arguments on every run of rake task.). Read about them in [their section below](#javapackager-extra-arguments).
3823
+ - Extra args (Optional): You may optionally add the following to `Rakefile` to configure extra arguments for javapackager: `Glimmer::RakeTask::Package.javapackager_extra_args = "..."` (Useful to avoid re-entering extra arguments on every run of rake task.). Read about them in [their section below](#javapackager-extra-arguments).
3797
3824
 
3798
3825
  ### javapackager Extra Arguments
3799
3826
 
@@ -3805,7 +3832,7 @@ In order to explicitly configure javapackager, Mac package attributes, or sign y
3805
3832
  - https://developer.apple.com/library/archive/releasenotes/General/SubmittingToMacAppStore/index.html#//apple_ref/doc/uid/TP40010572-CH16-SW8
3806
3833
 
3807
3834
  The Glimmer rake task allows passing extra options to javapackager via:
3808
- - `Glimmer::Packager.javapackager_extra_args="..."` in your application Rakefile
3835
+ - `Glimmer::RakeTask::Package.javapackager_extra_args="..."` in your application Rakefile
3809
3836
  - Environment variable: `JAVAPACKAGER_EXTRA_ARGS`
3810
3837
 
3811
3838
  Example (Rakefile):
@@ -3813,7 +3840,7 @@ Example (Rakefile):
3813
3840
  ```ruby
3814
3841
  require 'glimmer/rake_task'
3815
3842
 
3816
- Glimmer::Package.javapackager_extra_args = '-BlicenseType="MIT" -Bmac.category="public.app-category.business" -Bmac.signing-key-developer-id-app="Andy Maleh"'
3843
+ Glimmer::RakeTask::Package.javapackager_extra_args = '-BlicenseType="MIT" -Bmac.category="public.app-category.business" -Bmac.signing-key-developer-id-app="Andy Maleh"'
3817
3844
  ```
3818
3845
 
3819
3846
  Note that `mac.category` defaults to "public.app-category.business", but can be overridden with one of the category UTI values mentioned here:
@@ -3830,7 +3857,7 @@ That overrides the default application display name.
3830
3857
 
3831
3858
  ### Verbose Mode
3832
3859
 
3833
- Pass `-v` to javapackager in `Glimmer::Package.javapackager_extra_args` or by running `glimmer package:native[type] -v` to learn more about further available customizations for the installer you are requesting to generate.
3860
+ Pass `-v` to javapackager in `Glimmer::RakeTask::Package.javapackager_extra_args` or by running `glimmer package:native[type] -v` to learn more about further available customizations for the installer you are requesting to generate.
3834
3861
 
3835
3862
  ### Windows Application Packaging
3836
3863
 
@@ -3844,7 +3871,7 @@ If you just want to test out packaging into a native Windows app that is not pac
3844
3871
 
3845
3872
  Recent macOS versions (starting with Catalina) have very stringent security requirements requiring all applications to be signed before running (unless the user goes to System Preferences -> Privacy -> General tab and clicks "Open Anyway" after failing to open application the first time they run it). So, to release a desktop application on the Mac, it is recommended to enroll in the [Apple Developer Program](https://developer.apple.com/programs/) to distribute on the [Mac App Store](https://developer.apple.com/distribute/) or otherwise request [app notarization from Apple](https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution) to distribute independently.
3846
3873
 
3847
- Afterwards, you may add developer-id/signing-key arguments to `javapackager` via `Glimmer::Package.javapackager_extra_args` or `JAVAPACKAGER_EXTRA_ARGS` according to this webpage: https://docs.oracle.com/javase/9/tools/javapackager.htm#JSWOR719
3874
+ Afterwards, you may add developer-id/signing-key arguments to `javapackager` via `Glimmer::RakeTask::Package.javapackager_extra_args` or `JAVAPACKAGER_EXTRA_ARGS` according to this webpage: https://docs.oracle.com/javase/9/tools/javapackager.htm#JSWOR719
3848
3875
 
3849
3876
  DMG signing key argument:
3850
3877
  ```
@@ -3872,12 +3899,12 @@ To do so, you may follow these steps (abbreviated version from https://developer
3872
3899
  - Enter Name (referred to below as "CertificateName")
3873
3900
  - Set 'Certificate Type' to 'Code Signing'
3874
3901
  - Create (if you alternatively override defaults, make sure to enable all capabilities)
3875
- - Add the following option to javapackager: `-Bmac.signing-key-developer-id-app="CertificateName"` via `Glimmer::Package.javapackager_extra_args` or `JAVAPACKAGER_EXTRA_ARGS`
3902
+ - Add the following option to javapackager: `-Bmac.signing-key-developer-id-app="CertificateName"` via `Glimmer::RakeTask::Package.javapackager_extra_args` or `JAVAPACKAGER_EXTRA_ARGS`
3876
3903
 
3877
3904
  Example:
3878
3905
 
3879
3906
  ```ruby
3880
- Glimmer::Package.javapackager_extra_args = '-Bmac.signing-key-developer-id-app="Andy Maleh"'
3907
+ Glimmer::RakeTask::Package.javapackager_extra_args = '-Bmac.signing-key-developer-id-app="Andy Maleh"'
3881
3908
  ```
3882
3909
 
3883
3910
  Now, when you run `glimmer package`, it builds a self-signed DMG file. When you make available online, and users download, upon launching application, they are presented with your certificate, which they have to sign if they trust you in order to use the application.
@@ -3892,7 +3919,7 @@ Keep that in mind if you are not going to rely on the default `LICENSE.txt` supp
3892
3919
  Example:
3893
3920
 
3894
3921
  ```ruby
3895
- Glimmer::Package.javapackager_extra_args = '-srcfiles "ACME.txt" -BlicenseFile="ACME.txt" -BlicenseType="ACME"'
3922
+ Glimmer::RakeTask::Package.javapackager_extra_args = '-srcfiles "ACME.txt" -BlicenseFile="ACME.txt" -BlicenseType="ACME"'
3896
3923
  ```
3897
3924
 
3898
3925
  2. Mounted DMG Residue
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.17.1.1
1
+ 4.17.2.0
@@ -21,10 +21,6 @@
21
21
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
22
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
23
 
24
- if File.exist?(File.expand_path('./Gemfile'))
25
- require 'bundler/setup' unless ENV['GLIMMER_BUNDLER_SETUP'].to_s.downcase == 'false'
26
- end
27
-
28
24
  require_relative '../lib/glimmer/launcher'
29
25
 
30
26
  Glimmer::Launcher.new(ARGV).launch
@@ -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.1.1 ruby lib
5
+ # stub: glimmer-dsl-swt 4.17.2.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer-dsl-swt".freeze
9
- s.version = "4.17.1.1"
9
+ s.version = "4.17.2.0"
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-09-24"
14
+ s.date = "2020-09-25"
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]
@@ -78,11 +78,11 @@ Gem::Specification.new do |s|
78
78
  "lib/glimmer/dsl/swt/widget_expression.rb",
79
79
  "lib/glimmer/dsl/swt/widget_listener_expression.rb",
80
80
  "lib/glimmer/launcher.rb",
81
- "lib/glimmer/package.rb",
82
81
  "lib/glimmer/rake_task.rb",
83
82
  "lib/glimmer/rake_task/list.rb",
83
+ "lib/glimmer/rake_task/package.rb",
84
84
  "lib/glimmer/rake_task/sample.rb",
85
- "lib/glimmer/scaffold.rb",
85
+ "lib/glimmer/rake_task/scaffold.rb",
86
86
  "lib/glimmer/swt/color_proxy.rb",
87
87
  "lib/glimmer/swt/cursor_proxy.rb",
88
88
  "lib/glimmer/swt/display_proxy.rb",
@@ -149,14 +149,13 @@ Gem::Specification.new do |s|
149
149
  s.add_runtime_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.1"])
150
150
  s.add_runtime_dependency(%q<rake-tui>.freeze, [">= 0.2.3", "< 2.0.0"])
151
151
  s.add_runtime_dependency(%q<git-glimmer>.freeze, ["= 1.7.0"])
152
- s.add_runtime_dependency(%q<juwelier>.freeze, [">= 2.4.9", "< 3.0.0"])
153
152
  s.add_runtime_dependency(%q<logging>.freeze, [">= 2.3.0", "< 3.0.0"])
154
153
  s.add_runtime_dependency(%q<os>.freeze, [">= 1.0.0", "< 2.0.0"])
155
154
  s.add_runtime_dependency(%q<rake>.freeze, [">= 10.1.0", "< 14.0.0"])
156
- s.add_runtime_dependency(%q<rdoc>.freeze, [">= 6.2.1", "< 7.0.0"])
157
155
  s.add_runtime_dependency(%q<text-table>.freeze, [">= 1.2.4", "< 2.0.0"])
158
156
  s.add_runtime_dependency(%q<tty-markdown>.freeze, [">= 0.6.0", "< 2.0.0"])
159
- s.add_runtime_dependency(%q<warbler>.freeze, [">= 2.0.5", "< 3.0.0"])
157
+ s.add_development_dependency(%q<juwelier>.freeze, [">= 2.4.9", "< 3.0.0"])
158
+ s.add_development_dependency(%q<warbler>.freeze, [">= 2.0.5", "< 3.0.0"])
160
159
  s.add_development_dependency(%q<rspec-mocks>.freeze, ["~> 3.5.0"])
161
160
  s.add_development_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
162
161
  s.add_development_dependency(%q<coveralls>.freeze, ["= 0.8.23"])
@@ -169,13 +168,12 @@ Gem::Specification.new do |s|
169
168
  s.add_dependency(%q<puts_debuggerer>.freeze, ["~> 0.10.1"])
170
169
  s.add_dependency(%q<rake-tui>.freeze, [">= 0.2.3", "< 2.0.0"])
171
170
  s.add_dependency(%q<git-glimmer>.freeze, ["= 1.7.0"])
172
- s.add_dependency(%q<juwelier>.freeze, [">= 2.4.9", "< 3.0.0"])
173
171
  s.add_dependency(%q<logging>.freeze, [">= 2.3.0", "< 3.0.0"])
174
172
  s.add_dependency(%q<os>.freeze, [">= 1.0.0", "< 2.0.0"])
175
173
  s.add_dependency(%q<rake>.freeze, [">= 10.1.0", "< 14.0.0"])
176
- s.add_dependency(%q<rdoc>.freeze, [">= 6.2.1", "< 7.0.0"])
177
174
  s.add_dependency(%q<text-table>.freeze, [">= 1.2.4", "< 2.0.0"])
178
175
  s.add_dependency(%q<tty-markdown>.freeze, [">= 0.6.0", "< 2.0.0"])
176
+ s.add_dependency(%q<juwelier>.freeze, [">= 2.4.9", "< 3.0.0"])
179
177
  s.add_dependency(%q<warbler>.freeze, [">= 2.0.5", "< 3.0.0"])
180
178
  s.add_dependency(%q<rspec-mocks>.freeze, ["~> 3.5.0"])
181
179
  s.add_dependency(%q<rspec>.freeze, ["~> 3.5.0"])
@@ -19,6 +19,7 @@
19
19
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
20
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
 
22
+ require 'bundler/setup' if ARGV.include?('--bundler') && File.exist?(File.expand_path('./Gemfile'))
22
23
  require 'fileutils'
23
24
  require 'os'
24
25
 
@@ -28,7 +29,7 @@ module Glimmer
28
29
 
29
30
  TEXT_USAGE = <<~MULTI_LINE_STRING
30
31
  Glimmer (Ruby Desktop Development GUI Library) - JRuby Gem: glimmer-dsl-swt v#{File.read(File.expand_path('../../../VERSION', __FILE__))}
31
- Usage: glimmer [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
32
+ Usage: glimmer [--bundler] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
32
33
 
33
34
  Runs Glimmer applications and tasks.
34
35
 
@@ -38,6 +39,7 @@ module Glimmer
38
39
  Optionally, extra Glimmer options, JRuby options, and/or environment variables may be passed in.
39
40
 
40
41
  Glimmer options:
42
+ - "--bundler" : Activates Glimmer gems with `bundler/setup` to ensure they match Gemfile (passes -G to jruby on app run)
41
43
  - "--quiet" : Does not announce file path of Glimmer application being launched
42
44
  - "--debug" : Displays extra debugging information, passes "--debug" to JRuby, and enables debug logging
43
45
  - "--log-level=VALUE" : Sets Glimmer's Ruby logger level ("ERROR" / "WARN" / "INFO" / "DEBUG"; default is none)
@@ -50,7 +52,7 @@ module Glimmer
50
52
 
51
53
  GLIMMER_LIB_LOCAL = File.expand_path(File.join('lib', 'glimmer-dsl-swt.rb'))
52
54
  GLIMMER_LIB_GEM = 'glimmer-dsl-swt'
53
- GLIMMER_OPTIONS = %w[--log-level --quiet]
55
+ GLIMMER_OPTIONS = %w[--log-level --quiet --bundler]
54
56
  GLIMMER_OPTION_ENV_VAR_MAPPING = {
55
57
  '--log-level' => 'GLIMMER_LOGGER_LEVEL'
56
58
  }
@@ -103,6 +105,7 @@ module Glimmer
103
105
 
104
106
  def launch(application, jruby_options: [], env_vars: {}, glimmer_options: {})
105
107
  jruby_options_string = jruby_options.join(' ') + ' ' if jruby_options.any?
108
+ bundler_require = '-G' if glimmer_options['--bundler']
106
109
  env_vars = env_vars.merge(glimmer_option_env_vars(glimmer_options))
107
110
  env_vars_string = env_vars.map do |k,v|
108
111
  if OS.windows? && ENV['PROMPT'] # detect command prompt (or powershell)
@@ -134,7 +137,7 @@ module Glimmer
134
137
  @@mutex.synchronize do
135
138
  puts "Launching Glimmer Application: #{application}" if jruby_options_string.to_s.include?('--debug') || glimmer_options['--quiet'].to_s.downcase != 'true'
136
139
  end
137
- command = "#{env_vars_string} jruby #{jruby_options_string}#{jruby_os_specific_options} #{devmode_require}-r #{the_glimmer_lib} -S #{application}"
140
+ command = "#{env_vars_string} jruby #{bundler_require} #{jruby_options_string}#{jruby_os_specific_options} #{devmode_require}-r #{the_glimmer_lib} -S #{application}"
138
141
  if !env_vars_string.empty? && OS.windows?
139
142
  command = "bash -c \"#{command}\"" if ENV['SHELL'] # do in Windows Git Bash only
140
143
  command = "cmd /C \"#{command}\"" if ENV['PROMPT'] # do in Windows Command Prompt only (or Powershell)
@@ -19,9 +19,28 @@
19
19
  # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
20
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
 
22
- require 'rake'
22
+ module Glimmer
23
+ module RakeTask
24
+ RVM_FUNCTION = <<~MULTI_LINE_STRING
25
+ # Load RVM into a shell session *as a function*
26
+ if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
27
+
28
+ # First try to load from a user install
29
+ source "$HOME/.rvm/scripts/rvm"
30
+
31
+ elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
32
+
33
+ # Then try to load from a root install
34
+ source "/usr/local/rvm/scripts/rvm"
35
+
36
+ fi
37
+ MULTI_LINE_STRING
38
+ end
39
+ end
23
40
 
24
- require_relative 'package'
41
+ require 'rake'
42
+
43
+ require_relative 'rake_task/package'
25
44
 
26
45
  ENV['GLIMMER_LOGGER_ENABLED'] = 'false'
27
46
  require_relative '../ext/glimmer/config.rb'
@@ -54,28 +73,28 @@ namespace :glimmer do
54
73
  namespace :package do
55
74
  desc 'Clean by removing "dist" and "packages" directories'
56
75
  task :clean do
57
- Glimmer::Package.clean
76
+ Glimmer::RakeTask::Package.clean
58
77
  end
59
78
 
60
79
  desc 'Generate JAR config file'
61
80
  task :config do
62
- Glimmer::Package.config
81
+ Glimmer::RakeTask::Package.config
63
82
  end
64
83
 
65
84
  desc 'Generate JAR file'
66
85
  task :jar do
67
- Glimmer::Package.jar
86
+ Glimmer::RakeTask::Package.jar
68
87
  end
69
88
 
70
89
  desc 'Lock JARs'
71
90
  task :lock_jars do
72
- Glimmer::Package.lock_jars
91
+ Glimmer::RakeTask::Package.lock_jars
73
92
  end
74
93
 
75
94
  desc 'Generate Native files. type can be dmg/pkg on the Mac, msi/exe on Windows, and rpm/deb on Linux (type is optional)'
76
95
  task :native, [:type] do |t, args|
77
96
  extra_args = ARGV.partition {|arg| arg.include?('package:native')}.last.to_a.join(' ')
78
- Glimmer::Package.native(args[:type], extra_args)
97
+ Glimmer::RakeTask::Package.native(args[:type], extra_args)
79
98
  end
80
99
  end
81
100
 
@@ -90,15 +109,15 @@ namespace :glimmer do
90
109
 
91
110
  desc 'Scaffold Glimmer application directory structure to build a new app'
92
111
  task :scaffold, [:app_name] do |t, args|
93
- require_relative 'scaffold'
94
- Scaffold.app(args[:app_name])
112
+ require_relative 'rake_task/scaffold'
113
+ Glimmer::RakeTask::Scaffold.app(args[:app_name])
95
114
  end
96
115
 
97
116
  namespace :scaffold do
98
117
  desc 'Scaffold Glimmer::UI::CustomShell subclass (full window view) under app/views (namespace is optional) [alt: scaffold:cs]'
99
118
  task :customshell, [:name, :namespace] do |t, args|
100
- require_relative 'scaffold'
101
- Scaffold.custom_shell(args[:name], args[:namespace])
119
+ require_relative 'rake_task/scaffold'
120
+ Glimmer::RakeTask::Scaffold.custom_shell(args[:name], args[:namespace])
102
121
  end
103
122
 
104
123
  task :cs, [:name, :namespace] => :customshell
@@ -107,8 +126,8 @@ namespace :glimmer do
107
126
 
108
127
  desc 'Scaffold Glimmer::UI::CustomWidget subclass (part of a view) under app/views (namespace is optional) [alt: scaffold:cw]'
109
128
  task :customwidget, [:name, :namespace] do |t, args|
110
- require_relative 'scaffold'
111
- Scaffold.custom_widget(args[:name], args[:namespace])
129
+ require_relative 'rake_task/scaffold'
130
+ Glimmer::RakeTask::Scaffold.custom_widget(args[:name], args[:namespace])
112
131
  end
113
132
 
114
133
  task :cw, [:name, :namespace] => :customwidget
@@ -118,8 +137,8 @@ namespace :glimmer do
118
137
  namespace :gem do
119
138
  desc 'Scaffold Glimmer::UI::CustomShell subclass (full window view) under its own Ruby gem + app project (namespace is required) [alt: scaffold:gem:cs]'
120
139
  task :customshell, [:name, :namespace] do |t, args|
121
- require_relative 'scaffold'
122
- Scaffold.custom_shell_gem(args[:name], args[:namespace])
140
+ require_relative 'rake_task/scaffold'
141
+ Glimmer::RakeTask::Scaffold.custom_shell_gem(args[:name], args[:namespace])
123
142
  end
124
143
 
125
144
  task :cs, [:name, :namespace] => :customshell
@@ -128,8 +147,8 @@ namespace :glimmer do
128
147
 
129
148
  desc 'Scaffold Glimmer::UI::CustomWidget subclass (part of a view) under its own Ruby gem project (namespace is required) [alt: scaffold:gem:cw]'
130
149
  task :customwidget, [:name, :namespace] do |t, args|
131
- require_relative 'scaffold'
132
- Scaffold.custom_widget_gem(args[:name], args[:namespace])
150
+ require_relative 'rake_task/scaffold'
151
+ Glimmer::RakeTask::Scaffold.custom_widget_gem(args[:name], args[:namespace])
133
152
  end
134
153
 
135
154
  task :cw, [:name, :namespace] => :customwidget