[rubygems/rubygems] Use a constant empty tar header to avoid extra allocations
[ruby.git] / lib / delegate.gemspec
blob6c3feac74b505ad954a4a7b6e9c8bbcae1aac41b
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       = ["Yukihiro Matsumoto"]
14   spec.email         = ["matz@ruby-lang.org"]
16   spec.summary       = %q{Provides three abilities to delegate method calls to an object.}
17   spec.description   = %q{Provides three abilities to delegate method calls to an object.}
18   spec.homepage      = "https://github.com/ruby/delegate"
19   spec.licenses      = ["Ruby", "BSD-2-Clause"]
21   spec.metadata["homepage_uri"] = spec.homepage
22   spec.metadata["source_code_uri"] = spec.homepage
24   spec.files         = Dir.chdir(File.expand_path('..', __FILE__)) do
25     `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26   end
27   spec.require_paths = ["lib"]
28   spec.required_ruby_version = '>= 2.7'
29 end