method
resolve_dependencies
v2_4_6 -
Show latest stable
-
0 notes -
Class: DependencyInstaller
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
resolve_dependencies(dep_or_name, version)
public
Hide source
# File lib/rubygems/dependency_installer.rb, line 433 def resolve_dependencies dep_or_name, version # :nodoc: request_set = Gem::RequestSet.new request_set.development = @development request_set.development_shallow = @dev_shallow request_set.soft_missing = @force request_set.prerelease = @prerelease request_set.remote = false unless consider_remote? installer_set = Gem::Resolver::InstallerSet.new @domain installer_set.ignore_installed = @only_install_dir if consider_local? if dep_or_name =~ /\.gem$/ and File.file? dep_or_name then src = Gem::Source::SpecificFile.new dep_or_name installer_set.add_local dep_or_name, src.spec, src version = src.spec.version if version == Gem::Requirement.default elsif dep_or_name =~ /\.gem$/ then Dir[dep_or_name].each do |name| begin src = Gem::Source::SpecificFile.new name installer_set.add_local dep_or_name, src.spec, src rescue Gem::Package::FormatError end end # else This is a dependency. InstallerSet handles this case end end dependency = if spec = installer_set.local?(dep_or_name) then Gem::Dependency.new spec.name, version elsif String === dep_or_name then Gem::Dependency.new dep_or_name, version else dep_or_name end dependency.prerelease = @prerelease request_set.import [dependency] installer_set.add_always_install dependency request_set.always_install = installer_set.always_install if @ignore_dependencies then installer_set.ignore_dependencies = true request_set.ignore_dependencies = true request_set.soft_missing = true end request_set.resolve installer_set @errors.concat request_set.errors request_set end