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.
Parameters
- gem_spec<Gem::Specification>
-
The specification of the gem to add.
11 12 13 |
# File 'lib/merb-core/core_ext/rubygems.rb', line 11 def add_spec(gem_spec) @gems[gem_spec.full_name] = gem_spec unless @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") end |