#!/usr/bin/env ruby ## loads the active-orient environment ## and starts an interactive shell ## Parameter: production (p) ## development (d) [default] ## test (t) require 'logger' LogLevel = Logger::WARN require File.expand_path(File.dirname(__FILE__) + "/../config/boot") require 'orientdb' if RUBY_PLATFORM == 'java' require 'yaml' puts "ORD points to the REST-Instance, Database: #{ActiveOrient.database}" puts "DB is the API-Instance of the database, DB.db gets the DB-Api-base " if RUBY_PLATFORM == 'java' puts '-'* 45 ns= case ActiveOrient::Model.namespace when Object "No Prefix, just ClassName#CamelCase" else ActiveOrient::Model.namespace.to_s + "{ClassName.camelcase}" end puts "Namespace for model-classes : #{ns}" puts "Present Classes (Hierarchy) " puts ORD.class_hierarchy.to_yaml puts "" puts "Active Classes -> ActiveOrient ClassName" puts '-'* 45 puts ActiveOrient::Model.allocated_classes.map{|x,y| "#{"%15s"% x} -> #{y.to_s}" }.join("\n") puts '-'* 45 include OrientDB require 'irb' ARGV.clear IRB.start(__FILE__)