game-data/Rakefile

32 lines
614 B
Ruby
Raw Permalink 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
namespace :test do
task :rubocop do
2023-12-08 15:21:11 -05:00
system("rubocop src/")
end
end