class Bundler::ParallelInstaller
Attributes
size[R]
Public Class Methods
call(*args)
click to toggle source
# File bundler/installer/parallel_installer.rb, line 66 def self.call(*args) new(*args).call end
new(installer, all_specs, size, standalone, force)
click to toggle source
# File bundler/installer/parallel_installer.rb, line 72 def initialize(installer, all_specs, size, standalone, force) @installer = installer @size = size @standalone = standalone @force = force @specs = all_specs.map {|s| SpecInstallation.new(s) } @spec_set = all_specs @rake = @specs.find {|s| s.name == "rake" } end
Public Instance Methods
call()
click to toggle source
# File bundler/installer/parallel_installer.rb, line 82 def call if @rake do_install(@rake, 0) Gem::Specification.reset end if @size > 1 install_with_worker else install_serially end check_for_unmet_dependencies handle_error if failed_specs.any? @specs ensure worker_pool && worker_pool.stop end
check_for_unmet_dependencies()
click to toggle source
# File bundler/installer/parallel_installer.rb, line 102 def check_for_unmet_dependencies unmet_dependencies = @specs.map do |s| [ s, s.dependencies.reject {|dep| @specs.any? {|spec| dep.matches_spec?(spec.spec) } }, ] end.reject {|a| a.last.empty? } return if unmet_dependencies.empty? warning = [] warning << "Your lockfile doesn't include a valid resolution." warning << "You can fix this by regenerating your lockfile or manually editing the bad locked gems to a version that satisfies all dependencies." warning << "The unmet dependencies are:" unmet_dependencies.each do |spec, unmet_spec_dependencies| unmet_spec_dependencies.each do |unmet_spec_dependency| found = @specs.find {|s| s.name == unmet_spec_dependency.name && !unmet_spec_dependency.matches_spec?(s.spec) } warning << "* #{unmet_spec_dependency}, dependency of #{spec.full_name}, unsatisfied by #{found.full_name}" end end Bundler.ui.warn(warning.join("\n")) end