22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/orasaurus/cli.rb', line 22
def generate(script_type=:all)
puts "generate " + script_type.to_s + " #{options.to_s}"
a = Orasaurus::Application.new("cli",options.base_dir)
if options.sort_method.upcase == "SQL" then
puts "connecting for sql sorting."
db_connect_options = process_db_connect_options(options.db_username, options.db_password, options.db_name)
a.connect(db_connect_options[:db_username], db_connect_options[:db_password],db_connect_options[:db_name])
sort_options = { :method => :SQL, :db_connection => a.connection }
else
sort_options = {}
end
if [:build_scripts,:all].include? script_type.to_sym then
puts "generating build scrtipts"
a.generate(:build_scripts, sort_options)
end
if [:teardown_scripts,:all].include? script_type.to_sym then
puts "generating teardown scripts"
a.generate(:teardown_scripts, sort_options)
end
end
|