From 75a085b92d1ce5711f04903e6a150d8caa8a2a55 Mon Sep 17 00:00:00 2001 From: Mustafa Cagri Ardic Date: Thu, 18 Apr 2024 22:29:35 +0100 Subject: [PATCH 01/14] add pandas 2.2.2 documentation --- docs/file-scrapers.md | 5 ++++- lib/docs/scrapers/pandas.rb | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index 2cc99165..403c8333 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -183,10 +183,13 @@ mv ./usr/share/doc/openjdk-16-jre-headless/api/ docs/openjdk~$VERSION ## Pandas +From the home directory; `devdocs`, execute below: + ```sh -curl https://pandas.pydata.org/docs/pandas.zip | bsdtar --extract --file - --directory=docs/pandas~1 +curl https://pandas.pydata.org/docs/pandas.zip -o tmp.zip && unzip tmp.zip -d docs/pandas~2 && rm tmp.zip ``` + ## PHP Click the link under the "Many HTML files" column on https://www.php.net/download-docs.php, extract the tarball, change its name to `php` and put it in `docs/`. diff --git a/lib/docs/scrapers/pandas.rb b/lib/docs/scrapers/pandas.rb index d748c297..c95f7561 100644 --- a/lib/docs/scrapers/pandas.rb +++ b/lib/docs/scrapers/pandas.rb @@ -16,6 +16,29 @@ module Docs Licensed under the 3-clause BSD License. HTML + version '2' do + self.release = '2.2.2' + self.base_url = "https://pandas.pydata.org/pandas-docs/version/#{self.release}/" + + html_filters.push 'pandas/clean_html', 'pandas/entries' + + options[:container] = 'main section' + + options[:skip_patterns] = [ + /development/, + /getting_started/, + /whatsnew/ + ] + + options[:skip] = [ + 'panel.html', + 'pandas.pdf', + 'pandas.zip', + 'ecosystem.html' + ] + + end + version '1' do self.release = '1.5.0' self.base_url = "https://pandas.pydata.org/pandas-docs/version/#{self.release}/" From e5fc6c2042511e0fb40f7cd18f2ff651bf713d83 Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Fri, 14 Jun 2024 17:03:56 +0200 Subject: [PATCH 02/14] Update Elixir documentation (1.16 and 1.17) The guides have moved from a separate page into the same documentation system. This required shuffling of the cleanup functions, which is subtly incompatible with the docs of the older versions, or would have required if/else in various places. For legibility, I thus opted to remove old versions. --- lib/docs/filters/elixir/clean_html.rb | 29 ++--- lib/docs/filters/elixir/entries.rb | 38 +++--- lib/docs/scrapers/elixir.rb | 170 ++------------------------ 3 files changed, 32 insertions(+), 205 deletions(-) diff --git a/lib/docs/filters/elixir/clean_html.rb b/lib/docs/filters/elixir/clean_html.rb index c2c31d46..6783afb2 100644 --- a/lib/docs/filters/elixir/clean_html.rb +++ b/lib/docs/filters/elixir/clean_html.rb @@ -2,32 +2,12 @@ module Docs class Elixir class CleanHtmlFilter < Filter def call - if current_url.path.start_with?('/getting-started') - guide - else - api - end + api doc end - def guide - @doc = at_css('#content article') - - css('pre > code').each do |node| - node.parent.content = node.content - end - - css('div > pre.highlight').each do |node| - node.content = node.content - node['data-language'] = node.parent['class'][/language-(\w+)/, 1] - node.parent.before(node).remove - end - end - def api - css('.hover-link', 'footer', ':not(.detail-header) > .view-source').remove - - css('h1 .settings').remove + css('.top-search').remove css('.summary').each do |node| node.name = 'dl' @@ -65,6 +45,11 @@ module Docs end end + css('h1 a.icon-action[title="View Source"]').each do |node| + node['class'] = 'source' + node.content = "Source" + end + css('pre').each do |node| node['data-language'] = 'elixir' node.content = node.content diff --git a/lib/docs/filters/elixir/entries.rb b/lib/docs/filters/elixir/entries.rb index 7f73b54a..640f65e1 100644 --- a/lib/docs/filters/elixir/entries.rb +++ b/lib/docs/filters/elixir/entries.rb @@ -3,25 +3,21 @@ module Docs class EntriesFilter < Docs::EntriesFilter def get_name css('h1 .app-vsn').remove - name = (at_css('h1 > span') or at_css('h1')).content.strip - - if current_url.path.start_with?('/getting-started') - name.remove(/\.\z/) - else - name = name.split(' ').first unless name.start_with?('mix ') # ecto - name - end + (at_css('h1 > span') or at_css('h1')).content.strip end def get_type - if current_url.path.start_with?('/getting-started') - if subpath.start_with?('mix-otp') - 'Guide: Mix & OTP' - elsif subpath.start_with?('meta') - 'Guide: Metaprogramming' - else - 'Guide' - end + section = at_css('h1 a.source').attr('href').match('elixir/pages/([^/]+)/')&.captures&.first + if section == "mix-and-otp" + return "Mix & OTP" + elsif section + return section.gsub("-", " ").capitalize + end + + name = at_css('h1 span').text + case name.split(' ').first + when 'mix' then 'Mix Tasks' + when 'Changelog' then 'References' else case at_css('h1 small').try(:content) when 'exception' @@ -29,19 +25,13 @@ module Docs when 'protocol' 'Protocols' else - if name.start_with?('Phoenix') - name.split('.')[0..2].join('.') - elsif name.start_with?('mix ') - 'Mix Tasks' - else - name.split('.').first - end + name end end end def additional_entries - return [] if type == 'Exceptions' || type == 'Guide' || root_page? + return [] if root_page? css('.detail-header').map do |node| id = node['id'] diff --git a/lib/docs/scrapers/elixir.rb b/lib/docs/scrapers/elixir.rb index 75bee5e9..2523235e 100644 --- a/lib/docs/scrapers/elixir.rb +++ b/lib/docs/scrapers/elixir.rb @@ -4,7 +4,7 @@ module Docs self.name = 'Elixir' self.type = 'elixir' - self.root_path = 'api-reference.html' + self.root_path = 'introduction.html' self.links = { home: 'https://elixir-lang.org/', code: 'https://github.com/elixir-lang/elixir' @@ -12,193 +12,45 @@ module Docs html_filters.push 'elixir/clean_html', 'elixir/entries', 'title' - options[:container] = ->(filter) { - filter.current_url.path.start_with?('/getting-started') ? '#main' : '#content' - } + options[:container] = '#content' options[:title] = false options[:root_title] = 'Elixir' options[:attribution] = <<-HTML - © 2012 Plataformatec
+ © 2012 - 2024 The Elixir Team
Licensed under the Apache License, Version 2.0. HTML def initial_urls - [ "https://hexdocs.pm/elixir/#{self.class.release}/api-reference.html", + [ "https://hexdocs.pm/elixir/#{self.class.release}/introduction.html", "https://hexdocs.pm/eex/#{self.class.release}/EEx.html", "https://hexdocs.pm/ex_unit/#{self.class.release}/ExUnit.html", "https://hexdocs.pm/iex/#{self.class.release}/IEx.html", "https://hexdocs.pm/logger/#{self.class.release}/Logger.html", - "https://hexdocs.pm/mix/#{self.class.release}/Mix.html", - "https://elixir-lang.org/getting-started/introduction.html" ] - end - - version '1.15' do - self.release = '1.15.4' - self.base_urls = [ - "https://hexdocs.pm/elixir/#{release}/", - "https://hexdocs.pm/eex/#{release}/", - "https://hexdocs.pm/ex_unit/#{release}/", - "https://hexdocs.pm/iex/#{release}/", - "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' - ] - end - - version '1.14' do - self.release = '1.14.1' - self.base_urls = [ - "https://hexdocs.pm/elixir/#{release}/", - "https://hexdocs.pm/eex/#{release}/", - "https://hexdocs.pm/ex_unit/#{release}/", - "https://hexdocs.pm/iex/#{release}/", - "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' - ] - end - - version '1.13' do - self.release = '1.13.4' - self.base_urls = [ - "https://hexdocs.pm/elixir/#{release}/", - "https://hexdocs.pm/eex/#{release}/", - "https://hexdocs.pm/ex_unit/#{release}/", - "https://hexdocs.pm/iex/#{release}/", - "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' - ] - end - - version '1.12' do - self.release = '1.12.0' - self.base_urls = [ - "https://hexdocs.pm/elixir/#{release}/", - "https://hexdocs.pm/eex/#{release}/", - "https://hexdocs.pm/ex_unit/#{release}/", - "https://hexdocs.pm/iex/#{release}/", - "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' - ] - end - - version '1.11' do - self.release = '1.11.2' - self.base_urls = [ - "https://hexdocs.pm/elixir/#{release}/", - "https://hexdocs.pm/eex/#{release}/", - "https://hexdocs.pm/ex_unit/#{release}/", - "https://hexdocs.pm/iex/#{release}/", - "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' - ] - end - - version '1.10' do - self.release = '1.10.4' - self.base_urls = [ - "https://hexdocs.pm/elixir/#{release}/", - "https://hexdocs.pm/eex/#{release}/", - "https://hexdocs.pm/ex_unit/#{release}/", - "https://hexdocs.pm/iex/#{release}/", - "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' - ] - end - - version '1.9' do - self.release = '1.9.4' - self.base_urls = [ - "https://hexdocs.pm/elixir/#{release}/", - "https://hexdocs.pm/eex/#{release}/", - "https://hexdocs.pm/ex_unit/#{release}/", - "https://hexdocs.pm/iex/#{release}/", - "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' - ] - end - - version '1.8' do - self.release = '1.8.2' - self.base_urls = [ - "https://hexdocs.pm/elixir/#{release}/", - "https://hexdocs.pm/eex/#{release}/", - "https://hexdocs.pm/ex_unit/#{release}/", - "https://hexdocs.pm/iex/#{release}/", - "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' - ] - end - - version '1.7' do - self.release = '1.7.4' - self.base_urls = [ - "https://hexdocs.pm/elixir/#{release}/", - "https://hexdocs.pm/eex/#{release}/", - "https://hexdocs.pm/ex_unit/#{release}/", - "https://hexdocs.pm/iex/#{release}/", - "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' - ] - end - - version '1.6' do - self.release = '1.6.6' - self.base_urls = [ - "https://hexdocs.pm/elixir/#{release}/", - "https://hexdocs.pm/eex/#{release}/", - "https://hexdocs.pm/ex_unit/#{release}/", - "https://hexdocs.pm/iex/#{release}/", - "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' - ] - end - - version '1.5' do - self.release = '1.5.3' - self.base_urls = [ - "https://hexdocs.pm/elixir/#{release}/", - "https://hexdocs.pm/eex/#{release}/", - "https://hexdocs.pm/ex_unit/#{release}/", - "https://hexdocs.pm/iex/#{release}/", - "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' - ] + "https://hexdocs.pm/mix/#{self.class.release}/Mix.html" ] end - version '1.4' do - self.release = '1.4.5' + version '1.17' do + self.release = '1.17.0' self.base_urls = [ "https://hexdocs.pm/elixir/#{release}/", "https://hexdocs.pm/eex/#{release}/", "https://hexdocs.pm/ex_unit/#{release}/", "https://hexdocs.pm/iex/#{release}/", "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' + "https://hexdocs.pm/mix/#{release}/" ] end - version '1.3' do - self.release = '1.3.4' + version '1.16' do + self.release = '1.16.3' self.base_urls = [ "https://hexdocs.pm/elixir/#{release}/", "https://hexdocs.pm/eex/#{release}/", "https://hexdocs.pm/ex_unit/#{release}/", "https://hexdocs.pm/iex/#{release}/", "https://hexdocs.pm/logger/#{release}/", - "https://hexdocs.pm/mix/#{release}/", - 'https://elixir-lang.org/getting-started/' + "https://hexdocs.pm/mix/#{release}/" ] end From a8ed38260f65cbb1f9e4a523cf290a56e1592a6d Mon Sep 17 00:00:00 2001 From: TK Lai Date: Tue, 25 Jun 2024 18:00:27 +0800 Subject: [PATCH 03/14] Add Laravel 11 documentation --- lib/docs/scrapers/laravel.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/docs/scrapers/laravel.rb b/lib/docs/scrapers/laravel.rb index 9b3c0771..ac7a667c 100644 --- a/lib/docs/scrapers/laravel.rb +++ b/lib/docs/scrapers/laravel.rb @@ -29,6 +29,20 @@ module Docs Laravel is a trademark of Taylor Otwell. HTML + version '11' do + self.release = '11.11.1' + self.root_path = '/api/11.x/index.html' + self.initial_paths = %w(/docs/11.x/installation /api/11.x/classes.html) + + options[:only_patterns] = [%r{\A/api/11\.x/}, %r{\A/docs/11\.x/}] + + options[:fix_urls] = ->(url) do + url.sub! %r{11.x/+}, "11.x/" + url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?![1-9]?\d)}, "#{Laravel.base_url}/docs/11.x/" + url + end + end + version '10' do self.release = '10.13.0' self.root_path = '/api/10.x/index.html' From c76643a1b155353b9d69617b030aa2fd447d874e Mon Sep 17 00:00:00 2001 From: TK Lai Date: Tue, 25 Jun 2024 18:02:01 +0800 Subject: [PATCH 04/14] Update Laravel 9 & 10 documentation --- lib/docs/scrapers/laravel.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/laravel.rb b/lib/docs/scrapers/laravel.rb index 9b3c0771..b0323817 100644 --- a/lib/docs/scrapers/laravel.rb +++ b/lib/docs/scrapers/laravel.rb @@ -30,7 +30,7 @@ module Docs HTML version '10' do - self.release = '10.13.0' + self.release = '10.48.14' self.root_path = '/api/10.x/index.html' self.initial_paths = %w(/docs/10.x/installation /api/10.x/classes.html) @@ -44,7 +44,7 @@ module Docs end version '9' do - self.release = '9.52.8' + self.release = '9.52.16' self.root_path = '/api/9.x/index.html' self.initial_paths = %w(/docs/9.x/installation /api/9.x/classes.html) From a2f86786483ecd9db15225861c944518d06415c7 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 16 Jul 2024 16:58:03 +0100 Subject: [PATCH 05/14] Update QUnit documentation (2.21.0) --- lib/docs/scrapers/qunit.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/qunit.rb b/lib/docs/scrapers/qunit.rb index f0d649f5..ff13fbdb 100644 --- a/lib/docs/scrapers/qunit.rb +++ b/lib/docs/scrapers/qunit.rb @@ -4,8 +4,8 @@ module Docs class Qunit < UrlScraper self.name = 'QUnit' self.type = 'qunit' - self.release = '2.19.3' - self.base_url = 'https://api.qunitjs.com/' + self.release = '2.21.0' + self.base_url = 'https://qunitjs.com/api/' self.root_path = '/' self.links = { home: 'https://qunitjs.com/', @@ -18,13 +18,14 @@ module Docs options[:container] = '.main' options[:skip_patterns] = [ - /deprecated/, /^QUnit$/, /^assert$/, /^callbacks$/, /^async$/, /^config$/, /^extension$/, + /^deprecated$/, + /^removed$/, ] options[:attribution] = <<-HTML From 8a2e4761c81e59e78750bfec5ba27bd2b1727bdc Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 17 Jul 2024 06:07:06 +0200 Subject: [PATCH 06/14] qunit: remove wrapping
--- lib/docs/filters/qunit/clean_html.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/filters/qunit/clean_html.rb b/lib/docs/filters/qunit/clean_html.rb index eb104b5c..ff4d9ec9 100644 --- a/lib/docs/filters/qunit/clean_html.rb +++ b/lib/docs/filters/qunit/clean_html.rb @@ -4,7 +4,7 @@ module Docs class Qunit class CleanHtmlFilter < Filter def call - @doc = at_css('.content[role="main"]') + @doc = at_css('.content[role="main"] > article') css('.sidebar').remove css('pre').each do |node| node['data-language'] = 'javascript' From 01df1f62e81e60567e7d73d73698b9fb7d276949 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 17 Jul 2024 06:34:14 +0200 Subject: [PATCH 07/14] Update FastAPI documentation (0.111.1) --- lib/docs/scrapers/fastapi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/fastapi.rb b/lib/docs/scrapers/fastapi.rb index b19a1c78..ed857934 100644 --- a/lib/docs/scrapers/fastapi.rb +++ b/lib/docs/scrapers/fastapi.rb @@ -2,7 +2,7 @@ module Docs class Fastapi < UrlScraper self.name = 'FastAPI' self.type = 'fastapi' - self.release = '0.100.1' + self.release = '0.111.1' self.base_url = 'https://fastapi.tiangolo.com/' self.root_path = '/' self.links = { From 59aaafcbbf71a595870d42d7b3ae6a00ffec9761 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 17 Jul 2024 06:38:49 +0200 Subject: [PATCH 08/14] Update Elixir documentation (1.17.2) --- lib/docs/scrapers/elixir.rb | 175 +++++++++++++++++++++++++++++++++++- 1 file changed, 173 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/elixir.rb b/lib/docs/scrapers/elixir.rb index 2523235e..47f361e6 100644 --- a/lib/docs/scrapers/elixir.rb +++ b/lib/docs/scrapers/elixir.rb @@ -17,7 +17,7 @@ module Docs options[:root_title] = 'Elixir' options[:attribution] = <<-HTML - © 2012 - 2024 The Elixir Team
+ © 2012-2024 The Elixir Team
Licensed under the Apache License, Version 2.0. HTML @@ -31,7 +31,7 @@ module Docs end version '1.17' do - self.release = '1.17.0' + self.release = '1.17.2' self.base_urls = [ "https://hexdocs.pm/elixir/#{release}/", "https://hexdocs.pm/eex/#{release}/", @@ -54,6 +54,177 @@ module Docs ] end + # scraping of older versions is no longer supported! + + version '1.15' do + self.release = '1.15.4' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + + version '1.14' do + self.release = '1.14.1' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + + version '1.13' do + self.release = '1.13.4' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + + version '1.12' do + self.release = '1.12.0' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + + version '1.11' do + self.release = '1.11.2' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + + version '1.10' do + self.release = '1.10.4' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + + version '1.9' do + self.release = '1.9.4' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + + version '1.8' do + self.release = '1.8.2' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + + version '1.7' do + self.release = '1.7.4' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + + version '1.6' do + self.release = '1.6.6' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + + version '1.5' do + self.release = '1.5.3' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + + version '1.4' do + self.release = '1.4.5' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + + version '1.3' do + self.release = '1.3.4' + self.base_urls = [ + "https://hexdocs.pm/elixir/#{release}/", + "https://hexdocs.pm/eex/#{release}/", + "https://hexdocs.pm/ex_unit/#{release}/", + "https://hexdocs.pm/iex/#{release}/", + "https://hexdocs.pm/logger/#{release}/", + "https://hexdocs.pm/mix/#{release}/", + 'https://elixir-lang.org/getting-started/' + ] + end + def get_latest_version(opts) doc = fetch_doc('https://hexdocs.pm/elixir/api-reference.html', opts) doc.at_css('.sidebar-projectVersion').content.strip[1..-1] From 0bb04c0b7503c3a687ca2d8014ad5b5e316a96d3 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 17 Jul 2024 07:08:10 +0200 Subject: [PATCH 09/14] Update Vitest documentation (2.0.3) --- lib/docs/scrapers/vitest.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/vitest.rb b/lib/docs/scrapers/vitest.rb index 251b6c69..bbb82a27 100644 --- a/lib/docs/scrapers/vitest.rb +++ b/lib/docs/scrapers/vitest.rb @@ -17,7 +17,7 @@ module Docs Licensed under the MIT License. HTML - self.release = '1.2.2' + self.release = '2.0.3' self.base_url = 'https://vitest.dev/' self.initial_paths = %w(guide/) html_filters.push 'vitest/entries', 'vite/clean_html' From 6caa5eb1b18ab8d34034f319024bd81877035b36 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 17 Jul 2024 07:09:38 +0200 Subject: [PATCH 10/14] docs:upload no longer requires net/sftp --- Gemfile | 1 - Gemfile.lock | 4 ---- lib/tasks/docs.thor | 2 -- techstack.md | 1 - techstack.yml | 14 -------------- 5 files changed, 22 deletions(-) diff --git a/Gemfile b/Gemfile index cfbf549f..e3847952 100644 --- a/Gemfile +++ b/Gemfile @@ -39,7 +39,6 @@ group :development do end group :docs do - gem 'net-sftp', require: false gem 'progress_bar', require: false gem 'redcarpet' gem 'tty-pager', require: false diff --git a/Gemfile.lock b/Gemfile.lock index e673c7b6..2b9d1714 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,9 +57,6 @@ GEM mustermann (3.0.0) ruby2_keywords (~> 0.0.1) mutex_m (0.2.0) - net-sftp (4.0.0) - net-ssh (>= 5.0.0, < 8.0.0) - net-ssh (7.0.1) newrelic_rpm (8.16.0) nokogiri (1.16.6) mini_portile2 (~> 2.8.2) @@ -159,7 +156,6 @@ DEPENDENCIES image_optim image_optim_pack minitest - net-sftp newrelic_rpm nokogiri progress_bar diff --git a/lib/tasks/docs.thor b/lib/tasks/docs.thor index 54009530..5b85a8b0 100644 --- a/lib/tasks/docs.thor +++ b/lib/tasks/docs.thor @@ -162,8 +162,6 @@ class DocsCLI < Thor option :dryrun, type: :boolean option :packaged, type: :boolean def upload(*names) - require 'net/sftp' - if options[:packaged] slugs = Dir[File.join(Docs.store_path, '*.tar.gz')].map { |f| File.basename(f, '.tar.gz') } docs = find_docs_by_slugs(slugs) diff --git a/techstack.md b/techstack.md index f9657f09..d6415425 100644 --- a/techstack.md +++ b/techstack.md @@ -159,7 +159,6 @@ Full tech stack [here](/techstack.md) |[image_optim](https://rubygems.org/image_optim)|v0.31.3|11/14/22|Paul Sernatinger |MIT|N/A| |[image_optim_pack](https://rubygems.org/image_optim_pack)|v0.10.1|11/14/22|Paul Sernatinger |MIT|N/A| |[minitest](https://rubygems.org/minitest)|v5.21.2|01/03/15|Thibaut |MIT|N/A| -|[net-sftp](https://rubygems.org/net-sftp)|v4.0.0|11/14/22|Paul Sernatinger |MIT|N/A| |[newrelic_rpm](https://rubygems.org/newrelic_rpm)|v8.16.0|03/24/18|Thibaut Courouble |Apache-2.0|N/A| |[nokogiri](https://rubygems.org/nokogiri)|v1.16.0|10/21/18|Thibaut Courouble |MIT|N/A| |[progress_bar](https://rubygems.org/progress_bar)|v1.3.3|01/26/14|Thibaut |WTFPL|N/A| diff --git a/techstack.yml b/techstack.yml index 88f89c51..99d14af4 100644 --- a/techstack.yml +++ b/techstack.yml @@ -268,20 +268,6 @@ tools: detection_source: Gemfile last_updated_by: Thibaut last_updated_on: 2015-01-03 15:38:22.000000000 Z -- name: net-sftp - description: A pure Ruby implementation of the SFTP client protocol - package_url: https://rubygems.org/net-sftp - version: 4.0.0 - license: MIT - open_source: true - hosted_saas: false - category: Libraries - sub_category: RubyGems Packages - image_url: https://img.stackshare.io/package/19106/default_92b412aaa5197ea1fc2d70a503018e4186714110.png - detection_source_url: https://github.com/freeCodeCamp/devdocs/blob/main/Gemfile.lock - detection_source: Gemfile - last_updated_by: Paul Sernatinger - last_updated_on: 2022-11-14 14:30:30.000000000 Z - name: newrelic_rpm description: New Relic is a performance management system, developed by New Relic, Inc From 158e2145558a1b81c45320b16284509c213a9ceb Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 18 Jul 2024 20:40:53 +0200 Subject: [PATCH 11/14] Update Rust documentation (1.79.0) --- lib/docs/scrapers/rust.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/rust.rb b/lib/docs/scrapers/rust.rb index 536aaefd..e7d87ce0 100644 --- a/lib/docs/scrapers/rust.rb +++ b/lib/docs/scrapers/rust.rb @@ -3,7 +3,7 @@ module Docs class Rust < UrlScraper self.type = 'rust' - self.release = '1.75.0' + self.release = '1.79.0' self.base_url = 'https://doc.rust-lang.org/' self.root_path = 'book/index.html' self.initial_paths = %w( From baa1615c84c600380f5a49de79c4ffb80894deef Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 18 Jul 2024 20:52:47 +0200 Subject: [PATCH 12/14] Update Support Tables documentation (1.0.30001642) --- lib/docs/scrapers/support_tables.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/support_tables.rb b/lib/docs/scrapers/support_tables.rb index 7d9570a9..4318edf3 100644 --- a/lib/docs/scrapers/support_tables.rb +++ b/lib/docs/scrapers/support_tables.rb @@ -7,7 +7,7 @@ module Docs self.name = 'Support Tables' self.slug = 'browser_support_tables' self.type = 'support_tables' - self.release = '1.0.30001574' + self.release = '1.0.30001642' self.base_url = 'https://github.com/Fyrd/caniuse/raw/main/' # https://github.com/Fyrd/caniuse/blob/main/LICENSE From 5a0b5ebd7aec484f7160fba9412d4c718a970633 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 13:18:06 +0000 Subject: [PATCH 13/14] chore(deps): update ruby/setup-ruby action to v1.188.0 --- .github/workflows/build.yml | 2 +- .github/workflows/schedule-doc-report.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8d2f066..a0159be9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 - name: Set up Ruby - uses: ruby/setup-ruby@161cd54b698f1fb3ea539faab2e036d409550e3c # v1.187.0 + uses: ruby/setup-ruby@50ba3386b050ad5b97a41fcb81240cbee1d1821f # v1.188.0 with: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Run tests diff --git a/.github/workflows/schedule-doc-report.yml b/.github/workflows/schedule-doc-report.yml index e4488d80..30ab4418 100644 --- a/.github/workflows/schedule-doc-report.yml +++ b/.github/workflows/schedule-doc-report.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 - name: Set up Ruby - uses: ruby/setup-ruby@161cd54b698f1fb3ea539faab2e036d409550e3c # v1.187.0 + uses: ruby/setup-ruby@50ba3386b050ad5b97a41fcb81240cbee1d1821f # v1.188.0 with: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Generate report diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 99ab59bb..d0df2d11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Set up Ruby - uses: ruby/setup-ruby@161cd54b698f1fb3ea539faab2e036d409550e3c # v1.187.0 + uses: ruby/setup-ruby@50ba3386b050ad5b97a41fcb81240cbee1d1821f # v1.188.0 with: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Run tests From 7d24d973e41f5f5399fd16edb08bbb2752655d25 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 24 Jul 2024 23:57:30 +0200 Subject: [PATCH 14/14] Update Python documentation (3.12.4) --- lib/docs/scrapers/python.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index 3988bba3..507080d1 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -1,5 +1,5 @@ module Docs - class Python < FileScraper + class Python < UrlScraper self.type = 'python' self.root_path = 'index.html' self.links = { @@ -23,12 +23,12 @@ module Docs library/sunau.html) options[:attribution] = <<-HTML - © 2001–2023 Python Software Foundation
+ © 2001–2024 Python Software Foundation
Licensed under the PSF License. HTML version '3.12' do - self.release = '3.12.1' + self.release = '3.12.4' self.base_url = "https://docs.python.org/#{self.version}/" html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'