GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of rails/rails
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/ddollar/rails.git
Raise in stubby/init.rb if it doesn't have access to directory or config.  
loaded_plugins is a set of plugin names (so it will be usable with 
multiple paths, gems, etc).

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2924 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
jeremy (author)
Mon Nov 07 10:06:44 -0800 2005
commit  e55426a798f6cd80f5a0f9a5937b90cc20341b72
tree    a86923106d33400dc7e3746a8f360cba97f841a8
parent  0ceb9150d5daa3afed4fcf7afa29216a8f7132a1
...
286
287
288
289
 
290
291
292
...
286
287
288
 
289
290
291
292
0
@@ -286,7 +286,7 @@ module Rails
0
       # Raises <tt>LoadError</tt> if the plugin is not found.
0
       def load_plugin(directory)
0
         name = File.basename(directory)
0
- return false if loaded_plugins.include?(directory)
0
+ return false if loaded_plugins.include?(name)
0
 
0
         # Catch nonexistent and empty plugins.
0
         raise LoadError, "No such plugin: #{directory}" unless plugin_path?(directory)
...
 
 
 
 
 
1
2
 
...
1
2
3
4
5
6
 
7
0
@@ -1,2 +1,7 @@
0
+# I have access to my directory and the Rails config.
0
+raise 'directory expected but undefined in init.rb' unless defined? directory
0
+raise 'config expected but undefined in init.rb' unless defined? config
0
+
0
+# My lib/ dir must be in the load path.
0
 require 'stubby_mixin'
0
-raise unless defined? StubbyMixin
0
+raise 'missing mixin from my lib/ dir' unless defined? StubbyMixin

Comments

    No one has commented yet.