Class: VagrantPlugins::PuppetModules::Plugin
- Inherits:
-
Object
- Object
- VagrantPlugins::PuppetModules::Plugin
- Defined in:
- lib/vagrant-puppet-modules/plugin.rb
Constant Summary collapse
- VAGRANT_VERSION_REQUIREMENT =
'>= 1.1.0'
Class Method Summary collapse
-
.check_vagrant_version(*requirements) ⇒ Boolean
Returns true if the Vagrant version fulfills the requirements.
-
.check_vagrant_version! ⇒ Object
Verifies that the Vagrant version fulfills the requirements.
Class Method Details
.check_vagrant_version(*requirements) ⇒ Boolean
Returns true if the Vagrant version fulfills the requirements
15 16 17 18 19 |
# File 'lib/vagrant-puppet-modules/plugin.rb', line 15 def self.check_vagrant_version(*requirements) Gem::Requirement.new(*requirements).satisfied_by?( Gem::Version.new(Vagrant::VERSION) ) end |
.check_vagrant_version! ⇒ Object
Verifies that the Vagrant version fulfills the requirements
version
25 26 27 28 29 30 31 |
# File 'lib/vagrant-puppet-modules/plugin.rb', line 25 def self.check_vagrant_version! unless check_vagrant_version(VAGRANT_VERSION_REQUIREMENT) msg = "vagrant-puppet-modules requires Vagrant version " << VAGRANT_VERSION_REQUIREMENT $stderr.puts msg fail msg end end |