diff options
author | Smit Shah <who828@gmail.com> | 2014-11-18 01:42:49 -0800 |
---|---|---|
committer | Smit Shah <who828@gmail.com> | 2014-11-18 01:42:49 -0800 |
commit | d58f01dfaa5779b13f5b80c4368412754f3579c6 (patch) | |
tree | 348b92ea77d404db983b9ec3c69849439f947616 /lib/bundler/source/git.rb | |
parent | 0fa0665424c21b52eabeb3af0a12cc16119b33a0 (diff) | |
download | bundler-race_condition.tar.gz |
Fixed an issue with building git gems in parallelrace_condition
We need to ensure that the dir remains the same
through out the installation of these gems,
this includes Path Installer as well as rubygems
build.
Diffstat (limited to 'lib/bundler/source/git.rb')
-rw-r--r-- | lib/bundler/source/git.rb | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb index 4f8397bd4b..d5b10f37bb 100644 --- a/lib/bundler/source/git.rb +++ b/lib/bundler/source/git.rb @@ -220,19 +220,17 @@ module Bundler @allow_remote || @allow_cached end - private + private def serialize_gemspecs_in(destination) - SharedHelpers.chdir(destination) do - expanded_path = destination.expand_path(Bundler.root) - Dir["#{expanded_path}/#{@glob}"].each do |spec_path| - # Evaluate gemspecs and cache the result. Gemspecs - # in git might require git or other dependencies. - # The gemspecs we cache should already be evaluated. - spec = Bundler.load_gemspec(spec_path) - next unless spec - File.open(spec_path, 'wb') {|file| file.write(spec.to_ruby) } - end + expanded_path = destination.expand_path(Bundler.root) + Dir["#{expanded_path}/#{@glob}"].each do |spec_path| + # Evaluate gemspecs and cache the result. Gemspecs + # in git might require git or other dependencies. + # The gemspecs we cache should already be evaluated. + spec = Bundler.load_gemspec(spec_path) + next unless spec + File.open(spec_path, 'wb') {|file| file.write(spec.to_ruby) } end end |