game-data/Rakefile
Gregory Ballantine fa9245d7ec
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful
Added rubocop for style checking; added woodpecker CI config
2023-12-08 12:17:13 -05:00

32 lines
632 B
Ruby

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
system("rubocop app/ server.rb scan.rb")
end
end