Refactor and document Bottles.

This commit is contained in:
Markus Reiter 2020-08-19 07:50:49 +02:00
parent 8e78990176
commit b90290b18c
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