| 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 = ["Marc-Andre Lafortune"] |
| 14 |
spec.email = ["[email protected]"] |
| 15 |
|
| 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" |
| 21 |
|
| 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 |