Top Level Namespace
Defined Under Namespace
Modules: Boolean, Diametric, Kernel, Rails
Classes: FalseClass, TrueClass
Instance Method Summary
collapse
Instance Method Details
#create_schema(print_info = true) ⇒ Object
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/tasks/create_schema.rb', line 15
def create_schema(print_info=true)
puts "Creating all schemas ..." if print_info
Dir.glob(File.join(Rails.root, "app", "models", "*.rb")).each {|model| load model}
Module.constants.each do |const|
class_def = eval "#{const.to_s}"
if class_def.respond_to? :create_schema
class_def.send(:create_schema)
puts class_def.send(:schema) if print_info
end
end
puts "done" if print_info
end
|
#free_uri(args) ⇒ Object
43
44
45
|
# File 'lib/tasks/diametric_config.rb', line 43
def free_uri(args)
["datomic:free://localhost:", args[:port], "/", args[:database]].join
end
|
10
11
12
13
14
15
16
|
# File 'lib/diametric.rb', line 10
def is_jruby?
if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
true
else
false
end
end
|
#peer_uri(args) ⇒ Object
39
40
41
|
# File 'lib/tasks/diametric_config.rb', line 39
def peer_uri(args)
["datomic:mem://", args[:database]].join
end
|
#rest_uri(args) ⇒ Object
35
36
37
|
# File 'lib/tasks/diametric_config.rb', line 35
def rest_uri(args)
["http://localhost:", args[:port]].join
end
|