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 # frozen_string_literal: true
module Utils module Utils
class Bottles module Bottles
class << self class << self
undef tag undef tag

View File

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

View File

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