Make string literal to frozen object on gemspec of defulte gems.
Added following gemspecs.
* extensions: date, dbm, etc, fiddle, gdbm, sdbm, stringio, strscan, zlib
* pure ruby libraries: cmath, csv, fileutils, scanf, webrick
psych and rdoc is out of scope of this commit. I will merge after
upstream was change to `frozen_string_literal: true`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-19 13:03:06 +00:00
|
|
|
# frozen_string_literal: true
|
2017-02-27 09:20:39 +00:00
|
|
|
|
2019-07-10 12:33:29 +09:00
|
|
|
version = ["", "ext/etc/"].find do |dir|
|
|
|
|
begin
|
|
|
|
break File.open(File.expand_path("../#{dir}/etc.c", __FILE__)) do |f|
|
|
|
|
f.gets "\n#define RUBY_ETC_VERSION "
|
|
|
|
f.gets[/"(.+)"/, 1]
|
|
|
|
end
|
|
|
|
rescue
|
|
|
|
next
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2017-04-11 09:46:53 +00:00
|
|
|
Gem::Specification.new do |spec|
|
|
|
|
spec.name = "etc"
|
2019-07-10 12:33:29 +09:00
|
|
|
spec.version = version
|
2017-04-11 09:46:53 +00:00
|
|
|
spec.authors = ["Yukihiro Matsumoto"]
|
|
|
|
spec.email = ["matz@ruby-lang.org"]
|
2017-02-27 09:20:39 +00:00
|
|
|
|
2017-04-11 09:46:53 +00:00
|
|
|
spec.summary = %q{Provides access to information typically stored in UNIX /etc directory.}
|
2019-07-10 12:32:35 +09:00
|
|
|
spec.description = spec.summary
|
2017-04-11 09:46:53 +00:00
|
|
|
spec.homepage = "https://github.com/ruby/etc"
|
2020-08-18 20:15:59 +09:00
|
|
|
spec.licenses = ["Ruby", "BSD-2-Clause"]
|
2017-04-11 09:46:53 +00:00
|
|
|
|
2022-01-03 21:38:03 +09:00
|
|
|
changelogs = Dir.glob("logs/ChangeLog-[1-9]*[^~]", base: __dir__)
|
2017-04-11 22:41:21 +00:00
|
|
|
spec.files = %w[
|
|
|
|
LICENSE.txt
|
|
|
|
README.md
|
2022-01-02 14:07:22 +09:00
|
|
|
ChangeLog
|
2019-07-10 12:32:35 +09:00
|
|
|
ext/etc/constdefs.h
|
2017-04-11 22:41:21 +00:00
|
|
|
ext/etc/etc.c
|
|
|
|
ext/etc/extconf.rb
|
|
|
|
ext/etc/mkconstants.rb
|
|
|
|
test/etc/test_etc.rb
|
2022-01-03 18:06:18 +09:00
|
|
|
] + changelogs
|
2022-01-02 14:07:22 +09:00
|
|
|
spec.rdoc_options = ["--main", "README.md"]
|
2022-01-03 18:06:18 +09:00
|
|
|
spec.extra_rdoc_files = spec.files.grep_v(/\.{rb,[ch]}\z/)
|
2017-04-11 09:46:53 +00:00
|
|
|
spec.bindir = "exe"
|
|
|
|
spec.require_paths = ["lib"]
|
2017-04-11 22:41:21 +00:00
|
|
|
spec.extensions = %w{ext/etc/extconf.rb}
|
2017-04-11 09:46:53 +00:00
|
|
|
|
2022-01-02 13:22:36 +09:00
|
|
|
spec.required_ruby_version = ">= 2.6.0"
|
2017-02-27 09:20:39 +00:00
|
|
|
end
|