Class: BuildpackSupport::Rake::CachedArtifactFinder
- Inherits:
-
Object
- Object
- BuildpackSupport::Rake::CachedArtifactFinder
- Defined in:
- lib/buildpack_support/rake/cached_artifact_finder.rb
Overview
A class that finds all artifacts eligible to be cached
Instance Method Summary collapse
-
#find(configurations) ⇒ Array<String>
Returns a collection of URIs to be cached.
-
#initialize ⇒ CachedArtifactFinder
constructor
Creates a new instance.
Constructor Details
#initialize ⇒ CachedArtifactFinder
Creates a new instance
30 31 32 33 34 35 |
# File 'lib/buildpack_support/rake/cached_artifact_finder.rb', line 30 def initialize @cache = BuildpackSupport::Cache::DownloadCache.new @configuration_utils = BuildpackSupport::ConfigurationUtils.new @default_repository_root = @configuration_utils.load('repository')['default_repository_root'].chomp('/') @version_resolver = BuildpackSupport::Repository::WildcardVersionResolver.new end |
Instance Method Details
#find(configurations) ⇒ Array<String>
Returns a collection of URIs to be cached
41 42 43 44 45 46 47 |
# File 'lib/buildpack_support/rake/cached_artifact_finder.rb', line 41 def find(configurations) configurations.map do |configuration| index_uris(configuration).map do |index_uri| [index_uri, cached_artifact(configuration, index_uri)] end end.flatten end |