diff --git a/lib/docs/filters/react_bootstrap/clean_html.rb b/lib/docs/filters/react_bootstrap/clean_html.rb index 761e96172d..a0597553b3 100644 --- a/lib/docs/filters/react_bootstrap/clean_html.rb +++ b/lib/docs/filters/react_bootstrap/clean_html.rb @@ -5,8 +5,10 @@ def call @doc = doc.at_css('main') css('.flex-column.d-flex').remove - css('header').remove css('.bs-example').remove + css('nav').remove + css('.clean-btn').remove + css('.tableOfContents_bqdL').remove css('.position-relative pre').each do |node| node.content = node.children.map(&:content).join("\n") @@ -30,4 +32,4 @@ def call end end end -end +end \ No newline at end of file diff --git a/lib/docs/filters/react_bootstrap/entries.rb b/lib/docs/filters/react_bootstrap/entries.rb index e0cc3d739b..ca49b2a004 100644 --- a/lib/docs/filters/react_bootstrap/entries.rb +++ b/lib/docs/filters/react_bootstrap/entries.rb @@ -1,13 +1,18 @@ module Docs class ReactBootstrap class EntriesFilter < Docs::EntriesFilter - def get_name - name = at_css('#rb-docs-content h1, #rb-docs-content h2').content - if name.end_with? '#' - name = name[0..-2] - end - name - end + def get_name + header = at_css('header') + if header + name = header.at_css('h1').content + else + name = at_css('h1').content + end + if name.end_with?('#') + name = name[0..-2] + end + name.strip + end def get_type type = slug.split('/')[0..-2].join(': ') @@ -20,4 +25,4 @@ def get_type end end end -end +end \ No newline at end of file diff --git a/lib/docs/scrapers/homebrew.rb b/lib/docs/scrapers/homebrew.rb index ae2cbec2c7..b2536a9e33 100644 --- a/lib/docs/scrapers/homebrew.rb +++ b/lib/docs/scrapers/homebrew.rb @@ -2,7 +2,7 @@ module Docs class Homebrew < UrlScraper self.name = 'Homebrew' self.type = 'simple' - self.release = '3.5.10' + self.release = '4.0.15' self.base_url = 'https://docs.brew.sh/' self.links = { home: 'https://brew.sh', diff --git a/lib/docs/scrapers/node.rb b/lib/docs/scrapers/node.rb index d8623fc368..aa677f4a15 100644 --- a/lib/docs/scrapers/node.rb +++ b/lib/docs/scrapers/node.rb @@ -22,9 +22,9 @@ class Node < UrlScraper Node.js is a trademark of Joyent, Inc. and is used with its permission.
We are not endorsed by or affiliated with Joyent. HTML - + version do - self.release = '19.0.1' + self.release = '20.2.0' self.base_url = 'https://nodejs.org/api/' end diff --git a/lib/docs/scrapers/react_bootstrap.rb b/lib/docs/scrapers/react_bootstrap.rb index 80df23124e..9382f30c62 100644 --- a/lib/docs/scrapers/react_bootstrap.rb +++ b/lib/docs/scrapers/react_bootstrap.rb @@ -3,7 +3,7 @@ class ReactBootstrap < UrlScraper self.name = 'React Bootstrap' self.slug = 'react_bootstrap' self.type = 'simple' - self.release = '1.5.0' + self.release = '2.8.0' self.base_url = 'https://react-bootstrap.github.io/' self.links = { @@ -23,13 +23,8 @@ class ReactBootstrap < UrlScraper options[:trailing_slash] = true options[:attribution] = <<-HTML - © 2014–present Stephen J. Collings, Matthew Honnibal, Pieter Vanderwerff
+ © 2023 React Bootstrap.
Licensed under the MIT License (MIT). HTML - - def get_latest_version(opts) - doc = fetch_doc('https://react-bootstrap.github.io/', opts) - doc.at_css('#t-version>a').content.split()[0].strip[1..-1] - end end end