lib/mixlib/install/backend/bintray.rb in mixlib-install-1.0.10 vs lib/mixlib/install/backend/bintray.rb in mixlib-install-1.0.11
- old
+ new
@@ -49,32 +49,11 @@
def endpoint
@endpoint ||= ENV.fetch("BINTRAY_ENDPOINT", ENDPOINT)
end
- # Create filtered list of artifacts
#
- # @return [Array<ArtifactInfo>] list of artifacts for the configured
- # channel, product name, and product version.
- # @return [ArtifactInfo] arifact info for the configured
- # channel, product name, product version and platform info
- #
- def info
- artifacts = bintray_artifacts
-
- if options.platform
- artifacts.select! do |a|
- a.platform == options.platform &&
- a.platform_version == options.platform_version &&
- a.architecture == options.architecture
- end
- end
-
- artifacts.length == 1 ? artifacts.first : artifacts
- end
-
- #
# Makes a GET request to bintray for the given path.
#
# @param [String] path
# "/api/v1/packages/chef" is prepended to the given path.
#
@@ -109,10 +88,10 @@
#
# Get artifacts for a given version, channel and product_name
#
# @return [Array<ArtifactInfo>] Array of info about found artifacts
#
- def bintray_artifacts
+ def available_artifacts
version = options.latest_version? ? latest_version : options.product_version
begin
results = bintray_get("#{options.channel}/#{options.product_name}/versions/#{version}/files")
rescue Net::HTTPServerException => e
if e.message =~ /404 "Not Found"/