From 96ffac15299beca07a0671cdbed13b137a9aa4c4 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 29 Apr 2017 23:43:01 +0200 Subject: dbshell.rake: Add alias to `rake db:shell` Provide two ways of accessing the task. One saves a character (":") and is reminiscent of the Django command that this project is inspired by. The other is more Rails-like and is consistent with the other `db:`-prefixed Rails Rake tasks. --- lib/dbshell/rails/tasks/dbshell.rake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/dbshell/rails/tasks/dbshell.rake b/lib/dbshell/rails/tasks/dbshell.rake index cc898a4..44d7948 100644 --- a/lib/dbshell/rails/tasks/dbshell.rake +++ b/lib/dbshell/rails/tasks/dbshell.rake @@ -7,3 +7,8 @@ task :dbshell do Rails.application.config.database_configuration[env] ) end + +# Alias 'dbshell' to 'db:shell' +namespace :db do + task shell: :dbshell +end -- cgit v1.2.3