From 1ede66205549e84c83e04e4173dab3b0d6906255 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 29 Apr 2017 12:13:50 +0200 Subject: Add a test Rake task Create a stub for our Rake task to see something working. Inspired by https://github.com/paulelliott/fabrication/blob/b470cd817e1973c14e3253cd76606cf934942ca1/lib/fabrication.rb --- lib/dbshell/rails.rb | 9 ++++++++- lib/dbshell/rails/tasks/dbshell.rake | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 lib/dbshell/rails/tasks/dbshell.rake diff --git a/lib/dbshell/rails.rb b/lib/dbshell/rails.rb index 803b4ae..cac7229 100644 --- a/lib/dbshell/rails.rb +++ b/lib/dbshell/rails.rb @@ -2,6 +2,13 @@ require "dbshell/rails/version" module DBShell module Rails - # Your code goes here... + Dir[ + File.join(File.dirname(__FILE__), + 'rails', + 'tasks', + '**/*.rake') + ].each do |rake| + load rake + end end end diff --git a/lib/dbshell/rails/tasks/dbshell.rake b/lib/dbshell/rails/tasks/dbshell.rake new file mode 100644 index 0000000..65b74a2 --- /dev/null +++ b/lib/dbshell/rails/tasks/dbshell.rake @@ -0,0 +1,3 @@ +task :dbshell do + puts 'Hello World' +end -- cgit v1.2.3