Remove private_class_method from commands.
This commit is contained in:
parent
acaee035df
commit
c36f42ce95
@ -55,5 +55,4 @@ module Homebrew
|
||||
cmds << f.basename.to_s.sub(/\.(?:rb|sh)$/, "") if f.file?
|
||||
end
|
||||
end
|
||||
private_class_method :find_internal_commands
|
||||
end
|
||||
|
||||
@ -106,7 +106,6 @@ module Homebrew
|
||||
false
|
||||
end
|
||||
end
|
||||
private_class_method :retry_fetch?
|
||||
|
||||
def fetch_fetchable(f)
|
||||
f.clear_cache if ARGV.force?
|
||||
@ -127,5 +126,4 @@ module Homebrew
|
||||
|
||||
f.verify_download_integrity(download)
|
||||
end
|
||||
private_class_method :fetch_fetchable
|
||||
end
|
||||
|
||||
@ -86,5 +86,4 @@ module Homebrew
|
||||
end.join.strip
|
||||
end
|
||||
end
|
||||
private_class_method :command_help
|
||||
end
|
||||
|
||||
@ -78,5 +78,4 @@ module Homebrew
|
||||
rescue FormulaUnavailableError, TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError
|
||||
false
|
||||
end
|
||||
private_class_method :keg_only?
|
||||
end
|
||||
|
||||
@ -61,5 +61,4 @@ module Homebrew
|
||||
local = opts.fetch(:local, false)
|
||||
Pathname.new(local ? "~/Applications" : "/Applications").expand_path
|
||||
end
|
||||
private_class_method :linkapps_target
|
||||
end
|
||||
|
||||
@ -101,7 +101,6 @@ module Homebrew
|
||||
cd HOMEBREW_PREFIX
|
||||
exec "find", *args
|
||||
end
|
||||
private_class_method :list_unbrewed
|
||||
|
||||
def filtered_list
|
||||
names = if ARGV.named.empty?
|
||||
@ -128,7 +127,6 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
end
|
||||
private_class_method :filtered_list
|
||||
end
|
||||
|
||||
class PrettyListing
|
||||
|
||||
@ -29,5 +29,4 @@ module Homebrew
|
||||
args += ["--", path] unless path.nil?
|
||||
exec "git", "log", *args
|
||||
end
|
||||
private_class_method :git_log
|
||||
end
|
||||
|
||||
@ -80,10 +80,8 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
end
|
||||
private_class_method :print_tap_info
|
||||
|
||||
def print_tap_json(taps)
|
||||
puts Utils::JSON.dump(taps.map(&:to_hash))
|
||||
end
|
||||
private_class_method :print_tap_json
|
||||
end
|
||||
|
||||
@ -25,7 +25,6 @@ module Homebrew
|
||||
unlinkapps_from_dir(linkapps_target(local: false), opts)
|
||||
unlinkapps_from_dir(linkapps_target(local: true), opts)
|
||||
end
|
||||
private_class_method :unlinkapps_prune
|
||||
|
||||
def unlinkapps_from_dir(target_dir, opts = {})
|
||||
return unless target_dir.directory?
|
||||
@ -58,7 +57,6 @@ module Homebrew
|
||||
puts "Unlinked #{n} app#{plural(n)} from #{target_dir}"
|
||||
end
|
||||
end
|
||||
private_class_method :unlinkapps_from_dir
|
||||
|
||||
UNLINKAPPS_PREFIXES = %W[
|
||||
#{HOMEBREW_CELLAR}/
|
||||
@ -78,5 +76,4 @@ module Homebrew
|
||||
ARGV.kegs.any? { |keg| app.start_with?("#{keg}/", "#{keg.opt_record}/") }
|
||||
end
|
||||
end
|
||||
private_class_method :unlinkapps_unlink?
|
||||
end
|
||||
|
||||
@ -111,7 +111,6 @@ module Homebrew
|
||||
def shorten_revision(revision)
|
||||
Utils.popen_read("git", "-C", HOMEBREW_REPOSITORY, "rev-parse", "--short", revision).chomp
|
||||
end
|
||||
private_class_method :shorten_revision
|
||||
|
||||
def install_core_tap_if_necessary
|
||||
core_tap = CoreTap.instance
|
||||
@ -121,7 +120,6 @@ module Homebrew
|
||||
ENV["HOMEBREW_UPDATE_BEFORE_HOMEBREW_HOMEBREW_CORE"] = revision
|
||||
ENV["HOMEBREW_UPDATE_AFTER_HOMEBREW_HOMEBREW_CORE"] = revision
|
||||
end
|
||||
private_class_method :install_core_tap_if_necessary
|
||||
|
||||
def migrate_legacy_cache_if_necessary
|
||||
legacy_cache = Pathname.new "/Library/Caches/Homebrew"
|
||||
@ -176,7 +174,6 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
end
|
||||
private_class_method :migrate_legacy_cache_if_necessary
|
||||
|
||||
def migrate_legacy_repository_if_necessary
|
||||
return unless HOMEBREW_PREFIX.to_s == "/usr/local"
|
||||
@ -295,7 +292,6 @@ module Homebrew
|
||||
EOS
|
||||
$stderr.puts e.backtrace
|
||||
end
|
||||
private_class_method :migrate_legacy_repository_if_necessary
|
||||
|
||||
def link_completions_and_docs(repository = HOMEBREW_REPOSITORY)
|
||||
command = "brew update"
|
||||
@ -313,7 +309,6 @@ module Homebrew
|
||||
#{e}
|
||||
EOS
|
||||
end
|
||||
private_class_method :link_completions_and_docs
|
||||
end
|
||||
|
||||
class Reporter
|
||||
|
||||
@ -44,7 +44,6 @@ module Homebrew
|
||||
cask_markup = (HOMEBREW_LIBRARY/"Homebrew/manpages/brew-cask.1.md").read
|
||||
convert_man_page(cask_markup, TARGET_MAN_PATH/"brew-cask.1")
|
||||
end
|
||||
private_class_method :regenerate_man_pages
|
||||
|
||||
def path_glob_commands(glob)
|
||||
Pathname.glob(glob)
|
||||
@ -57,7 +56,6 @@ module Homebrew
|
||||
end
|
||||
.reject { |s| s.strip.empty? || s.include?("@hide_from_man_page") }
|
||||
end
|
||||
private_class_method :path_glob_commands
|
||||
|
||||
def build_man_page
|
||||
template = (SOURCE_PATH/"brew.1.md.erb").read
|
||||
@ -75,13 +73,11 @@ module Homebrew
|
||||
|
||||
ERB.new(template, nil, ">").result(variables.instance_eval { binding })
|
||||
end
|
||||
private_class_method :build_man_page
|
||||
|
||||
def sort_key_for_path(path)
|
||||
# Options after regular commands (`~` comes after `z` in ASCII table).
|
||||
path.basename.to_s.sub(/\.(rb|sh)$/, "").sub(/^--/, "~~")
|
||||
end
|
||||
private_class_method :sort_key_for_path
|
||||
|
||||
def convert_man_page(markup, target)
|
||||
manual = target.basename(".1")
|
||||
@ -114,7 +110,6 @@ module Homebrew
|
||||
target.atomic_write ronn.read
|
||||
end
|
||||
end
|
||||
private_class_method :convert_man_page
|
||||
|
||||
def target_path_to_format(target)
|
||||
case target.basename
|
||||
@ -124,5 +119,4 @@ module Homebrew
|
||||
odie "Failed to infer output format from '#{target.basename}'."
|
||||
end
|
||||
end
|
||||
private_class_method :target_path_to_format
|
||||
end
|
||||
|
||||
@ -257,12 +257,10 @@ module Homebrew
|
||||
end
|
||||
published
|
||||
end
|
||||
private_class_method :publish_changed_formula_bottles
|
||||
|
||||
def pull_patch(url, description = nil)
|
||||
PatchPuller.new(url, description).pull_patch
|
||||
end
|
||||
private_class_method :pull_patch
|
||||
|
||||
class PatchPuller
|
||||
attr_reader :base_url
|
||||
@ -342,7 +340,6 @@ module Homebrew
|
||||
end
|
||||
{ files: files, formulae: formulae, others: others }
|
||||
end
|
||||
private_class_method :files_changed_in_patch
|
||||
|
||||
# Get current formula versions without loading formula definition in this process
|
||||
# Returns info as a hash (type => version), for pull.rb's internal use
|
||||
@ -359,7 +356,6 @@ module Homebrew
|
||||
end
|
||||
versions
|
||||
end
|
||||
private_class_method :current_versions_from_info_external
|
||||
|
||||
def subject_for_bump(formula, old, new)
|
||||
if old[:nonexistent]
|
||||
@ -399,12 +395,10 @@ module Homebrew
|
||||
end
|
||||
subject
|
||||
end
|
||||
private_class_method :subject_for_bump
|
||||
|
||||
def pbcopy(text)
|
||||
Utils.popen_write("pbcopy") { |io| io.write text }
|
||||
end
|
||||
private_class_method :pbcopy
|
||||
|
||||
# Publishes the current bottle files for a given formula to Bintray
|
||||
def publish_bottle_file_on_bintray(f, creds)
|
||||
@ -421,7 +415,6 @@ module Homebrew
|
||||
"-d", '{"publish_wait_for_secs": 0}',
|
||||
"https://api.bintray.com/content/homebrew/#{repo}/#{package}/#{version}/publish"
|
||||
end
|
||||
private_class_method :publish_bottle_file_on_bintray
|
||||
|
||||
# Formula info drawn from an external "brew info --json" call
|
||||
class FormulaInfoFromJson
|
||||
@ -582,5 +575,4 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
end
|
||||
private_class_method :verify_bintray_published
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user