| 1 |
# frozen_string_literal: true |
| 2 |
|
| 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 |
| 9 |
|
| 10 |
Gem::Specification.new do |spec| |
| 11 |
spec.name = name |
| 12 |
spec.version = version |
| 13 |
spec.authors = ["Yukihiro Matsumoto"] |
| 14 |
spec.email = ["[email protected]"] |
| 15 |
|
| 16 |
spec.summary = %q{Auto-terminate potentially long-running operations in Ruby.} |
| 17 |
spec.description = %q{Auto-terminate potentially long-running operations in Ruby.} |
| 18 |
spec.homepage = "https://github.com/ruby/timeout" |
| 19 |
spec.licenses = ["Ruby", "BSD-2-Clause"] |
| 20 |
|
| 21 |
spec.metadata["homepage_uri"] = spec.homepage |
| 22 |
spec.metadata["source_code_uri"] = spec.homepage |
| 23 |
|
| 24 |
spec.required_ruby_version = '>= 2.6.0' |
| 25 |
|
| 26 |
spec.files = Dir.chdir(__dir__) do |
| 27 |
`git ls-files -z`.split("\x0").reject do |f| |
| 28 |
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features|rakelib)/|\.(?:git|travis|circleci)|appveyor|Rakefile)}) |
| 29 |
end |
| 30 |
end |
| 31 |
spec.require_paths = ["lib"] |
| 32 |
end |