aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/environment.rb
blob: fe510e35a72f5c6f297558ddd6c85218a4a9377a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
      @definition.lock(root.join('Gemfile.lock'))
    end

    def update(*gems)
      # Nothing
    end

  end
end