2018-10-19 16:38:41 +01:00
|
|
|
require "requirement"
|
|
|
|
|
|
|
|
class XcodeRequirement < Requirement
|
|
|
|
module Compat
|
|
|
|
def initialize(tags = [])
|
|
|
|
@version = if tags.first.to_s.match?(/(\d\.)+\d/)
|
|
|
|
tags.shift
|
|
|
|
else
|
|
|
|
tags.find do |tag|
|
|
|
|
next unless tag.to_s.match?(/(\d\.)+\d/)
|
2019-01-08 19:13:46 +00:00
|
|
|
odisabled('depends_on :xcode => [..., "X.Y.Z"]')
|
2018-10-19 16:38:41 +01:00
|
|
|
tags.delete(tag)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
super(tags)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
prepend Compat
|
|
|
|
end
|