module OrientdbSchemaMigrator
Constants
- VERSION
Public Class Methods
client()
click to toggle source
# File lib/orientdb-schema-migrator.rb, line 35 def self.client @client ||= Orientdb4r.client(:host => get_config["host"]) end
get_config()
click to toggle source
# File lib/orientdb-schema-migrator.rb, line 12 def self.get_config config_file = if defined?(Rails) Rails.root.to_s + '/config/orientdb.yml' elsif ENV['ODB_TEST'] File.expand_path('../../spec/support/config.yml', __FILE__) elsif ENV['odb_config_path'] ENV['odb_config_path'] else raise "No odb config path defined" end env = if defined?(Rails) Rails.env elsif ENV['ODB_TEST'] 'test' else raise "No environment specified to load database connection config" end YAML.load_file(config_file)[env] end