orientdb 0.0.16-jruby → 0.0.17-jruby
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/jars/orient-commons-1.0rc7.jar +0 -0
- data/jars/orientdb-client-1.0rc7.jar +0 -0
- data/jars/orientdb-core-1.0rc7.jar +0 -0
- data/jars/orientdb-enterprise-1.0rc7.jar +0 -0
- data/jars/orientdb-server-1.0rc7.jar +0 -0
- data/jars/orientdb-tools-1.0rc7.jar +0 -0
- data/jars/persistence-api-1.0.jar +0 -0
- data/lib/orientdb.rb +2 -2
- data/lib/orientdb/oclass.rb +21 -17
- data/lib/orientdb/version.rb +1 -1
- data/orientdb.gemspec +13 -14
- data/spec/database_spec.rb +6 -6
- data/spec/spec_helper.rb +3 -0
- metadata +9 -11
- data/jars/orient-commons-0.9.24.jar +0 -0
- data/jars/orientdb-client-0.9.24.jar +0 -0
- data/jars/orientdb-core-0.9.24.jar +0 -0
- data/jars/orientdb-enterprise-0.9.24.jar +0 -0
- data/jars/orientdb-server-0.9.24.jar +0 -0
- data/jars/orientdb-tools-0.9.24.jar +0 -0
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.17
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
data/lib/orientdb.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
raise "
|
1
|
+
raise "OrieentDB-client only runs on JRuby. Sorry!" unless (RUBY_PLATFORM =~ /java/)
|
2
2
|
|
3
3
|
$: << File.dirname(__FILE__)
|
4
4
|
$: << File.expand_path('../../jars/', __FILE__)
|
5
5
|
|
6
6
|
require 'java'
|
7
|
-
require "orientdb-client-
|
7
|
+
require "orientdb-client-1.0rc7"
|
8
8
|
|
9
9
|
module OrientDB
|
10
10
|
|
data/lib/orientdb/oclass.rb
CHANGED
@@ -3,23 +3,7 @@ module OrientDB
|
|
3
3
|
class OClass
|
4
4
|
|
5
5
|
def type_for(value)
|
6
|
-
|
7
|
-
type = case value
|
8
|
-
when OrientDB::SchemaType, OrientDB::OClass
|
9
|
-
value
|
10
|
-
when String
|
11
|
-
if schema.exists_class?(value)
|
12
|
-
schema.get_class(value)
|
13
|
-
else
|
14
|
-
FIELD_TYPES[value.to_sym]
|
15
|
-
end
|
16
|
-
when Symbol
|
17
|
-
FIELD_TYPES[value]
|
18
|
-
else
|
19
|
-
FIELD_TYPES[value.to_s.to_sym]
|
20
|
-
end
|
21
|
-
raise "Uknown schema type for [#{value}] (#{value.class.name})" unless type
|
22
|
-
type
|
6
|
+
self.class.type_for value
|
23
7
|
end
|
24
8
|
|
25
9
|
def add(property_name, type, options = { })
|
@@ -81,6 +65,26 @@ module OrientDB
|
|
81
65
|
|
82
66
|
class << self
|
83
67
|
|
68
|
+
def type_for(value)
|
69
|
+
value = value.oclass if value.respond_to?(:oclass)
|
70
|
+
type = case value
|
71
|
+
when OrientDB::SchemaType, OrientDB::OClass
|
72
|
+
value
|
73
|
+
when String
|
74
|
+
if schema.exists_class?(value)
|
75
|
+
schema.get_class(value)
|
76
|
+
else
|
77
|
+
FIELD_TYPES[value.to_sym]
|
78
|
+
end
|
79
|
+
when Symbol
|
80
|
+
FIELD_TYPES[value]
|
81
|
+
else
|
82
|
+
FIELD_TYPES[value.to_s.to_sym]
|
83
|
+
end
|
84
|
+
raise "Uknown schema type for [#{value}] (#{value.class.name})" unless type
|
85
|
+
type
|
86
|
+
end
|
87
|
+
|
84
88
|
def create(db, name, fields = { })
|
85
89
|
name = name.to_s
|
86
90
|
add_cluster = fields.delete :add_cluster
|
data/lib/orientdb/version.rb
CHANGED
data/orientdb.gemspec
CHANGED
@@ -5,16 +5,15 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{orientdb}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.17"
|
9
9
|
s.platform = %q{jruby}
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if s.respond_to? :required_rubygems_version=
|
12
|
-
s.authors = [
|
13
|
-
s.date = %q{2011-
|
14
|
-
s.default_executable = %q{orientdb_console}
|
12
|
+
s.authors = [%q{Adrian Madrid}]
|
13
|
+
s.date = %q{2011-12-09}
|
15
14
|
s.description = %q{Simple JRuby wrapper for the OrientDB.}
|
16
|
-
s.email = [
|
17
|
-
s.executables = [
|
15
|
+
s.email = [%q{aemadrid@gmail.com}]
|
16
|
+
s.executables = [%q{orientdb_console}]
|
18
17
|
s.extra_rdoc_files = [
|
19
18
|
"LICENSE",
|
20
19
|
"README.rdoc"
|
@@ -28,12 +27,12 @@ Gem::Specification.new do |s|
|
|
28
27
|
"Rakefile",
|
29
28
|
"VERSION",
|
30
29
|
"bin/orientdb_console",
|
31
|
-
"jars/orient-commons-
|
32
|
-
"jars/orientdb-client-
|
33
|
-
"jars/orientdb-core-
|
34
|
-
"jars/orientdb-enterprise-
|
35
|
-
"jars/orientdb-server-
|
36
|
-
"jars/orientdb-tools-
|
30
|
+
"jars/orient-commons-1.0rc7.jar",
|
31
|
+
"jars/orientdb-client-1.0rc7.jar",
|
32
|
+
"jars/orientdb-core-1.0rc7.jar",
|
33
|
+
"jars/orientdb-enterprise-1.0rc7.jar",
|
34
|
+
"jars/orientdb-server-1.0rc7.jar",
|
35
|
+
"jars/orientdb-tools-1.0rc7.jar",
|
37
36
|
"jars/persistence-api-1.0.jar",
|
38
37
|
"lib/orientdb.rb",
|
39
38
|
"lib/orientdb/constants.rb",
|
@@ -65,9 +64,9 @@ Gem::Specification.new do |s|
|
|
65
64
|
"spec/sql_spec.rb"
|
66
65
|
]
|
67
66
|
s.homepage = %q{http://rubygems.org/gems/orientdb}
|
68
|
-
s.require_paths = [
|
67
|
+
s.require_paths = [%q{lib}]
|
69
68
|
s.rubyforge_project = %q{orientdb}
|
70
|
-
s.rubygems_version = %q{1.
|
69
|
+
s.rubygems_version = %q{1.8.9}
|
71
70
|
s.summary = %q{JRuby wrapper for OrientDB}
|
72
71
|
|
73
72
|
if s.respond_to? :specification_version then
|
data/spec/database_spec.rb
CHANGED
@@ -26,13 +26,13 @@ describe "OrientDB" do
|
|
26
26
|
end
|
27
27
|
|
28
28
|
it "should create a complex table" do
|
29
|
-
exp_class = "#<OrientDB::OClass:invoice number=INTEGER(idx) customer=LINK
|
29
|
+
exp_class = "#<OrientDB::OClass:invoice total=FLOAT sold_on=DATE lines=LINKLIST number=INTEGER(idx) customer=LINK>"
|
30
30
|
exp_props = [
|
31
|
-
"#<OrientDB::Propery:
|
32
|
-
"#<OrientDB::Propery:
|
33
|
-
"#<OrientDB::Propery:
|
34
|
-
"#<OrientDB::Propery:
|
35
|
-
"#<OrientDB::Propery:
|
31
|
+
"#<OrientDB::Propery:total type=decimal indexed=false mandatory=false not_null=false>",
|
32
|
+
"#<OrientDB::Propery:sold_on type=date indexed=false mandatory=false not_null=false>",
|
33
|
+
"#<OrientDB::Propery:lines type=link_list indexed=false mandatory=false not_null=false>",
|
34
|
+
"#<OrientDB::Propery:number type=int indexed=true mandatory=true not_null=false>",
|
35
|
+
"#<OrientDB::Propery:customer type=link indexed=false mandatory=false not_null=true>"
|
36
36
|
]
|
37
37
|
@invoice_class.to_s.should == exp_class
|
38
38
|
@invoice_class.properties.map { |x| x.to_s }.should == exp_props
|
data/spec/spec_helper.rb
CHANGED
@@ -21,6 +21,9 @@ unless defined?(SPEC_HELPER_LOADED)
|
|
21
21
|
end
|
22
22
|
else
|
23
23
|
TEST_DB_PATH = "#{TEMP_DIR}/databases/db_#{rand(999) + 1}"
|
24
|
+
require 'fileutils'
|
25
|
+
FileUtils.remove_dir "#{TEMP_DIR}/databases" rescue nil
|
26
|
+
FileUtils.mkdir_p TEST_DB_PATH
|
24
27
|
puts ">> Testing [local] Database :: TEST_DB PATH : #{TEST_DB_PATH}"
|
25
28
|
FileUtils.remove_dir "#{TEMP_DIR}/databases/"
|
26
29
|
FileUtils.mkdir_p TEST_DB_PATH
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: orientdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.17
|
6
6
|
platform: jruby
|
7
7
|
authors:
|
8
8
|
- Adrian Madrid
|
@@ -10,8 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
14
|
-
default_executable: orientdb_console
|
13
|
+
date: 2011-12-09 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: awesome_print
|
@@ -54,12 +53,12 @@ files:
|
|
54
53
|
- Rakefile
|
55
54
|
- VERSION
|
56
55
|
- bin/orientdb_console
|
57
|
-
- jars/orient-commons-
|
58
|
-
- jars/orientdb-client-
|
59
|
-
- jars/orientdb-core-
|
60
|
-
- jars/orientdb-enterprise-
|
61
|
-
- jars/orientdb-server-
|
62
|
-
- jars/orientdb-tools-
|
56
|
+
- jars/orient-commons-1.0rc7.jar
|
57
|
+
- jars/orientdb-client-1.0rc7.jar
|
58
|
+
- jars/orientdb-core-1.0rc7.jar
|
59
|
+
- jars/orientdb-enterprise-1.0rc7.jar
|
60
|
+
- jars/orientdb-server-1.0rc7.jar
|
61
|
+
- jars/orientdb-tools-1.0rc7.jar
|
63
62
|
- jars/persistence-api-1.0.jar
|
64
63
|
- lib/orientdb.rb
|
65
64
|
- lib/orientdb/constants.rb
|
@@ -89,7 +88,6 @@ files:
|
|
89
88
|
- spec/spec_basic_helper.rb
|
90
89
|
- spec/spec_helper.rb
|
91
90
|
- spec/sql_spec.rb
|
92
|
-
has_rdoc: true
|
93
91
|
homepage: http://rubygems.org/gems/orientdb
|
94
92
|
licenses: []
|
95
93
|
|
@@ -113,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
111
|
requirements: []
|
114
112
|
|
115
113
|
rubyforge_project: orientdb
|
116
|
-
rubygems_version: 1.
|
114
|
+
rubygems_version: 1.8.9
|
117
115
|
signing_key:
|
118
116
|
specification_version: 3
|
119
117
|
summary: JRuby wrapper for OrientDB
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|