Skip to content

Commit 9a9c934

Browse files
Cherry-pick core changes
1 parent f04d50c commit 9a9c934

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

bundler/spec/quality_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,10 @@ def check_for_specific_pronouns(filename)
191191
end
192192

193193
it "ships the correct set of files" do
194-
git_list = git_ls_files(ruby_core? ? "lib/bundler lib/bundler.rb libexec/bundle*" : "lib exe CHANGELOG.md LICENSE.md README.md bundler.gemspec")
194+
git_list = tracked_files.reject {|f| f.start_with?("spec/") }
195195

196196
gem_list = loaded_gemspec.files
197+
gem_list.map! {|f| f.sub(%r{\Aexe/}, "libexec/") } if ruby_core?
197198

198199
expect(git_list).to match_array(gem_list)
199200
end

bundler/spec/support/helpers.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ def with_built_bundler(version = nil)
336336

337337
begin
338338
shipped_files.each do |shipped_file|
339-
target_shipped_file = build_path + shipped_file
339+
target_shipped_file = shipped_file
340+
target_shipped_file = shipped_file.sub(/\Alibexec/, "exe") if ruby_core?
341+
target_shipped_file = build_path + target_shipped_file
340342
target_shipped_dir = File.dirname(target_shipped_file)
341343
FileUtils.mkdir_p target_shipped_dir unless File.directory?(target_shipped_dir)
342344
FileUtils.cp shipped_file, target_shipped_file, preserve: true

bundler/spec/support/path.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def tracked_files
8080
end
8181

8282
def shipped_files
83-
@shipped_files ||= loaded_gemspec.files
83+
@shipped_files ||= ruby_core? ? tracked_files : loaded_gemspec.files
8484
end
8585

8686
def lib_tracked_files
@@ -268,7 +268,7 @@ def git_ls_files(glob)
268268
end
269269

270270
def tracked_files_glob
271-
ruby_core? ? "lib/bundler lib/bundler.rb spec/bundler man/bundle*" : ""
271+
ruby_core? ? "libexec/bundle* lib/bundler lib/bundler.rb spec/bundler man/bundle*" : "lib exe spec CHANGELOG.md LICENSE.md README.md bundler.gemspec"
272272
end
273273

274274
def lib_tracked_files_glob

0 commit comments

Comments
 (0)