summaryrefslogtreecommitdiff
path: root/spec/support/path.rb
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2020-02-11 17:10:55 +0000
committerBundlerbot <bot@bundler.io>2020-02-11 17:10:55 +0000
commit0a55b739946330ddc6312f58cfb23680db0b7328 (patch)
tree4d34011f2af4fcd5b6bb662b2203c8d06d691071 /spec/support/path.rb
parent203d02c3670083a95733afc1a9d7a870d1ae1c34 (diff)
parent1e9e4cbab0715d77059fa0b3aac9a940f1d60873 (diff)
downloadbundler-0a55b739946330ddc6312f58cfb23680db0b7328.tar.gz
Merge #7630
7630: More paralelization improvements r=deivid-rodriguez a=deivid-rodriguez <!-- Thanks so much for the contribution! If you're updating documentation, make sure you run `bin/rake man:build` and squash the result into your changes, so that all documentation formats are updated. To make reviewing this PR a bit easier, please fill out answers to the following questions. --> ### What was the end-user or developer problem that led to this PR? The developer problem is that CI is still failing sometimes. The reason is most likely due to side effects when parallelizing specs, since specs still change the current folder globally sometimes. ### What is your fix for the problem, implemented in this PR? My changes stop changing folders globally in more places, to try to alleviate these issues. <!-- Explain the fix being implemented. Include any diagnosis you run to determine the cause of the issue and your conclusions. If you considered other alternatives, explain why you end up choosing the current implementation --> Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
Diffstat (limited to 'spec/support/path.rb')
-rw-r--r--spec/support/path.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/spec/support/path.rb b/spec/support/path.rb
index 25206c9832..bfa4865abd 100644
--- a/spec/support/path.rb
+++ b/spec/support/path.rb
@@ -86,8 +86,6 @@ module Spec
root.join(*path)
end
- alias_method :bundled_app1, :bundled_app
-
def bundled_app2(*path)
root = tmp.join("bundled_app2")
FileUtils.mkdir_p(root)
@@ -172,8 +170,8 @@ module Spec
def with_root_gemspec
if ruby_core?
root_gemspec = root.join("bundler.gemspec")
- # `in_repo_root` for Dir.glob in gemspec
- spec = in_repo_root { Gem::Specification.load(gemspec.to_s) }
+ # Dir.chdir for Dir.glob in gemspec
+ spec = Dir.chdir(root) { Gem::Specification.load(gemspec.to_s) }
spec.bindir = "libexec"
File.open(root_gemspec.to_s, "w") {|f| f.write spec.to_ruby }
yield(root_gemspec)
@@ -194,10 +192,6 @@ module Spec
end
end
- def in_repo_root
- Dir.chdir(root) { yield }
- end
-
extend self
private