Class: ConfigBuilder::Action::VersionCheck
- Inherits:
-
Object
- Object
- ConfigBuilder::Action::VersionCheck
- Defined in:
- lib/config_builder/action/version_check.rb
Constant Summary collapse
- MINIMUM_VERSION =
'1.8.0'
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, env) ⇒ VersionCheck
constructor
A new instance of VersionCheck.
Constructor Details
#initialize(app, env) ⇒ VersionCheck
Returns a new instance of VersionCheck.
10 11 12 |
# File 'lib/config_builder/action/version_check.rb', line 10 def initialize(app, env) @app = app end |
Instance Method Details
#call(env) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/config_builder/action/version_check.rb', line 14 def call(env) unless Gem::Version.new(Vagrant::VERSION) > Gem::Version.new(MINIMUM_VERSION) env[:env].ui.warn I18n.t( 'config_builder.action.version_check.deprecated_vagrant_version', minimum_version: MINIMUM_VERSION, vagrant_version: Vagrant::VERSION ) end @app.call(env) end |