Skip to content

Commit ecb5ead

Browse files
authored
Use railsdoc main branch (#131)
* Use railsdoc main branch * Add `remove_existing_files` method * Update docs
1 parent 0803980 commit ecb5ead

File tree

2,422 files changed

+93498
-115998
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,422 files changed

+93498
-115998
lines changed

Rakefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def generate_rails_rdoc
6464

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

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

8283
cd target_dir do
@@ -92,3 +93,10 @@ def generate_src(target_version:)
9293
File.write('navigation.html', content)
9394
end
9495
end
96+
97+
EXISTING_DIRS = %w[classes files].freeze
98+
def remove_existing_files(target_dir)
99+
EXISTING_DIRS.each do |dir|
100+
rm_rf "#{target_dir}/#{dir}"
101+
end
102+
end

src/classes/AbstractController/ActionNotFound/Correction.html

Lines changed: 0 additions & 157 deletions
This file was deleted.

0 commit comments

Comments
 (0)