RUBY-279 update to Java driver 2.6.5
This commit is contained in:
parent
50ca353b05
commit
d552d603a8
5
Rakefile
5
Rakefile
@ -22,12 +22,11 @@ namespace :build do
|
|||||||
jar_dir = File.join(java_dir, 'jar')
|
jar_dir = File.join(java_dir, 'jar')
|
||||||
|
|
||||||
jruby_jar = File.join(jar_dir, 'jruby.jar')
|
jruby_jar = File.join(jar_dir, 'jruby.jar')
|
||||||
mongo_jar = File.join(jar_dir, 'mongo-2.4.jar')
|
mongo_jar = File.join(jar_dir, 'mongo-2.6.5.jar')
|
||||||
bson_jar = File.join(jar_dir, 'bson-2.2.jar')
|
|
||||||
|
|
||||||
src_base = File.join(java_dir, 'src')
|
src_base = File.join(java_dir, 'src')
|
||||||
|
|
||||||
system("javac -Xlint:unchecked -classpath #{jruby_jar}:#{mongo_jar}:#{bson_jar} #{File.join(src_base, 'org', 'jbson', '*.java')}")
|
system("javac -Xlint:deprecation -Xlint:unchecked -classpath #{jruby_jar}:#{mongo_jar} #{File.join(src_base, 'org', 'jbson', '*.java')}")
|
||||||
system("cd #{src_base} && jar cf #{File.join(jar_dir, 'jbson.jar')} #{File.join('.', 'org', 'jbson', '*.class')}")
|
system("cd #{src_base} && jar cf #{File.join(jar_dir, 'jbson.jar')} #{File.join('.', 'org', 'jbson', '*.class')}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Binary file not shown.
@ -297,14 +297,9 @@ public class RubyBSONCallback implements BSONCallback {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void gotBinaryArray( String name , byte[] b ) {
|
public void gotBinaryArray( String name , byte[] b ) {
|
||||||
RubyArray a = ja2ra( b );
|
/* Deprecated */
|
||||||
|
|
||||||
Object[] args = new Object[] { a, 2 };
|
|
||||||
|
|
||||||
Object result = JavaEmbedUtils.invokeMethod(_runtime, _rbclsBinary, "new", args, Object.class);
|
|
||||||
|
|
||||||
_put( name, (RubyObject)result );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: fix abs stuff here. some kind of bad type issue
|
// TODO: fix abs stuff here. some kind of bad type issue
|
||||||
|
@ -12,7 +12,7 @@ import org.bson.*;
|
|||||||
import org.bson.io.*;
|
import org.bson.io.*;
|
||||||
import org.bson.types.*;
|
import org.bson.types.*;
|
||||||
|
|
||||||
public class RubyBSONDecoder extends BSONDecoder {
|
public class RubyBSONDecoder extends BasicBSONDecoder {
|
||||||
|
|
||||||
protected void _binary( String name )
|
protected void _binary( String name )
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
@ -56,7 +56,7 @@ end
|
|||||||
|
|
||||||
if RUBY_PLATFORM =~ /java/
|
if RUBY_PLATFORM =~ /java/
|
||||||
jar_dir = File.join(File.dirname(__FILE__), '..', 'ext', 'java', 'jar')
|
jar_dir = File.join(File.dirname(__FILE__), '..', 'ext', 'java', 'jar')
|
||||||
require File.join(jar_dir, 'mongo-2.4.jar')
|
require File.join(jar_dir, 'mongo-2.6.5.jar')
|
||||||
require File.join(jar_dir, 'jbson.jar')
|
require File.join(jar_dir, 'jbson.jar')
|
||||||
require 'bson/bson_java'
|
require 'bson/bson_java'
|
||||||
module BSON
|
module BSON
|
||||||
|
Loading…
Reference in New Issue
Block a user