Merge pull request #5158 from MikeMcQuaid/compat-requirements-odeprecated
compat/requirements: add odeprecated.
This commit is contained in:
		
						commit
						4b7a0f9588
					
				@ -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
 | 
			
		||||
 | 
			
		||||
script:
 | 
			
		||||
  - brew test-bot
 | 
			
		||||
  - travis_wait 60 brew test-bot
 | 
			
		||||
 | 
			
		||||
notifications:
 | 
			
		||||
  slack: machomebrew:1XNF7p1JRCdBUuKaeSwsWEc1
 | 
			
		||||
 | 
			
		||||
@ -4,8 +4,7 @@ class X11Requirement < Requirement
 | 
			
		||||
  module Compat
 | 
			
		||||
    def initialize(tags = [])
 | 
			
		||||
      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
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -8,8 +8,7 @@ class XcodeRequirement < Requirement
 | 
			
		||||
      else
 | 
			
		||||
        tags.find do |tag|
 | 
			
		||||
          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)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user