lib/liberty_buildpack/repository/version_resolver.rb
def matches?(tokenized_candidate_version, tokenized_version)
          (0..3).all? do |i|
            tokenized_candidate_version[i].nil? ||
              tokenized_candidate_version[i] == LibertyBuildpack::Util::TokenizedVersion::WILDCARD ||
              tokenized_candidate_version[i] == tokenized_version[i]
          end
        end
# Resolves a version from a collection of versions.  The +candidate_version+ must be structured like:
#   * up to three numeric components, followed by an optional string component
#   * the final component may be a +
# The resolution returns the maximum of the versions that match the candidate version
#
# @param [TokenizedVersion] candidate_version the version, possibly containing a wildcard, to resolve.  If
#                                             +nil+, substituted with +.
# @param [Array<String>] versions the collection of versions to resolve against
# @return [TokenizedVersion] the resolved version or nil if no matching version is found
Resolves a version from a collection of versions.  The +candidate_version+ must be structured like:
up to three numeric components, followed by an optional string component
the final component may be a +
The resolution returns the maximum of the versions that match the candidate version
Resolves a version from a collection of versions . The + candidate_version + must be structured like : up to three numeric components followed by an optional string component the final component may be a + The resolution returns the maximum of the versions that match the candidate version
def matches?(tokenized_candidate_version, tokenized_version)
          (0..3).all? do |i|
            tokenized_candidate_version[i].nil? ||
              tokenized_candidate_version[i] == LibertyBuildpack::Util::TokenizedVersion::WILDCARD ||
              tokenized_candidate_version[i] == tokenized_version[i]
          end
        end
def matches? ( tokenized_candidate_version , tokenized_version ) ( 0 .. 3 ) . all? do | i | tokenized_candidate_version [ i ] . nil? || tokenized_candidate_version [ i ] == LibertyBuildpack :: Util :: TokenizedVersion :: WILDCARD || tokenized_candidate_version [ i ] == tokenized_version [ i ] end end
Resolves a version from a collection of versions.
Resolves a version from a collection of versions .
the resolved version or nil if no matching version is found
the resolved version or nil if no matching version is found
TokenizedVersion
tokenized_candidate_version
tokenized_version
versions the collection of versions to resolve against
versions the collection of versions to resolve against