Sha256: de197016133159419a3d2947e24dcda81cadffc030e8463b17aebae1227676ca

Contents?: true

Size: 429 Bytes

Versions: 30

Compression:

Stored size: 429 Bytes

Contents

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

        def call(env)
          if env[:machine].provider.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

30 entries across 30 versions & 1 rubygems

Version Path
vagrant-parallels-1.0.8 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.0.7 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.0.6 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.0.6.rc1 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.0.5 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.0.4 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.0.3 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.0.2 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.0.1 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-1.0.0 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-0.2.2 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-0.2.2.rc1 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-0.2.1 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-0.2.0 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-0.1.3 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-0.1.2 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-0.1.1 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-0.1.0 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-0.0.9 lib/vagrant-parallels/action/suspend.rb
vagrant-parallels-0.0.8 lib/vagrant-parallels/action/suspend.rb