Module: Bundler

Defined in:
lib/iruby/dependencies/unload.rb,
lib/iruby/dependencies/shared_helpers.rb

Overview

a minor modification of the code from the bundler-unload gem

Defined Under Namespace

Modules: SharedHelpers

Constant Summary collapse

ORIGINAL_SPECS =
[]

Class Method Summary collapse

Class Method Details

.rootObject



35
36
37
# File 'lib/iruby/dependencies.rb', line 35

def Bundler.root
  Bundler::SharedHelpers.pwd.expand_path
end

.unload!Object



7
8
9
10
11
12
13
14
15
# File 'lib/iruby/dependencies/unload.rb', line 7

def unload!
  if ORIGINAL_SPECS.empty?
    ORIGINAL_SPECS.concat Gem::Specification._all
  end

  @load = @definition = nil
  ENV.replace ORIGINAL_ENV
  Gem::Specification.all = ORIGINAL_SPECS
end