Class: VagrantPlugins::PuppetInstall::Plugin
- Inherits:
-
Object
- Object
- VagrantPlugins::PuppetInstall::Plugin
- Defined in:
- lib/vagrant-puppet-install/plugin.rb
Constant Summary collapse
- VAGRANT_VERSION_REQUIREMENT =
'>= 1.1.0'.freeze
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
16 17 18 19 |
# File 'lib/vagrant-puppet-install/plugin.rb', line 16 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
is incompatible with the Vagrant version
25 26 27 28 29 30 31 32 33 |
# File 'lib/vagrant-puppet-install/plugin.rb', line 25 def self.check_vagrant_version! unless check_vagrant_version(VAGRANT_VERSION_REQUIREMENT) msg = I18n.t( 'vagrant-puppet_install.errors.vagrant_version', requirement: VAGRANT_VERSION_REQUIREMENT.inspect) $stderr.puts msg raise msg end end |