Sha256: d8b17b96043a41a3f7476c7ffe9249aae16307de384a373a02645cf058b6a4c5

Contents?: true

Size: 545 Bytes

Versions: 64

Compression:

Stored size: 545 Bytes

Contents

module Vagrant
  module Action
    module Builtin
      # This middleware simply outputs a message to the UI.
      class Message
        def initialize(app, env, message, **opts)
          @app     = app
          @message = message
          @opts    = opts
        end

        def call(env)
          if !@opts[:post]
            env[:ui].output(@message)
          end

          @app.call(env)

          if @opts[:post]
            env[:ui].output(@message)
          end
        end
      end
    end
  end
end

Version data entries

64 entries across 57 versions & 8 rubygems

Version Path
vagrant-unbundled-2.2.0.0 lib/vagrant/action/builtin/message.rb
vagrant-unbundled-2.1.4.0 lib/vagrant/action/builtin/message.rb
vagrant-unbundled-2.1.2.0 lib/vagrant/action/builtin/message.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/lib/vagrant/action/builtin/message.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/lib/vagrant/action/builtin/message.rb
vagrant-packet-0.1.2 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/lib/vagrant/action/builtin/message.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/lib/vagrant/action/builtin/message.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/lib/vagrant/action/builtin/message.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/lib/vagrant/action/builtin/message.rb
vagrant-unbundled-2.1.1.0 lib/vagrant/action/builtin/message.rb
vagrant-unbundled-2.0.4.0 lib/vagrant/action/builtin/message.rb
vagrant-unbundled-2.0.3.0 lib/vagrant/action/builtin/message.rb
vagrant-aws-detiber-0.7.2.pre.4 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/lib/vagrant/action/builtin/message.rb
vagrant-aws-detiber-0.7.2.pre.3 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/lib/vagrant/action/builtin/message.rb
vagrant-aws-detiber-0.7.2.pre.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-419afb4dcffe/lib/vagrant/action/builtin/message.rb
vagrant-unbundled-2.0.2.0 lib/vagrant/action/builtin/message.rb
vagrant-unbundled-2.0.1.0 lib/vagrant/action/builtin/message.rb
vagrant-aws-mkubenka-0.7.2.pre.22 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-f3fdbf414272/lib/vagrant/action/builtin/message.rb
vagrant-aws-mkubenka-0.7.2.pre.16 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-1ee58c40e3f5/lib/vagrant/action/builtin/message.rb
vagrant-unbundled-2.0.0.1 lib/vagrant/action/builtin/message.rb