Skip to content

Instantly share code, notes, and snippets.

@reset
Created April 25, 2012 02:25
Show Gist options
  • Save reset/2485602 to your computer and use it in GitHub Desktop.
Save reset/2485602 to your computer and use it in GitHub Desktop.
# Don't know if you'd have to initialize it here
arbitrary_sql = nil
ruby_block "read sql file" do
block do
arbitrary_sql = ::File.open("/opt/sl/rtview.sql").read
end
end
mysql_database "create tables" do
database_name params[:database][:name]
connection(
:host => "localhost",
:username => params[:database][:user],
:password => params[:database][:password]
)
sql arbitrary_sql
action :nothing
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment