rjb 1.6.2 → 1.6.3

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: bb67ad89857525ce2a6443cb151d5f48dc05a5338ad09e28714b1706cecaa5d6
4
- data.tar.gz: 42ab7af0fab4e999d025bc4c7957771a9372699dcd0e15664a741eb0b008aea5
3
+ metadata.gz: 06eaf84ad81cb13f6ae41403c49a861410021b6dc805442325736721a4de2267
4
+ data.tar.gz: 5b5dfe96970ee79488679d1c9f7e617bd0a4d5155b452f5a60ad408cfa34401d
5
5
  SHA512:
6
- metadata.gz: ce14080ae984eaa12dafd0433fd5a902fa9dcb5d731f34e674a78d20ae9e04634512c7f40086283fcad7db1064f3a750c1b8c35802c8f1fd75add365cbcf3c0a
7
- data.tar.gz: ea0a88e9752dfd8407bd9130b1548589b0fdca90d7a962bef175e504183775817e2818abcb833bae7ab65cfb88e4dcda04c666388b3f2c40235f4b93db396a56
6
+ metadata.gz: 411554c897ddef118a5e6cff0a83fcfe7b4b1b7ff938b41d4f97ac3ba84bc5a6f925f46feaba7fc23a9d7e482238eacf1d475a850074536a54638c0dcd0e873f
7
+ data.tar.gz: 657db969c323fdfe224fe451c8dafbdf4b0525f8855a1043bd898e3f94f02b9428bdcbc821b5b2ae038876aecb68c1fd6cc5b3f85adb0fe59fbeb766d543c428
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ Sun Feb 7 2021 arton
2
+ * ext/extconf.rb
3
+ check javac and javah version
4
+ * ext/rjb.c
5
+ RJB_VERSION -> 1.6.3
1
6
  Sat Aug 1 2020 arton
2
7
  * ext/rjb.c
3
8
  RJB_VERSION -> 1.6.2
