Sha256: 0e0c9a510f008505d571a0454978ef63ed025208398493bd6150682afe65e8cd

Contents?: true

Size: 511 Bytes

Versions: 2

Compression:

Stored size: 511 Bytes

Contents

# frozen_string_literal: true

module KeepUp
  # Set of dependencies with their current locked versions.
  class DependencySet
    attr_reader :dependencies

    def initialize(dependencies)
      @dependencies = dependencies
    end

    def find_specification_update(update)
      current_dependency = dependencies.find { |it| it.name == update.name }
      return if !current_dependency || current_dependency.matches_spec?(update)

      current_dependency.generalize_specification(update)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
keep_up-0.11.0 lib/keep_up/dependency_set.rb
keep_up-0.10.2 lib/keep_up/dependency_set.rb