diff options
Diffstat (limited to 'lib/uri/uri.gemspec')
| -rw-r--r-- | lib/uri/uri.gemspec | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/uri/uri.gemspec b/lib/uri/uri.gemspec index 57c3239c53..0d0f897cba 100644 --- a/lib/uri/uri.gemspec +++ b/lib/uri/uri.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |spec| spec.homepage = github_link spec.licenses = ["Ruby", "BSD-2-Clause"] - spec.required_ruby_version = '>= 2.4' + spec.required_ruby_version = '>= 2.5' spec.metadata = { "bug_tracker_uri" => "#{github_link}/issues", @@ -30,8 +30,11 @@ Gem::Specification.new do |spec| # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. + gemspec = File.basename(__FILE__) spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do - `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject do |file| + (file == gemspec) || file.start_with?(*%w[bin/ test/ rakelib/ .github/ .gitignore Gemfile Rakefile]) + end end spec.bindir = "exe" spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } |
