glimmer 0.1.0.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +1 -0
- data/Gemfile +9 -0
- data/LICENSE.txt +20 -0
- data/README.markdown +54 -0
- data/Rakefile +54 -0
- data/VERSION +1 -0
- data/bin/glimmer +132 -0
- data/glimmer.gemspec +145 -0
- data/images/Bitter-sweet.jpg +0 -0
- data/{src → lib}/command_handler.rb +7 -10
- data/{src → lib}/command_handler_chain_factory.rb +29 -22
- data/{src → lib}/command_handler_chain_link.rb +19 -22
- data/{src → lib}/command_handlers.rb +29 -26
- data/{src → lib}/command_handlers/bind_command_handler.rb +25 -28
- data/lib/command_handlers/combo_selection_data_binding_command_handler.rb +39 -0
- data/{src → lib}/command_handlers/data_binding_command_handler.rb +61 -64
- data/lib/command_handlers/list_selection_data_binding_command_handler.rb +42 -0
- data/lib/command_handlers/models/list_observer.rb +31 -0
- data/{src → lib}/command_handlers/models/model_observer.rb +28 -25
- data/{src → lib}/command_handlers/models/observable_array.rb +53 -46
- data/lib/command_handlers/models/observable_model.rb +61 -0
- data/{src → lib}/command_handlers/models/r_runnable.rb +11 -14
- data/{src → lib}/command_handlers/models/r_shell.rb +23 -26
- data/lib/command_handlers/models/r_tab_item_composite.rb +25 -0
- data/{src → lib}/command_handlers/models/r_widget.rb +16 -14
- data/lib/command_handlers/models/r_widget_listener.rb +9 -0
- data/{src → lib}/command_handlers/models/r_widget_packages.rb +5 -8
- data/{src → lib}/command_handlers/models/table_items_updater.rb +38 -39
- data/{src → lib}/command_handlers/models/widget_observer.rb +4 -6
- data/{src → lib}/command_handlers/shell_command_handler.rb +14 -17
- data/{src → lib}/command_handlers/swt_constant_command_handler.rb +18 -21
- data/lib/command_handlers/tab_item_command_handler.rb +22 -0
- data/{src → lib}/command_handlers/table_column_properties_data_binding_command_handler.rb +20 -23
- data/{src → lib}/command_handlers/table_items_data_binding_command_handler.rb +26 -29
- data/{src → lib}/command_handlers/widget_command_handler.rb +22 -25
- data/{src → lib}/command_handlers/widget_listener_command_handler.rb +36 -34
- data/{src → lib}/command_handlers/widget_method_command_handler.rb +18 -21
- data/{src → lib}/glimmer.rb +52 -45
- data/lib/parent.rb +5 -0
- data/{src → lib}/shine.rb +21 -24
- data/{src → lib}/xml_command_handlers.rb +15 -18
- data/{src → lib}/xml_command_handlers/html_command_handler.rb +45 -49
- data/{src → lib}/xml_command_handlers/models/depth_first_search_iterator.rb +17 -20
- data/{src → lib}/xml_command_handlers/models/name_space_visitor.rb +17 -20
- data/{src → lib}/xml_command_handlers/models/node.rb +80 -83
- data/{src → lib}/xml_command_handlers/models/node_visitor.rb +8 -11
- data/{src → lib}/xml_command_handlers/models/xml_visitor.rb +58 -61
- data/{src → lib}/xml_command_handlers/xml_command_handler.rb +18 -22
- data/{src → lib}/xml_command_handlers/xml_name_space_command_handler.rb +31 -34
- data/{src → lib}/xml_command_handlers/xml_tag_command_handler.rb +23 -26
- data/{src → lib}/xml_command_handlers/xml_text_command_handler.rb +19 -22
- data/samples/contactmanager/contact.rb +0 -3
- data/samples/contactmanager/contact_manager.rb +1 -4
- data/samples/contactmanager/contact_manager_presenter.rb +0 -3
- data/samples/contactmanager/contact_repository.rb +0 -3
- data/samples/hello_combo.rb +32 -0
- data/samples/hello_world.rb +1 -4
- data/samples/login.rb +1 -4
- data/samples/tictactoe/tic_tac_toe.rb +2 -5
- data/samples/tictactoe/tic_tac_toe_board.rb +0 -3
- data/test/glimmer_combo_data_binding_test.rb +131 -0
- data/test/glimmer_constant_test.rb +6 -11
- data/test/glimmer_data_binding_test.rb +16 -16
- data/test/glimmer_list_data_binding_test.rb +223 -0
- data/test/glimmer_listeners_test.rb +6 -6
- data/test/glimmer_shine_data_binding_test.rb +7 -6
- data/test/glimmer_tab_item_test.rb +61 -0
- data/test/glimmer_table_data_binding_test.rb +7 -20
- data/test/glimmer_test.rb +18 -13
- data/test/helper.rb +21 -0
- data/test/observable_model_test.rb +2 -4
- data/test/r_widget_test.rb +5 -5
- data/test/samples/contactmanager/contact_manager_presenter_test.rb +1 -4
- data/test/samples/tictactoe/tic_tac_toe_test.rb +1 -4
- data/test/xml/glimmer_xml_test.rb +43 -43
- metadata +210 -105
- data/COPYING.LGPL +0 -504
- data/README +0 -27
- data/src/command_handlers/models/observable_model.rb +0 -35
- data/src/command_handlers/models/r_widget_listener.rb +0 -12
- data/src/parent.rb +0 -8
- data/src/swt.rb +0 -10
- data/src/xml.rb +0 -10
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use jruby@glimmer --create
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 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.
|
data/README.markdown
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
Glimmer
|
2
|
+
===
|
3
|
+
Glimmer is a JRuby DSL that enables easy and efficient authoring of desktop application user-interfaces. It relies on the robust platform-independent Eclipse SWT library. Glimmer comes with built-in data-binding support to greatly facilitate synchronizing UI with domain models.
|
4
|
+
|
5
|
+
![Glimmer](https://github.com/AndyObtiva/glimmer/raw/master/images/Bitter-sweet.jpg)
|
6
|
+
|
7
|
+
Example
|
8
|
+
---
|
9
|
+
shell {
|
10
|
+
text "Example"
|
11
|
+
label {
|
12
|
+
text "Hello World!"
|
13
|
+
}
|
14
|
+
}.open
|
15
|
+
|
16
|
+
Getting Started
|
17
|
+
---
|
18
|
+
1. Download the "SWT binary and source" archive from the Eclipse site and follow their instructions.
|
19
|
+
[http://www.eclipse.org/swt/](http://www.eclipse.org/swt/)
|
20
|
+
2. Download and setup jRuby 1.5.6 (rvm install jruby -v1.5.6)
|
21
|
+
3. Install bundler (gem install bundler)
|
22
|
+
4. Install project required gems (bundle install)
|
23
|
+
5. Write a program that requires the file "lib/glimmer.rb" (or glimmer gem) and has the UI class (view) include the Glimmer module
|
24
|
+
6. Run your program with jruby
|
25
|
+
|
26
|
+
Samples
|
27
|
+
---
|
28
|
+
Check the "samples" folder for examples on how to write Glimmer applications.
|
29
|
+
|
30
|
+
Mac Support
|
31
|
+
---
|
32
|
+
In order to run Glimmer on the Mac, you need to pass an extra option to JRuby. For example:
|
33
|
+
jruby samples/hello_world.rb -XstartOnFirstThread
|
34
|
+
|
35
|
+
Background
|
36
|
+
---
|
37
|
+
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.
|
38
|
+
|
39
|
+
Resources
|
40
|
+
---
|
41
|
+
* [Eclipse Zone Tutorial](http://eclipse.dzone.com/articles/an-introduction-glimmer)
|
42
|
+
* [InfoQ Article](http://www.infoq.com/news/2008/02/glimmer-jruby-swt)
|
43
|
+
* [RubyConf 2008 Video](http://rubyconf2008.confreaks.com/desktop-development-with-glimmer.html)
|
44
|
+
* [Code Painter Blog](http://andymaleh.blogspot.com/search/label/Glimmer)
|
45
|
+
|
46
|
+
Contributors
|
47
|
+
---
|
48
|
+
* Annas "Andy" Al Maleh (Founder)
|
49
|
+
* Dennis Theisen
|
50
|
+
|
51
|
+
License
|
52
|
+
---
|
53
|
+
Copyright (c) 2011 Annas Al Maleh.
|
54
|
+
See LICENSE.txt for further details.
|
data/Rakefile
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'rake'
|
11
|
+
|
12
|
+
require 'jeweler'
|
13
|
+
Jeweler::Tasks.new do |gem|
|
14
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
|
+
gem.name = "glimmer"
|
16
|
+
gem.homepage = "http://github.com/AndyObtiva/glimmer"
|
17
|
+
gem.license = "MIT"
|
18
|
+
gem.summary = %Q{Desktop application development library}
|
19
|
+
gem.description = %Q{JRuby DSL that enables easy and efficient authoring of user-interfaces using the robust platform-independent Eclipse SWT library}
|
20
|
+
gem.email = "andy@obtiva.com"
|
21
|
+
gem.authors = ["Andy Maleh"]
|
22
|
+
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
23
|
+
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
24
|
+
gem.add_runtime_dependency 'facets', '2.9.0'
|
25
|
+
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
26
|
+
end
|
27
|
+
Jeweler::RubygemsDotOrgTasks.new
|
28
|
+
|
29
|
+
require 'rake/testtask'
|
30
|
+
Rake::TestTask.new(:test) do |test|
|
31
|
+
test.libs << 'lib' << 'samples' << 'test'
|
32
|
+
test.pattern = 'test/**/*_test.rb'
|
33
|
+
test.verbose = true
|
34
|
+
test.ruby_opts = ['-J-XstartOnFirstThread']
|
35
|
+
end
|
36
|
+
|
37
|
+
require 'rcov/rcovtask'
|
38
|
+
Rcov::RcovTask.new do |test|
|
39
|
+
test.libs << 'test'
|
40
|
+
test.pattern = 'test/**/*_test.rb'
|
41
|
+
test.verbose = true
|
42
|
+
end
|
43
|
+
|
44
|
+
task :default => :test
|
45
|
+
|
46
|
+
require 'rake/rdoctask'
|
47
|
+
Rake::RDocTask.new do |rdoc|
|
48
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
49
|
+
|
50
|
+
rdoc.rdoc_dir = 'rdoc'
|
51
|
+
rdoc.title = "glimmer #{version}"
|
52
|
+
rdoc.rdoc_files.include('README*')
|
53
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
54
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.2
|
data/bin/glimmer
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'abbrev'
|
4
|
+
load File.dirname(__FILE__) + '/../Rakefile'
|
5
|
+
|
6
|
+
# Displayed when no valid command is given
|
7
|
+
HELP_TEXT = <<-EOS
|
8
|
+
usage: glimmer COMMAND [ARGS]
|
9
|
+
|
10
|
+
Available COMMANDS:
|
11
|
+
list - display all installed Glimmer applications (samples)
|
12
|
+
run - run any glimmer application or sample by name
|
13
|
+
generate - create a new project with a scaffold of an application
|
14
|
+
|
15
|
+
Note: You can use abbreviations as long as they're unambiguos (g for generate)
|
16
|
+
EOS
|
17
|
+
|
18
|
+
# the generate-command will create this file for a new project to start with
|
19
|
+
GLIMMER_BASE_TEMPLATE = <<-EOS
|
20
|
+
require 'rubygems'
|
21
|
+
require 'swt'
|
22
|
+
|
23
|
+
|
24
|
+
class <%= @name %>
|
25
|
+
include Glimmer
|
26
|
+
# Remember to include all SWT packages that you need
|
27
|
+
# or you will get a `const_missing' error
|
28
|
+
include_package 'org.eclipse.swt.layout'
|
29
|
+
|
30
|
+
def initialize
|
31
|
+
build
|
32
|
+
end
|
33
|
+
|
34
|
+
def build
|
35
|
+
@shell = shell {
|
36
|
+
text "<%= @name %>"
|
37
|
+
|
38
|
+
composite {
|
39
|
+
layout GridLayout.new(2, false)
|
40
|
+
button {
|
41
|
+
text "&Click"
|
42
|
+
on_widget_selected { @label.text("You clicked the button") }
|
43
|
+
}
|
44
|
+
@label = label { text "Click the button to change me" }
|
45
|
+
}
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
def launch
|
50
|
+
@shell.open
|
51
|
+
end
|
52
|
+
end
|
53
|
+
# Start the application
|
54
|
+
<%= @name %>.new.launch
|
55
|
+
EOS
|
56
|
+
|
57
|
+
class GlimmerRunner
|
58
|
+
|
59
|
+
COMMANDS = %w[list run generate]
|
60
|
+
|
61
|
+
PLATFORM_EXTENSION = (PLATFORM =~ /win\d\d/) ? '.bat' : ''
|
62
|
+
JRUBY_COMMAND = "jruby#{PLATFORM_EXTENSION} -S"
|
63
|
+
SAMPLES_PATH = File.dirname(__FILE__) + "/../samples"
|
64
|
+
# This could be avoided by naming the main application like the directory (i.e. without underscores)
|
65
|
+
# You need to add new multi file applications to this list, so that they can be started using "glimmer run"
|
66
|
+
SAMPLES = {"contactmanager" => "contact_manager", "tictactoe" => "tic_tac_toe", "glimmereditor" => "glimmer_editor"}
|
67
|
+
|
68
|
+
JRUBY_BAT_LIB_REGEX = /Djava\.library\.path="%ECLIPSE_HOME%\\plugins\\org\.eclipse\.swt\.win32\.win32.x86_3.4.1.v3449c"/
|
69
|
+
|
70
|
+
def initialize(command, name)
|
71
|
+
@command, @name = command, name
|
72
|
+
decide
|
73
|
+
end
|
74
|
+
|
75
|
+
def decide
|
76
|
+
shortcuts = COMMANDS.abbrev
|
77
|
+
if @command and shortcuts.keys.include?(cmd = @command.downcase)
|
78
|
+
send(shortcuts[cmd])
|
79
|
+
else
|
80
|
+
puts HELP_TEXT
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# Run a sample application or any user application with jruby
|
85
|
+
def run
|
86
|
+
return puts("usage example: glimmer run tictactoe") unless @name
|
87
|
+
# Search for the filename (and add the .rb extension if not provided), and run it
|
88
|
+
if File.exist?("#{@name}#{'.rb' unless @name =~ /.rb$/}")
|
89
|
+
command = "#{JRUBY_COMMAND} \"#{@name.gsub(/\\/, '/')}#{'.rb' unless @name =~ /.rb$/}\""
|
90
|
+
else
|
91
|
+
# Search for all installed samples and try to run of those
|
92
|
+
command = "#{JRUBY_COMMAND} \"#{SAMPLES_PATH}/#{fetch_app(@name)}.rb\""
|
93
|
+
end
|
94
|
+
puts "Starting the application with following command:"
|
95
|
+
puts command
|
96
|
+
system command
|
97
|
+
end
|
98
|
+
|
99
|
+
def list
|
100
|
+
single_file_apps = Dir["#{SAMPLES_PATH}/*.rb"]
|
101
|
+
multi_file_apps = Dir["#{SAMPLES_PATH}/*"].reject{ |file| file =~ /.rb$/}
|
102
|
+
puts "Installed Glimmer applications:"
|
103
|
+
(single_file_apps + multi_file_apps).each_with_index do |file, index|
|
104
|
+
puts "#{index+1}. #{File.basename(file, '.*')}"
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def generate
|
109
|
+
return puts("usage example: glimmer generate my_test_project") unless @name
|
110
|
+
puts "Creating project named: #{@name}"
|
111
|
+
Dir.mkdir(@name)
|
112
|
+
filename = "#{@name}/#{@name}.rb"
|
113
|
+
puts "Creating glimmer file: #{filename}"
|
114
|
+
File.open(filename, 'w') do |file|
|
115
|
+
file.write(GemHelper.render_template(GLIMMER_BASE_TEMPLATE, {:name => @name.capitalize}))
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
private
|
120
|
+
# This could be avoided by naming the main application like the directory (i.e. without underscores)
|
121
|
+
def fetch_app(name)
|
122
|
+
return name if SAMPLES[name].nil?
|
123
|
+
"#{name}/#{SAMPLES[name]}"
|
124
|
+
end
|
125
|
+
|
126
|
+
end
|
127
|
+
|
128
|
+
|
129
|
+
# Here's where the action starts
|
130
|
+
command, name = ARGV[0], ARGV[1]
|
131
|
+
|
132
|
+
GlimmerRunner.new(command, name)
|
data/glimmer.gemspec
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{glimmer}
|
8
|
+
s.version = "0.1.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Andy Maleh"]
|
12
|
+
s.date = %q{2011-02-22}
|
13
|
+
s.default_executable = %q{glimmer}
|
14
|
+
s.description = %q{JRuby DSL that enables easy and efficient authoring of user-interfaces using the robust platform-independent Eclipse SWT library}
|
15
|
+
s.email = %q{andy@obtiva.com}
|
16
|
+
s.executables = ["glimmer"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.markdown"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".rvmrc",
|
23
|
+
"Gemfile",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.markdown",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"bin/glimmer",
|
29
|
+
"glimmer.gemspec",
|
30
|
+
"images/Bitter-sweet.jpg",
|
31
|
+
"lib/command_handler.rb",
|
32
|
+
"lib/command_handler_chain_factory.rb",
|
33
|
+
"lib/command_handler_chain_link.rb",
|
34
|
+
"lib/command_handlers.rb",
|
35
|
+
"lib/command_handlers/bind_command_handler.rb",
|
36
|
+
"lib/command_handlers/combo_selection_data_binding_command_handler.rb",
|
37
|
+
"lib/command_handlers/data_binding_command_handler.rb",
|
38
|
+
"lib/command_handlers/list_selection_data_binding_command_handler.rb",
|
39
|
+
"lib/command_handlers/models/list_observer.rb",
|
40
|
+
"lib/command_handlers/models/model_observer.rb",
|
41
|
+
"lib/command_handlers/models/observable_array.rb",
|
42
|
+
"lib/command_handlers/models/observable_model.rb",
|
43
|
+
"lib/command_handlers/models/r_runnable.rb",
|
44
|
+
"lib/command_handlers/models/r_shell.rb",
|
45
|
+
"lib/command_handlers/models/r_tab_item_composite.rb",
|
46
|
+
"lib/command_handlers/models/r_widget.rb",
|
47
|
+
"lib/command_handlers/models/r_widget_listener.rb",
|
48
|
+
"lib/command_handlers/models/r_widget_packages.rb",
|
49
|
+
"lib/command_handlers/models/table_items_updater.rb",
|
50
|
+
"lib/command_handlers/models/widget_observer.rb",
|
51
|
+
"lib/command_handlers/shell_command_handler.rb",
|
52
|
+
"lib/command_handlers/swt_constant_command_handler.rb",
|
53
|
+
"lib/command_handlers/tab_item_command_handler.rb",
|
54
|
+
"lib/command_handlers/table_column_properties_data_binding_command_handler.rb",
|
55
|
+
"lib/command_handlers/table_items_data_binding_command_handler.rb",
|
56
|
+
"lib/command_handlers/widget_command_handler.rb",
|
57
|
+
"lib/command_handlers/widget_listener_command_handler.rb",
|
58
|
+
"lib/command_handlers/widget_method_command_handler.rb",
|
59
|
+
"lib/glimmer.rb",
|
60
|
+
"lib/parent.rb",
|
61
|
+
"lib/shine.rb",
|
62
|
+
"lib/xml_command_handlers.rb",
|
63
|
+
"lib/xml_command_handlers/html_command_handler.rb",
|
64
|
+
"lib/xml_command_handlers/models/depth_first_search_iterator.rb",
|
65
|
+
"lib/xml_command_handlers/models/name_space_visitor.rb",
|
66
|
+
"lib/xml_command_handlers/models/node.rb",
|
67
|
+
"lib/xml_command_handlers/models/node_visitor.rb",
|
68
|
+
"lib/xml_command_handlers/models/xml_visitor.rb",
|
69
|
+
"lib/xml_command_handlers/xml_command_handler.rb",
|
70
|
+
"lib/xml_command_handlers/xml_name_space_command_handler.rb",
|
71
|
+
"lib/xml_command_handlers/xml_tag_command_handler.rb",
|
72
|
+
"lib/xml_command_handlers/xml_text_command_handler.rb",
|
73
|
+
"samples/contactmanager/contact.rb",
|
74
|
+
"samples/contactmanager/contact_manager.rb",
|
75
|
+
"samples/contactmanager/contact_manager_presenter.rb",
|
76
|
+
"samples/contactmanager/contact_repository.rb",
|
77
|
+
"samples/hello_combo.rb",
|
78
|
+
"samples/hello_world.rb",
|
79
|
+
"samples/login.rb",
|
80
|
+
"samples/tictactoe/tic_tac_toe.rb",
|
81
|
+
"samples/tictactoe/tic_tac_toe_board.rb",
|
82
|
+
"test/glimmer_combo_data_binding_test.rb",
|
83
|
+
"test/glimmer_constant_test.rb",
|
84
|
+
"test/glimmer_data_binding_test.rb",
|
85
|
+
"test/glimmer_list_data_binding_test.rb",
|
86
|
+
"test/glimmer_listeners_test.rb",
|
87
|
+
"test/glimmer_shine_data_binding_test.rb",
|
88
|
+
"test/glimmer_tab_item_test.rb",
|
89
|
+
"test/glimmer_table_data_binding_test.rb",
|
90
|
+
"test/glimmer_test.rb",
|
91
|
+
"test/helper.rb",
|
92
|
+
"test/observable_model_test.rb",
|
93
|
+
"test/r_widget_test.rb",
|
94
|
+
"test/samples/contactmanager/contact_manager_presenter_test.rb",
|
95
|
+
"test/samples/tictactoe/tic_tac_toe_test.rb",
|
96
|
+
"test/xml/glimmer_xml_test.rb"
|
97
|
+
]
|
98
|
+
s.homepage = %q{http://github.com/AndyObtiva/glimmer}
|
99
|
+
s.licenses = ["MIT"]
|
100
|
+
s.require_paths = ["lib"]
|
101
|
+
s.rubygems_version = %q{1.5.2}
|
102
|
+
s.summary = %q{Desktop application development library}
|
103
|
+
s.test_files = [
|
104
|
+
"test/glimmer_combo_data_binding_test.rb",
|
105
|
+
"test/glimmer_constant_test.rb",
|
106
|
+
"test/glimmer_data_binding_test.rb",
|
107
|
+
"test/glimmer_list_data_binding_test.rb",
|
108
|
+
"test/glimmer_listeners_test.rb",
|
109
|
+
"test/glimmer_shine_data_binding_test.rb",
|
110
|
+
"test/glimmer_tab_item_test.rb",
|
111
|
+
"test/glimmer_table_data_binding_test.rb",
|
112
|
+
"test/glimmer_test.rb",
|
113
|
+
"test/helper.rb",
|
114
|
+
"test/observable_model_test.rb",
|
115
|
+
"test/r_widget_test.rb",
|
116
|
+
"test/samples/contactmanager/contact_manager_presenter_test.rb",
|
117
|
+
"test/samples/tictactoe/tic_tac_toe_test.rb",
|
118
|
+
"test/xml/glimmer_xml_test.rb"
|
119
|
+
]
|
120
|
+
|
121
|
+
if s.respond_to? :specification_version then
|
122
|
+
s.specification_version = 3
|
123
|
+
|
124
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
125
|
+
s.add_runtime_dependency(%q<facets>, ["= 2.9.0"])
|
126
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
127
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
128
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
129
|
+
s.add_runtime_dependency(%q<facets>, ["= 2.9.0"])
|
130
|
+
else
|
131
|
+
s.add_dependency(%q<facets>, ["= 2.9.0"])
|
132
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
133
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
134
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
135
|
+
s.add_dependency(%q<facets>, ["= 2.9.0"])
|
136
|
+
end
|
137
|
+
else
|
138
|
+
s.add_dependency(%q<facets>, ["= 2.9.0"])
|
139
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
140
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
141
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
142
|
+
s.add_dependency(%q<facets>, ["= 2.9.0"])
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
Binary file
|
@@ -1,11 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
def
|
6
|
-
raise "must be implemented by a class"
|
7
|
-
end
|
8
|
-
def do_handle(parent, command_symbol, *args, &block)
|
9
|
-
raise "must be implemented by a class"
|
10
|
-
end
|
1
|
+
module CommandHandler
|
2
|
+
def can_handle?(parent, command_symbol, *args, &block)
|
3
|
+
raise "must be implemented by a class"
|
4
|
+
end
|
5
|
+
def do_handle(parent, command_symbol, *args, &block)
|
6
|
+
raise "must be implemented by a class"
|
7
|
+
end
|
11
8
|
end
|