data/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # Rjb is Ruby-Java bridge using Java Native Interface.
2
+
3
+ The [Ruby Kaigi 2010](http://www.slideshare.net/artonx/j-ruby-kaigi-2010)
4
+ Presentation on `Rjb`.
5
+
6
+ A short [introduction](https://www.artonx.org/collabo/backyard/?RubyJavaBridge)
7
+ in English.
8
+
9
+ Some [examples](https://www.artonx.org/collabo/backyard/?RjbQandA) in
10
+ Japanese, but the source code is clear for everybody.
11
+
12
+ # How to install
13
+
14
+ You need to install Java2 sdk, and setup `JAVA_HOME` enviromental
15
+ varible except for OS X. I assume that OS X's `JAVA_HOME` is reported
16
+ by calling `/usr/libexec/java_home`.
17
+
18
+ This done please proceed with:
19
+
20
+ ``` bash
21
+ ruby setup.rb config
22
+ ruby setup.rb setup
23
+ ```
24
+
25
+ ``` bash
26
+ # (in Unix)
27
+ sudo ruby setup.rb install
28
+ ```
29
+
30
+ or
31
+
32
+ ``` bash
33
+ # (in win32)
34
+ ruby setup.rb install
35
+ ```
36
+
37
+ # How to test
38
+
39
+ On Windows based machines:
40
+
41
+ ``` bash
42
+ cd test
43
+ ruby test.rb
44
+ ```
45
+
46
+ On Unix based machines plese see `test/readme.unix`. You need to set
47
+ `LD_LIBRARY_PATH` environmental variable to run `rjb`.
48
+
49
+ # Notice for opening non-ASCII 7bit filename
50
+
51
+ If you'll plan to open the non-ascii character named file by Java
52
+ class through Rjb, it may require to set LC_ALL environment variable
53
+ in you sciprt.
54
+
55
+ For example in Rails, set above line in `production.rb` as your environment:
56
+
57
+ ``` bash
58
+ ENV['LC_ALL'] = 'en_us.utf8' # or ja_JP.utf8 etc.
59
+ ```
60
+
61
+ cf: http://bugs.sun.com/view_bug.do?bug_id=4733494
62
+ (Thanks Paul for this information).
63
+
64
+ # Contact
65
+ artonx@yahoo.co.jp
data/ext/extconf.h CHANGED
@@ -4,5 +4,5 @@
4
4
  #define HAVE_NL_LANGINFO 1
5
5
  #define HAVE_SETLOCALE 1
6
6
  #define HAVE_GETENV 1
7
- #define RJB_RUBY_VERSION_CODE 271
7
+ #define RJB_RUBY_VERSION_CODE 300
8
8
  #endif
data/ext/extconf.rb CHANGED
@@ -76,10 +76,19 @@ when /cygwin/, /mingw/
76
76
  $defs << '-DNONAMELESSUNION'
77
77
  end
78
78
 
79
+ JAVAH_COMMAND = 'javac -h . -classpath ../data/rjb RBridge.java'.freeze
80
+
79
81
  if find_executable('javah')
80
- javah = 'javah -classpath ../data/rjb jp.co.infoseek.hp.arton.rjb.RBridge'
82
+ cversion = (`javac -version` =~ /\d+\.\d+\.\d+/ ) ? $& : nil
83
+ hversion = (`javah -version` =~ /\d+\.\d+\.\d+/ ) ? $& : nil
84
+ if cversion == hversion
85
+ javah = 'javah -classpath ../data/rjb jp.co.infoseek.hp.arton.rjb.RBridge'
86
+ else
87
+ $stderr.puts "warning: javac and javah version unmatch => javah: #{hversion}, javac: #{cversion}"
88
+ javah = JAVAH_COMMAND
89
+ end
81
90
  else
82
- javah = 'javac -h . -classpath ../data/rjb RBridge.java'
91
+ javah = JAVAH_COMMAND
83
92
  end
84
93
  File.open('depend', 'w') do |fout|
85
94
  fout.write ERB.new(IO::read('depend.erb')).result
data/ext/rjb.c CHANGED
@@ -14,7 +14,7 @@
14
14
  *
15
15
  */
16
16
 
17
- #define RJB_VERSION "1.6.2"
17
+ #define RJB_VERSION "1.6.3"
18
18
 
19
19
  #include "ruby.h"
20
20
  #include "extconf.h"
metadata CHANGED
@@ -1,19 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rjb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - arton
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-01 00:00:00.000000000 Z
11
+ date: 2021-02-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: 'RJB is a bridge program that connect between Ruby and Java with Java
13
+ description: RJB is a Bridge library which connects Ruby and Java code using the Java
14
14
  Native Interface.
15
-
16
- '
17
15
  email: artonx@gmail.com
18
16
  executables: []
19
17
  extensions:
@@ -22,6 +20,7 @@ extra_rdoc_files: []
22
20
  files:
23
21
  - COPYING
24
22
  - ChangeLog
23
+ - README.md
25
24
  - data/rjb/jp/co/infoseek/hp/arton/rjb/RBridge.class
26
25
  - ext/RBridge.java
27
26
  - ext/depend.erb
@@ -72,11 +71,11 @@ files:
72
71
  - test/test_osxload.rb
73
72
  - test/test_unload.rb
74
73
  - test/x.rb
75
- homepage: https://www.artonx.org/collabo/backyard/?RubyJavaBridge
74
+ homepage: http://www.artonx.org/collabo/backyard/?RubyJavaBridge
76
75
  licenses:
77
76
  - LGPL-2.1-or-later
78
77
  metadata: {}
79
- post_install_message:
78
+ post_install_message:
80
79
  rdoc_options: []
81
80
  require_paths:
82
81
  - lib
@@ -91,11 +90,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
90
  - !ruby/object:Gem::Version
92
91
  version: '0'
93
92
  requirements:
94
- - none
95
93
  - JDK 5.0
96
- rubygems_version: 3.1.2
97
- signing_key:
94
+ rubygems_version: 3.2.3
95
+ signing_key:
98
96
  specification_version: 4
99
- summary: Ruby Java bridge
100
- test_files:
101
- - test/test.rb
97
+ summary: Ruby Java Bridge
98
+ test_files: []