Class/Module Index [+]

Quicksearch

Bundler::SharedHelpers

Attributes

gem_loaded[RW]

Public Instance Methods

chdir(dir, &blk) click to toggle source
# File lib/bundler/shared_helpers.rb, line 39
def chdir(dir, &blk)
  @chdir_monitor.synchronize do
    Dir.chdir dir, &blk
  end
end
default_gemfile() click to toggle source
# File lib/bundler/shared_helpers.rb, line 22
def default_gemfile
  gemfile = find_gemfile
  raise GemfileNotFound, "Could not locate Gemfile" unless gemfile
  Pathname.new(gemfile)
end
default_lockfile() click to toggle source
# File lib/bundler/shared_helpers.rb, line 28
def default_lockfile
  Pathname.new("#{default_gemfile}.lock")
end
in_bundle?() click to toggle source
# File lib/bundler/shared_helpers.rb, line 32
def in_bundle?
  find_gemfile
end
pwd() click to toggle source
# File lib/bundler/shared_helpers.rb, line 45
def pwd
  @chdir_monitor.synchronize do
    Dir.pwd
  end
end
with_clean_git_env(&block) click to toggle source
# File lib/bundler/shared_helpers.rb, line 60
def with_clean_git_env(&block)
  keys    = ]GIT_DIR GIT_WORK_TREE]
  old_env = keys.inject({}) do |h, k|
    h.update(k => ENV[k])
  end

  keys.each {|key| ENV.delete(key) }

  block.call
ensure
  keys.each {|key| ENV[key] = old_env[key] }
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.