diff --git a/Gemfile b/Gemfile index d08ba4763..681dfde2d 100644 --- a/Gemfile +++ b/Gemfile @@ -126,6 +126,7 @@ group :development, :test, :staging do end group :development, :test do + gem "colorize" # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem "debug", platforms: %i[mri mingw x64_mingw] gem "pry", "~> 0.15.0" diff --git a/Gemfile.lock b/Gemfile.lock index dcbf0bcfa..534aefe5e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -136,6 +136,7 @@ GEM childprocess (5.1.0) logger (~> 1.5) coderay (1.1.3) + colorize (1.1.0) concurrent-ruby (1.3.4) connection_pool (2.4.1) crass (1.0.6) @@ -583,6 +584,7 @@ DEPENDENCIES brakeman bugsnag (~> 6.27) capybara + colorize cuprite dartsass-rails debug diff --git a/bin/setup b/bin/setup index be3db3c0d..2ac88776b 100755 --- a/bin/setup +++ b/bin/setup @@ -1,5 +1,6 @@ #!/usr/bin/env ruby require "fileutils" +require "colorize" APP_ROOT = File.expand_path("..", __dir__) @@ -16,9 +17,13 @@ FileUtils.chdir APP_ROOT do system("bundle check") || system!("bundle install") # puts "\n== Copying sample files ==" - # unless File.exist?("config/database.yml") - # FileUtils.cp "config/database.yml.sample", "config/database.yml" - # end + unless File.exist?("config/application.yml") + puts "== Setup application.yml ==" + puts "⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️" + puts "Please provide the necessary configuration in config/application.yml".colorize(:red) + puts "⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️" + FileUtils.cp "config/application.example.yml", "config/application.yml" + end puts "\n== Preparing database ==" system! "bin/rails db:prepare"