orientdb 0.0.21-jruby → 0.0.22-jruby
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.
- data/VERSION +1 -1
- data/lib/orientdb/database.rb +7 -0
- data/orientdb.gemspec +1 -1
- data/spec/spec_helper.rb +3 -3
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.22
|
data/lib/orientdb/database.rb
CHANGED
@@ -68,6 +68,13 @@ module OrientDB
|
|
68
68
|
get_class(klass_name) || create_class(klass_name, fields)
|
69
69
|
end
|
70
70
|
|
71
|
+
def migrate_class(klass_name, fields = {})
|
72
|
+
klass = get_or_create_class klass_name
|
73
|
+
field.each do |name, options|
|
74
|
+
klass.add name, options
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
71
78
|
def drop_class(klass_name)
|
72
79
|
schema.remove_class(klass_name) if schema.exists_class(klass_name)
|
73
80
|
end
|
data/orientdb.gemspec
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -5,13 +5,13 @@ unless defined?(SPEC_HELPER_LOADED)
|
|
5
5
|
require 'spec_basic_helper'
|
6
6
|
|
7
7
|
TEST_URL = ENV["ORIENTDB_TEST_URL"]
|
8
|
-
TEST_USERNAME = ENV["ORIENTDB_TEST_USERNAME"]
|
9
|
-
TEST_PASSWORD = ENV["ORIENTDB_TEST_PASSWORD"]
|
8
|
+
TEST_USERNAME = ENV["ORIENTDB_TEST_USERNAME"] || 'admin'
|
9
|
+
TEST_PASSWORD = ENV["ORIENTDB_TEST_PASSWORD"] || 'admin'
|
10
10
|
TEST_POOLED = ENV["ORIENTDB_TEST_POOLED"].to_s[0, 1].downcase == 't'
|
11
11
|
|
12
12
|
puts "ENV :: TEST_URL : #{TEST_URL} | TEST_USERNAME : #{TEST_USERNAME} | TEST_PASSWORD : #{TEST_PASSWORD} | TEST_POOLED : #{TEST_POOLED}"
|
13
13
|
|
14
|
-
if TEST_URL
|
14
|
+
if TEST_URL
|
15
15
|
if TEST_POOLED
|
16
16
|
puts ">> Testing [#{TEST_URL[0,TEST_URL.index(':')]}] Pooled Database :: TEST_DB URL : #{TEST_URL} : #{TEST_USERNAME} : #{TEST_PASSWORD}"
|
17
17
|
DB = OrientDB::DocumentDatabasePool.connect(TEST_URL, TEST_USERNAME, TEST_PASSWORD)
|