From 9c21cbd3eed1e3034bdcb86691135392c30e1889 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 11 Jan 2022 06:18:22 +0100 Subject: [PATCH] Update Nokogiri documentation (1.13.0) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/filters/nokogiri2/attribution.rb | 12 ++++++++++++ lib/docs/scrapers/nokogiri2.rb | 5 +++-- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 lib/docs/filters/nokogiri2/attribution.rb diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 399eb00c..c462994f 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -589,7 +589,7 @@ credits = [ 'https://raw.githubusercontent.com/nodejs/node/master/LICENSE' ], [ 'Nokogiri', - '2008-2018 Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo, Patrick Mahoney, Yoko Harada, Akinori MUSHA, John Shahid, Lars Kanis', + '2008–2021 Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo, Patrick Mahoney, Yoko Harada, Akinori MUSHA, John Shahid, Lars Kanis', 'MIT', 'https://raw.githubusercontent.com/sparklemotion/nokogiri/master/LICENSE.md' ], [ diff --git a/lib/docs/filters/nokogiri2/attribution.rb b/lib/docs/filters/nokogiri2/attribution.rb new file mode 100644 index 00000000..1f4ec420 --- /dev/null +++ b/lib/docs/filters/nokogiri2/attribution.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Docs + class Nokogiri2 + class AttributionFilter < Docs::AttributionFilter + def attribution_link + url = current_url.to_s.sub! 'http://localhost', 'https://nokogiri.org/rdoc' + %(#{url}) + end + end + end +end diff --git a/lib/docs/scrapers/nokogiri2.rb b/lib/docs/scrapers/nokogiri2.rb index 0bb975c0..9b916a40 100644 --- a/lib/docs/scrapers/nokogiri2.rb +++ b/lib/docs/scrapers/nokogiri2.rb @@ -7,15 +7,16 @@ module Docs self.name = 'Nokogiri' self.slug = 'nokogiri' - self.release = '1.10.4' + self.release = '1.13.0' html_filters.replace 'rdoc/entries', 'nokogiri2/entries' + text_filters.replace 'attribution', 'nokogiri2/attribution' options[:root_title] = 'Nokogiri' options[:only_patterns] = [/\ANokogiri/, /\AXSD/] options[:attribution] = <<-HTML - © 2008–2018 Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo,
+ © 2008–2021 Aaron Patterson, Mike Dalessio, Charles Nutter, Sergio Arbeo,
Patrick Mahoney, Yoko Harada, Akinori MUSHA, John Shahid, Lars Kanis
Licensed under the MIT License. HTML