# File lib/bundler/shared_helpers.rb, line 39 def chdir(dir, &blk) @chdir_monitor.synchronize do Dir.chdir dir, &blk end end
# 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
# File lib/bundler/shared_helpers.rb, line 28 def default_lockfile Pathname.new("#{default_gemfile}.lock") end
# File lib/bundler/shared_helpers.rb, line 32 def in_bundle? find_gemfile end
# File lib/bundler/shared_helpers.rb, line 45 def pwd @chdir_monitor.synchronize do Dir.pwd end end
# 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
Generated with the Darkfish Rdoc Generator 2.