aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-04-29 12:13:50 +0200
committerTeddy Wing2017-04-29 12:15:37 +0200
commit1ede66205549e84c83e04e4173dab3b0d6906255 (patch)
treef64efe17112c3e8c6b3fff9643ebb424e08993be
parent7528990d74c6ce83d715ffdb8da107a52ff7eba0 (diff)
downloaddbshell-rails-1ede66205549e84c83e04e4173dab3b0d6906255.tar.bz2
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
-rw-r--r--lib/dbshell/rails.rb9
-rw-r--r--lib/dbshell/rails/tasks/dbshell.rake3
2 files changed, 11 insertions, 1 deletions
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