rubeus 0.0.9-java → 0.1.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/Gemfile +5 -0
  4. data/Gemfile.lock +29 -0
  5. data/Rakefile +5 -52
  6. data/VERSION +1 -1
  7. data/examples/rubeus_swing_jdbc_example01.rb +19 -1
  8. data/examples/rubeus_swing_menu_example.rb +30 -0
  9. data/lib/rubeus.rb +4 -3
  10. data/lib/rubeus/extensions/javax/swing/j_menu.rb +7 -0
  11. data/lib/rubeus/extensions/javax/swing/j_menu_bar.rb +7 -0
  12. data/lib/rubeus/jdbc/column.rb +1 -1
  13. data/lib/rubeus/reflection.rb +4 -0
  14. data/lib/rubeus/reflection/java_methods.rb +95 -0
  15. data/lib/rubeus/version.rb +3 -0
  16. data/rubeus.gemspec +26 -197
  17. data/test/minitest_helper.rb +20 -0
  18. data/test/rubeus/awt/test_attributes.rb +2 -4
  19. data/test/rubeus/awt/test_event.rb +2 -4
  20. data/test/rubeus/awt/test_nestable.rb +2 -4
  21. data/test/rubeus/awt/test_setter.rb +2 -4
  22. data/test/rubeus/extensions/java/awt/test_dimension.rb +3 -5
  23. data/test/rubeus/extensions/java/sql/test_connection.rb +3 -4
  24. data/test/rubeus/extensions/java/sql/test_database_meta_data.rb +3 -6
  25. data/test/rubeus/extensions/java/sql/test_driver_manager.rb +2 -4
  26. data/test/rubeus/extensions/java/sql/test_result_set.rb +3 -4
  27. data/test/rubeus/extensions/java/sql/test_result_set_meta_data.rb +3 -4
  28. data/test/rubeus/extensions/java/sql/test_sql_helper.rb +11 -4
  29. data/test/rubeus/extensions/java/sql/test_statement.rb +3 -4
  30. data/test/rubeus/extensions/javax/swing/table/test_default_table_model.rb +3 -4
  31. data/test/rubeus/extensions/javax/swing/test_box_layout.rb +45 -47
  32. data/test/rubeus/extensions/javax/swing/test_j_component.rb +20 -22
  33. data/test/rubeus/extensions/javax/swing/test_j_frame.rb +31 -33
  34. data/test/rubeus/extensions/javax/swing/test_j_menu_bar.rb +28 -0
  35. data/test/rubeus/extensions/javax/swing/test_j_panel.rb +16 -18
  36. data/test/rubeus/extensions/javax/swing/test_j_scroll_pane.rb +18 -19
  37. data/test/rubeus/extensions/javax/swing/test_j_split_pane.rb +45 -46
  38. data/test/rubeus/extensions/javax/swing/test_j_tabbed_pane.rb +2 -4
  39. data/test/rubeus/extensions/javax/swing/test_j_table.rb +67 -68
  40. data/test/rubeus/extensions/javax/swing/test_j_text_field.rb +43 -45
  41. data/test/rubeus/extensions/javax/swing/test_timer.rb +5 -5
  42. data/test/rubeus/reflection/test_java_methods.rb +138 -0
  43. data/test/rubeus/reflection/test_method_modifier.rb +3 -4
  44. data/test/rubeus/test_extensions.rb +3 -7
  45. data/test/test_rubeus.rb +7 -0
  46. metadata +285 -235
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: cd7a1311ab198eddb1d2a6ea7338cf7b266c48e4
4
+ data.tar.gz: 43f32d3c740f434eccf210635484306c787c724b
5
+ SHA512:
6
+ metadata.gz: 53dce4d977f66e98265c580a01accf04e51ff2cf6bfdbf37bea420bccd4d4e237e45ae6c243c4fa807851f3b17bdd5aaa9e5f86ecde425ff5bd4fd946ed41022
7
+ data.tar.gz: 581ba2224ec98426dab5e936796b16c8b6712755abd28b9b903e09aa282f5ec4e802871b7d87f103c0d33c13a51f4be6e0bedadec977d45f94ff25b2d5e14462
data/.gitignore CHANGED
@@ -1,5 +1,9 @@
1
1
  *.class
2
+ *.log
3
+ *~
2
4
  /
