diff options
| author | Teddy Wing | 2017-04-29 12:13:50 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-04-29 12:15:37 +0200 |
| commit | 1ede66205549e84c83e04e4173dab3b0d6906255 (patch) | |
| tree | f64efe17112c3e8c6b3fff9643ebb424e08993be | |
| parent | 7528990d74c6ce83d715ffdb8da107a52ff7eba0 (diff) | |
| download | dbshell-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.rb | 9 | ||||
| -rw-r--r-- | lib/dbshell/rails/tasks/dbshell.rake | 3 |
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 |
