Sha256: 0ef92e43bdebabd8a1f1695e72a57e326c1190b67f9c6a2be755181389e457ed

Contents?: true

Size: 871 Bytes

Versions: 2

Compression:

Stored size: 871 Bytes

Contents

module Bundler
  class Environment
    attr_reader :root

    def initialize(root, definition)
      @root = root
      @definition = definition

      env_file = root.join('.bundle/environment.rb')
      env_file.rmtree if env_file.exist?
    end

    def inspect
      @definition.to_lock.inspect
    end

    # TODO: Remove this method. It's used in cli.rb still
    def index
      @definition.index
    end

    def requested_specs
      @definition.requested_specs
    end

    def specs
      @definition.specs
    end

    def dependencies
      @definition.dependencies
    end

    def current_dependencies
      @definition.current_dependencies
    end

    def lock
      contents = @definition.to_lock

      File.open(root.join('Gemfile.lock'), 'w') do |f|
        f.puts contents
      end
    end

    def update(*gems)
      # Nothing
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bundler-1.0.0.beta.9 lib/bundler/environment.rb
bundler-1.0.0.beta.8 lib/bundler/environment.rb