glimmer 0.1.11.SWT4.14 → 0.1.11.470

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: e969215624dc4b042727fb8cf0ab47397e9b70e499b59df66ce971b45acb54d7
4
- data.tar.gz: 84f2da9b3e691d1360d7a9db1345b11a7ecbd00adc15f7c8176fd7ed27023db3
3
+ metadata.gz: f5b339cef2e99a0b2b52cc8b12118838539f715c2d12dbd84b5f339eaf8f6dac
4
+ data.tar.gz: 97002f166453f85f6a55666b6761260d95353864d30cc29b5d577a69609bce37
5
5
  SHA512:
6
- metadata.gz: 3cc0172f53ed935dfe09ce6dd3f154c563e71c3fa6d403a2772acb5c36d6f2cb06143c8fb77b01590eafa2a0dded33a158977cd805244f603f092540326863ee
7
- data.tar.gz: dee9c61db200aeec1573631c4767ad9488d8b806df361e538c665457380ef7f74cdf919b0ff09366a96a1bad5f66113659262fe5fb041b8ce8c2dbe7198f69d9
6
+ metadata.gz: 42769e6f83f473af36fe13ffa1a908a786d00872470cfc0dc8e561bb93074fb039ed9cb90a45b4256553b468891ea27fd6f7c14c5a050a97b394b8fc0d334b5b
7
+ data.tar.gz: 990ac2f452d51fedb8df76c9730e9c947bf4bb8fcdc9027c0b7bf9e4bea00648fb95d28360cc4c65a76f9321408aafb7d53f5c84cfdef9bf90b5691bdab24887
@@ -45,7 +45,7 @@ Please follow these instructions to make the `glimmer` command available on your
45
45
 
46
46
  Add the following to `Gemfile`:
47
47
  ```
48
- gem 'glimmer', '~> 0.1.11.SWT4.14'
48
+ gem 'glimmer', '~> 0.1.11.470'
49
49
  ```
50
50
 
51
51
  And, then run:
@@ -57,7 +57,7 @@ bundle install
57
57
 
58
58
  Run this command to get directly:
59
59
  ```
60
- gem install glimmer -v 0.1.11.SWT4.14
60
+ gem install glimmer -v 0.1.11.470
61
61
  ```
62
62
 
63
63
  ## Usage
@@ -178,6 +178,7 @@ Same as Windows
178
178
 
179
179
  These features have been suggested. You might see them in a future version of Glimmer. You are welcome to contribute more feature suggestions.
180
180
 
181
+ - Nested binding via attribute expressions (e.g. `bind(person, "address.city")`)
181
182
  - bind_collection: an iterator that enables spawning widgets based on a collection (e.g. spawn 2 `AddressWidget`s if `user.addresses` bind collection contains 2 addresses)
182
183
 
183
184
  ## Contributing to Glimmer
data/RELEASE.md CHANGED
@@ -1,8 +1,5 @@
1
1
  # Release Notes
2
2
 
3
- ** 0.1.11.SWT4.14 **
4
- - Upgraded SWT to version 4.14
5
-
6
3
  ** 0.1.11.470 **
7
4
  - Nested property data binding support
8
5
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.11.SWT4.14
1
+ 0.1.11.470
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: glimmer 0.1.11.SWT4.14 ruby lib
5
+ # stub: glimmer 0.1.11.470 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer".freeze
9
- s.version = "0.1.11.SWT4.14"
9
+ s.version = "0.1.11.470"
10
10
 
11
- s.required_rubygems_version = Gem::Requirement.new("> 1.3.1".freeze) if s.respond_to? :required_rubygems_version=
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-02-28"
14
+ s.date = "2020-02-26"
15
15
  s.description = "JRuby Desktop UI DSL + Data-Binding library that enables easy and efficient authoring of user-interfaces using the robust platform-independent Eclipse SWT library".freeze
16
16
  s.email = "andy.am@gmail.com".freeze
17
17
  s.executables = ["glimmer".freeze, "girb".freeze]