5
+ /.ruby-version
6
+ /.rvmrc
3
7
  /coverage
4
8
  /debugging
5
9
  /pkg
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # -*- coding: utf-8 -*-
2
+ source 'https://rubygems.org'
3
+
4
+ # Specify your gem's dependencies in rubeus.gemspec
5
+ gemspec
@@ -0,0 +1,29 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rubeus (0.1.0-java)
5
+ activesupport (< 4.0.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (3.2.14)
11
+ i18n (~> 0.6, >= 0.6.4)
12
+ multi_json (~> 1.0)
13
+ i18n (0.6.5)
14
+ jdbc-derby (10.6.2.1-java)
15
+ minitest (5.0.7)
16
+ multi_json (1.7.9)
17
+ rake (0.9.2.2)
18
+ rmaven (0.0.1)
19
+
20
+ PLATFORMS
21
+ java
22
+
23
+ DEPENDENCIES
24
+ bundler (~> 1.3)
25
+ jdbc-derby (= 10.6.2.1)
26
+ minitest
27
+ rake
28
+ rmaven (= 0.0.1)
29
+ rubeus!
data/Rakefile CHANGED
@@ -6,60 +6,13 @@ begin
6
6
  rescue LoadError
7
7
  puts "rmaven (or a dependency) not available. Install it with: gem install rmaven"
8
8
  end
9
- require 'rake'
10
9
 
11
- begin
12
- require 'jeweler'
13
- Jeweler::Tasks.new do |gem|
14
- gem.name = "rubeus"
15
- gem.platform = "java"
16
- gem.summary = %Q{Rubeus provides you an easy access to Java objects from Ruby scripts on JRuby}
17
- gem.description = %Q{Rubeus provides you an easy access to Java objects from Ruby scripts on JRuby}
18
- gem.email = "rubeus@googlegroups.com"
19
- gem.homepage = "http://code.google.com/p/rubeus/"
20
- gem.authors = ["akimatter"]
21
- gem.add_dependency "activesupport", "= 2.1.2"
22
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
23
- gem.add_development_dependency "rcov", ">= 0.9.8"
24
- gem.bindir = 'bin'
25
- gem.executables = %w[jirb_rubeus jirb_rubeus.bat]
26
- end
27
- Jeweler::GemcutterTasks.new
28
- rescue LoadError
29
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
30
- end
10
+ require "bundler/gem_tasks"
11
+ require "rake/testtask"
31
12
 
32
- require 'rake/testtask'
33
- Rake::TestTask.new(:test) do |test|
34
- test.libs << 'lib' << 'test'
35
- test.pattern = 'test/**/test_*.rb'
36
- test.verbose = true
13
+ Rake::TestTask.new(:test) do |t|
14
+ t.libs << "test"
15
+ t.test_files = FileList['test/**/test_*.rb']
37
16
  end
38
17
 
39
- begin
40
- require 'rcov/rcovtask'
41
- Rcov::RcovTask.new do |test|
42
- test.libs << 'test'
43
- test.pattern = 'test/**/test_*.rb'
44
- test.rcov_opts = ['--text-report', '--exclude "(eval),yaml/*,test/*,gems/*"']
45
- test.verbose = true
46
- end
47
- rescue LoadError
48
- task :rcov do
49
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
50
- end
51
- end
52
-
53
- task :test => :check_dependencies
54
-
55
18
  task :default => :test
56
-
57
- require 'rake/rdoctask'
58
- Rake::RDocTask.new do |rdoc|
59
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
60
-
61
- rdoc.rdoc_dir = 'rdoc'
62
- rdoc.title = "rubeus #{version}"
63
- rdoc.rdoc_files.include('README*')
64
- rdoc.rdoc_files.include('lib/**/*.rb')
65
- end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.9
1
+ 0.0.10
@@ -1,5 +1,23 @@
1
1
  require 'rubygems'
2
2
  require "rubeus"
3
-
4
3
  Rubeus::Swing.irb
5
4
 
5
+ @conn = Rubeus::Jdbc::DriverManager.
6
+ connect("jdbc:derby:test_db;create = true")
7
+ tables = @conn.meta_data.tables(:schema => "APP")
8
+
9
+ JFrame.new("Rubeus Swing Example 01") do |frame|
10
+ frame.layout = BoxLayout.new(:X_AXIS)
11
+ JSplitPane.new(JSplitPane::HORIZONTAL_SPLIT) do
12
+ JScrollPane.new(:preferred_size => [150, 250]) do |pane|
13
+ @list = JList.new(tables.map(&:name).to_java) do |event|
14
+ table_name = @list.selected_value.inspect
15
+ @conn.query("select * from #{table_name}") do |rs|
16
+ @table.model = rs.map{|row| row.to_a}
17
+ end
18
+ end
19
+ end
20
+ JScrollPane.new{|pane| @table = JTable.new}
21
+ end
22
+ frame.visible = true
23
+ end
@@ -0,0 +1,30 @@
1
+ require 'rubygems'
2
+ require 'java'
3
+ require 'rubeus'
4
+
5
+ # Rubeus.verbose = true
6
+ Rubeus::Swing.irb
7
+
8
+ JFrame.new('Hello') do |frame|
9
+ frame.layout = BoxLayout.new(:Y_AXIS)
10
+
11
+ JSplitPane.new(JSplitPane::HORIZONTAL_SPLIT) do
12
+ JTree.new
13
+ JEditorPane.new
14
+ end
15
+
16
+ frame.jmenu_bar = JMenuBar.new do
17
+ JMenu.new("File") do
18
+ JMenuItem.new("New...") do
19
+ puts 'new'
20
+ end
21
+ JMenuItem.new("Exit") do
22
+ java.lang.System.exit(0)
23
+ end
24
+ end
25
+ end
26
+
27
+ frame.set_size(800, 600)
28
+ frame.default_close_operation = JFrame::EXIT_ON_CLOSE
29
+ frame.visible = true
30
+ end
@@ -1,8 +1,10 @@
1
+ require "rubeus/version"
2
+
1
3
  require 'java'
2
4
  require File.join(File.dirname(__FILE__), 'rubeus.jar')
3
5
 
4
- require "rubygems"
5
- gem "activesupport", "=2.1.2"
6
+ # require "rubygems"
7
+ # gem "activesupport", "=2.1.2"
6
8
  # require "active_support"
7
9
  require "active_support/core_ext/string"
8
10
 
@@ -13,7 +15,6 @@ Kernel.module_eval <<-EOS
13
15
  EOS
14
16
 
15
17
  module Rubeus
16
- VERSION = '0.0.9'
17
18
  EMAIL_GROUP = 'rubeus@googlegroups.com'
18
19
  WEB_SITE = 'http://code.google.com/p/rubeus/'
19
20
 
@@ -0,0 +1,7 @@
1
+ module Rubeus::Extensions::Javax::Swing
2
+ module JMenu
3
+ def self.included(klass)
4
+ klass.perform_as_container
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Rubeus::Extensions::Javax::Swing
2
+ module JMenuBar
3
+ def self.included(klass)
4
+ klass.perform_as_container
5
+ end
6
+ end
7
+ end
@@ -68,7 +68,7 @@ module Rubeus::Jdbc
68
68
 
69
69
  attr_accessor :rails_ignored
70
70
  attr_accessor :rails_name, :rails_options
71
- attr_reader :name_changed?
71
+ # attr_reader :name_changed?
72
72
 
73
73
  def nullable?
74
74
  @_nullable ||= (is_nullable != 'NO')
@@ -3,6 +3,7 @@ require "rubeus/component_loader"
3
3
 
4
4
  module Rubeus
5
5
  Reflection = ComponentLoader.new("java.lang.reflect") do
6
+ autoload :JavaMethods, "rubeus/reflection/java_methods"
6
7
 
7
8
  def self.irb
8
9
  self.extend_with
@@ -11,7 +12,10 @@ module Rubeus
11
12
  end
12
13
 
13
14
  java.lang.reflect.Method # 参照して予め拡張しておきます
15
+
14
16
  # java.util.AbstractList.java_class.declared_instance_methods などで得られる
15
17
  # 配列中のオブジェクトは、Java::JavaLangReflectMethodではなく実はJava::JavaMethodなので、
16
18
  # java.lang.reflect.Methodと同じように拡張しておく
17
19
  Java::JavaMethod.send(:include, Rubeus::Extensions::Java::Lang::Reflect::Method)
20
+
21
+ Rubeus::Reflection::JavaMethods.activate
@@ -0,0 +1,95 @@
1
+ module Rubeus::Reflection
2
+ module JavaMethods
3
+ def self.activate
4
+ ::Java::JavaClass.send(:include, ::Rubeus::Reflection::JavaMethods::JavaClass)
5
+ ::Object.send(:include, ::Rubeus::Reflection::JavaMethods::Object)
6
+ end
7
+
8
+ MODIFIERS = %w[public protected package_scope private final strict synchronized].freeze
9
+ METATYPES = %w[instance class singleton].freeze
10
+
11
+ JAVA_METHODS_PATTERN = /^java_(.+)_methods$/.freeze
12
+
13
+ def self.parse(method_name)
14
+ if method_name.to_s == 'java_methods'
15
+ return [], nil
16
+ elsif method_name.to_s =~ JAVA_METHODS_PATTERN
17
+ modifiers = $1.gsub(/_/, "-").gsub(/package-scope/, 'package_scope').split(/-/)
18
+ metatype = METATYPES.include?(modifiers.last) ? modifiers.pop : nil
19
+ if metatype == 'singleton'
20
+ metatype = 'class'
21
+ end
22
+ if (modifiers - MODIFIERS).empty?
23
+ return modifiers, metatype
24
+ else
25
+ return nil, nil
26
+ end
27
+ else
28
+ return nil, nil
29
+ end
30
+ end
31
+
32
+ module JavaClass
33
+ def method_missing(method_name, *args, &block)
34
+ modifiers, metatype = JavaMethods.parse(method_name)
35
+ if modifiers
36
+ metatype ||= 'class'
37
+ result = self.send("declared_#{metatype}_methods")
38
+ result = result.send((metatype == 'class') ? :select : :reject, &:static?)
39
+ modifiers.each do |modifier|
40
+ predication = "#{modifier}?".to_sym
41
+ result = result.select(&predication)
42
+ end
43
+ result
44
+ else
45
+ super
46
+ end
47
+ end
48
+
49
+ def respond_to?(method_name)
50
+ modifiers, metatype = JavaMethods.parse(method_name)
51
+ !!modifiers || super
52
+ end
53
+ end
54
+
55
+ module Object
56
+ def method_missing(method_name, *args, &block)
57
+ modifiers, metatype = JavaMethods.parse(method_name)
58
+ return super unless modifiers
59
+ if is_a?(Module)
60
+ case metatype
61
+ when nil then to_java_methods(method_name)
62
+ when 'class' then to_java_methods(method_name)
63
+ when 'instance' then to_java_methods(method_name) # self.send(method_name, *args, &block)
64
+ else
65
+ raise "something wrong..."
66
+ end
67
+ else
68
+ case metatype
69
+ when nil then self.class.send(method_name.to_s.gsub(/_methods$/, '_instance_methods'), *args, &block)
70
+ when 'class' then raise NoMethodError
71
+ when 'instance' then self.class.send(method_name, *args, &block)
72
+ else
73
+ raise "something wrong..."
74
+ end
75
+ end
76
+ end
77
+
78
+ def respond_to?(method_name)
79
+ modifiers, metatype = JavaMethods.parse(method_name)
80
+ return super unless modifiers
81
+ return true if is_a?(Module)
82
+ metatype != 'class'
83
+ end
84
+
85
+ private
86
+ def to_java_methods(method_name)
87
+ return nil unless respond_to?(:java_class)
88
+ result = java_class.send(method_name)
89
+ result.map(&:name).uniq
90
+ end
91
+ end
92
+
93
+ end
94
+ end
95
+
@@ -0,0 +1,3 @@
1
+ module Rubeus
2
+ VERSION = "0.1.0"
3
+ end
@@ -1,202 +1,31 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
- # -*- encoding: utf-8 -*-
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'rubeus/version'
5
5
 
6
- Gem::Specification.new do |s|
7
- s.name = %q{rubeus}
8
- s.version = "0.0.9"
9
- s.platform = %q{java}
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "rubeus"
8
+ spec.version = Rubeus::VERSION
9
+ spec.platform = %q{java}
10
+ spec.authors = ["akimatter"]
11
+ spec.email = ["rubeus@googlegroups.com"]
12
+ spec.description = %q{Rubeus provides you an easy access to Java objects from Ruby scripts on JRuby}
13
+ spec.summary = %q{Rubeus provides you an easy access to Java objects from Ruby scripts on JRuby}
14
+ spec.homepage = "http://code.google.com/p/rubeus/"
15
+ spec.license = "MIT"
16
+ # spec.date = %q{2010-08-28}
10
17
 
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.authors = ["akimatter"]
13
- s.date = %q{2010-08-26}
14
- s.description = %q{Rubeus provides you an easy access to Java objects from Ruby scripts on JRuby}
15
- s.email = %q{rubeus@googlegroups.com}
16
- s.executables = ["jirb_rubeus", "jirb_rubeus.bat"]
17
- s.extra_rdoc_files = [
18
- "LICENSE",
19
- "README.rdoc"
20
- ]
21
- s.files = [
22
- ".document",
23
- ".gitignore",
24
- "LICENSE",
25
- "README.rdoc",
26
- "Rakefile",
27
- "VERSION",
28
- "bin/jirb_rubeus",
29
- "bin/jirb_rubeus.bat",
30
- "examples/.gitignore",
31
- "examples/JavaSwingExample01.java",
32
- "examples/jdbc_example.rb",
33
- "examples/notepad.rb",
34
- "examples/notepad.rtf",
35
- "examples/nyanco_viewer/nekobean_LICENSE.txt",
36
- "examples/nyanco_viewer/nekobean_s.png",
37
- "examples/nyanco_viewer/nyanco_disp_label.rb",
38
- "examples/nyanco_viewer/nyanco_viewer_rubeus.rb",
39
- "examples/rubeus_swing_example01.rb",
40
- "examples/rubeus_swing_example01_with_class.rb",
41
- "examples/rubeus_swing_example02.rb",
42
- "examples/rubeus_swing_example03.rb",
43
- "java/.gitignore",
44
- "java/mvn_plugins.yml",
45
- "java/pom.xml",
46
- "java/src/main/java/jp/rubybizcommons/rubeus/extensions/javax/swing/table/DelegatableTableModel.java",
47
- "java/src/main/java/jp/rubybizcommons/rubeus/extensions/javax/swing/table/ReadonlyableTableModel.java",
48
- "lib/rubeus.jar",
49
- "lib/rubeus.rb",
50
- "lib/rubeus/awt.rb",
51
- "lib/rubeus/awt/attributes.rb",
52
- "lib/rubeus/awt/event.rb",
53
- "lib/rubeus/awt/nestable.rb",
54
- "lib/rubeus/awt/setters.rb",
55
- "lib/rubeus/component_loader.rb",
56
- "lib/rubeus/extensions.rb",
57
- "lib/rubeus/extensions/java.rb",
58
- "lib/rubeus/extensions/java/awt.rb",
59
- "lib/rubeus/extensions/java/awt/component.rb",
60
- "lib/rubeus/extensions/java/awt/container.rb",
61
- "lib/rubeus/extensions/java/awt/dimension.rb",
62
- "lib/rubeus/extensions/java/lang.rb",
63
- "lib/rubeus/extensions/java/lang/reflect.rb",
64
- "lib/rubeus/extensions/java/lang/reflect/method.rb",
65
- "lib/rubeus/extensions/java/sql.rb",
66
- "lib/rubeus/extensions/java/sql/connection.rb",
67
- "lib/rubeus/extensions/java/sql/database_meta_data.rb",
68
- "lib/rubeus/extensions/java/sql/driver_manager.rb",
69
- "lib/rubeus/extensions/java/sql/result_set.rb",
70
- "lib/rubeus/extensions/java/sql/result_set_meta_data.rb",
71
- "lib/rubeus/extensions/java/sql/statement.rb",
72
- "lib/rubeus/extensions/javax.rb",
73
- "lib/rubeus/extensions/javax/swing.rb",
74
- "lib/rubeus/extensions/javax/swing/box_layout.rb",
75
- "lib/rubeus/extensions/javax/swing/j_applet.rb",
76
- "lib/rubeus/extensions/javax/swing/j_component.rb",
77
- "lib/rubeus/extensions/javax/swing/j_editor_pane.rb",
78
- "lib/rubeus/extensions/javax/swing/j_frame.rb",
79
- "lib/rubeus/extensions/javax/swing/j_list.rb",
80
- "lib/rubeus/extensions/javax/swing/j_panel.rb",
81
- "lib/rubeus/extensions/javax/swing/j_scroll_pane.rb",
82
- "lib/rubeus/extensions/javax/swing/j_split_pane.rb",
83
- "lib/rubeus/extensions/javax/swing/j_tabbed_pane.rb",
84
- "lib/rubeus/extensions/javax/swing/j_table.rb",
85
- "lib/rubeus/extensions/javax/swing/j_text_field.rb",
86
- "lib/rubeus/extensions/javax/swing/j_text_pane.rb",
87
- "lib/rubeus/extensions/javax/swing/j_window.rb",
88
- "lib/rubeus/extensions/javax/swing/table/default_table_model.rb",
89
- "lib/rubeus/extensions/javax/swing/table/readonlyable_table_model.rb",
90
- "lib/rubeus/extensions/javax/swing/timer.rb",
91
- "lib/rubeus/jdbc.rb",
92
- "lib/rubeus/jdbc/closeable_resource.rb",
93
- "lib/rubeus/jdbc/column.rb",
94
- "lib/rubeus/jdbc/foreign_key.rb",
95
- "lib/rubeus/jdbc/index.rb",
96
- "lib/rubeus/jdbc/meta_element.rb",
97
- "lib/rubeus/jdbc/primary_key.rb",
98
- "lib/rubeus/jdbc/result_set_column.rb",
99
- "lib/rubeus/jdbc/table.rb",
100
- "lib/rubeus/reflection.rb",
101
- "lib/rubeus/swing.rb",
102
- "lib/rubeus/util.rb",
103
- "lib/rubeus/util/java_method_name.rb",
104
- "lib/rubeus/util/name_access_array.rb",
105
- "lib/rubeus/verboseable.rb",
106
- "rmaven.yml",
107
- "rubeus.gemspec",
108
- "test/rubeus/awt/test_attributes.rb",
109
- "test/rubeus/awt/test_event.rb",
110
- "test/rubeus/awt/test_nestable.rb",
111
- "test/rubeus/awt/test_setter.rb",
112
- "test/rubeus/extensions/java/awt/test_dimension.rb",
113
- "test/rubeus/extensions/java/sql/test_connection.rb",
114
- "test/rubeus/extensions/java/sql/test_database_meta_data.rb",
115
- "test/rubeus/extensions/java/sql/test_driver_manager.rb",
116
- "test/rubeus/extensions/java/sql/test_result_set.rb",
117
- "test/rubeus/extensions/java/sql/test_result_set_meta_data.rb",
118
- "test/rubeus/extensions/java/sql/test_sql_helper.rb",
119
- "test/rubeus/extensions/java/sql/test_statement.rb",
120
- "test/rubeus/extensions/javax/swing/table/test_default_table_model.rb",
121
- "test/rubeus/extensions/javax/swing/table/test_default_table_model/nhk_words.xml",
122
- "test/rubeus/extensions/javax/swing/test_box_layout.rb",
123
- "test/rubeus/extensions/javax/swing/test_j_component.rb",
124
- "test/rubeus/extensions/javax/swing/test_j_frame.rb",
125
- "test/rubeus/extensions/javax/swing/test_j_panel.rb",
126
- "test/rubeus/extensions/javax/swing/test_j_scroll_pane.rb",
127
- "test/rubeus/extensions/javax/swing/test_j_split_pane.rb",
128
- "test/rubeus/extensions/javax/swing/test_j_tabbed_pane.rb",
129
- "test/rubeus/extensions/javax/swing/test_j_table.rb",
130
- "test/rubeus/extensions/javax/swing/test_j_text_field.rb",
131
- "test/rubeus/extensions/javax/swing/test_timer.rb",
132
- "test/rubeus/reflection/test_method_modifier.rb",
133
- "test/rubeus/test_extensions.rb",
134
- "test/rubeus_test.jar",
135
- "test_jar/.classpath",
136
- "test_jar/.gitignore",
137
- "test_jar/.project",
138
- "test_jar/mvn_plugins.yml",
139
- "test_jar/pom.xml",
140
- "test_jar/src/main/java/jp/rubybizcommons/rubeus/test/reflection/VariousFields.java",
141
- "test_jar/src/main/java/jp/rubybizcommons/rubeus/test/reflection/VariousMethods.java",
142
- "test_jar/src/test/java/jp/rubybizcommons/rubeus/test/AppTest.java"
143
- ]
144
- s.homepage = %q{http://code.google.com/p/rubeus/}
145
- s.rdoc_options = ["--charset=UTF-8"]
146
- s.require_paths = ["lib"]
147
- s.rubygems_version = %q{1.3.6}
148
- s.summary = %q{Rubeus provides you an easy access to Java objects from Ruby scripts on JRuby}
149
- s.test_files = [
150
- "test/rubeus/test_extensions.rb",
151
- "test/rubeus/awt/test_attributes.rb",
152
- "test/rubeus/awt/test_event.rb",
153
- "test/rubeus/awt/test_nestable.rb",
154
- "test/rubeus/awt/test_setter.rb",
155
- "test/rubeus/extensions/java/awt/test_dimension.rb",
156
- "test/rubeus/extensions/java/sql/test_connection.rb",
157
- "test/rubeus/extensions/java/sql/test_database_meta_data.rb",
158
- "test/rubeus/extensions/java/sql/test_driver_manager.rb",
159
- "test/rubeus/extensions/java/sql/test_result_set.rb",
160
- "test/rubeus/extensions/java/sql/test_result_set_meta_data.rb",
161
- "test/rubeus/extensions/java/sql/test_sql_helper.rb",
162
- "test/rubeus/extensions/java/sql/test_statement.rb",
163
- "test/rubeus/extensions/javax/swing/test_box_layout.rb",
164
- "test/rubeus/extensions/javax/swing/test_j_component.rb",
165
- "test/rubeus/extensions/javax/swing/test_j_frame.rb",
166
- "test/rubeus/extensions/javax/swing/test_j_panel.rb",
167
- "test/rubeus/extensions/javax/swing/test_j_scroll_pane.rb",
168
- "test/rubeus/extensions/javax/swing/test_j_split_pane.rb",
169
- "test/rubeus/extensions/javax/swing/test_j_tabbed_pane.rb",
170
- "test/rubeus/extensions/javax/swing/test_j_table.rb",
171
- "test/rubeus/extensions/javax/swing/test_j_text_field.rb",
172
- "test/rubeus/extensions/javax/swing/test_timer.rb",
173
- "test/rubeus/extensions/javax/swing/table/test_default_table_model.rb",
174
- "test/rubeus/reflection/test_method_modifier.rb",
175
- "examples/jdbc_example.rb",
176
- "examples/notepad.rb",
177
- "examples/rubeus_swing_example01.rb",
178
- "examples/rubeus_swing_example01_with_class.rb",
179
- "examples/rubeus_swing_example02.rb",
180
- "examples/rubeus_swing_example03.rb",
181
- "examples/rubeus_swing_jdbc_example01.rb",
182
- "examples/nyanco_viewer/nyanco_disp_label.rb",
183
- "examples/nyanco_viewer/nyanco_viewer_rubeus.rb"
184
- ]
18
+ spec.files = `git ls-files`.split($/)
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
+ spec.require_paths = ["lib"]
185
22
 
186
- if s.respond_to? :specification_version then
187
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
188
- s.specification_version = 3
23
+ spec.add_runtime_dependency "activesupport", "< 4.0.0"
189
24
 
190
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
191
- s.add_runtime_dependency(%q<activesupport>, ["= 2.1.2"])
192
- s.add_development_dependency(%q<rcov>, [">= 0.9.8"])
193
- else
194
- s.add_dependency(%q<activesupport>, ["= 2.1.2"])
195
- s.add_dependency(%q<rcov>, [">= 0.9.8"])
196
- end
197
- else
198
- s.add_dependency(%q<activesupport>, ["= 2.1.2"])
199
- s.add_dependency(%q<rcov>, [">= 0.9.8"])
200
- end
201
- end
25
+ spec.add_development_dependency "bundler", "~> 1.3"
26
+ spec.add_development_dependency "rake"
27
+ spec.add_development_dependency "minitest"
202
28
 
29
+ spec.add_development_dependency "jdbc-derby", "10.6.2.1"
30
+ spec.add_development_dependency "rmaven", "0.0.1"
31
+ end