Sha256: 9e56a5cc3bef10af6dbcc21d96b3cfcb04786d781b3192f5f2acd1b34c136441

Contents?: true

Size: 716 Bytes

Versions: 16

Compression:

Stored size: 716 Bytes

Contents

module RubyFly
  module Commands
    module Mixins
      module Environment
        def initialize(opts={})
          super(opts)
          @environment = opts[:environment]
        end

        def for_environment(environment)
          @environment = environment
          self
        end

        def configure_command(builder, opts)
          builder = super(builder, opts)
          environment = opts[:environment] || @environment
          if environment
            builder = environment.to_a
                .inject(builder) do |b, environment_variable|
              b.with_environment_variable(*environment_variable)
            end
          end
          builder
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ruby_fly-0.36.0.pre.4 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.36.0.pre.3 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.36.0.pre.2 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.36.0.pre.1 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.35.0 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.34.0.pre.1 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.33.0 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.32.0.pre.1 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.31.0 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.30.0.pre.1 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.29.0 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.28.0.pre.1 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.27.0 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.26.0.pre.1 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.25.0 lib/ruby_fly/commands/mixins/environment.rb
ruby_fly-0.24.0.pre.1 lib/ruby_fly/commands/mixins/environment.rb