Sha256: b1cd60b7f735faba1005b886f546a6be8780f3df6b506ab7968c7c7ce3bf6d50

Contents?: true

Size: 600 Bytes

Versions: 82

Compression:

Stored size: 600 Bytes

Contents

module Vagrant
  module Action
    module Builtin
      # This middleware class allows you to modify the environment hash
      # in the middle of a middleware sequence. The new environmental data
      # will take affect at this stage in the middleware and will persist
      # through.
      class EnvSet
        def initialize(app, env, new_env=nil)
          @app     = app
          @new_env = new_env || {}
        end

        def call(env)
          # Merge in the new data
          env.merge!(@new_env)

          # Carry on
          @app.call(env)
        end
      end
    end
  end
end

Version data entries

82 entries across 75 versions & 13 rubygems

Version Path
vagrant-unbundled-2.0.0.1 lib/vagrant/action/builtin/env_set.rb
vagrant-unbundled-1.9.8.1 lib/vagrant/action/builtin/env_set.rb
vagrant-unbundled-1.9.7.1 lib/vagrant/action/builtin/env_set.rb
vagrant-aws-mkubenka-0.7.2.pre.14 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/lib/vagrant/action/builtin/env_set.rb
vagrant-aws-mkubenka-0.7.2.pre.11 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/lib/vagrant/action/builtin/env_set.rb
vagrant-aws-mkubenka-0.7.2.pre.10 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/lib/vagrant/action/builtin/env_set.rb
vagrant-aws-mkubenka-0.7.2.pre.9 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-5333e60e2d38/lib/vagrant/action/builtin/env_set.rb
vagrant-unbundled-1.9.5.1 lib/vagrant/action/builtin/env_set.rb
vagrant-unbundled-1.9.1.1 lib/vagrant/action/builtin/env_set.rb
tamtam-vagrant-reload-1.1.2 vendor/cache/vagrant-0ac2a8738841/lib/vagrant/action/builtin/env_set.rb
vagrant-compose-yaml-0.1.3 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/lib/vagrant/action/builtin/env_set.rb
vagrant-compose-yaml-0.1.2 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/lib/vagrant/action/builtin/env_set.rb
vagrant-compose-yaml-0.1.1 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/lib/vagrant/action/builtin/env_set.rb
vagrant-compose-yaml-0.1.0 vendor/bundle/ruby/2.2.0/bundler/gems/vagrant-dbb756c7b6da/lib/vagrant/action/builtin/env_set.rb
vagrant-unbundled-1.8.5.2 lib/vagrant/action/builtin/env_set.rb
vagrant-unbundled-1.8.5.1 lib/vagrant/action/builtin/env_set.rb
vagrant-unbundled-1.8.4.2 lib/vagrant/action/builtin/env_set.rb
vagrant-unbundled-1.8.4.1 lib/vagrant/action/builtin/env_set.rb
tamtam-vagrant-reload-1.1.1 vendor/cache/vagrant-0ac2a8738841/lib/vagrant/action/builtin/env_set.rb
tamtam-vagrant-reload-1.1 vendor/cache/vagrant-0ac2a8738841/lib/vagrant/action/builtin/env_set.rb