Sha256: 821aa07fe8bbb9d0260a25e8b4580aa89cd6cf86edd1d7d27ef9033b0f69f58c

Contents?: true

Size: 722 Bytes

Versions: 14

Compression:

Stored size: 722 Bytes

Contents

module RubyLeiningen
  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

14 entries across 14 versions & 1 rubygems

Version Path
ruby_leiningen-0.24.0.pre.6 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.24.0.pre.5 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.24.0.pre.4 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.24.0.pre.3 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.24.0.pre.2 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.24.0.pre.1 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.23.0 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.22.0.pre.1 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.21.0 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.20.0.pre.1 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.19.0 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.18.0.pre.1 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.17.0 lib/ruby_leiningen/commands/mixins/environment.rb
ruby_leiningen-0.16.0.pre.1 lib/ruby_leiningen/commands/mixins/environment.rb