Merge pull request #8452 from reitermarkus/document-bottles

Refactor and document `Bottles`.
This commit is contained in:
Markus Reiter 2020-08-23 05:30:43 +02:00 committed by GitHub
commit 129fd33a62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
module Utils
class Bottles
module Bottles
class << self
undef tag

View File

@ -3,7 +3,7 @@
module Utils
include Kernel
class Bottles
module Bottles
end
module Link

View File

@ -3,7 +3,10 @@
require "tab"
module Utils
class Bottles
# Helper functions for bottles.
#
# @api private
module Bottles
class << self
def tag
@tag ||= "#{ENV["HOMEBREW_PROCESSOR"]}_#{ENV["HOMEBREW_SYSTEM"]}".downcase.to_sym
@ -69,7 +72,8 @@ module Utils
end
end
class Bintray
# Helper functions for bottles hosted on Bintray.
module Bintray
def self.package(formula_name)
package_name = formula_name.to_s.dup
package_name.tr!("+", "x")
@ -86,6 +90,7 @@ module Utils
end
end
# Collector for bottles specifications.
class Collector
extend Forwardable