Skip to content

Instantly share code, notes, and snippets.

@igkuz
Created March 9, 2019 13:18
Show Gist options
  • Save igkuz/0edb79e08189fe42d945446eb2a66b95 to your computer and use it in GitHub Desktop.
Save igkuz/0edb79e08189fe42d945446eb2a66b95 to your computer and use it in GitHub Desktop.
Rakefile for sample ROM app with db:setup
require_relative 'boot'
require 'rom/sql/rake_task'
namespace :db do
task :setup do
configuration = ROM::Configuration.new(:sql, "mysql2:///#{CONFIG['db']['name']}", CONFIG['db'])
ROM::SQL::RakeSupport.env = configuration
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment