Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Resurrect "Add simple cache to Bundler.load_gemspec"
Browse files Browse the repository at this point in the history
This reverts prior revert 6b45e28, restoring 3d4163a.
  • Loading branch information
dekellum committed Apr 9, 2012
1 parent b3e9c1a commit 26637b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/bundler.rb
Expand Up @@ -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
Expand Down

0 comments on commit 26637b7

Please sign in to comment.