class Bundler::Source::Path
def cache(spec, custom_path = nil)
def cache(spec, custom_path = nil) app_cache_path = app_cache_path(custom_path) return unless Bundler.settings[:cache_all] return if expand(@original_path).to_s.index(Bundler.root.to_s) == 0 unless @original_path.exist? raise GemNotFound, "Can't cache gem #{version_message(spec)} because #{to_s} is missing!" end FileUtils.rm_rf(app_cache_path) FileUtils.cp_r("#{@original_path}/.", app_cache_path) FileUtils.touch(app_cache_path.join(".bundlecache")) end