Sha256: 6b2454f91c347b01c5b9e7479efbf2abcb8d3e0ee25d0bb998b17d7b2e145bdf

Contents?: true

Size: 419 Bytes

Versions: 13

Compression:

Stored size: 419 Bytes

Contents

module VagrantPlugins
  module ManagedServers
    module Action
      # This can be used with "Call" built-in to check if the machine
      # is created and branch in the middleware.
      class IsReachable
        def initialize(app, env)
          @app = app
        end

        def call(env)
          env[:result] = env[:machine].communicate.ready?
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
vagrant-managed-servers-0.8.0 lib/vagrant-managed-servers/action/is_reachable.rb
vagrant-managed-servers-0.7.1 lib/vagrant-managed-servers/action/is_reachable.rb
vagrant-managed-servers-0.7.0 lib/vagrant-managed-servers/action/is_reachable.rb
vagrant-managed-servers-0.6.2 lib/vagrant-managed-servers/action/is_reachable.rb
vagrant-managed-servers-0.6.1 lib/vagrant-managed-servers/action/is_reachable.rb
vagrant-managed-servers-0.6.0 lib/vagrant-managed-servers/action/is_reachable.rb
vagrant-managed-servers-0.5.1 lib/vagrant-managed-servers/action/is_reachable.rb
vagrant-managed-servers-0.5.0 lib/vagrant-managed-servers/action/is_reachable.rb
vagrant-managed-servers-0.4.1 lib/vagrant-managed-servers/action/is_reachable.rb
vagrant-managed-servers-0.4.0 lib/vagrant-managed-servers/action/is_reachable.rb
vagrant-managed-servers-0.3.0 lib/vagrant-managed-servers/action/is_reachable.rb
vagrant-managed-servers-0.2.0 lib/vagrant-managed-servers/action/is_reachable.rb
vagrant-managed-servers-0.1.0 lib/vagrant-managed-servers/action/is_reachable.rb