Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 9 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def generate_rails_rdoc

# Replace sdoc gem with my forked one
gemfile = File.read('Gemfile')
gemfile.gsub!(/"sdoc".*$/, '"sdoc", github: "toshimaru/sdoc", branch: "railsdoc"')
gemfile.gsub!(/"sdoc".*$/, '"sdoc", github: "toshimaru/sdoc", branch: "main"')
File.write('Gemfile', gemfile)

sh 'bundle install && bundle update sdoc'
Expand All @@ -77,6 +77,7 @@ end
def generate_src(target_version:)
copy_sources = Dir.glob('rails/doc/rdoc/*').reject { |path| path.end_with?('panel', 'js', 'created.rid') }
target_dir = target_version == default_rails_version ? SOURCE_DIR : "#{SOURCE_DIR}/#{target_version}"
remove_existing_files(target_dir)
cp_r copy_sources, target_dir

cd target_dir do
Expand All @@ -92,3 +93,10 @@ def generate_src(target_version:)
File.write('navigation.html', content)
end
end

EXISTING_DIRS = %w[classes files].freeze
def remove_existing_files(target_dir)
EXISTING_DIRS.each do |dir|
rm_rf "#{target_dir}/#{dir}"
end
end
157 changes: 0 additions & 157 deletions src/classes/AbstractController/ActionNotFound/Correction.html

This file was deleted.

Loading