public
Rubygem
Description: Ramaze is a simple, light and modular open-source web application framework written in Ruby.
Homepage: http://ramaze.net
Clone URL: git://github.com/manveru/ramaze.git
Click here to lend your support to: ramaze and make a donation at www.pledgie.com !
Don't reuse the Adapter alias for requireing adapter files
Failed for Mongrel, as it has different files for a single alias.
Jonathan Buch (author)
Thu Jul 03 14:31:05 -0700 2008
commit  c671b8cc5ea1ef2d0f83993e136a56673cdfa1f3
tree    f52f5a97920ba5fc9f841673c51cfaa82249cb86
parent  029b39ae46ba10b72f96242993518719ac783537
...
123
124
125
126
127
 
 
128
129
130
131
132
133
134
135
136
 
 
137
138
139
...
123
124
125
 
 
126
127
128
129
130
131
132
 
 
 
 
133
134
135
136
137
0
@@ -123,17 +123,15 @@ module Ramaze
0
         case name
0
         when String, Symbol
0
           name = name.to_s
0
-          name = self[alias_key][name] || name
0
-          find_require(name, mod, path)
0
+          class_name = self[alias_key][name] || name
0
+          find_require(name, class_name, mod, path)
0
         else
0
           name
0
         end
0
       end
0
 
0
-      def find_require(name, mod, path)
0
-        class_name = name.to_s
0
-        file_path = File.join(path, class_name.downcase)
0
-
0
+      def find_require(name, class_name, mod, path)
0
+        file_path = File.join(path, name)
0
         require(file_path) unless mod.const_defined?(class_name)
0
 
0
         mod.const_get(class_name)

Comments