Sha256: 78dcccdbdf86a9411efab72ea2b84089c165421ea93bc92cd28e2a501fa9c0d5

Contents?: true

Size: 384 Bytes

Versions: 40

Compression:

Stored size: 384 Bytes

Contents

module Vagrant
  module Action
    module VM
      class Suspend
        def initialize(app, env)
          @app = app
        end

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

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

Version data entries

40 entries across 40 versions & 6 rubygems

Version Path
bmhatfield-vagrant-1.0.10 lib/vagrant/action/vm/suspend.rb
bmhatfield-vagrant-1.0.9 lib/vagrant/action/vm/suspend.rb
bmhatfield-vagrant-1.0.8 lib/vagrant/action/vm/suspend.rb
bmhatfield-vagrant-1.0.7 lib/vagrant/action/vm/suspend.rb
vagrantup-1.0.7 lib/vagrant/action/vm/suspend.rb
vagrantup-1.0.6 lib/vagrant/action/vm/suspend.rb
vagrantup-1.0.5 lib/vagrant/action/vm/suspend.rb
vagrantup-1.0.4 lib/vagrant/action/vm/suspend.rb
vagrantup-1.0.3 lib/vagrant/action/vm/suspend.rb
vagrantup-1.0.2 lib/vagrant/action/vm/suspend.rb
vagrantup-1.0.1 lib/vagrant/action/vm/suspend.rb
vagrantup-1.0.0 lib/vagrant/action/vm/suspend.rb
vagrantup-0.9.99.2 lib/vagrant/action/vm/suspend.rb
vagrantup-0.9.99.1 lib/vagrant/action/vm/suspend.rb
vagrantup-0.9.7 lib/vagrant/action/vm/suspend.rb
vagrantup-0.9.6 lib/vagrant/action/vm/suspend.rb
vagrantup-0.9.5 lib/vagrant/action/vm/suspend.rb
vagrantup-0.9.4 lib/vagrant/action/vm/suspend.rb
vagrantup-0.9.3 lib/vagrant/action/vm/suspend.rb
vagrantup-0.9.2 lib/vagrant/action/vm/suspend.rb