diff options
| author | Teddy Wing | 2017-04-29 23:10:33 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-04-29 23:10:33 +0200 | 
| commit | b32dfa416313a762c3e74bdd1692b36001bfb050 (patch) | |
| tree | 772b34b7f17dde57b65095e18733c7a457cd50e7 /lib | |
| parent | fb9ff6eb8cbad57b3ca2bbd58dc098f208edd1e1 (diff) | |
| download | dbshell-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
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dbshell/rails.rb | 17 | 
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 | 
