Module: Carton

Defined in:
lib/carton.rb,
lib/carton.rb,
lib/carton/box.rb,
lib/carton/exports.rb,
lib/carton/runtime.rb,
lib/carton/version.rb,
lib/carton/kernel_patch.rb,
lib/carton/export_methods.rb

Defined Under Namespace

Classes: Box, Exports

Constant Summary collapse

VERSION =
'0.1.0'

Class Method Summary collapse

Class Method Details

.with_bundle(gemfile) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/carton.rb', line 8

def with_bundle(gemfile)
  previous = ENV['BUNDLE_GEMFILE']
  ENV['BUNDLE_GEMFILE'] = gemfile
  yield
ensure
  if previous
    ENV['BUNDLE_GEMFILE'] = previous
  else
    ENV.delete 'BUNDLE_GEMFILE'
  end
end