Support git ls-files ....split style for file list of gemspec

This commit is contained in:
Hiroshi SHIBATA 2025-02-07 11:02:42 +09:00
parent 2ed1962cbe
commit e776efdc70
Notes: git 2025-02-07 02:48:09 +00:00

View File

@ -783,7 +783,7 @@ def load_gemspec(file, base = nil)
next if File.directory?(File.join(base, n))
files << n.dump
end if base
code.gsub!(/(?:`git[^\`]*`|%x\[git[^\]]*\])\.split\([^\)]*\)/m) do
code.gsub!(/(?:`git[^\`]*`|%x\[git[^\]]*\])\.split(\([^\)]*\))?/m) do
"[" + files.join(", ") + "]"
end
code.gsub!(/IO\.popen\(.*git.*?\)/) do