diff options
author | luislavena <luislavena@19e92222-5c0b-0410-8929-a290d50e31e9> | 2008-04-06 00:14:45 +0000 |
---|---|---|
committer | luislavena <luislavena@19e92222-5c0b-0410-8929-a290d50e31e9> | 2008-04-06 00:14:45 +0000 |
commit | 34d44f3b9cc76974315ca3e5e1800c4771bb7729 (patch) | |
tree | fd7a99779f992e0ccac199743f31048cbab35c3d | |
parent | 74edc38c9d3702a6fafbb67e190564b7f1422a28 (diff) | |
download | unicorn-34d44f3b9cc76974315ca3e5e1800c4771bb7729.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/branches/stable_1-2@1002 19e92222-5c0b-0410-8929-a290d50e31e9
-rw-r--r-- | projects/gem_plugin/lib/gem_plugin.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/projects/gem_plugin/lib/gem_plugin.rb b/projects/gem_plugin/lib/gem_plugin.rb index 4664aa1..782a990 100644 --- a/projects/gem_plugin/lib/gem_plugin.rb +++ b/projects/gem_plugin/lib/gem_plugin.rb @@ -131,11 +131,14 @@ module GemPlugin gem_dir = "" Gem.path.each do |gem_path| gem_dir = File.join(gem_path, "gems", path) - break if File.exists?(gem_dir) + break if File.exist?(gem_dir) end - require File.join(gem_dir, "lib", gem.name, "init.rb") - @gems[gem.name] = gem_dir + gem_init = File.join(gem_dir, "lib", gem.name, "init.rb") + if File.exist?(gem_init) + require gem_init + @gems[gem.name] = gem_dir + end end end |