Skip to content

Commit 54b7a27

Browse files
Merge pull request #7887 from rubygems/deivid-rodriguez/smoother-devenv-breaking-changes
Allow smoother breaking changes in test env (cherry picked from commit bac8744)
1 parent 7c8d0a3 commit 54b7a27

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

bundler/spec/support/path.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,18 @@ def man_tracked_files
102102
end
103103

104104
def tmp(*path)
105-
source_root.join("tmp", scope, *path)
105+
tmp_root(scope).join(*path)
106+
end
107+
108+
def tmp_root(scope)
109+
source_root.join("tmp", "#{test_env_version}.#{scope}")
110+
end
111+
112+
# Bump this version whenever you make a breaking change to the spec setup
113+
# that requires regenerating tmp/.
114+
115+
def test_env_version
116+
1
106117
end
107118

108119
def scope

bundler/spec/support/rubygems_ext.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def install_parallel_test_deps
5757
install_test_deps
5858

5959
(2..Parallel.processor_count).each do |n|
60-
source = Path.source_root.join("tmp", "1")
61-
destination = Path.source_root.join("tmp", n.to_s)
60+
source = Path.tmp_root("1")
61+
destination = Path.tmp_root(n.to_s)
6262

6363
FileUtils.rm_rf destination
6464
FileUtils.cp_r source, destination

0 commit comments

Comments
 (0)