Class/Module Index [+]

Quicksearch

Bundler::SharedHelpers

Constants

CHDIR_MONITOR

Attributes

gem_loaded[RW]

Public Instance Methods

chdir(dir, &blk) click to toggle source
# File lib/bundler/shared_helpers.rb, line 42
def chdir(dir, &blk)
  chdir_monitor.synchronize do
    Dir.chdir dir, &blk
  end
end
chdir_monitor() click to toggle source
# File lib/bundler/shared_helpers.rb, line 38
def chdir_monitor
  CHDIR_MONITOR
end
default_gemfile() click to toggle source
# File lib/bundler/shared_helpers.rb, line 24
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 30
def default_lockfile
  Pathname.new("#{default_gemfile}.lock")
end
in_bundle?() click to toggle source
# File lib/bundler/shared_helpers.rb, line 34
def in_bundle?
  find_gemfile
end
pwd() click to toggle source
# File lib/bundler/shared_helpers.rb, line 48
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 54
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.