aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2017-04-29 23:10:33 +0200
committerTeddy Wing2017-04-29 23:10:33 +0200
commitb32dfa416313a762c3e74bdd1692b36001bfb050 (patch)
tree772b34b7f17dde57b65095e18733c7a457cd50e7
parentfb9ff6eb8cbad57b3ca2bbd58dc098f208edd1e1 (diff)
downloaddbshell-rails-b32dfa416313a762c3e74bdd1692b36001bfb050.tar.bz2
rails.rb: Move Rake task loader outside of the module context
I don't think the load call really needs to be inside the module, as evidenced by https://github.com/paulelliott/fabrication/blob/b470cd817e1973c14e3253cd76606cf934942ca1/lib/fabrication.rb
-rw-r--r--lib/dbshell/rails.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/dbshell/rails.rb b/lib/dbshell/rails.rb
index cac7229..53ba80a 100644
--- a/lib/dbshell/rails.rb
+++ b/lib/dbshell/rails.rb
@@ -1,14 +1,15 @@
require "dbshell/rails/version"
+Dir[
+ File.join(File.dirname(__FILE__),
+ 'rails',
+ 'tasks',
+ '**/*.rake')
+].each do |rake|
+ load rake
+end
+
module DBShell
module Rails
- Dir[
- File.join(File.dirname(__FILE__),
- 'rails',
- 'tasks',
- '**/*.rake')
- ].each do |rake|
- load rake
- end
end
end