Use Dir.glob and base keyword arg for the installer of Ruby package

This commit is contained in:
Hiroshi SHIBATA 2025-07-01 10:00:31 +09:00
parent 05443bb7e9
commit 5ee6315704
2 changed files with 3 additions and 3 deletions

View file

@ -44,8 +44,7 @@ spec = Gem::Specification.new do |s|
"LEGAL",
"README.md",
"json.gemspec",
*Dir["lib/**/*.rb"],
]
] + Dir.glob("lib/**/*.rb", base: File.expand_path("..", __FILE__))
if java_ext
s.platform = 'java'

View file

@ -13,7 +13,8 @@ Gem::Specification.new do |spec|
spec.files = []
spec.add_runtime_dependency('jruby-openssl', '~> 0.14')
else
spec.files = Dir["lib/**/*.rb", "ext/**/*.{c,h,rb}", "*.md", "BSDL", "COPYING"]
spec.files = Dir.glob(["lib/**/*.rb", "ext/**/*.{c,h,rb}", "*.md"], base: File.expand_path("..", __FILE__)) +
["BSDL", "COPYING"]
spec.require_paths = ["lib"]
spec.extensions = ["ext/openssl/extconf.rb"]
end