From 55c4e23b05934f04675e1936c4b51d4970ddb547 Mon Sep 17 00:00:00 2001 From: malkoG Date: Tue, 19 Jan 2021 16:27:06 +0900 Subject: [PATCH 1/2] Update Rails documentation (6.1.0) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/rdoc/rails.rb | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index f1d9b70f..e629f314 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -718,7 +718,7 @@ credits = [ 'https://www.ruby-lang.org/en/about/license.txt' ], [ 'Ruby on Rails', - '2004-2019 David Heinemeier Hansson
Rails, Ruby on Rails, and the Rails logo are trademarks of David Heinemeier Hansson.', + '2004-2020 David Heinemeier Hansson
Rails, Ruby on Rails, and the Rails logo are trademarks of David Heinemeier Hansson.', 'MIT', 'https://raw.githubusercontent.com/rails/rails/master/activerecord/MIT-LICENSE' ], [ diff --git a/lib/docs/scrapers/rdoc/rails.rb b/lib/docs/scrapers/rdoc/rails.rb index 6e37cbd0..df772607 100644 --- a/lib/docs/scrapers/rdoc/rails.rb +++ b/lib/docs/scrapers/rdoc/rails.rb @@ -72,17 +72,21 @@ module Docs options[:attribution] = ->(filter) do if filter.slug.start_with?('guides') <<-HTML - © 2004–2019 David Heinemeier Hansson
+ © 2004–2020 David Heinemeier Hansson
Licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. HTML else <<-HTML - © 2004–2019 David Heinemeier Hansson
+ © 2004–2020 David Heinemeier Hansson
Licensed under the MIT License. HTML end end + version '6.1' do + self.release = '6.1.0' + end + version '6.0' do self.release = '6.0.0' end From 335d86830cdfafb66c276f539312e75339571107 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 19 Jan 2021 19:54:16 +0100 Subject: [PATCH 2/2] rails: fix clean_html_guide --- lib/docs/filters/rails/clean_html_guides.rb | 5 +++-- lib/docs/scrapers/rdoc/rails.rb | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/docs/filters/rails/clean_html_guides.rb b/lib/docs/filters/rails/clean_html_guides.rb index 8463fe9d..a40dcba0 100644 --- a/lib/docs/filters/rails/clean_html_guides.rb +++ b/lib/docs/filters/rails/clean_html_guides.rb @@ -23,9 +23,10 @@ module Docs end css('pre').each do |node| - language = node['class'][/brush: ?(\w+)/, 1] + code = node.at_css('code') + language = code['class'][/highlight ?(\w+)/, 1] node['data-language'] = language unless language == 'plain' - node.remove_attribute('class') + code.remove_attribute('class') node.content = node.content.strip end diff --git a/lib/docs/scrapers/rdoc/rails.rb b/lib/docs/scrapers/rdoc/rails.rb index df772607..907deed3 100644 --- a/lib/docs/scrapers/rdoc/rails.rb +++ b/lib/docs/scrapers/rdoc/rails.rb @@ -84,7 +84,7 @@ module Docs end version '6.1' do - self.release = '6.1.0' + self.release = '6.1.1' end version '6.0' do