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