Module: Homebrew::Bundle::TapDumper Private
- Defined in:
- bundle/tap_dumper.rb
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Class Method Summary collapse
- .dump ⇒ String private
- .reset! ⇒ void private
- .tap_names ⇒ Array<String> private
Class Method Details
.dump ⇒ String
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'bundle/tap_dumper.rb', line 15 def self.dump taps.map do |tap| remote = if tap.custom_remote? && (tap_remote = tap.remote) if (api_token = ENV.fetch("HOMEBREW_GITHUB_API_TOKEN", false).presence) # Replace the API token in the remote URL with interpolation. # Rubocop's warning here is wrong; we intentionally want to not # evaluate this string until the Brewfile is evaluated. # rubocop:disable Lint/InterpolationCheck tap_remote = tap_remote.gsub api_token, '#{ENV.fetch("HOMEBREW_GITHUB_API_TOKEN")}' # rubocop:enable Lint/InterpolationCheck end ", \"#{tap_remote}\"" end "tap \"#{tap.name}\"#{remote}" end.sort.uniq.join("\n") end |
.reset! ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
10 11 12 |
# File 'bundle/tap_dumper.rb', line 10 def self.reset! @taps = nil end |
.tap_names ⇒ Array<String>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
33 34 35 |
# File 'bundle/tap_dumper.rb', line 33 def self.tap_names taps.map(&:name) end |