Look for created.rid in api_dir (output dir)

This changes to use a single source of truth for the output dir in the rdoc task.
Which lets us override this value when building from a different directory.

Mainly this change is a no-op, but we are using Rails::API:Task to test and build SDoc version 3.
This commit is contained in:
zzak 2023-03-07 06:21:21 +09:00
parent 40f35dda59
commit 2e116944e6
No known key found for this signature in database
GPG Key ID: 213927DFCF4FF102

@ -150,8 +150,8 @@ def configure_rdoc_files
# Only generate documentation for files that have been
# changed since the API was generated.
if Dir.exist?("doc/rdoc") && !ENV["ALL"]
last_generation = DateTime.rfc2822(File.open("doc/rdoc/created.rid", &:readline))
if Dir.exist?(api_dir) && !ENV["ALL"]
last_generation = DateTime.rfc2822(File.open("#{api_dir}/created.rid", &:readline))
rdoc_files.keep_if do |file|
File.mtime(file).to_datetime > last_generation