Skip to content

Commit 2e11694

Browse files
committed
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.
1 parent 40f35dd commit 2e11694

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

railties/lib/rails/api/task.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ def configure_rdoc_files
150150

151151
# Only generate documentation for files that have been
152152
# changed since the API was generated.
153-
if Dir.exist?("doc/rdoc") && !ENV["ALL"]
154-
last_generation = DateTime.rfc2822(File.open("doc/rdoc/created.rid", &:readline))
153+
if Dir.exist?(api_dir) && !ENV["ALL"]
154+
last_generation = DateTime.rfc2822(File.open("#{api_dir}/created.rid", &:readline))
155155

156156
rdoc_files.keep_if do |file|
157157
File.mtime(file).to_datetime > last_generation

0 commit comments

Comments
 (0)