lib/liberty_buildpack/repository/configured_item.rb
def find_item(component_name = nil, configuration)
          repository_root = repository_root(configuration)
          version         = version(configuration)

          yield version if block_given?

          index = index(repository_root)
          index.find_item version
        rescue => e
          if component_name.nil?
            raise e
          else
            raise RuntimeError, "#{component_name} error: #{e.message}", e.backtrace
          end
        end
# Finds an instance of the file based on the configuration and wraps any exceptions
# to identify the component.
#
# @param [String] component_name the name of the component
# @param [Hash] configuration the configuration
# @option configuration [String] :repository_root the root directory of the repository
# @option configuration [String] :version the version of the file to resolve
# @yield [Block] optional version_validator to yield to
# @return [String] the URI of the chosen version of the file
# @return [LibertyBuildpack::Util::TokenizedVersion] the chosen version of the file
Finds an instance of the file based on the configuration and wraps any exceptions
to identify the component.
Finds an instance of the file based on the configuration and wraps any exceptions to identify the component .
def find_item(component_name = nil, configuration)
          repository_root = repository_root(configuration)
          version         = version(configuration)
          yield version if block_given?
          index = index(repository_root)
          index.find_item version
        rescue => e
          if component_name.nil?
            raise e
          else
            raise RuntimeError, "#{component_name} error: #{e.message}", e.backtrace
          end
        end
def find_item ( component_name = nil , configuration ) repository_root = repository_root ( configuration ) version = version ( configuration ) yield version if block_given? index = index ( repository_root ) index . find_item version rescue => e if component_name . nil? raise e else raise RuntimeError , "#{component_name} error: #{e.message}" , e . backtrace end end
Finds an instance of the file based on the configuration and wraps any exceptions
to identify the component.
Finds an instance of the file based on the configuration and wraps any exceptions to identify the component .
the URI of the chosen version of the file
the URI of the chosen version of the file
String
the chosen version of the file
the chosen version of the file
LibertyBuildpack::Util::TokenizedVersion
component_name
configuration
:version the version of the file to resolve
: version the version of the file to resolve
configuration the configuration
configuration the configuration
]
optional version_validator to yield to
optional version_validator to yield to