class ParallelInstaller::SpecInstallation
def all_dependencies
def all_dependencies @spec.dependencies end
def dependencies(all_spec_names)
Represents only the non-development dependencies, the ones that are
def dependencies(all_spec_names) @dependencies ||= begin deps = all_dependencies.reject {|dep| ignorable_dependency? dep } missing = deps.reject {|dep| all_spec_names.include? dep.name } if missing.size > 0 raise Bundler::LockfileError, "Your Gemfile.lock is corrupt. The following #{missing.size > 1 ? "gems are" : "gem is"} missing " \ "from the DEPENDENCIES section: '#{missing.map(&:name).join('\' \'')}'" end deps end end
def dependencies_installed?(all_specs)
Checks installed dependencies against spec's dependencies to make
def dependencies_installed?(all_specs) installed_specs = all_specs.select(&:installed?).map(&:name) dependencies(all_specs.map(&:name)).all? {|d| installed_specs.include? d.name } end
def enqueued?
def enqueued? state == :enqueued end
def has_post_install_message?
def has_post_install_message? !post_install_message.empty? end
def ignorable_dependency?(dep)
def ignorable_dependency?(dep) dep.type == :development || dep.name == @name end
def initialize(spec)
def initialize(spec) @spec = spec @name = spec.name @state = :none @post_install_message = "" end
def installed?
def installed? state == :installed end
def ready_to_enqueue?
def ready_to_enqueue? !installed? && !enqueued? end