Fix rubocop issues

This commit is contained in:
Ryan W
2021-09-26 14:51:13 -07:00
parent 3a3b5d043a
commit ac680341f6
35 changed files with 193 additions and 103 deletions
+10 -8
View File
@@ -1,8 +1,10 @@
#!/usr/bin/env ruby
require "fileutils"
# frozen_string_literal: true
require 'fileutils'
# path to your application root.
APP_ROOT = File.expand_path("..", __dir__)
APP_ROOT = File.expand_path('..', __dir__)
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
@@ -13,9 +15,9 @@ FileUtils.chdir APP_ROOT do
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
# Add necessary setup steps to this file.
puts "== Installing dependencies =="
system! "gem install bundler --conservative"
system("bundle check") || system!("bundle install")
puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
# puts "\n== Copying sample files =="
# unless File.exist?("config/database.yml")
@@ -23,11 +25,11 @@ FileUtils.chdir APP_ROOT do
# end
puts "\n== Preparing database =="
system! "bin/rails db:prepare"
system! 'bin/rails db:prepare'
puts "\n== Removing old logs and tempfiles =="
system! "bin/rails log:clear tmp:clear"
system! 'bin/rails log:clear tmp:clear'
puts "\n== Restarting application server =="
system! "bin/rails restart"
system! 'bin/rails restart'
end