class HashiCorp::VagrantVMwareDesktop::Action::Compatibility

This modifies the env with some compatibility layers for prior versions of Vagrant.

Public Class Methods

new(app, env) click to toggle source
# File lib/vagrant-vmware-desktop/action/compatibility.rb, line 9
def initialize(app, env)
  @app = app
end

Public Instance Methods

call(env) click to toggle source
# File lib/vagrant-vmware-desktop/action/compatibility.rb, line 13
def call(env)
  return @app.call(env) if env[:_vmware_compatibility]

  if Vagrant::VERSION < "1.5.0"
    if env[:ui]
      # Create the new UI methods
      ui = env[:ui]
      def ui.detail(*args)
        self.info(*args)
      end

      def ui.output(*args)
        self.info(*args)
      end
    end
  end

  env[:_vmware_compatibility] = true
  @app.call(env)
end