-
Notifications
You must be signed in to change notification settings - Fork 65
/
rexml.gemspec
61 lines (56 loc) · 1.53 KB
/
rexml.gemspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
begin
require_relative "lib/rexml/rexml"
rescue LoadError
# for Ruby core repository
require_relative "rexml"
end
Gem::Specification.new do |spec|
spec.name = "rexml"
spec.version = REXML::VERSION
spec.authors = ["Kouhei Sutou"]
spec.email = ["[email protected]"]
spec.summary = %q{An XML toolkit for Ruby}
spec.description = %q{An XML toolkit for Ruby}
spec.homepage = "https://github.com/ruby/rexml"
spec.license = "BSD-2-Clause"
spec.metadata = {
"changelog_uri" => "#{spec.homepage}/releases/tag/v#{spec.version}"
}
files = [
"LICENSE.txt",
"NEWS.md",
"README.md",
]
rdoc_files = files.dup
lib_path = "lib"
spec.require_paths = [lib_path]
lib_dir = File.join(__dir__, lib_path)
if File.exist?(lib_dir)
Dir.chdir(lib_dir) do
Dir.glob("**/*.rb").each do |file|
files << "lib/#{file}"
end
end
end
doc_path = "doc"
doc_dir = File.join(__dir__, doc_path)
if File.exist?(doc_dir)
Dir.chdir(doc_dir) do
Dir.glob("**/*.rdoc").each do |rdoc_file|
files << "#{doc_path}/#{rdoc_file}"
rdoc_files << "#{doc_path}/#{rdoc_file}"
end
end
end
tasks_path = "tasks"
tasks_dir = File.join(__dir__, tasks_path)
Dir.chdir(doc_dir) do
Dir.glob("**/*.rake").each do |task_file|
files << "#{tasks_path}/#{task_file}"
end
end
spec.files = files
spec.rdoc_options.concat(["--main", "README.md"])
spec.extra_rdoc_files = rdoc_files
spec.required_ruby_version = '>= 2.5.0'
end