@@ -34,7 +34,6 @@ Gem::Specification.new do |s|
34
34
  "bin/girb",
35
35
  "bin/girb_runner.rb",
36
36
  "bin/glimmer",
37
- "config/swt.yml",
38
37
  "glimmer.gemspec",
39
38
  "images/Bitter-sweet.jpg",
40
39
  "lib/command_handler.rb",
@@ -1,21 +1,22 @@
1
1
  require 'net/http'
2
2
  require 'fileutils'
3
3
  require 'os'
4
- require 'yaml'
5
4
 
6
5
  class GlimmerApplication
7
6
  SWT_ZIP_FILE = File.join(`echo ~`.strip, '.glimmer', 'vendor', 'swt.zip')
8
7
  SWT_JAR_FILE = File.join(File.dirname(SWT_ZIP_FILE), 'swt.jar')
9
8
 
10
9
  OPERATING_SYSTEMS = ["mac", "windows", "linux"]
11
- REGEX_SETUP = /--setup/
12
- REGEX_SWT_VERSION = /[0-9]+[.0-9]*/
13
- REGEX_APPLICATION = /.+/
14
- REGEX_OPTIONS = [
15
- REGEX_SETUP, REGEX_SWT_VERSION, REGEX_APPLICATION
16
- ].map {|re| "(#{re})?"}.join("\s*")
17
-
18
- attr_reader :setup_requested, :swt_version_specified, :application
10
+
11
+ SWT_URL = {
12
+ "mac_x86_64" => "http://mirror.csclub.uwaterloo.ca/eclipse/eclipse/downloads/drops4/R-4.7-201706120950/swt-4.7-cocoa-macosx-x86_64.zip",
13
+ "linux_x86_64" => "http://mirror.cc.vt.edu/pub/eclipse/eclipse/downloads/drops4/R-4.7-201706120950/swt-4.7-gtk-linux-x86_64.zip",
14
+ "linux_x86" => "http://mirror.csclub.uwaterloo.ca/eclipse/eclipse/downloads/drops4/R-4.7-201706120950/swt-4.7-gtk-linux-x86.zip",
15
+ "windows_x86_64" => "http://mirror.csclub.uwaterloo.ca/eclipse/eclipse/downloads/drops4/R-4.7-201706120950/swt-4.7-win32-win32-x86_64.zip",
16
+ "windows_x86" => "http://eclipse.mirror.rafal.ca/eclipse/downloads/drops4/R-4.7-201706120950/swt-4.7-win32-win32-x86.zip"
17
+ }
18
+
19
+ attr_reader :setup_requested, :application
19
20
  alias :setup_requested? :setup_requested
20
21
 
21
22
  # Accepts the following options string:
@@ -25,10 +26,8 @@ class GlimmerApplication
25
26
  # or
26
27
  # app_file_path.rb
27
28
  def initialize(options)
28
- options_regex_match = options.join(' ').match(REGEX_OPTIONS)
29
- @setup_requested = !!options_regex_match[1]
30
- @swt_version_specified = options_regex_match[2]
31
- @application = options_regex_match[3]
29
+ @setup_requested = options.first == '--setup'
30
+ @application = setup_requested? ? options[1] : options.first
32
31
  end
33
32
 
34
33
  def start
@@ -36,7 +35,7 @@ class GlimmerApplication
36
35
 
37
36
  setup if setup_requested? || !File.exist?(SWT_JAR_FILE)
38
37
 
39
- if application && File.exist?(SWT_JAR_FILE)
38
+ if application
40
39
  puts "Starting Glimmer Application #{application}"
41
40
  system "ruby #{additional_options} -J-classpath \"#{SWT_JAR_FILE}\" #{application}"
42
41
  end
@@ -44,21 +43,18 @@ class GlimmerApplication
44
43
 
45
44
  def usage
46
45
  puts <<-MULTILINE
47
- Usage: glimmer [--setup] [SWT_VERSION] [application_ruby_file_path.rb]
46
+ Usage: glimmer [--setup] [application_ruby_file_path.rb]
48
47
 
