Class: Gem::SourceIndex
Instance Method Summary collapse
-
#add_spec(gem_spec) ⇒ Object
Overwrite this so that a gem of the same name and version won’t push one from the gems directory out entirely.
Instance Method Details
#add_spec(gem_spec) ⇒ Object
Overwrite this so that a gem of the same name and version won’t push one from the gems directory out entirely.
13 14 15 16 17 18 19 20 21 |
# File 'lib/extlib/rubygems.rb', line 13 def add_spec(gem_spec) unless gem_spec.instance_variable_get("@loaded_from") && @gems[gem_spec.full_name].is_a?(Gem::Specification) && @gems[gem_spec.full_name].installation_path == File.join(defined?(Merb) && Merb.respond_to?(:root) ? Merb.root : Dir.pwd,"gems") @gems[gem_spec.full_name] = gem_spec end end |