Sha256: 43511588d7adf2c727ce80be5adfd91fb8ef4b8a0fa0d5e0cd0215cb1235feb8

Contents?: true

Size: 458 Bytes

Versions: 11

Compression:

Stored size: 458 Bytes

Contents

module VagrantPlugins
  module Parallels
    module Action
      class Resume
        def initialize(app, env)
          @app = app
        end

        def call(env)
          current_state = env[:machine].state.id

          if current_state == :suspended
            env[:ui].info I18n.t('vagrant.actions.vm.resume.resuming')
            env[:machine].provider.driver.resume
          end

          @app.call(env)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
vagrant-parallels-1.7.3 lib/vagrant-parallels/action/resume.rb
vagrant-parallels-1.7.2 lib/vagrant-parallels/action/resume.rb
vagrant-parallels-1.7.1 lib/vagrant-parallels/action/resume.rb
vagrant-parallels-1.7.0 lib/vagrant-parallels/action/resume.rb
vagrant-parallels-1.6.3 lib/vagrant-parallels/action/resume.rb
vagrant-parallels-1.6.2 lib/vagrant-parallels/action/resume.rb
vagrant-parallels-1.6.1 lib/vagrant-parallels/action/resume.rb
vagrant-parallels-1.6.0 lib/vagrant-parallels/action/resume.rb
vagrant-parallels-1.5.1 lib/vagrant-parallels/action/resume.rb
vagrant-parallels-1.5.0 lib/vagrant-parallels/action/resume.rb
vagrant-parallels-1.4.3 lib/vagrant-parallels/action/resume.rb