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:
parent
40f35dda59
commit
2e116944e6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user