[rubygems/rubygems] Use a constant empty tar header to avoid extra allocations
[ruby.git] / lib / un.gemspec
blob2ed49511cc44ee8071ef04261deeea0d54ff6522
1 # frozen_string_literal: true
3 name = File.basename(__FILE__, ".gemspec")
4 version = ["lib", Array.new(name.count("-")+1).join("/")].find do |dir|
5   break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
6     /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
7   end rescue nil
8 end
10 Gem::Specification.new do |spec|
11   spec.name          = name
12   spec.version       = version
13   spec.authors       = ["WATANABE Hirofumi"]
14   spec.email         = ["eban@ruby-lang.org"]
16   spec.summary       = "Utilities to replace common UNIX commands"
17   spec.description   = spec.summary
18   spec.homepage      = "https://github.com/ruby/un"
19   spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
20   spec.licenses      = ["Ruby", "BSD-2-Clause"]
22   spec.metadata["homepage_uri"] = spec.homepage
23   spec.metadata["source_code_uri"] = spec.homepage
25   spec.files = Dir.chdir(File.expand_path(__dir__)) do
26     `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
27   end
28   spec.bindir        = "exe"
29   spec.executables   = []
30   spec.require_paths = ["lib"]
31 end