bind-it 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -4
- data/lib/bind-it.rb +1 -1
- data/lib/bind-it/binding.rb +3 -2
- metadata +2 -2
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
**About**
|
2
2
|
|
3
|
-
BindIt is a
|
3
|
+
BindIt is a tool that allows to build platform-agnostic Ruby wrappers for JAVA code. The resulting bindings will work both on the JRuby and MRI platforms. On the MRI platform, BindIt uses the Ruby-Java-Bridge (Rjb) to access Java objects.
|
4
4
|
|
5
|
-
BindIt
|
5
|
+
BindIt is tested on MRI Ruby 1.9.2 and 1.9.3, as well as JRuby 1.7.1.
|
6
6
|
|
7
7
|
**Installing**
|
8
8
|
|
@@ -61,8 +61,6 @@ module MyBindings
|
|
61
61
|
|
62
62
|
end
|
63
63
|
|
64
|
-
|
65
|
-
|
66
64
|
obj = MyBindings::MyClass.new
|
67
65
|
|
68
66
|
```
|
data/lib/bind-it.rb
CHANGED
data/lib/bind-it/binding.rb
CHANGED
@@ -3,8 +3,6 @@ module BindIt
|
|
3
3
|
# This is the module your namespace should extend.
|
4
4
|
module Binding
|
5
5
|
|
6
|
-
VERSION = '0.0.1'
|
7
|
-
|
8
6
|
if RUBY_PLATFORM =~ /java/
|
9
7
|
require 'java'
|
10
8
|
# require 'bind-it/jruby_proxy'
|
@@ -103,6 +101,9 @@ module BindIt
|
|
103
101
|
if RUBY_PLATFORM =~ /java/
|
104
102
|
rb_class = java_import(fqcn)
|
105
103
|
if name != klass
|
104
|
+
if rb_class.is_a?(Array)
|
105
|
+
rb_class = rb_class.first
|
106
|
+
end
|
106
107
|
const_set(name.intern, rb_class)
|
107
108
|
end
|
108
109
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bind-it
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
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: 2012-12-
|
12
|
+
date: 2012-12-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rjb
|