glimmer 0.1.4.470 → 0.1.5.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: 0daa73328eea5ec8f8ca28ba1ccc951951a882ff16e60e4d4b552d0257d65ba4
4
- data.tar.gz: 9dd0675fd3d6f4a7aa7bf0309cf2d03e30b99f5e5573eea8f34d261b7b1ccfcb
3
+ metadata.gz: d5614f3671026c45846b7f6bfadd538f8ce93b8bddcc8b10407fa3c046b041a1
4
+ data.tar.gz: 97450f0a03ea502699b7ecd38ed7444f0f6c6ab9494a6d01d12d7a5986fb7851
5
5
  SHA512:
6
- metadata.gz: bfdda0b377e8256c162e1a8c994617014e425cf23ca37027a17b9e9280e5d4ce30b1cd4ece887ac5d7501687583bb5737c65aff97c39a64667f211b8e7a51b33
7
- data.tar.gz: 31c92581a76ad2d5933371a63491bf48c918aff6d46cbbdbb7601d14be32b922e75c1594237c83f66abd6346cba864bc8d30e0b0d2f89f39cb97f080f2a2ee0f
6
+ metadata.gz: 7168e408c5b7095a7852033a33635bec397681b3211ca64bef8ff7980b7b16ec5bf3123d2f21426b8527849019539333af2d5ecee989df0b3b8eccce8e23090b
7
+ data.tar.gz: 6d194c420b0daa51f2e23ceaae47e11c495aabbcf8b6a41b264b3270c5a515a2bfd25924b1582104a1e1f9ee41396b7688b2e5613473638e94e81ea31751cb78
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
3
  gem 'facets', '3.1.0'
4
+ gem 'os', '1.0.0'
4
5
 
5
6
  group :development do
6
7
  gem "rdoc", "~> 2.3.0"
@@ -2,41 +2,109 @@
2
2
 
3
3
  Glimmer is a cross-platform Ruby desktop development library. Glimmer's main innovation is a JRuby DSL that enables easy and efficient authoring of desktop application user-interfaces while relying on the robust platform-independent Eclipse SWT library. Glimmer additionally innovates by having built-in desktop UI data-binding support to greatly facilitate synchronizing the UI with domain models. As a result, that achieves true decoupling of object oriented components, enabling developers to solve business problems without worrying about UI concerns, or alternatively drive development UI-first, and then write clean business components test-first afterward.
4
4
 
