Showing 17 of 17 total issues
Block has too many lines. [28/25] Open
namespace :db do desc "Dumps the database to db/APP_NAME.dump" task :dump => :environment do cmd = nil
- Read upRead up
- Exclude checks
Line is too long. [130/120] Open
cmd = "pg_restore --verbose --host #{host} --username #{user} --clean --no-owner --no-acl --dbname #{db} #{latest_filename}"
- Read upRead up
- Exclude checks
Prefer Time over DateTime. Open
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{db}_#{DateTime.now.strftime("%Y_%m_%d_%H%M%S")}.dump"
- Read upRead up
- Exclude checks
Extra empty line detected at block body beginning. Open
desc "Dumps the database to db/APP_NAME.dump"
- Read upRead up
- Exclude checks
Space between { and | missing. Open
latest_filename = Dir.glob("#{Rails.root}/db/backup/*.dump").max_by(1) {|f| File.mtime(f)}.first
- Read upRead up
- Exclude checks
Line is too long. [184/120] Open
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{db}_#{DateTime.now.strftime("%Y_%m_%d_%H%M%S")}.dump"
- Read upRead up
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Rake::Task["db:drop"].invoke
- Read upRead up
- Exclude checks
Prefer single-quoted strings inside interpolations. Open
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{db}_#{DateTime.now.strftime("%Y_%m_%d_%H%M%S")}.dump"
- Read upRead up
- Exclude checks
Unused block argument - app
. If it's necessary, use _
or _app
as an argument name to indicate that it won't be used. Open
with_config do |app, host, db, user|
- Read upRead up
- Exclude checks
Unused block argument - app
. If it's necessary, use _
or _app
as an argument name to indicate that it won't be used. Open
with_config do |app, host, db, user|
- Read upRead up
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
desc "Dumps the database to db/APP_NAME.dump"
- Read upRead up
- Exclude checks
Space missing inside }. Open
latest_filename = Dir.glob("#{Rails.root}/db/backup/*.dump").max_by(1) {|f| File.mtime(f)}.first
- Read upRead up
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
desc "Restores the database dump at db/APP_NAME.dump."
- Read upRead up
- Exclude checks
Prefer single-quoted strings when you don't need string interpolation or special symbols. Open
Rake::Task["db:create"].invoke
- Read upRead up
- Exclude checks