Sha256: 1746b3f32e511dafa9b425f1d0a5f118daefd6a1dde5e52a40bc2cadf95fb367

Contents?: true

Size: 420 Bytes

Versions: 31

Compression:

Stored size: 420 Bytes

Contents

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

        def call(env)
          if env[:machine].state.id == :running
            env[:ui].info I18n.t('vagrant.actions.vm.suspend.suspending')
            env[:machine].provider.driver.suspend
          end

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

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
vagrant-parallels-2.4.2 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.4.1 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.4.0 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.3.1 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.3.0 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.2.6 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.2.5 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.2.4 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.2.3 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.2.2 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.2.1 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.2.0 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.1.0 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.0.1 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-2.0.0 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.7.8 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.7.7 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.7.6 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.7.5 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.7.4 lib/vagrant-parallels/action/suspend.rb