bind-it 0.2.1-java → 0.2.2-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +2 -4
  2. data/lib/bind-it.rb +1 -1
  3. data/lib/bind-it/binding.rb +3 -2
  4. metadata +36 -42
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  **About**
2
2
 
3
- BindIt is a very simple tool that allows to make Ruby bindings to Java packages that work both on JRuby and MRI platforms. It provides a simplified interface to load JARs and Java classes, and allows logging of JVM output to a text file.
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 uses the Ruby-Java-Bridge (Rjb) to access Java objects. It runs on Ruby 1.9.2 and 1.9.3.
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
  ```
@@ -1,7 +1,7 @@
1
1
  # BindIt is a tool to facilitate the creation of Java bindings in Ruby.
2
2
  module BindIt
3
3
 
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  require 'bind-it/binding'
6
6
 
7
7
  end
@@ -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,60 +1,54 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bind-it
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.2.1
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.2.2
6
6
  platform: java
7
- authors:
8
- - Louis Mullie
9
- autorequire:
7
+ authors:
8
+ - Louis Mullie
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-12-18 00:00:00 Z
12
+ date: 2012-12-20 00:00:00.000000000 Z
14
13
  dependencies: []
15
-
16
- description: " BindIt is a thin wrapper over the Ruby-Java-Bridge (Rjb) to facilitate the creation of Java bindings in Ruby. "
17
- email:
18
- - louis.mullie@gmail.com
14
+ description: ! ' BindIt is a thin wrapper over the Ruby-Java-Bridge (Rjb) to facilitate
15
+ the creation of Java bindings in Ruby. '
16
+ email:
17
+ - louis.mullie@gmail.com
19
18
  executables: []
20
-
21
19
  extensions: []
22
-
23
20
  extra_rdoc_files: []
24
-
25
- files:
26
- - lib/bind-it.rb
27
- - lib/bind-it/binding.rb
28
- - lib/bind-it/jar_loader.rb
29
- - lib/bind-it/rjb_proxy.rb
30
- - README.md
31
- - LICENSE
21
+ files:
22
+ - lib/bind-it.rb
23
+ - lib/bind-it/binding.rb
24
+ - lib/bind-it/jar_loader.rb
25
+ - lib/bind-it/rjb_proxy.rb
26
+ - README.md
27
+ - LICENSE
32
28
  homepage: https://github.com/louismullie/bind-it
33
29
  licenses: []
34
-
35
- post_install_message:
30
+ post_install_message:
36
31
  rdoc_options: []
37
-
38
- require_paths:
39
- - lib
40
- required_ruby_version: !ruby/object:Gem::Requirement
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: !binary |-
39
+ MA==
41
40
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: "0"
46
- required_rubygems_version: !ruby/object:Gem::Requirement
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: !binary |-
46
+ MA==
47
47
  none: false
48
- requirements:
49
- - - ">="
50
- - !ruby/object:Gem::Version
51
- version: "0"
52
48
  requirements: []
53
-
54
- rubyforge_project:
49
+ rubyforge_project:
55
50
  rubygems_version: 1.8.24
56
- signing_key:
51
+ signing_key:
57
52
  specification_version: 3
58
53
  summary: BindIt is a tool to facilitate the creation of Java bindings in Ruby.
59
54
  test_files: []
60
-