From b18a6099e6f2dd9b140de28ef28221afc7d45299 Mon Sep 17 00:00:00 2001 From: Stanley Liu Date: Fri, 29 Jan 2021 12:28:00 +0000 Subject: [PATCH] fix/made abort message more informative and add byebug to staging env --- Gemfile | 6 +++++- lib/tasks/cache.rake | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index ae3f05472..2de1ed363 100644 --- a/Gemfile +++ b/Gemfile @@ -80,8 +80,12 @@ group :test, :development do gem 'ejs' # gem 'minitest', '5.10.3' # Explicit minitest version fixes test reporting errors gem 'minitest', '~> 5.10', '!= 5.10.2' - gem 'byebug', '~> 9.0', '>= 9.0.5' + + +end +group :test, :development, :staging do + gem 'byebug', '~> 9.0', '>= 9.0.5' end diff --git a/lib/tasks/cache.rake b/lib/tasks/cache.rake index 3e9a6d966..b26b151fd 100644 --- a/lib/tasks/cache.rake +++ b/lib/tasks/cache.rake @@ -1,11 +1,11 @@ namespace :cache do desc "Clear the Rails cache (everything except downloads which is handled by Redis)" - task :clear do + task clear: do logger = Logger.new(STDOUT) logger.info "Clearing cache..." - abort('Rails cache is nil') if Rails.cache.nil? + abort('Aborting: Rails cache is nil') if Rails.cache.nil? Rails.cache.clear logger.info "Done."