game-data/Rakefile

25 lines
537 B
Ruby
Raw Normal View History

require 'bundler/setup'
namespace :db do
desc 'Run migrations'
task :migrate, [:version] do |t, args|
require "sequel/core"
Sequel.extension :migration
version = args[:version].to_i if args[:version]
Sequel.connect('sqlite://data/gamedata.db') do |db|
Sequel::Migrator.run(db, "db/migrations", target: version)
end
end
end
namespace :server do
task :start do
ENV['APP_ENV'] = 'production'
system("puma")
end
task :dev do
system('rerun --no-notify --exit --dir="src/" puma')
end
end