Merge pull request #3652 from MikeMcQuaid/add-more-deprecations-disables
Add more deprecations, disable some existing ones.
This commit is contained in:
commit
892e1b5b4f
@ -1,6 +1,5 @@
|
|||||||
module HomebrewArgvExtension
|
module HomebrewArgvExtension
|
||||||
def build_32_bit?
|
def build_32_bit?
|
||||||
odeprecated "ARGV.build_32_bit?"
|
odisabled "ARGV.build_32_bit?"
|
||||||
include? "--32-bit"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,6 +5,6 @@ module SharedEnvExtension
|
|||||||
end
|
end
|
||||||
|
|
||||||
def java_cache
|
def java_cache
|
||||||
# odeprecated "ENV.java_cache"
|
odeprecated "ENV.java_cache"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
class BuildOptions
|
class BuildOptions
|
||||||
def build_32_bit?
|
def build_32_bit?
|
||||||
odeprecated "build.build_32_bit?"
|
odisabled "build.build_32_bit?"
|
||||||
include?("32-bit") && option_defined?("32-bit")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_bottle?
|
def build_bottle?
|
||||||
odeprecated "build.build_bottle?", "build.bottle?"
|
odisabled "build.build_bottle?", "build.bottle?"
|
||||||
bottle?
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -10,6 +10,7 @@ class DependencyCollector
|
|||||||
|
|
||||||
def parse_string_spec(spec, tags)
|
def parse_string_spec(spec, tags)
|
||||||
if (tag = tags.first) && LANGUAGE_MODULES.include?(tag)
|
if (tag = tags.first) && LANGUAGE_MODULES.include?(tag)
|
||||||
|
odeprecated "'depends_on :#{tag}'"
|
||||||
LanguageModuleRequirement.new(tag, spec, tags[1])
|
LanguageModuleRequirement.new(tag, spec, tags[1])
|
||||||
else
|
else
|
||||||
_parse_string_spec(spec, tags)
|
_parse_string_spec(spec, tags)
|
||||||
@ -23,7 +24,7 @@ class DependencyCollector
|
|||||||
when :clt
|
when :clt
|
||||||
odeprecated "'depends_on :clt'"
|
odeprecated "'depends_on :clt'"
|
||||||
when :tex
|
when :tex
|
||||||
# odeprecated "'depends_on :tex'"
|
odeprecated "'depends_on :tex'"
|
||||||
TeXRequirement.new(tags)
|
TeXRequirement.new(tags)
|
||||||
when :autoconf, :automake, :bsdmake, :libtool
|
when :autoconf, :automake, :bsdmake, :libtool
|
||||||
output_deprecation(spec, tags)
|
output_deprecation(spec, tags)
|
||||||
@ -39,7 +40,7 @@ class DependencyCollector
|
|||||||
output_deprecation("libtool", tags)
|
output_deprecation("libtool", tags)
|
||||||
Dependency.new("libtool", tags)
|
Dependency.new("libtool", tags)
|
||||||
when :apr
|
when :apr
|
||||||
# output_deprecation(spec, tags, "apr-util")
|
output_deprecation(spec, tags, "apr-util")
|
||||||
Dependency.new("apr-util", tags)
|
Dependency.new("apr-util", tags)
|
||||||
when :fortran
|
when :fortran
|
||||||
# output_deprecation(spec, tags, "gcc")
|
# output_deprecation(spec, tags, "gcc")
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
class Formula
|
class Formula
|
||||||
def fails_with_llvm(_msg = nil, _data = nil)
|
def fails_with_llvm(_msg = nil, _data = nil)
|
||||||
odeprecated "Formula#fails_with_llvm in install"
|
odisabled "Formula#fails_with_llvm in install"
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.fails_with_llvm(_msg = nil, _data = {})
|
def self.fails_with_llvm(_msg = nil, _data = {})
|
||||||
odeprecated "Formula.fails_with_llvm"
|
odisabled "Formula.fails_with_llvm"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
module FormulaCompat
|
module FormulaCompat
|
||||||
def x11_installed?
|
def x11_installed?
|
||||||
odeprecated "Formula#x11_installed?", "MacOS::X11.installed?"
|
odisabled "Formula#x11_installed?", "MacOS::X11.installed?"
|
||||||
MacOS::X11.installed?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def snow_leopard_64?
|
def snow_leopard_64?
|
||||||
odeprecated "Formula#snow_leopard_64?", "MacOS.prefer_64_bit?"
|
odisabled "Formula#snow_leopard_64?", "MacOS.prefer_64_bit?"
|
||||||
MacOS.prefer_64_bit?
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -15,48 +13,40 @@ class Formula
|
|||||||
extend FormulaCompat
|
extend FormulaCompat
|
||||||
|
|
||||||
def std_cmake_parameters
|
def std_cmake_parameters
|
||||||
odeprecated "Formula#std_cmake_parameters", "Formula#std_cmake_args"
|
odisabled "Formula#std_cmake_parameters", "Formula#std_cmake_args"
|
||||||
"-DCMAKE_INSTALL_PREFIX='#{prefix}' -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def cxxstdlib_check(check_type)
|
def cxxstdlib_check(_)
|
||||||
odeprecated "Formula#cxxstdlib_check in install",
|
odisabled "Formula#cxxstdlib_check in install",
|
||||||
"Formula.cxxstdlib_check outside install"
|
"Formula.cxxstdlib_check outside install"
|
||||||
self.class.cxxstdlib_check check_type
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.bottle_sha1(*)
|
def self.bottle_sha1(*)
|
||||||
odeprecated "Formula.bottle_sha1"
|
odisabled "Formula.bottle_sha1"
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.all
|
def self.all
|
||||||
odeprecated "Formula.all", "Formula.map"
|
odisabled "Formula.all", "Formula.map"
|
||||||
map
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.canonical_name(name)
|
def self.canonical_name(_)
|
||||||
odeprecated "Formula.canonical_name", "Formulary.canonical_name"
|
odisabled "Formula.canonical_name", "Formulary.canonical_name"
|
||||||
Formulary.canonical_name(name)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.class_s(name)
|
def self.class_s(_)
|
||||||
odeprecated "Formula.class_s", "Formulary.class_s"
|
odisabled "Formula.class_s", "Formulary.class_s"
|
||||||
Formulary.class_s(name)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.factory(name)
|
def self.factory(_)
|
||||||
odeprecated "Formula.factory", "Formulary.factory"
|
odisabled "Formula.factory", "Formulary.factory"
|
||||||
Formulary.factory(name)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.require_universal_deps
|
def self.require_universal_deps
|
||||||
odeprecated "Formula.require_universal_deps"
|
odisabled "Formula.require_universal_deps"
|
||||||
define_method(:require_universal_deps?) { true }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.path(name)
|
def self.path(_)
|
||||||
odeprecated "Formula.path", "Formulary.core_path"
|
odisabled "Formula.path", "Formulary.core_path"
|
||||||
Formulary.core_path(name)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
DATA = :DATA
|
DATA = :DATA
|
||||||
@ -67,20 +57,18 @@ class Formula
|
|||||||
{}
|
{}
|
||||||
end
|
end
|
||||||
|
|
||||||
def python(_options = {}, &_block)
|
def python(_options = {}, &_)
|
||||||
odeprecated "Formula#python"
|
odisabled "Formula#python"
|
||||||
yield if block_given?
|
|
||||||
PythonRequirement.new
|
|
||||||
end
|
end
|
||||||
alias python2 python
|
alias python2 python
|
||||||
alias python3 python
|
alias python3 python
|
||||||
|
|
||||||
def startup_plist
|
def startup_plist
|
||||||
odeprecated "Formula#startup_plist", "Formula#plist"
|
odisabled "Formula#startup_plist", "Formula#plist"
|
||||||
end
|
end
|
||||||
|
|
||||||
def rake(*args)
|
def rake(*args)
|
||||||
# odeprecated "FileUtils#rake", "system \"rake\""
|
odeprecated "FileUtils#rake", "system \"rake\""
|
||||||
system "rake", *args
|
system "rake", *args
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,47 +1,23 @@
|
|||||||
class ScriptFileFormula < Formula
|
class ScriptFileFormula < Formula
|
||||||
def install
|
def install
|
||||||
odeprecated "ScriptFileFormula#install", "Formula#install"
|
odisabled "ScriptFileFormula#install", "Formula#install"
|
||||||
bin.install Dir["*"]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class GithubGistFormula < ScriptFileFormula
|
class GithubGistFormula < ScriptFileFormula
|
||||||
def self.url(val)
|
def self.url(_val)
|
||||||
odeprecated "GithubGistFormula.url", "Formula.url"
|
odisabled "GithubGistFormula.url", "Formula.url"
|
||||||
super
|
|
||||||
version File.basename(File.dirname(val))[0, 6]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# This formula serves as the base class for several very similar
|
|
||||||
# formulae for Amazon Web Services related tools.
|
|
||||||
class AmazonWebServicesFormula < Formula
|
class AmazonWebServicesFormula < Formula
|
||||||
# Use this method to perform a standard install for Java-based tools,
|
|
||||||
# keeping the .jars out of HOMEBREW_PREFIX/lib
|
|
||||||
def install
|
def install
|
||||||
odeprecated "AmazonWebServicesFormula#install", "Formula#install"
|
odisabled "AmazonWebServicesFormula#install", "Formula#install"
|
||||||
|
|
||||||
rm Dir["bin/*.cmd"] # Remove Windows versions
|
|
||||||
libexec.install Dir["*"]
|
|
||||||
bin.install_symlink Dir["#{libexec}/bin/*"] - ["#{libexec}/bin/service"]
|
|
||||||
end
|
end
|
||||||
alias standard_install install
|
alias standard_install install
|
||||||
|
|
||||||
# Use this method to generate standard caveats.
|
# Use this method to generate standard caveats.
|
||||||
def standard_instructions(home_name, home_value = libexec)
|
def standard_instructions(_, _)
|
||||||
odeprecated "AmazonWebServicesFormula#standard_instructions", "Formula#caveats"
|
odisabled "AmazonWebServicesFormula#standard_instructions", "Formula#caveats"
|
||||||
|
|
||||||
<<~EOS
|
|
||||||
Before you can use these tools you must export some variables to your $SHELL.
|
|
||||||
|
|
||||||
To export the needed variables, add them to your dotfiles.
|
|
||||||
* On Bash, add them to `~/.bash_profile`.
|
|
||||||
* On Zsh, add them to `~/.zprofile` instead.
|
|
||||||
|
|
||||||
export JAVA_HOME="$(/usr/libexec/java_home)"
|
|
||||||
export AWS_ACCESS_KEY="<Your AWS Access ID>"
|
|
||||||
export AWS_SECRET_KEY="<Your AWS Secret Key>"
|
|
||||||
export #{home_name}="#{home_value}"
|
|
||||||
EOS
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -3,8 +3,7 @@ module Homebrew
|
|||||||
|
|
||||||
def method_missing(method, *args, &block)
|
def method_missing(method, *args, &block)
|
||||||
if instance_methods.include?(method)
|
if instance_methods.include?(method)
|
||||||
odeprecated "#{self}##{method}", "'module_function' or 'def self.#{method}' to convert it to a class method"
|
odisabled "#{self}##{method}", "'module_function' or 'def self.#{method}' to convert it to a class method"
|
||||||
return instance_method(method).bind(self).call(*args, &block)
|
|
||||||
end
|
end
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
@ -4,46 +4,24 @@ module Gpg
|
|||||||
module_function
|
module_function
|
||||||
|
|
||||||
def executable
|
def executable
|
||||||
|
odeprecated "Gpg.executable", 'which "gpg"'
|
||||||
which "gpg"
|
which "gpg"
|
||||||
end
|
end
|
||||||
|
|
||||||
def available?
|
def available?
|
||||||
|
odeprecated "Gpg.available?", 'which "gpg"'
|
||||||
File.executable?(executable.to_s)
|
File.executable?(executable.to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_test_key(path)
|
def create_test_key(_)
|
||||||
odie "No GPG present to test against!" unless available?
|
odeprecated "Gpg.create_test_key"
|
||||||
|
|
||||||
(path/"batch.gpg").write <<~EOS
|
|
||||||
Key-Type: RSA
|
|
||||||
Key-Length: 2048
|
|
||||||
Subkey-Type: RSA
|
|
||||||
Subkey-Length: 2048
|
|
||||||
Name-Real: Testing
|
|
||||||
Name-Email: testing@foo.bar
|
|
||||||
Expire-Date: 1d
|
|
||||||
%no-protection
|
|
||||||
%commit
|
|
||||||
EOS
|
|
||||||
system executable, "--batch", "--gen-key", "batch.gpg"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def cleanup_test_processes!
|
def cleanup_test_processes!
|
||||||
odie "No GPG present to test against!" unless available?
|
odeprecated "Gpg.cleanup_test_processes!"
|
||||||
|
|
||||||
gpgconf = Pathname.new(executable).parent/"gpgconf"
|
|
||||||
|
|
||||||
system gpgconf, "--kill", "gpg-agent"
|
|
||||||
system gpgconf, "--homedir", "keyrings/live", "--kill",
|
|
||||||
"gpg-agent"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def test(path)
|
def test(_)
|
||||||
create_test_key(path)
|
odeprecated "Gpg.test"
|
||||||
begin
|
|
||||||
yield
|
|
||||||
ensure
|
|
||||||
cleanup_test_processes!
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,43 +1,35 @@
|
|||||||
module Hardware
|
module Hardware
|
||||||
class << self
|
class << self
|
||||||
def is_32_bit?
|
def is_32_bit?
|
||||||
odeprecated "Hardware.is_32_bit?", "Hardware::CPU.is_32_bit?"
|
odisabled "Hardware.is_32_bit?", "Hardware::CPU.is_32_bit?"
|
||||||
!CPU.is_64_bit?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_64_bit?
|
def is_64_bit?
|
||||||
odeprecated "Hardware.is_64_bit?", "Hardware::CPU.is_64_bit?"
|
odisabled "Hardware.is_64_bit?", "Hardware::CPU.is_64_bit?"
|
||||||
CPU.is_64_bit?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def bits
|
def bits
|
||||||
odeprecated "Hardware.bits", "Hardware::CPU.bits"
|
odisabled "Hardware.bits", "Hardware::CPU.bits"
|
||||||
Hardware::CPU.bits
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def cpu_type
|
def cpu_type
|
||||||
odeprecated "Hardware.cpu_type", "Hardware::CPU.type"
|
odisabled "Hardware.cpu_type", "Hardware::CPU.type"
|
||||||
Hardware::CPU.type
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def cpu_family
|
def cpu_family
|
||||||
odeprecated "Hardware.cpu_family", "Hardware::CPU.family"
|
odisabled "Hardware.cpu_family", "Hardware::CPU.family"
|
||||||
Hardware::CPU.family
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def intel_family
|
def intel_family
|
||||||
odeprecated "Hardware.intel_family", "Hardware::CPU.family"
|
odisabled "Hardware.intel_family", "Hardware::CPU.family"
|
||||||
Hardware::CPU.family
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def ppc_family
|
def ppc_family
|
||||||
odeprecated "Hardware.ppc_family", "Hardware::CPU.family"
|
odisabled "Hardware.ppc_family", "Hardware::CPU.family"
|
||||||
Hardware::CPU.family
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def processor_count
|
def processor_count
|
||||||
odeprecated "Hardware.processor_count", "Hardware::CPU.cores"
|
odisabled "Hardware.processor_count", "Hardware::CPU.cores"
|
||||||
Hardware::CPU.cores
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4,34 +4,16 @@ module Utils
|
|||||||
module JSON
|
module JSON
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
Error = Class.new(StandardError)
|
def load(_)
|
||||||
|
odisabled "Utils::JSON.load", "JSON.parse"
|
||||||
def load(str)
|
|
||||||
odeprecated "Utils::JSON.load", "JSON.parse"
|
|
||||||
::JSON.parse(str)
|
|
||||||
rescue ::JSON::ParserError => e
|
|
||||||
raise Error, e.message
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def dump(obj)
|
def dump(_)
|
||||||
odeprecated "Utils::JSON.dump", "JSON.generate"
|
odisabled "Utils::JSON.dump", "JSON.generate"
|
||||||
::JSON.generate(obj)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def stringify_keys(obj)
|
def stringify_keys(_)
|
||||||
odeprecated "Utils::JSON.stringify_keys"
|
odisabled "Utils::JSON.stringify_keys"
|
||||||
case obj
|
|
||||||
when Array
|
|
||||||
obj.map { |val| stringify_keys(val) }
|
|
||||||
when Hash
|
|
||||||
obj.inject({}) do |result, (key, val)|
|
|
||||||
key = key.respond_to?(:to_s) ? key.to_s : key
|
|
||||||
val = stringify_keys(val)
|
|
||||||
result.merge!(key => val)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
obj
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
class Keg
|
class Keg
|
||||||
def fname
|
def fname
|
||||||
odeprecated "Keg#fname", "Keg#name"
|
odisabled "Keg#fname", "Keg#name"
|
||||||
name
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -10,142 +10,115 @@ module OS
|
|||||||
module_function
|
module_function
|
||||||
|
|
||||||
def xcode_folder
|
def xcode_folder
|
||||||
odeprecated "MacOS.xcode_folder", "MacOS::Xcode.folder"
|
odisabled "MacOS.xcode_folder", "MacOS::Xcode.folder"
|
||||||
Xcode.folder
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def xcode_prefix
|
def xcode_prefix
|
||||||
odeprecated "MacOS.xcode_prefix", "MacOS::Xcode.prefix"
|
odisabled "MacOS.xcode_prefix", "MacOS::Xcode.prefix"
|
||||||
Xcode.prefix
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def xcode_installed?
|
def xcode_installed?
|
||||||
odeprecated "MacOS.xcode_installed?", "MacOS::Xcode.installed?"
|
odisabled "MacOS.xcode_installed?", "MacOS::Xcode.installed?"
|
||||||
Xcode.installed?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def xcode_version
|
def xcode_version
|
||||||
odeprecated "MacOS.xcode_version", "MacOS::Xcode.version"
|
odisabled "MacOS.xcode_version", "MacOS::Xcode.version"
|
||||||
Xcode.version
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def clt_installed?
|
def clt_installed?
|
||||||
odeprecated "MacOS.clt_installed?", "MacOS::CLT.installed?"
|
odisabled "MacOS.clt_installed?", "MacOS::CLT.installed?"
|
||||||
CLT.installed?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def clt_version?
|
def clt_version?
|
||||||
odeprecated "MacOS.clt_version?", "MacOS::CLT.version"
|
odisabled "MacOS.clt_version?", "MacOS::CLT.version"
|
||||||
CLT.version
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def x11_installed?
|
def x11_installed?
|
||||||
odeprecated "MacOS.x11_installed?", "MacOS::X11.installed?"
|
odisabled "MacOS.x11_installed?", "MacOS::X11.installed?"
|
||||||
X11.installed?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def x11_prefix
|
def x11_prefix
|
||||||
odeprecated "MacOS.x11_prefix", "MacOS::X11.prefix"
|
odisabled "MacOS.x11_prefix", "MacOS::X11.prefix"
|
||||||
X11.prefix
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def leopard?
|
def leopard?
|
||||||
odeprecated "MacOS.leopard?", "'MacOS.version == :leopard'"
|
odisabled "MacOS.leopard?", "'MacOS.version == :leopard'"
|
||||||
version == :leopard
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def snow_leopard?
|
def snow_leopard?
|
||||||
odeprecated "MacOS.snow_leopard?", "'MacOS.version >= :snow_leopard'"
|
odisabled "MacOS.snow_leopard?", "'MacOS.version >= :snow_leopard'"
|
||||||
version >= :snow_leopard
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def snow_leopard_or_newer?
|
def snow_leopard_or_newer?
|
||||||
odeprecated "MacOS.snow_leopard_or_newer?", "'MacOS.version >= :snow_leopard'"
|
odisabled "MacOS.snow_leopard_or_newer?", "'MacOS.version >= :snow_leopard'"
|
||||||
version >= :snow_leopard
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def lion?
|
def lion?
|
||||||
odeprecated "MacOS.lion?", "'MacOS.version >= :lion'"
|
odisabled "MacOS.lion?", "'MacOS.version >= :lion'"
|
||||||
version >= :lion
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def lion_or_newer?
|
def lion_or_newer?
|
||||||
odeprecated "MacOS.lion_or_newer?", "'MacOS.version >= :lion'"
|
odisabled "MacOS.lion_or_newer?", "'MacOS.version >= :lion'"
|
||||||
version >= :lion
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def mountain_lion?
|
def mountain_lion?
|
||||||
odeprecated "MacOS.mountain_lion?", "'MacOS.version >= :mountain_lion'"
|
odisabled "MacOS.mountain_lion?", "'MacOS.version >= :mountain_lion'"
|
||||||
version >= :mountain_lion
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def mountain_lion_or_newer?
|
def mountain_lion_or_newer?
|
||||||
odeprecated "MacOS.mountain_lion_or_newer?", "'MacOS.version >= :mountain_lion'"
|
odisabled "MacOS.mountain_lion_or_newer?", "'MacOS.version >= :mountain_lion'"
|
||||||
version >= :mountain_lion
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def macports_or_fink_installed?
|
def macports_or_fink_installed?
|
||||||
odeprecated "MacOS.macports_or_fink_installed?", "!MacOS.macports_or_fink.empty?"
|
odisabled "MacOS.macports_or_fink_installed?", "!MacOS.macports_or_fink.empty?"
|
||||||
!macports_or_fink.empty?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def locate(tool)
|
def locate(_)
|
||||||
odeprecated "MacOS.locate", "DevelopmentTools.locate"
|
odisabled "MacOS.locate", "DevelopmentTools.locate"
|
||||||
DevelopmentTools.locate(tool)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_cc
|
def default_cc
|
||||||
odeprecated "MacOS.default_cc", "DevelopmentTools.default_cc"
|
odisabled "MacOS.default_cc", "DevelopmentTools.default_cc"
|
||||||
DevelopmentTools.default_cc
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_compiler
|
def default_compiler
|
||||||
odeprecated "MacOS.default_compiler", "DevelopmentTools.default_compiler"
|
odisabled "MacOS.default_compiler", "DevelopmentTools.default_compiler"
|
||||||
DevelopmentTools.default_compiler
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def gcc_40_build_version
|
def gcc_40_build_version
|
||||||
odeprecated "MacOS.gcc_40_build_version", "DevelopmentTools.gcc_4_0_build_version"
|
odisabled "MacOS.gcc_40_build_version", "DevelopmentTools.gcc_4_0_build_version"
|
||||||
DevelopmentTools.gcc_4_0_build_version
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def gcc_4_0_build_version
|
def gcc_4_0_build_version
|
||||||
odeprecated "MacOS.gcc_4_0_build_version", "DevelopmentTools.gcc_4_0_build_version"
|
odisabled "MacOS.gcc_4_0_build_version", "DevelopmentTools.gcc_4_0_build_version"
|
||||||
DevelopmentTools.gcc_4_0_build_version
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def gcc_42_build_version
|
def gcc_42_build_version
|
||||||
odeprecated "MacOS.gcc_42_build_version", "DevelopmentTools.gcc_4_2_build_version"
|
odisabled "MacOS.gcc_42_build_version", "DevelopmentTools.gcc_4_2_build_version"
|
||||||
DevelopmentTools.gcc_4_2_build_version
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def gcc_build_version
|
def gcc_build_version
|
||||||
odeprecated "MacOS.gcc_build_version", "DevelopmentTools.gcc_4_2_build_version"
|
odisabled "MacOS.gcc_build_version", "DevelopmentTools.gcc_4_2_build_version"
|
||||||
DevelopmentTools.gcc_4_2_build_version
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def llvm_build_version
|
def llvm_build_version
|
||||||
odeprecated "MacOS.llvm_build_version"
|
odisabled "MacOS.llvm_build_version"
|
||||||
end
|
end
|
||||||
|
|
||||||
def clang_version
|
def clang_version
|
||||||
odeprecated "MacOS.clang_version", "DevelopmentTools.clang_version"
|
odisabled "MacOS.clang_version", "DevelopmentTools.clang_version"
|
||||||
DevelopmentTools.clang_version
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def clang_build_version
|
def clang_build_version
|
||||||
odeprecated "MacOS.clang_build_version", "DevelopmentTools.clang_build_version"
|
odisabled "MacOS.clang_build_version", "DevelopmentTools.clang_build_version"
|
||||||
DevelopmentTools.clang_build_version
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_apple_developer_tools?
|
def has_apple_developer_tools?
|
||||||
odeprecated "MacOS.has_apple_developer_tools?", "DevelopmentTools.installed?"
|
odisabled "MacOS.has_apple_developer_tools?", "DevelopmentTools.installed?"
|
||||||
DevelopmentTools.installed?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def release
|
def release
|
||||||
odeprecated "MacOS.release", "MacOS.version"
|
odisabled "MacOS.release", "MacOS.version"
|
||||||
version
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,17 +1,9 @@
|
|||||||
class Pathname
|
class Pathname
|
||||||
def cp(dst)
|
def cp(_)
|
||||||
odeprecated "Pathname#cp", "FileUtils.cp"
|
odisabled "Pathname#cp", "FileUtils.cp"
|
||||||
if file?
|
|
||||||
FileUtils.cp to_s, dst
|
|
||||||
else
|
|
||||||
FileUtils.cp_r to_s, dst
|
|
||||||
end
|
|
||||||
dst
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def chmod_R(perms)
|
def chmod_R(_)
|
||||||
odeprecated "Pathname#chmod_R", "FileUtils.chmod_R"
|
odisabled "Pathname#chmod_R", "FileUtils.chmod_R"
|
||||||
require "fileutils"
|
|
||||||
FileUtils.chmod_R perms, to_s
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
class BottleSpecification
|
class BottleSpecification
|
||||||
def revision(*args)
|
def revision(*)
|
||||||
odeprecated "BottleSpecification.revision", "BottleSpecification.rebuild"
|
odisabled "BottleSpecification.revision", "BottleSpecification.rebuild"
|
||||||
rebuild(*args)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
class Tab < OpenStruct
|
class Tab < OpenStruct
|
||||||
def build_32_bit?
|
def build_32_bit?
|
||||||
odeprecated "Tab.build_32_bit?"
|
odisabled "Tab.build_32_bit?"
|
||||||
include?("32-bit")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -2,7 +2,6 @@ require "tap"
|
|||||||
|
|
||||||
class Tap
|
class Tap
|
||||||
def core_formula_repository?
|
def core_formula_repository?
|
||||||
odeprecated "Tap#core_formula_repository?", "Tap#core_tap?"
|
odisabled "Tap#core_formula_repository?", "Tap#core_tap?"
|
||||||
core_tap?
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -2,17 +2,14 @@ module Tty
|
|||||||
module_function
|
module_function
|
||||||
|
|
||||||
def white
|
def white
|
||||||
odeprecated "Tty.white", "Tty.reset.bold"
|
odisabled "Tty.white", "Tty.reset.bold"
|
||||||
reset.bold
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def puts_columns(items)
|
def puts_columns(_)
|
||||||
odeprecated "puts_columns", "puts Formatter.columns"
|
odisabled "puts_columns", "puts Formatter.columns"
|
||||||
puts Formatter.columns(items)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def plural(n, s = "s")
|
def plural(_, _)
|
||||||
odeprecated "#plural", "Formatter.pluralize"
|
odisabled "#plural", "Formatter.pluralize"
|
||||||
(n == 1) ? "" : s
|
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
class Version
|
class Version
|
||||||
def slice(*args)
|
def slice(*)
|
||||||
odeprecated "Version#slice", "Version#to_s.slice"
|
odisabled "Version#slice", "Version#to_s.slice"
|
||||||
to_s.slice(*args)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4,8 +4,7 @@ module OS
|
|||||||
module_function
|
module_function
|
||||||
|
|
||||||
def provides_autotools?
|
def provides_autotools?
|
||||||
odeprecated "OS::Mac::Xcode.provides_autotools?"
|
odisabled "OS::Mac::Xcode.provides_autotools?"
|
||||||
version < "4.3"
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user