rjb 1.6.2 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb67ad89857525ce2a6443cb151d5f48dc05a5338ad09e28714b1706cecaa5d6
4
- data.tar.gz: 42ab7af0fab4e999d025bc4c7957771a9372699dcd0e15664a741eb0b008aea5
3
+ metadata.gz: 05a38f07091a13ff2a32e770eb3a0ea3337e6e62698ad657241dffe264143b64
4
+ data.tar.gz: 21cbbcf1476283d6e7a0b71f4be5279834cd38d752473d04a119d0ab60d17228
5
5
  SHA512:
6
- metadata.gz: ce14080ae984eaa12dafd0433fd5a902fa9dcb5d731f34e674a78d20ae9e04634512c7f40086283fcad7db1064f3a750c1b8c35802c8f1fd75add365cbcf3c0a
7
- data.tar.gz: ea0a88e9752dfd8407bd9130b1548589b0fdca90d7a962bef175e504183775817e2818abcb833bae7ab65cfb88e4dcda04c666388b3f2c40235f4b93db396a56
6
+ metadata.gz: 5167ed5ba650846bb0efa583969bd0ebee8dd66f7a20b30711a7c04774e3362e48805a3a56408af550a235830be4029f6f9728bd2590603511d9a5b1b259c212
7
+ data.tar.gz: 0a466f32ea539cb7e794bc761fca6a8aa97b64a120b61803141500f940144959f3695ece1c04930981ee86af1dac4b7841cc1891682d82118a51edeb0d3515f0
data/ChangeLog CHANGED
@@ -1,3 +1,13 @@
1
+ Sun Feb 7 2021 arton
2
+ * ext/extconf.rb
3
+ use javah if `javac -version` didn't return the version number (ex. 1.4.2)
4
+ * ext/rjb.c
5
+ RJB_VERSION -> 1.6.3
6
+ Sun Feb 7 2021 arton
7
+ * ext/extconf.rb
8
+ check javac and javah version
9
+ * ext/rjb.c
10
+ RJB_VERSION -> 1.6.3
1
11
  Sat Aug 1 2020 arton
2
12
  * ext/rjb.c
3
13
  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 || cversion.nil?
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.4"
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.4
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-07 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: []