Sha256: 50cacbfa5aa4f13a021ed96ad7052e07d70658e916ebba7f01f05e5ed72fe854

Contents?: true

Size: 420 Bytes

Versions: 2

Compression:

Stored size: 420 Bytes

Contents

require 'catori'
module Catori
class Installer
def self.install(db,user,pw)
	require 'ftools'
	File.mkpath Catori::CONFIG_DIR
	data={"user"=>user,"database"=>db,"password"=>pw}
	File.open(Catori::CONFIG_FILE,"w") {|f|
	YAML.dump(data,f) }
	sql=File.expand_path(File.dirname(__FILE__)+"../../../sql/catori_mysql.sql")
	s=`mysql  -f -u #{user} --password=#{pw} #{db} < #{sql}`
	puts s
	puts "Catori installed"
end
end
end

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
catori-0.2.5 ./lib/catori/Installer.rb
catori-0.2.5 lib/catori/Installer.rb