Merge pull request #5158 from MikeMcQuaid/compat-requirements-odeprecated

compat/requirements: add odeprecated.
This commit is contained in:
Mike McQuaid 2018-10-23 15:32:48 +01:00 committed by GitHub
commit 4b7a0f9588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View File

@ -24,7 +24,7 @@ before_install:
- travis_retry git clone --depth=1 https://github.com/Homebrew/homebrew-test-bot Library/Taps/homebrew/homebrew-test-bot - travis_retry git clone --depth=1 https://github.com/Homebrew/homebrew-test-bot Library/Taps/homebrew/homebrew-test-bot
script: script:
- brew test-bot - travis_wait 60 brew test-bot
notifications: notifications:
slack: machomebrew:1XNF7p1JRCdBUuKaeSwsWEc1 slack: machomebrew:1XNF7p1JRCdBUuKaeSwsWEc1

View File

@ -4,8 +4,7 @@ class X11Requirement < Requirement
module Compat module Compat
def initialize(tags = []) def initialize(tags = [])
if tags.first.to_s.match?(/(\d\.)+\d/) if tags.first.to_s.match?(/(\d\.)+\d/)
# TODO: deprecate when Homebrew/homebrew-core is fixed. odeprecated('depends_on :x11 => "X.Y.Z"')
# odeprecated('depends_on :x11 => "X.Y.Z"')
tags.shift tags.shift
end end

View File

@ -8,8 +8,7 @@ class XcodeRequirement < Requirement
else else
tags.find do |tag| tags.find do |tag|
next unless tag.to_s.match?(/(\d\.)+\d/) next unless tag.to_s.match?(/(\d\.)+\d/)
# TODO: deprecate when Homebrew/homebrew-core is fixed. odeprecated('depends_on :xcode => [..., "X.Y.Z"]')
# odeprecated('depends_on :xcode => [..., "X.Y.Z"]')
tags.delete(tag) tags.delete(tag)
end end
end end