Sha256: 1312252820d7f3464114e33845143c3ed398a04d2e95f0d13735355477b6e7b6

Contents?: true

Size: 516 Bytes

Versions: 8

Compression:

Stored size: 516 Bytes

Contents

require "log4r"

module VagrantPlugins
  module Vmpooler
    module Action
      # This deletes the running server, if there is one.
      class SuspendServer
        def initialize(app, env)
          @app    = app
          @logger = Log4r::Logger.new("vagrant_vmpooler::action::suspend_server")
        end

        def call(env)
          if env[:machine].id
            env[:ui].info(I18n.t("vagrant_vmpooler.suspending_server"))

          end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vagrant-vmpooler-0.2.0 lib/vagrant-vmpooler/action/suspend_server.rb
vagrant-vmpooler-0.1.9 lib/vagrant-vmpooler/action/suspend_server.rb
vagrant-vmpooler-0.1.8 lib/vagrant-vmpooler/action/suspend_server.rb
vagrant-vmpooler-0.1.7 lib/vagrant-vmpooler/action/suspend_server.rb
vagrant-vmpooler-0.1.6 lib/vagrant-vmpooler/action/suspend_server.rb
vagrant-vmpooler-0.1.5 lib/vagrant-vmpooler/action/suspend_server.rb
vagrant-vmpooler-0.1.4 lib/vagrant-vmpooler/action/suspend_server.rb
vagrant-vmpooler-0.1.2 lib/vagrant-vmpooler/action/suspend_server.rb