Sha256: 358d6f4f1cb3535faf09ce1821a05ed7cd43b2da091c4dcaa9379bc858e65886

Contents?: true

Size: 435 Bytes

Versions: 2

Compression:

Stored size: 435 Bytes

Contents

require 'catori'
require 'yaml'
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.6 ./lib/catori/Installer.rb
catori-0.2.6 lib/catori/Installer.rb