Files
game-data/Rakefile
Gregory Ballantine 3f0efce0d8
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Fixed a few lints; changed rake task name to test:lint
2025-08-12 23:56:46 -04:00

39 lines
788 B
Ruby

require 'bundler/setup'
namespace :db do
desc 'Run migrations'
task :migrate, [:version] do |t, args|
require 'sequel/core'
# load configuration
require_relative 'src/config'
conf = Config.new()
Sequel.extension :migration
version = args[:version].to_i if args[:version]
Sequel.connect(adapter: conf.get('database.adapter'), database: conf.get('database.database')) do |db|
Sequel::Migrator.run(db, 'db/migrations', target: version)
end
end
end
namespace :server do
task :start do
ENV['RACK_ENV'] = 'production'
system("puma")
end
task :dev do
system('rerun --no-notify --dir="src/" puma')
end
end
namespace :test do
task :unit do
system("rspec")
end
task :lint do
system("rubocop src/ spec/")
end
end