From aeaaa44a539f9bacc5d5d66bfbef7ff112f3aa54 Mon Sep 17 00:00:00 2001 From: AnmolDh <73706789+AnmolDh@users.noreply.github.com> Date: Sun, 21 May 2023 18:44:32 +0530 Subject: [PATCH 1/6] bump node.js version --- lib/docs/scrapers/node.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/node.rb b/lib/docs/scrapers/node.rb index d8623fc368..f60f9c6b1d 100644 --- a/lib/docs/scrapers/node.rb +++ b/lib/docs/scrapers/node.rb @@ -22,12 +22,17 @@ 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 + version '19 LTS' do + self.release = '19.9.0' + self.base_url = 'https://nodejs.org/dist/latest-v19.x/docs/api/' + end + version '18 LTS' do self.release = '18.12.1' self.base_url = 'https://nodejs.org/dist/latest-v18.x/docs/api/' @@ -78,4 +83,4 @@ def get_latest_version(opts) doc.at_css('#home-intro > .home-downloadblock:last-of-type > a')['data-version'][1..-1] end end -end +end \ No newline at end of file From f6e4cb627d73759a1e80cd6e8912bc91942acb41 Mon Sep 17 00:00:00 2001 From: AnmolDh <73706789+AnmolDh@users.noreply.github.com> Date: Sun, 21 May 2023 18:54:18 +0530 Subject: [PATCH 2/6] bump homebrew version --- lib/docs/scrapers/homebrew.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', From 595f277055ce95a802fc2c449e48be25f1d93115 Mon Sep 17 00:00:00 2001 From: AnmolDh <73706789+AnmolDh@users.noreply.github.com> Date: Sun, 21 May 2023 19:01:17 +0530 Subject: [PATCH 3/6] bump react_bs --- lib/docs/scrapers/react_bootstrap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/react_bootstrap.rb b/lib/docs/scrapers/react_bootstrap.rb index 80df23124e..b2e87ddf41 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.7.2' self.base_url = 'https://react-bootstrap.github.io/' self.links = { From 48c1f8e1aff1ef47f2e4e8495fb90a8bcb25d976 Mon Sep 17 00:00:00 2001 From: Anmol Dhiman <73706789+AnmolDh@users.noreply.github.com> Date: Tue, 23 May 2023 09:11:52 +0530 Subject: [PATCH 4/6] rm node.js 19 --- lib/docs/scrapers/node.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/docs/scrapers/node.rb b/lib/docs/scrapers/node.rb index f60f9c6b1d..aa677f4a15 100644 --- a/lib/docs/scrapers/node.rb +++ b/lib/docs/scrapers/node.rb @@ -28,11 +28,6 @@ class Node < UrlScraper self.base_url = 'https://nodejs.org/api/' end - version '19 LTS' do - self.release = '19.9.0' - self.base_url = 'https://nodejs.org/dist/latest-v19.x/docs/api/' - end - version '18 LTS' do self.release = '18.12.1' self.base_url = 'https://nodejs.org/dist/latest-v18.x/docs/api/' @@ -83,4 +78,4 @@ def get_latest_version(opts) doc.at_css('#home-intro > .home-downloadblock:last-of-type > a')['data-version'][1..-1] end end -end \ No newline at end of file +end From f9a3826bb02c3bfc32962c6eab7581ed08008540 Mon Sep 17 00:00:00 2001 From: Anmol Dhiman <73706789+AnmolDh@users.noreply.github.com> Date: Sat, 10 Jun 2023 10:34:06 +0530 Subject: [PATCH 5/6] Update react_bootstrap Co-authored-by: South Drifted --- lib/docs/scrapers/react_bootstrap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/react_bootstrap.rb b/lib/docs/scrapers/react_bootstrap.rb index b2e87ddf41..30b8f31c0f 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 = '2.7.2' + self.release = '2.7.4' self.base_url = 'https://react-bootstrap.github.io/' self.links = { From 398aace76260aade820df83935c3b3f72eeb0e7b Mon Sep 17 00:00:00 2001 From: AnmolDh <73706789+AnmolDh@users.noreply.github.com> Date: Mon, 3 Jul 2023 13:56:54 +0530 Subject: [PATCH 6/6] fix r-bs --- .../filters/react_bootstrap/clean_html.rb | 6 ++++-- lib/docs/filters/react_bootstrap/entries.rb | 21 ++++++++++++------- lib/docs/scrapers/react_bootstrap.rb | 9 ++------ 3 files changed, 19 insertions(+), 17 deletions(-) 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/react_bootstrap.rb b/lib/docs/scrapers/react_bootstrap.rb index 30b8f31c0f..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 = '2.7.4' + 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