rjb 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +504 -504
- data/ChangeLog +6 -1
- data/data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class +0 -0
- data/ext/RBridge.java +39 -39
- data/ext/depend +23 -23
- data/ext/extconf.h +1 -0
- data/ext/extconf.rb +77 -77
- data/ext/jp_co_infoseek_hp_arton_rjb_RBridge.h +21 -21
- data/ext/load.c +408 -408
- data/ext/riconv.c +218 -218
- data/ext/riconv.h +24 -24
- data/ext/rjb.c +3317 -3317
- data/ext/rjb.h +164 -164
- data/ext/rjbexception.c +167 -167
- data/lib/rjb.rb +122 -122
- data/readme.txt +35 -35
- data/samples/filechooser.rb +35 -35
- data/samples/unzip.rb +66 -66
- data/test/gctest.rb +24 -24
- data/test/listtest.rb +56 -56
- data/test/osx_jvmcheck.rb +9 -9
- data/test/rjbtest.jar +0 -0
- data/test/test.rb +873 -873
- data/test/test_osxjvm.rb +23 -23
- data/test/test_osxload.rb +64 -64
- data/test/test_unload.rb +0 -0
- metadata +15 -17
- data/lib/rjbcore.so +0 -0
data/test/test_osxjvm.rb
CHANGED
@@ -1,23 +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
|
-
|
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
|
+
|
data/test/test_osxload.rb
CHANGED
@@ -1,64 +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
|
-
|
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
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rjb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-25 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'RJB is a bridge program that connect between Ruby and Java with Java
|
15
15
|
Native Interface.
|
@@ -22,37 +22,37 @@ extensions:
|
|
22
22
|
extra_rdoc_files: []
|
23
23
|
files:
|
24
24
|
- ext/RBridge.java
|
25
|
+
- ext/rjbexception.c
|
26
|
+
- ext/rjb.c
|
25
27
|
- ext/load.c
|
26
28
|
- ext/riconv.c
|
27
|
-
- ext/rjb.c
|
28
|
-
- ext/rjbexception.c
|
29
29
|
- ext/extconf.h
|
30
30
|
- ext/jniwrap.h
|
31
31
|
- ext/jp_co_infoseek_hp_arton_rjb_RBridge.h
|
32
|
-
- ext/riconv.h
|
33
32
|
- ext/rjb.h
|
33
|
+
- ext/riconv.h
|
34
34
|
- ext/depend
|
35
35
|
- data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class
|
36
|
-
- lib/rjb.rb
|
37
36
|
- lib/rjbextension.rb
|
37
|
+
- lib/rjb.rb
|
38
38
|
- samples/filechooser.rb
|
39
39
|
- samples/unzip.rb
|
40
|
-
- test/exttest.rb
|
41
|
-
- test/gctest.rb
|
42
40
|
- test/jartest.rb
|
43
|
-
- test/
|
44
|
-
- test/jartest3.rb
|
45
|
-
- test/listtest.rb
|
46
|
-
- test/osx_jvmcheck.rb
|
47
|
-
- test/test.rb
|
41
|
+
- test/gctest.rb
|
48
42
|
- test/test_osxjvm.rb
|
43
|
+
- test/test.rb
|
44
|
+
- test/exttest.rb
|
49
45
|
- test/test_osxload.rb
|
46
|
+
- test/osx_jvmcheck.rb
|
47
|
+
- test/jartest2.rb
|
48
|
+
- test/jartest3.rb
|
50
49
|
- test/test_unload.rb
|
50
|
+
- test/listtest.rb
|
51
|
+
- test/jp/co/infoseek/hp/arton/rjb/Test.class
|
52
|
+
- test/jp/co/infoseek/hp/arton/rjb/Test$TestTypes.class
|
51
53
|
- test/jp/co/infoseek/hp/arton/rjb/CallbackTest$Callback.class
|
52
54
|
- test/jp/co/infoseek/hp/arton/rjb/CallbackTest.class
|
53
55
|
- test/jp/co/infoseek/hp/arton/rjb/IBase.class
|
54
|
-
- test/jp/co/infoseek/hp/arton/rjb/Test$TestTypes.class
|
55
|
-
- test/jp/co/infoseek/hp/arton/rjb/Test.class
|
56
56
|
- test/Two.class
|
57
57
|
- test/TwoCaller.class
|
58
58
|
- test/jartest.jar
|
@@ -62,7 +62,6 @@ files:
|
|
62
62
|
- ChangeLog
|
63
63
|
- readme.sj
|
64
64
|
- readme.txt
|
65
|
-
- lib/rjbcore.so
|
66
65
|
- ext/extconf.rb
|
67
66
|
homepage: http://rjb.rubyforge.org/
|
68
67
|
licenses: []
|
@@ -85,7 +84,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
84
|
requirements:
|
86
85
|
- none
|
87
86
|
- JDK 5.0
|
88
|
-
- ! ' VC6 version of Ruby'
|
89
87
|
rubyforge_project: rjb
|
90
88
|
rubygems_version: 1.8.23
|
91
89
|
signing_key:
|
data/lib/rjbcore.so
DELETED
Binary file
|