mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00

(https://github.com/ruby/rdoc/pull/1212)
Currently, the gemspec's files are defined by hand, which is error-prone.
For example: https://github.com/ruby/rdoc/pull/1211
This commit uses `Dir.glob` where possible to reduce the risk of that
happening again.
- Additional files added with this approach:
```
# This should have been added by only captured by this commit
lib/rdoc/parser/prism_ruby.rb
# These are folders and can be included/ignored either way
lib/rdoc/generator/template/darkfish
lib/rdoc/generator/template/darkfish/css
lib/rdoc/generator/template/darkfish/fonts
lib/rdoc/generator/template/darkfish/images
lib/rdoc/generator/template/darkfish/js
lib/rdoc/generator/template/json_index
lib/rdoc/generator/template/json_index/js
```
- Files that are ignored after this change:
```
# They make no difference on documentation generation
# Probably can be removed
lib/rdoc/generator/template/darkfish/.document
lib/rdoc/generator/template/json_index/.document
```
ac2a151f10
67 lines
2 KiB
Ruby
67 lines
2 KiB
Ruby
begin
|
|
require_relative "lib/rdoc/version"
|
|
rescue LoadError
|
|
# for Ruby repository
|
|
require_relative "version"
|
|
end
|
|
|
|
Gem::Specification.new do |s|
|
|
s.name = "rdoc"
|
|
s.version = RDoc::VERSION
|
|
|
|
s.authors = [
|
|
"Eric Hodel",
|
|
"Dave Thomas",
|
|
"Phil Hagelberg",
|
|
"Tony Strauss",
|
|
"Zachary Scott",
|
|
"Hiroshi SHIBATA",
|
|
"ITOYANAGI Sakura"
|
|
]
|
|
s.email = ["drbrain@segment7.net", "", "", "", "mail@zzak.io", "hsbt@ruby-lang.org", "aycabta@gmail.com"]
|
|
|
|
s.summary = "RDoc produces HTML and command-line documentation for Ruby projects"
|
|
s.description = <<-DESCRIPTION
|
|
RDoc produces HTML and command-line documentation for Ruby projects.
|
|
RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentation from the command-line.
|
|
DESCRIPTION
|
|
s.homepage = "https://ruby.github.io/rdoc"
|
|
s.licenses = ["Ruby"]
|
|
|
|
s.metadata["homepage_uri"] = s.homepage
|
|
s.metadata["source_code_uri"] = "https://github.com/ruby/rdoc"
|
|
s.metadata["changelog_uri"] = "#{s.metadata["source_code_uri"]}/releases"
|
|
|
|
s.bindir = "exe"
|
|
s.executables = ["rdoc", "ri"]
|
|
s.require_paths = ["lib"]
|
|
# for ruby core repository. It was generated by
|
|
# `git ls-files -z`.split("\x0").each {|f| puts " #{f.dump}," unless f.start_with?(*%W[test/ spec/ features/ .]) }
|
|
non_lib_files = [
|
|
"CONTRIBUTING.rdoc",
|
|
"CVE-2013-0256.rdoc",
|
|
"ExampleMarkdown.md",
|
|
"ExampleRDoc.rdoc",
|
|
"History.rdoc",
|
|
"LEGAL.rdoc",
|
|
"LICENSE.rdoc",
|
|
"README.rdoc",
|
|
"RI.md",
|
|
"TODO.rdoc",
|
|
"exe/rdoc",
|
|
"exe/ri",
|
|
"man/ri.1",
|
|
]
|
|
template_files = Dir.glob("lib/rdoc/generator/template/**/*")
|
|
lib_files = Dir.glob("lib/**/*.{rb,kpeg,ry}")
|
|
|
|
s.files = (non_lib_files + template_files + lib_files).uniq
|
|
|
|
s.rdoc_options = ["--main", "README.rdoc"]
|
|
s.extra_rdoc_files += s.files.grep(%r[\A[^\/]+\.(?:rdoc|md)\z])
|
|
|
|
s.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
|
|
s.required_rubygems_version = Gem::Requirement.new(">= 2.2")
|
|
|
|
s.add_dependency 'psych', '>= 4.0.0'
|
|
end
|