Skip to content
Browse files

Resurrect "Add simple cache to Bundler.load_gemspec"

This reverts prior revert 6b45e28, restoring 3d4163a.
  • Loading branch information...
1 parent b3e9c1a commit 26637b7ef7b75ea5705d0b51492490cc93d5515a @dekellum committed Apr 8, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/bundler.rb
View
5 lib/bundler.rb
@@ -270,6 +270,11 @@ def read_file(file)
end
def load_gemspec(file)
+ @gemspec_cache ||= {}
+ @gemspec_cache[File.expand_path(file)] ||= load_gemspec_uncached(file)
+ end
+
+ def load_gemspec_uncached(file)
path = Pathname.new(file)
# Eval the gemspec from its parent directory
Dir.chdir(path.dirname.to_s) do

0 comments on commit 26637b7

Please sign in to comment.
Something went wrong with that request. Please try again.