Sha256: 7b22fee4921f391393b74fc89b276a8d701367e616e9618b794c69dbb9132767
Contents?: true
Size: 933 Bytes
Versions: 29
Compression:
Stored size: 933 Bytes
Contents
namespace :oracle do desc 'Build the Oracle test databases' task :build_databases => :load_connection do puts File.join(SCHEMA_PATH, 'oracle.sql') options_str = ENV['cpk_adapter_options_str'] sh %( sqlplus #{options_str} < #{File.join(SCHEMA_PATH, 'oracle.sql')} ) end desc 'Drop the Oracle test databases' task :drop_databases => :load_connection do puts File.join(SCHEMA_PATH, 'oracle.drop.sql') options_str = ENV['cpk_adapter_options_str'] sh %( sqlplus #{options_str} < #{File.join(SCHEMA_PATH, 'oracle.drop.sql')} ) end desc 'Rebuild the Oracle test databases' task :rebuild_databases => [:drop_databases, :build_databases] task :load_connection do require File.join(PROJECT_ROOT, %w[lib adapter_helper oracle]) spec = AdapterHelper::Oracle.load_connection_from_env ENV['cpk_adapter_options_str'] = "#{spec[:username]}/#{spec[:password]}@#{spec[:host]}" end end
Version data entries
29 entries across 29 versions & 5 rubygems