diff options
author | Hiroshi SHIBATA <[email protected]> | 2025-02-07 18:40:07 +0900 |
---|---|---|
committer | <[email protected]> | 2025-02-07 18:40:07 +0900 |
commit | 7178593558080ca529abb61ef27038236ab2687d () | |
tree | 519ae8c3615621e3546e137eed2066441c960845 /tool/rbinstall.rb | |
parent | 8dbbc79e8b19f0bf000f88d0e45b26185c5fcd4b (diff) |
Simplified to find gemspecs for bundled gems (#12709)
* Simplified to find gemspecs for bundled gems Co-authored-by: Nobuyoshi Nakada <[email protected]>
Notes: Merged-By: hsbt <[email protected]>
-rwxr-xr-x | tool/rbinstall.rb | 25 |
1 files changed, 11 insertions, 14 deletions
@@ -1138,21 +1138,18 @@ install?(:ext, :comm, :gem, :'bundled-gems') do next unless /^(\S+)\s+(\S+).*/ =~ name gem = $1 gem_name = "#$1-#$2" - # Try to find the original gemspec file - path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem}.gemspec" - unless File.exist?(path) - # Try to find the gemspec file for C ext gems # ex .bundle/gems/debug-1.7.1/debug-1.7.1.gemspec - # This gemspec keep the original dependencies - path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec" - unless File.exist?(path) - # Try to find the gemspec file for gems that hasn't own gemspec - path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec" - unless File.exist?(path) - skipped[gem_name] = "gemspec not found" - next - end - end end spec = load_gemspec(path, "#{srcdir}/.bundle/gems/#{gem_name}") unless spec.platform == Gem::Platform::RUBY |