rjb 1.4.7-x86-mswin32-100
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +504 -0
- data/ChangeLog +646 -0
- data/data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class +0 -0
- data/ext/RBridge.java +39 -0
- data/ext/depend +23 -0
- data/ext/extconf.h +7 -0
- data/ext/jniwrap.h +34 -0
- data/ext/jp_co_infoseek_hp_arton_rjb_RBridge.h +21 -0
- data/ext/load.c +438 -0
- data/ext/riconv.c +218 -0
- data/ext/riconv.h +24 -0
- data/ext/rjb.c +3314 -0
- data/ext/rjb.h +164 -0
- data/ext/rjbexception.c +167 -0
- data/lib/rjb.rb +122 -0
- data/lib/rjbcore.so +0 -0
- data/lib/rjbextension.rb +1 -0
- data/readme.sj +27 -0
- data/readme.txt +35 -0
- data/samples/filechooser.rb +35 -0
- data/samples/unzip.rb +66 -0
- data/test/Two.class +0 -0
- data/test/TwoCaller.class +0 -0
- data/test/exttest.rb +39 -0
- data/test/gctest.rb +24 -0
- data/test/jartest.jar +0 -0
- data/test/jartest.rb +24 -0
- data/test/jartest2.jar +0 -0
- data/test/jartest2.rb +23 -0
- data/test/jartest3.rb +28 -0
- data/test/jp/co/infoseek/hp/arton/rjb/CallbackTest$Callback.class +0 -0
- data/test/jp/co/infoseek/hp/arton/rjb/CallbackTest.class +0 -0
- data/test/jp/co/infoseek/hp/arton/rjb/IBase.class +0 -0
- data/test/jp/co/infoseek/hp/arton/rjb/Test$TestTypes.class +0 -0
- data/test/jp/co/infoseek/hp/arton/rjb/Test.class +0 -0
- data/test/listtest.rb +56 -0
- data/test/osx_jvmcheck.rb +9 -0
- data/test/rjbtest.jar +0 -0
- data/test/test.rb +882 -0
- data/test/test_osxjvm.rb +23 -0
- data/test/test_osxload.rb +64 -0
- data/test/test_unload.rb +26 -0
- metadata +93 -0
data/test/test_osxjvm.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/local/env ruby -Ku
|
2
|
+
# encoding: utf-8
|
3
|
+
# $Id:$
|
4
|
+
|
5
|
+
begin
|
6
|
+
require 'rjb'
|
7
|
+
rescue LoadError
|
8
|
+
require 'rubygems'
|
9
|
+
require 'rjb'
|
10
|
+
end
|
11
|
+
require 'test/unit'
|
12
|
+
|
13
|
+
if RUBY_PLATFORM =~ /darwin/
|
14
|
+
class TestOsxJvm < Test::Unit::TestCase
|
15
|
+
def test_with_javahome
|
16
|
+
ENV['JAVA_HOME'] = `/usr/libexec/java_home`
|
17
|
+
assert_nothing_raised do
|
18
|
+
Rjb::load
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require 'rbconfig'
|
4
|
+
require 'test/unit'
|
5
|
+
|
6
|
+
class TestOSXLoad < Test::Unit::TestCase
|
7
|
+
def setup
|
8
|
+
ENV['JAVA_HOME'] = ''
|
9
|
+
ENV['JVM_LIB'] = ''
|
10
|
+
@testprog = File.dirname($0) + File::SEPARATOR + 'osx_jvmcheck.rb'
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_no_java_home
|
14
|
+
skip "no meaning test except for OSX" unless /darwin/ =~ RUBY_PLATFORM
|
15
|
+
|
16
|
+
javahome = `/usr/libexec/java_home`
|
17
|
+
if javahome =~ /jdk1\.[7-8]\.0/
|
18
|
+
vendor = /Oracle/
|
19
|
+
version = /1\.[7-8]\.0/
|
20
|
+
else
|
21
|
+
vendor = /Apple/
|
22
|
+
version = /1\.[4-6]\.0/
|
23
|
+
end
|
24
|
+
test = `#{RbConfig.ruby} #{@testprog}`
|
25
|
+
assert test =~ vendor, expected(vendor, test)
|
26
|
+
assert test =~ version, expected(version, test)
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_apple_jvm
|
30
|
+
skip "no meaning test except for OSX" unless /darwin/ =~ RUBY_PLATFORM
|
31
|
+
|
32
|
+
test_specific_jvm('/System/Library/Frameworks/JavaVM.framework/Home',
|
33
|
+
/Apple/)
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_oracle_jvm
|
37
|
+
skip "no meaning test except for OSX" unless /darwin/ =~ RUBY_PLATFORM
|
38
|
+
|
39
|
+
test_specific_jvm('/Library/Java/JavaVirtualMachines/***/Contents/Home',
|
40
|
+
/Oracle/)
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_withjvmlib
|
44
|
+
skip "no meaning test except for OSX" unless /darwin/ =~ RUBY_PLATFORM
|
45
|
+
|
46
|
+
ENV['JVM_LIB'] = '/usr/lib/libc.dylib'
|
47
|
+
test = `#{RbConfig.ruby} #{@testprog}`.strip
|
48
|
+
assert test == '', "no exception but #{test}"
|
49
|
+
end
|
50
|
+
|
51
|
+
private
|
52
|
+
def test_specific_jvm(path, vendor)
|
53
|
+
jvms = Dir.glob(path)
|
54
|
+
skip "no #{vendor.inspect} jvm" if jvms.size == 0
|
55
|
+
ENV['JAVA_HOME'] = jvms[0]
|
56
|
+
test = `#{RbConfig.ruby} #{@testprog}`.strip
|
57
|
+
assert test =~ vendor, expected(vendor, test)
|
58
|
+
end
|
59
|
+
|
60
|
+
def expected(test, target)
|
61
|
+
"expected #{test.inspect} but #{target}"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
data/test/test_unload.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/local/env ruby -Ku
|
2
|
+
# encoding: utf-8
|
3
|
+
# $Id: test.rb 176 2011-11-09 14:27:28Z arton $
|
4
|
+
|
5
|
+
begin
|
6
|
+
require 'rjb'
|
7
|
+
rescue LoadError
|
8
|
+
require 'rubygems'
|
9
|
+
require 'rjb'
|
10
|
+
end
|
11
|
+
require 'test/unit'
|
12
|
+
|
13
|
+
class TestUnloadRjb < Test::Unit::TestCase
|
14
|
+
include Rjb
|
15
|
+
def setup
|
16
|
+
Rjb::load('.')
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_unload
|
20
|
+
jString = import('java.lang.String')
|
21
|
+
assert_equal 0, Rjb::unload
|
22
|
+
jString = nil
|
23
|
+
GC.start
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
metadata
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rjb
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.4.7
|
5
|
+
prerelease:
|
6
|
+
platform: x86-mswin32-100
|
7
|
+
authors:
|
8
|
+
- arton
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-06-18 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: ! 'RJB is a bridge program that connect between Ruby and Java with Java
|
15
|
+
Native Interface.
|
16
|
+
|
17
|
+
'
|
18
|
+
email: artonx@gmail.com
|
19
|
+
executables: []
|
20
|
+
extensions: []
|
21
|
+
extra_rdoc_files: []
|
22
|
+
files:
|
23
|
+
- ext/RBridge.java
|
24
|
+
- ext/rjbexception.c
|
25
|
+
- ext/rjb.c
|
26
|
+
- ext/load.c
|
27
|
+
- ext/riconv.c
|
28
|
+
- ext/extconf.h
|
29
|
+
- ext/jniwrap.h
|
30
|
+
- ext/jp_co_infoseek_hp_arton_rjb_RBridge.h
|
31
|
+
- ext/rjb.h
|
32
|
+
- ext/riconv.h
|
33
|
+
- ext/depend
|
34
|
+
- data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class
|
35
|
+
- lib/rjbextension.rb
|
36
|
+
- lib/rjb.rb
|
37
|
+
- samples/filechooser.rb
|
38
|
+
- samples/unzip.rb
|
39
|
+
- test/jartest.rb
|
40
|
+
- test/gctest.rb
|
41
|
+
- test/test_osxjvm.rb
|
42
|
+
- test/test.rb
|
43
|
+
- test/exttest.rb
|
44
|
+
- test/test_osxload.rb
|
45
|
+
- test/osx_jvmcheck.rb
|
46
|
+
- test/jartest2.rb
|
47
|
+
- test/jartest3.rb
|
48
|
+
- test/test_unload.rb
|
49
|
+
- test/listtest.rb
|
50
|
+
- test/jp/co/infoseek/hp/arton/rjb/Test.class
|
51
|
+
- test/jp/co/infoseek/hp/arton/rjb/Test$TestTypes.class
|
52
|
+
- test/jp/co/infoseek/hp/arton/rjb/CallbackTest$Callback.class
|
53
|
+
- test/jp/co/infoseek/hp/arton/rjb/CallbackTest.class
|
54
|
+
- test/jp/co/infoseek/hp/arton/rjb/IBase.class
|
55
|
+
- test/Two.class
|
56
|
+
- test/TwoCaller.class
|
57
|
+
- test/jartest.jar
|
58
|
+
- test/jartest2.jar
|
59
|
+
- test/rjbtest.jar
|
60
|
+
- COPYING
|
61
|
+
- ChangeLog
|
62
|
+
- readme.sj
|
63
|
+
- readme.txt
|
64
|
+
- lib/rjbcore.so
|
65
|
+
homepage: http://rjb.rubyforge.org/
|
66
|
+
licenses: []
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 1.8.2
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
none: false
|
79
|
+
requirements:
|
80
|
+
- - ! '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
requirements:
|
84
|
+
- none
|
85
|
+
- JDK 5.0
|
86
|
+
- ! ' VC6 version of Ruby'
|
87
|
+
rubyforge_project: rjb
|
88
|
+
rubygems_version: 1.8.23
|
89
|
+
signing_key:
|
90
|
+
specification_version: 3
|
91
|
+
summary: Ruby Java bridge
|
92
|
+
test_files:
|
93
|
+
- test/test.rb
|