bin/setup
#!/usr/bin/env ruby
# Configure the development or production environment; must be idempotent.
require "fileutils"
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
end
FileUtils.chdir(File.expand_path("..", __dir__)) do
puts "== Installing Ruby dependencies =="
system!("bundle install")
puts "\n== Preparing database =="
system!("bin/rails db:reset")
puts "\n== Removing old logs and tempfiles =="
system!("bin/rails log:clear tmp:clear")
puts "\n\nš Ready! Run the test application with: `rails s`. š\n"
end