lib/plugin_manager.rb in plugin_manager-1.2 vs lib/plugin_manager.rb in plugin_manager-1.3
- old
+ new
@@ -61,10 +61,10 @@
def add_gem_plugin_source
all_gem_names = Gem::SourceIndex.from_installed_gems.map {|n, _| n}
redcar_plugin_gem_names = all_gem_names.select {|n| n =~ /^redcar-/}
definition_files = redcar_plugin_gem_names.map do |gem_name|
- [gem_name, ENV["GEM_HOME"] + "/gems/" + gem_name + "/plugin.rb"]
+ [gem_name, Gem.source_index.specification(gem_name).full_gem_path + "/plugin.rb"]
end
definition_files = definition_files.select do |name, definition_file|
File.exist?(definition_file)
end