2014-03-11 23:37:47 +00:00
|
|
|
module Vagrant
|
|
|
|
module Backports
|
|
|
|
class << self
|
2014-03-13 02:09:34 +00:00
|
|
|
def vagrant_1_2_or_later?
|
|
|
|
greater_than?('1.2.0')
|
|
|
|
end
|
|
|
|
|
2014-03-11 23:37:47 +00:00
|
|
|
def vagrant_1_3_or_later?
|
2014-03-13 02:09:34 +00:00
|
|
|
greater_than?('1.3.0')
|
2014-03-11 23:37:47 +00:00
|
|
|
end
|
2014-03-11 23:56:11 +00:00
|
|
|
|
2014-03-12 13:26:14 +00:00
|
|
|
def vagrant_1_4_or_later?
|
2014-03-13 02:09:34 +00:00
|
|
|
greater_than?('1.4.0')
|
2014-03-12 13:26:14 +00:00
|
|
|
end
|
|
|
|
|
2014-03-11 23:56:11 +00:00
|
|
|
def vagrant_1_5_or_later?
|
2014-03-13 02:09:34 +00:00
|
|
|
greater_than?('1.5.0')
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def greater_than?(version)
|
|
|
|
Gem::Version.new(Vagrant::VERSION) >= Gem::Version.new(version)
|
2014-03-11 23:56:11 +00:00
|
|
|
end
|
2014-03-11 23:37:47 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|