From b32dfa416313a762c3e74bdd1692b36001bfb050 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 29 Apr 2017 23:10:33 +0200 Subject: 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 --- lib/dbshell/rails.rb | 17 +++++++++-------- 1 file 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 -- cgit v1.2.3