Changeset 585

Show
Ignore:
Timestamp:
09/09/07 02:45:07 (1 year ago)
Author:
in..@loobmedia.com
Message:

when loading old-style plugins, add its /lib path to the LOAD_PATH

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app_generators/merb/templates/config/dependencies.rb

    r576 r585  
    3030 
    3131# We pick up any old-style plugins in deps/plugins as a last-effort 
    32 Dir["#{MERB_ROOT}/deps/plugins/*/init.rb"].each { |m| require m } 
     32Dir["#{MERB_ROOT}/deps/plugins/*/init.rb"].each do |m|  
     33  plugin_lib = File.dirname(m) / 'lib' 
     34  $LOAD_PATH << plugin_lib if File.directory?(plugin_lib) 
     35  require m 
     36end 
  • trunk/lib/merb/dispatcher.rb

    r575 r585  
    8585          if env[Merb::Const::UPCASE_CONTENT_TYPE] == Merb::Const::FORM_URL_ENCODED 
    8686            querystring.update(query_parse(request_body.read)) 
    87             # see if the method was passed as part of the request body 
     87            # See if the method was passed as part of the request body 
    8888            if querystring.key?('_method') && allow.include?(method) 
    8989              method = querystring.delete('_method').downcase.intern