5
- You may learn more by reading this article: * [Eclipse Zone Tutorial](http://eclipse.dzone.com/articles/an-introduction-glimmer)
5
+ You may learn more by reading this article: [Eclipse Zone Tutorial](http://eclipse.dzone.com/articles/an-introduction-glimmer)
6
6
 
7
7
  ![Glimmer](https://github.com/AndyObtiva/glimmer/raw/master/images/Bitter-sweet.jpg)
8
8
 
9
9
  ## Example
10
10
 
11
+ ```ruby
11
12
  shell {
12
13
  text "Example"
13
14
  label {
14
15
  text "Hello World!"
15
16
  }
16
17
  }.open
18
+ ```
17
19
 
18
- ## Getting Started
20
+ ## Setup
19
21
 
20
- 1. Download and extract the ["SWT binary and source"](http://download.eclipse.org/eclipse/downloads/drops4/R-4.7-201706120950/#SWT).
21
- 2. Add swt.jar to your Java CLASSPATH environment (e.g. `export CLASSPATH="/path_to_swt_jar/swt.jar"`)
22
- 3. Download and setup jRuby 1.5.6 (`rvm install jruby-9.1.12.0`)
23
- 4. Install bundler (gem install bundler)
24
- 5. Install project required gems (bundle install)
25
- 6. Write a program that requires the file "lib/glimmer.rb" (or glimmer gem) and has the UI class (view) include the Glimmer module
26
- 7. Run your program with `bin/glimmer` or jruby (pass `-J-XstartOnFirstThread` option if on the Mac)
22
+ Please follow these instructions to make the `glimmer` command available on your system.
23
+
24
+ ### Option 1: Bundler
25
+
26
+ Add the following to `Gemfile`:
27
+ ```
28
+ gem 'glimmer', '~> 0.1.5.470'
29
+ ```
30
+
31
+ And, then run:
32
+ ```
33
+ bundle install
34
+ ```
35
+
36
+ ### Option 2: Direct RubyGem
37
+
38
+ Run this command to get directly:
39
+ ```
40
+ gem install glimmer -v 0.1.5.470
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ Usage: `glimmer [--setup] [application_ruby_file_path.rb]`
46
+
47
+ Example 1: `glimmer hello_combo.rb`
48
+ This runs the Glimmer application hello_combo.rb
49
+ If the SWT Jar is missing, it downloads it and sets it up first.
50
+
51
+ Example 2: `glimmer --setup hello_combo.rb`
52
+ This performs setup and then runs the Glimmer application hello_combo.rb
53
+ It downloads and sets up the SWT jar whether missing or not.
54
+
55
+ Example 3: `glimmer --setup`
56
+ This downloads and sets up the SWT jar whether missing or not.
27
57
 
28
58
  ## Samples
29
59
 
30
60
  Check the "samples" folder for examples on how to write Glimmer applications.
31
61
 
62
+ ## Background
63
+
64
+ Ruby is a dynamically-typed object-oriented language, which provides great productivity gains due to its powerful expressive syntax and dynamic nature. While it is proven by the Ruby on Rails framework for web development, it currently lacks a robust platform-independent framework for building desktop applications. Given that Java libraries can now be utilized in Ruby code through JRuby, Eclipse technologies, such as SWT, JFace, and RCP can help fill the gap of desktop application development with Ruby.
65
+
66
+ ## Logging
67
+
68
+ Glimmer comes with a Ruby Logger accessible via `Glimmer.logger`
69
+ Its level of logging defaults to `Logger::WARN`
70
+ It may be configured to show a different level of logging as follows:
71
+ ```ruby
72
+ Glimmer.logger.level = Logger::DEBUG
73
+ ```
74
+ This results in more verbose debugging log to `STDOUT`, which is helpful in troubleshooting Glimmer DSL syntax when needed.
75
+
76
+ Example log:
77
+ ```
78
+ D, [2017-07-21T19:23:12.587870 #35707] DEBUG -- : method: shell and args: []
79
+ D, [2017-07-21T19:23:12.594405 #35707] DEBUG -- : ShellCommandHandler will handle command: shell with arguments []
80
+ D, [2017-07-21T19:23:12.844775 #35707] DEBUG -- : method: composite and args: []
81
+ D, [2017-07-21T19:23:12.845388 #35707] DEBUG -- : parent is a widget: true
82
+ D, [2017-07-21T19:23:12.845833 #35707] DEBUG -- : on listener?: false
83
+ D, [2017-07-21T19:23:12.864395 #35707] DEBUG -- : WidgetCommandHandler will handle command: composite with arguments []
84
+ D, [2017-07-21T19:23:12.864893 #35707] DEBUG -- : widget styles are: []
85
+ D, [2017-07-21T19:23:12.874296 #35707] DEBUG -- : method: list and args: [:multi]
86
+ D, [2017-07-21T19:23:12.874969 #35707] DEBUG -- : parent is a widget: true
87
+ D, [2017-07-21T19:23:12.875452 #35707] DEBUG -- : on listener?: false
88
+ D, [2017-07-21T19:23:12.878434 #35707] DEBUG -- : WidgetCommandHandler will handle command: list with arguments [:multi]
89
+ D, [2017-07-21T19:23:12.878798 #35707] DEBUG -- : widget styles are: [:multi]
90
+ ```
91
+
32
92
  ## Mac Support
33
93
 
34
94
  In order to run Glimmer on the Mac, you need to pass an extra option to JRuby. For example:
35
95
  `jruby -J-XstartOnFirstThread samples/hello_world.rb`
36
96
 
37
- ## Background
97
+ ## Contributing to Glimmer
38
98
 
39
- Ruby is a dynamically-typed object-oriented language, which provides great productivity gains due to its powerful expressive syntax and dynamic nature. While it is proven by the Ruby on Rails framework for web development, it currently lacks a robust platform-independent framework for building desktop applications. Given that Java libraries can now be utilized in Ruby code through JRuby, Eclipse technologies, such as SWT, JFace, and RCP can help fill the gap of desktop application development with Ruby.
99
+ Please follow these instructions if you would like to help us develop Glimmer:
100
+
101
+ 1. Download and extract the ["SWT binary and source"](http://download.eclipse.org/eclipse/downloads/drops4/R-4.7-201706120950/#SWT).
102
+ 2. Add swt.jar to your Java CLASSPATH environment (e.g. `export CLASSPATH="$CLASSPATH:/path_to_swt_jar/swt.jar"`)
103
+ 3. Download and setup jRuby 1.5.6 (`rvm install jruby-9.1.12.0`)
104
+ 4. Install bundler (gem install bundler)
105
+ 5. Install project required gems (bundle install)
106
+ 6. Write a program that requires the file "lib/glimmer.rb" (or glimmer gem) and has the UI class (view) include the Glimmer module
107
+ 7. Run your program with `bin/glimmer` or jruby (pass `-J-XstartOnFirstThread` option if on the Mac)
40
108
 
41
109
  ## Resources
42
110
 
data/Rakefile CHANGED
@@ -1,5 +1,7 @@
1
1
  require 'rubygems'
2
2
  require 'bundler'
3
+ require 'os'
4
+ require_relative 'lib/glimmer_application'
3
5
  begin
4
6
  Bundler.setup(:default, :development)
5
7
  rescue Bundler::BundlerError => e
@@ -29,7 +31,8 @@ Rake::TestTask.new(:test) do |test|
29
31
  test.libs << 'lib' << 'samples' << 'test'
30
32
  test.pattern = 'test/**/*_test.rb'
31
33
  test.verbose = true
32
- test.ruby_opts = ['-J-XstartOnFirstThread -Xcli.debug=true --debug']
34
+ additional_options = OS.mac? ? "-J-XstartOnFirstThread" : ""
35
+ test.ruby_opts = ["#{additional_options} -J-classpath \"#{GlimmerApplication::SWT_JAR_FILE}\" -Xcli.debug=true --debug"]
33
36
  end
34
37
 
35
38
  task :default => :test
data/TODO.md CHANGED
@@ -2,8 +2,5 @@
2
2
 
3
3
  Here is a list of tasks to do (please delete once done):
4
4
 
5
- * Route puts to a debug logger with log options
6
- * Upgrade test suite to RSpec
7
- * Download/Setup SWT Jar as part of gem install
5
+ * Increase test coverage to 80% (debug failure of test suite despite passing tests)
8
6
  * Support Tree databinding
9
- * Increase test coverage to 80%
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4.470
1
+ 0.1.5.470
@@ -1,3 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- `ruby -J-XstartOnFirstThread #{ARGV.first}`
3
+ require_relative File.join('..', 'lib', 'glimmer_application')
4
+ GlimmerApplication.new(ARGV).start
@@ -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.4.470 ruby lib
5
+ # stub: glimmer 0.1.5.470 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "glimmer".freeze
9
- s.version = "0.1.4.470"
9
+ s.version = "0.1.5.470"
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 = "2017-07-21"
14
+ s.date = "2017-07-22"
15
15
  s.description = "JRuby DSL 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]
@@ -59,6 +59,7 @@ Gem::Specification.new do |s|
59
59
  "lib/command_handlers/widget_listener_command_handler.rb",
60
60
  "lib/command_handlers/widget_method_command_handler.rb",
61
61
  "lib/glimmer.rb",
62
+ "lib/glimmer_application.rb",
62
63
  "lib/parent.rb",
63
64
  "lib/shine.rb",
64
65
  "lib/string.rb",
@@ -112,6 +113,7 @@ Gem::Specification.new do |s|
112
113
 
113
114
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
114
115
  s.add_runtime_dependency(%q<facets>.freeze, ["= 3.1.0"])
116
+ s.add_runtime_dependency(%q<os>.freeze, ["= 1.0.0"])
115
117
  s.add_development_dependency(%q<rdoc>.freeze, ["~> 2.3.0"])
116
118
  s.add_development_dependency(%q<bundler>.freeze, ["~> 1.0"])
117
119
  s.add_development_dependency(%q<jeweler>.freeze, ["~> 2.3.0"])
@@ -120,6 +122,7 @@ Gem::Specification.new do |s|
120
122
  s.add_development_dependency(%q<puts_debuggerer>.freeze, ["= 0.6.1"])
121
123
  else
122
124
  s.add_dependency(%q<facets>.freeze, ["= 3.1.0"])
125
+ s.add_dependency(%q<os>.freeze, ["= 1.0.0"])
123
126
  s.add_dependency(%q<rdoc>.freeze, ["~> 2.3.0"])
124
127
  s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
125
128
  s.add_dependency(%q<jeweler>.freeze, ["~> 2.3.0"])
@@ -129,6 +132,7 @@ Gem::Specification.new do |s|
129
132
  end
130
133
  else
131
134
  s.add_dependency(%q<facets>.freeze, ["= 3.1.0"])
135
+ s.add_dependency(%q<os>.freeze, ["= 1.0.0"])
132
136
  s.add_dependency(%q<rdoc>.freeze, ["~> 2.3.0"])
133
137
  s.add_dependency(%q<bundler>.freeze, ["~> 1.0"])
134
138
  s.add_dependency(%q<jeweler>.freeze, ["~> 2.3.0"])
@@ -2,12 +2,12 @@ require File.dirname(__FILE__) + "/command_handler_chain_link"
2
2
 
3
3
  class CommandHandlerChainFactory
4
4
  @@dsls = {}
5
-
5
+
6
6
  def self.def_dsl(dsl, *command_handler_array)
7
7
  @@last_chain_link = nil
8
8
  @@chain = nil
9
9
  command_handler_array.each do |command_handler|
10
- puts "Loading #{command_handler.class.to_s}..."
10
+ Glimmer.logger.debug "Loading #{command_handler.class.to_s}..."
11
11
  chain_link = CommandHandlerChainLink.new(command_handler)
12
12
  @@last_chain_link.chain_to(chain_link) if @@last_chain_link
13
13
  @@last_chain_link = chain_link
@@ -23,8 +23,8 @@ class CommandHandlerChainFactory
23
23
  @@last_chain_link = @@dsls[dsl][:last_chain_link]
24
24
  @@chain = @@dsls[dsl][:chain]
25
25
  end
26
-
26
+
27
27
  def self.chain
28
28
  @@chain
29
29
  end
30
- end
30
+ end
@@ -7,12 +7,12 @@ class CommandHandlerChainLink
7
7
  end
8
8
  def handle(parent, command_symbol, *args, &block)
9
9
  if (@command_handler.can_handle?(parent, command_symbol, *args, &block))
10
- puts "#{@command_handler.class.to_s} will handle command: #{command_symbol} with arguments #{args}"
10
+ Glimmer.logger.debug "#{@command_handler.class.to_s} will handle command: #{command_symbol} with arguments #{args}"
11
11
  return @command_handler.do_handle(parent, command_symbol, *args, &block)
12
12
  elsif @next_chain_link
13
13
  return @next_chain_link.handle(parent, command_symbol, *args, &block)
14
14
  else
15
- puts "Command: #{command_symbol} cannot be handled!"
15
+ Glimmer.logger.debug "Command: #{command_symbol} cannot be handled!"
16
16
  return nil
17
17
  end
18
18
  end
@@ -13,7 +13,7 @@ class WidgetCommandHandler
13
13
  end
14
14
 
15
15
  def do_handle(parent, command_symbol, *args, &block)
16
- puts "widget styles are: " + args.inspect
16
+ Glimmer.logger.debug "widget styles are: " + args.inspect
17
17
  RWidget.new(command_symbol.to_s, parent.widget, args)
18
18
  end
19
19
 
@@ -7,15 +7,15 @@ class WidgetListenerCommandHandler
7
7
  include_package 'org.eclipse.swt.widgets'
8
8
 
9
9
  def can_handle?(parent, command_symbol, *args, &block)
10
- puts "parent is a widget: " + (parent.is_a?(RWidget)).to_s
10
+ Glimmer.logger.debug "parent is a widget: " + (parent.is_a?(RWidget)).to_s
11
11
  return unless parent.is_a?(RWidget)
12
- puts "on listener?: " + (command_symbol.to_s[0,3] == "on_").to_s
12
+ Glimmer.logger.debug "on listener?: " + (command_symbol.to_s[0,3] == "on_").to_s
13
13
  return unless command_symbol.to_s[0,3] == "on_"
14
- puts "command symbol is longer than 3: " + (command_symbol.to_s.length > 3).to_s
14
+ Glimmer.logger.debug "command symbol is longer than 3: " + (command_symbol.to_s.length > 3).to_s
15
15
  return unless command_symbol.to_s.length > 3
16
- puts "args are 0?: " + (args.size == 0).to_s
16
+ Glimmer.logger.debug "args are 0?: " + (args.size == 0).to_s
17
17
  return unless args.size == 0
18
- puts "can add listener? " + (parent.can_add_listener?(command_symbol.to_s[3, command_symbol.to_s.length])).to_s
18
+ Glimmer.logger.debug "can add listener? " + (parent.can_add_listener?(command_symbol.to_s[3, command_symbol.to_s.length])).to_s
19
19
  parent.can_add_listener?(command_symbol.to_s[3, command_symbol.to_s.length])
20
20
  end
21
21
 
@@ -1,23 +1,29 @@
1
1
  # Glimmer - a JRuby DSL that enables easy and efficient authoring of user
2
- # interfaces using the robust platform-independent Eclipse SWT library. Glimmer
3
- # comes with built-in data-binding support to greatly facilitate synchronizing
2
+ # interfaces using the robust platform-independent Eclipse SWT library. Glimmer
3
+ # comes with built-in data-binding support to greatly facilitate synchronizing
4
4
  # UI with domain models.
5
5
 
6
6
  require "rubygems"
7
7
  require "facets"
8
+ require "logger"
8
9
  require "java"
9
10
  require File.dirname(__FILE__) + "/string"
10
11
  require File.dirname(__FILE__) + "/symbol"
11
12
  require File.dirname(__FILE__) + "/parent"
12
13
 
13
14
  module Glimmer
14
-
15
+
15
16
  include_package 'org.eclipse.swt'
16
-
17
+
17
18
  @@parent_stack = []
19
+ @@logger = Logger.new(STDOUT).tap {|logger| logger.level = Logger::WARN}
20
+
21
+ def self.logger
22
+ @@logger
23
+ end
18
24
 
19
25
  def self.method_missing(method_symbol, *args, &block)
20
- puts "method: " + method_symbol.to_s + " and args: " + args.to_s
26
+ Glimmer.logger.debug "method: " + method_symbol.to_s + " and args: " + args.to_s
21
27
  command_handler_chain = CommandHandlerChainFactory.chain
22
28
  return_value = command_handler_chain.handle(@@parent_stack.last, method_symbol, *args, &block)
23
29
  add_contents(return_value, &block)
@@ -35,7 +41,7 @@ module Glimmer
35
41
  end
36
42
 
37
43
  #added for convenience
38
-
44
+
39
45
  def method_missing(method_symbol, *args, &block)
40
46
  Glimmer.method_missing(method_symbol, *args, &block)
41
47
  end
@@ -0,0 +1,99 @@
1
+ require 'net/http'
2
+ require 'fileutils'
3
+ require 'os'
4
+
5
+ class GlimmerApplication
6
+ SWT_ZIP_FILE = File.join(`echo ~`.strip, '.glimmer', 'vendor', 'swt.zip')
7
+ SWT_JAR_FILE = File.join(File.dirname(SWT_ZIP_FILE), 'swt.jar')
8
+
9
+ OPERATING_SYSTEMS = ["mac", "windows", "linux"]
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
20
+ alias :setup_requested? :setup_requested
21
+
22
+ # Accepts the following options string:
23
+ # --setup app_file_path.rb
24
+ # or
25
+ # --setup
26
+ # or
27
+ # app_file_path.rb
28
+ def initialize(options)
29
+ @setup_requested = options.first == '--setup'
30
+ @application = setup_requested? ? options[1] : options.first
31
+ end
32
+
33
+ def start
34
+ usage unless setup_requested? || application
35
+
36
+ setup if setup_requested? || !File.exist?(SWT_JAR_FILE)
37
+
38
+ if application
39
+ puts "Starting Glimmer Application #{application}"
40
+ additional_options
41
+ `ruby #{additional_options} -J-classpath "#{SWT_JAR_FILE}" #{application}`
42
+ end
43
+ end
44
+
45
+ def usage
46
+ puts <<~MULTILINE
47
+ Usage: glimmer [--setup] [application_ruby_file_path.rb]
48
+
49
+ Example 1: glimmer hello_combo.rb
50
+ This runs the Glimmer application hello_combo.rb
51
+ If the SWT Jar is missing, it downloads it and sets it up first.
52
+
53
+ Example 2: glimmer --setup hello_combo.rb
54
+ This performs setup and then runs the Glimmer application hello_combo.rb
55
+ It downloads and sets up the SWT jar whether missing or not.
56
+
57
+ Example 3: glimmer --setup
58
+ This downloads and sets up the SWT jar whether missing or not.
59
+ MULTILINE
60
+ end
61
+
62
+ def setup
63
+ puts "#{SWT_JAR_FILE} is missing! Will obtain a new copy now." unless File.exist?(SWT_JAR_FILE)
64
+ FileUtils.mkdir_p(File.dirname(SWT_ZIP_FILE))
65
+ download(SWT_ZIP_FILE)
66
+ puts "Unzipping #{SWT_ZIP_FILE}"
67
+ `unzip -o #{SWT_ZIP_FILE} -d #{File.dirname(SWT_ZIP_FILE)}`
68
+ puts "Finished unzipping"
69
+ end
70
+
71
+ def download(file)
72
+ uri = URI(platform_swt_url)
73
+ puts "Downloading #{uri}"
74
+ File.open(file, 'w') do |f|
75
+ f.write(Net::HTTP.get(uri))
76
+ end
77
+ puts "Finished downloading"
78
+ end
79
+
80
+ def platform_swt_url
81
+ SWT_URL[platform_swt_url_key]
82
+ end
83
+
84
+ def platform_swt_url_key
85
+ "#{platform_os}_#{platform_cpu}"
86
+ end
87
+
88
+ def platform_os
89
+ OPERATING_SYSTEMS.detect {|os| OS.send("#{os}?")}
90
+ end
91
+
92
+ def platform_cpu
93
+ OS.host_cpu
94
+ end
95
+
96
+ def additional_options
97
+ OS.mac? ? "-J-XstartOnFirstThread" : ""
98
+ end
99
+ end
@@ -47,7 +47,7 @@ class XmlVisitor < NodeVisitor
47
47
  end
48
48
 
49
49
  def append_attributes(node)
50
- puts "Take 3"
50
+ Glimmer.logger.debug "Take 3"
51
51
  p node.attributes
52
52
  node.attributes.each_key do |attribute|
53
53
  attribute_name = attribute
@@ -20,7 +20,7 @@ class XmlNameSpaceCommandHandler
20
20
  name_space_visitor = NameSpaceVisitor.new(args[0].to_s)
21
21
  DepthFirstSearchIterator.new(node, name_space_visitor).iterate
22
22
  def node.process_block(block)
23
- puts 'block'
23
+ Glimmer.logger.debug 'block'
24
24
  #NOOP
25
25
  end
26
26
  end
@@ -20,5 +20,5 @@ require 'glimmer'
20
20
  class Test::Unit::TestCase
21
21
  def assert_has_style(style, widget)
22
22
  assert_equal style.swt_constant, widget.getStyle & style.swt_constant
23
- end
23
+ end
24
24
  end
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.4.470
4
+ version: 0.1.5.470
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-21 00:00:00.000000000 Z
11
+ date: 2017-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.1.0
27
+ - !ruby/object:Gem::Dependency
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - '='
31
+ - !ruby/object:Gem::Version
32
+ version: 1.0.0
33
+ name: os
34
+ prerelease: false
35
+ type: :runtime
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  requirement: !ruby/object:Gem::Requirement
29
43
  requirements:
@@ -157,6 +171,7 @@ files:
157
171
  - lib/command_handlers/widget_listener_command_handler.rb
158
172
  - lib/command_handlers/widget_method_command_handler.rb
159
173
  - lib/glimmer.rb
174
+ - lib/glimmer_application.rb
160
175
  - lib/parent.rb
161
176
  - lib/shine.rb
162
177
  - lib/string.rb