[rubygems/rubygems] Use a constant empty tar header to avoid extra allocations
[ruby.git] / lib / ostruct.gemspec
blob08a7aefb059e97c256976dac8bfbf746cfe01d67
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       = ["Marc-Andre Lafortune"]
14   spec.email         = ["ruby-core@marc-andre.ca"]
16   spec.summary       = %q{Class to build custom data structures, similar to a Hash.}
17   spec.description   = %q{Class to build custom data structures, similar to a Hash.}
18   spec.homepage      = "https://github.com/ruby/ostruct"
19   spec.licenses      = ["Ruby", "BSD-2-Clause"]
20   spec.required_ruby_version = ">= 2.5.0"
22   spec.files         = [".gitignore", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "bin/console", "bin/setup", "lib/ostruct.rb", "ostruct.gemspec"]
23   spec.require_paths = ["lib"]
24 end