diff options
author | David RodrÃguez <[email protected]> | 2024-01-24 10:22:26 +0100 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-03-25 11:55:08 +0900 |
commit | 2b703eed46237d28ca71f3ed24f77bf53cf81720 () | |
tree | 8ca846cbb6a47a45a3ed5d5211e2c0d704a8bb37 /tool/rbinstall.rb | |
parent | bece07e6c3716f93c0f2b98159430aa5df51c0a0 (diff) |
Consistently put requirable features in default gemspecs file list
-rwxr-xr-x | tool/rbinstall.rb | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -549,24 +549,24 @@ module RbInstall end def collect - libraries.sort end class Ext < self - def libraries # install ext only when it's configured return [] unless File.exist?(makefile_path) - ruby_libraries + ext_libraries end private - def ruby_libraries Dir.glob("**/*.rb", base: "#{makefile_dir}/lib") end - def ext_libraries makefile = File.read(makefile_path) name = makefile[/^TARGET[ \t]*=[ \t]*((?:.*\\\n)*.*)/, 1] @@ -586,24 +586,24 @@ module RbInstall end class Lib < self - def libraries gemname = File.basename(gemspec, ".gemspec") base = relative_base || gemname # for lib/net/net-smtp.gemspec if m = /.*(?=-(.*)\z)/.match(gemname) base = File.join(base, *m.to_a.select {|n| !base.include?(n)}) end - files = Dir.glob("lib/#{base}{.rb,/**/*.rb}", base: srcdir) if !relative_base and files.empty? # no files at the toplevel # pseudo gem like ruby2_keywords - files << "lib/#{gemname}.rb" end case gemname when "net-http" - files << "lib/net/https.rb" when "optparse" - files << "lib/optionparser.rb" end files |