49
48
  Example 1: glimmer hello_combo.rb
50
49
  This runs the Glimmer application hello_combo.rb
51
- If the SWT Jar is missing, it first downloads the latest version supported.
50
+ If the SWT Jar is missing, it downloads it and sets it up first.
52
51
 
53
52
  Example 2: glimmer --setup hello_combo.rb
54
53
  This performs setup and then runs the Glimmer application hello_combo.rb
55
- It downloads and sets up the latest SWT jar whether missing or not.
54
+ It downloads and sets up the SWT jar whether missing or not.
56
55
 
57
56
  Example 3: glimmer --setup
58
- This downloads and sets up the latest SWT jar whether missing or not.
59
-
60
- Example 4: glimmer --setup 4.14
61
- This downloads and sets up the SWT jar specified version 4.14 whether missing or not.
57
+ This downloads and sets up the SWT jar whether missing or not.
62
58
  MULTILINE
63
59
  end
64
60
 
@@ -69,8 +65,6 @@ This downloads and sets up the SWT jar specified version 4.14 whether missing or
69
65
  puts "Unzipping #{SWT_ZIP_FILE}"
70
66
  `unzip -o #{SWT_ZIP_FILE} -d #{File.dirname(SWT_ZIP_FILE)}`
71
67
  puts "Finished unzipping"
72
- rescue => e
73
- puts e.message
74
68
  end
75
69
 
76
70
  def download(file)
@@ -83,21 +77,7 @@ This downloads and sets up the SWT jar specified version 4.14 whether missing or
83
77
  end
84
78
 
85
79
  def platform_swt_url
86
- swt_config[swt_version][platform_swt_url_key]
87
- rescue
88
- raise "SWT version #{swt_version} is not available for download!"
89
- end
90
-
91
- def swt_config
92
- @swt_config ||= YAML.load_file(File.join(__FILE__, '..', '..', 'config', 'swt.yml'))['SWT']
93
- end
94
-
95
- def swt_version
96
- swt_version_specified || swt_latest_version
97
- end
98
-
99
- def swt_latest_version
100
- @swt_latest_version ||= swt_config.keys.max_by {|v| v.split('.').reverse.map(&:to_i).each_with_index.map {|n, i| n*(1000**i)}.sum}
80
+ SWT_URL[platform_swt_url_key]
101
81
  end
102
82
 
103
83
  def platform_swt_url_key
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11.SWT4.14
4
+ version: 0.1.11.470
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-28 00:00:00.000000000 Z
11
+ date: 2020-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -161,7 +161,6 @@ files:
161
161
  - bin/girb
162
162
  - bin/girb_runner.rb
163
163
  - bin/glimmer
164
- - config/swt.yml
165
164
  - glimmer.gemspec
166
165
  - images/Bitter-sweet.jpg
167
166
  - lib/command_handler.rb
@@ -258,9 +257,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
258
257
  version: '0'
259
258
  required_rubygems_version: !ruby/object:Gem::Requirement
260
259
  requirements:
261
- - - ">"
260
+ - - ">="
262
261
  - !ruby/object:Gem::Version
263
- version: 1.3.1
262
+ version: '0'
264
263
  requirements: []
265
264
  rubyforge_project:
266
265
  rubygems_version: 2.7.10
@@ -1,5 +0,0 @@
1
- SWT:
2
- '4.14':
3
- mac_x86_64: http://mirror.csclub.uwaterloo.ca/eclipse/eclipse/downloads/drops4/R-4.14-201912100610/swt-4.14-cocoa-macosx-x86_64.zip
4
- linux_x86_64: http://mirror.csclub.uwaterloo.ca/eclipse/eclipse/downloads/drops4/R-4.14-201912100610/swt-4.14-gtk-linux-x86_64.zip
5
- windows_x86_64: http://mirror.csclub.uwaterloo.ca/eclipse/eclipse/downloads/drops4/R-4.14-201912100610/swt-4.14-win32-win32-x86_64.zip