From 4e1d561c078aba3f48c473987a86458af8910826 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 7 Feb 2020 20:04:16 +0100 Subject: [PATCH 01/33] bundle update ffi --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 473542b6..a73db036 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,7 +26,7 @@ GEM eventmachine (1.2.7) execjs (2.7.0) exifr (1.3.6) - ffi (1.11.1) + ffi (1.12.2) fspath (3.1.2) highline (2.0.3) html-pipeline (2.12.0) From b1a143440f48d71edb78039e94e17f6d2e7dcb2c Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 7 Feb 2020 20:17:09 +0100 Subject: [PATCH 02/33] Fix get_latest_version for various scrapers --- lib/docs/scrapers/ansible.rb | 2 +- lib/docs/scrapers/dart.rb | 2 +- lib/docs/scrapers/gnuplot.rb | 6 ++++++ lib/docs/scrapers/pandas.rb | 4 +--- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/docs/scrapers/ansible.rb b/lib/docs/scrapers/ansible.rb index 6826b393..5a19e393 100644 --- a/lib/docs/scrapers/ansible.rb +++ b/lib/docs/scrapers/ansible.rb @@ -71,7 +71,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://docs.ansible.com/ansible/latest/index.html', opts) - doc.at_css('.DocSiteProduct-CurrentVersion').content.strip + doc.at_css('.version').content.strip end end end diff --git a/lib/docs/scrapers/dart.rb b/lib/docs/scrapers/dart.rb index e3b8c289..4522762b 100644 --- a/lib/docs/scrapers/dart.rb +++ b/lib/docs/scrapers/dart.rb @@ -33,7 +33,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://api.dartlang.org/', opts) label = doc.at_css('footer > span').content.strip - label.sub(/Dart /, '') + label.sub(/Dart\s*/, '') end end end diff --git a/lib/docs/scrapers/gnuplot.rb b/lib/docs/scrapers/gnuplot.rb index 0682ade4..d6d5b195 100644 --- a/lib/docs/scrapers/gnuplot.rb +++ b/lib/docs/scrapers/gnuplot.rb @@ -37,5 +37,11 @@ module Docs Distributed under the gnuplot license (rights to distribute modified versions are withheld). HTML + def get_latest_version(opts) + doc = fetch_doc('http://www.gnuplot.info/download.html', opts) + label = doc.at_css('h2').content.strip + label.sub(/[^0-9.]*/, '') + end + end end diff --git a/lib/docs/scrapers/pandas.rb b/lib/docs/scrapers/pandas.rb index e333da7f..fedba47b 100644 --- a/lib/docs/scrapers/pandas.rb +++ b/lib/docs/scrapers/pandas.rb @@ -62,9 +62,7 @@ module Docs end def get_latest_version(opts) - doc = fetch_doc('http://pandas.pydata.org/pandas-docs/stable/', opts) - label = doc.at_css('.body > .section > p').content - label.scan(/Version: ([0-9.]+)/)[0][0] + get_latest_github_release('pandas-dev', 'pandas', opts) end end end From c25fbb4b3c8d61802fca38e175373ce26b491b09 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 7 Feb 2020 20:23:56 +0100 Subject: [PATCH 03/33] doc.fetch: read GITHUB_TOKEN also from ENV --- lib/docs/core/doc.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/docs/core/doc.rb b/lib/docs/core/doc.rb index a5268300..94611208 100644 --- a/lib/docs/core/doc.rb +++ b/lib/docs/core/doc.rb @@ -220,6 +220,8 @@ module Docs if opts.key?(:github_token) and url.start_with?('https://api.github.com/') headers['Authorization'] = "token #{opts[:github_token]}" + elsif ENV['GITHUB_TOKEN'] and url.start_with?('https://api.github.com/') + headers['Authorization'] = "token #{ENV['GITHUB_TOKEN']}" end opts[:logger].debug("Fetching #{url}") From e75655ac086c2f1c9dd9d05dc6c7b81ba45e5748 Mon Sep 17 00:00:00 2001 From: Mark Knol Date: Thu, 20 Feb 2020 11:41:43 +0100 Subject: [PATCH 04/33] Update haxe.rb --- lib/docs/scrapers/haxe.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/haxe.rb b/lib/docs/scrapers/haxe.rb index 2dbab01a..892085be 100644 --- a/lib/docs/scrapers/haxe.rb +++ b/lib/docs/scrapers/haxe.rb @@ -2,7 +2,7 @@ module Docs class Haxe < UrlScraper self.name = 'Haxe' self.type = 'simple' - self.release = '3.4.7' + self.release = '4.0.5' self.base_url = 'https://api.haxe.org/' html_filters.push 'haxe/clean_html', 'haxe/entries' @@ -10,7 +10,7 @@ module Docs options[:container] = '.span9' options[:attribution] = <<-HTML - © 2005–2018 Haxe Foundation
+ © 2005–2020 Haxe Foundation
Licensed under a MIT license. HTML @@ -20,7 +20,7 @@ module Docs code: 'https://github.com/HaxeFoundation/haxe' } - options[:skip_patterns] = [/\A(?:cpp|cs|flash|java|js|neko|php|python|lua|hl|sys)/i] + options[:skip_patterns] = [/\A(?:cpp|cs|flash|java|js|neko|php|python|lua|hl|sys|eval)/i] end version 'C++' do @@ -67,6 +67,10 @@ module Docs self.base_url = 'https://api.haxe.org/python/' end + version 'Eval' do + self.base_url = 'https://api.haxe.org/eval/' + end + def get_latest_version(opts) doc = fetch_doc('https://api.haxe.org/', opts) label = doc.at_css('.container.main-content h1 > small').content From 7ce6008b91896c3162047cf2169bb0d66f4152a3 Mon Sep 17 00:00:00 2001 From: David Chen Date: Sat, 23 May 2020 12:47:37 -0700 Subject: [PATCH 05/33] Add ruby 2.7.1 docs --- lib/docs/scrapers/rdoc/ruby.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/docs/scrapers/rdoc/ruby.rb b/lib/docs/scrapers/rdoc/ruby.rb index 3a2b8b76..8dab6bf4 100644 --- a/lib/docs/scrapers/rdoc/ruby.rb +++ b/lib/docs/scrapers/rdoc/ruby.rb @@ -69,6 +69,10 @@ module Docs Licensed under their own licenses. HTML + version '2.7' do + self.release = '2.7.1' + end + version '2.6' do self.release = '2.6.3' end From b40b8af0d8829091da158bf2f6d36c52dc4cdcc4 Mon Sep 17 00:00:00 2001 From: Jiawen Geng Date: Mon, 10 Aug 2020 03:47:19 +0000 Subject: [PATCH 06/33] add Node.js 14 --- lib/docs/scrapers/node.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/docs/scrapers/node.rb b/lib/docs/scrapers/node.rb index c5ac060c..39b55004 100644 --- a/lib/docs/scrapers/node.rb +++ b/lib/docs/scrapers/node.rb @@ -23,7 +23,12 @@ module Docs HTML version do - self.release = '12.9.1' + self.release = '14.7.0' + self.base_url = 'https://nodejs.org/dist/latest-v14.x/docs/api/' + end + + version '12 LTS' do + self.release = '12.18.3' self.base_url = 'https://nodejs.org/dist/latest-v12.x/docs/api/' end From c037839b5a88ef39eef00a9e18d203857d384ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Bu=C5=82aj?= Date: Fri, 2 Oct 2020 10:09:31 +0200 Subject: [PATCH 07/33] Update react.rb Updated react version to current latest one (16.13.1) https://reactjs.org/versions --- lib/docs/scrapers/react.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/react.rb b/lib/docs/scrapers/react.rb index e293cf11..f6dc599c 100644 --- a/lib/docs/scrapers/react.rb +++ b/lib/docs/scrapers/react.rb @@ -2,7 +2,7 @@ module Docs class React < UrlScraper self.name = 'React' self.type = 'simple' - self.release = '16.12.0' + self.release = '16.13.1' self.base_url = 'https://reactjs.org/docs/' self.root_path = 'hello-world.html' self.links = { From 210ab2a6c5ee2047d395948c234556ed697fc80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20B=C3=A4lter?= Date: Wed, 21 Oct 2020 17:06:06 +0200 Subject: [PATCH 08/33] Searching for maintainers --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 63d31ddc..74fb4046 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ DevDocs combines multiple developer documentations in a clean and organized web DevDocs was created by [Thibaut Courouble](https://thibaut.me) and is operated by [freeCodeCamp](https://www.freecodecamp.org). +## We are currently searching for maintainers + +Please reach out to `@Thibaut` on [Gitter](https://gitter.im/FreeCodeCamp/DevDocs) if you would like to join the team! + Keep track of development news: * Join the contributor chat room on [Gitter](https://gitter.im/FreeCodeCamp/DevDocs) From 8d5cebdfe3389f1fb5d03d97c71fbb4ba41bb451 Mon Sep 17 00:00:00 2001 From: ocavue Date: Thu, 22 Oct 2020 04:38:58 +0000 Subject: [PATCH 09/33] Update the Go version --- lib/docs/scrapers/go.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/go.rb b/lib/docs/scrapers/go.rb index 05f8a531..210ef1f6 100644 --- a/lib/docs/scrapers/go.rb +++ b/lib/docs/scrapers/go.rb @@ -1,7 +1,7 @@ module Docs class Go < UrlScraper self.type = 'go' - self.release = '1.13' + self.release = '1.15' self.base_url = 'https://golang.org/pkg/' self.links = { home: 'https://golang.org/', From 3e7a095ac73c86035a26394fcfe31432acbf7fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20B=C3=A4lter?= Date: Fri, 23 Oct 2020 14:22:47 +0200 Subject: [PATCH 10/33] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 74fb4046..8ff70029 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ DevDocs was created by [Thibaut Courouble](https://thibaut.me) and is operated b ## We are currently searching for maintainers -Please reach out to `@Thibaut` on [Gitter](https://gitter.im/FreeCodeCamp/DevDocs) if you would like to join the team! +Please reach out to the community on [Gitter](https://gitter.im/FreeCodeCamp/DevDocs) if you would like to join the team! Keep track of development news: From 289b9fe3c2fde4442aa1cff415b8996e17bf0fc5 Mon Sep 17 00:00:00 2001 From: "Stuart P. Bentley" Date: Thu, 29 Oct 2020 20:23:08 -0700 Subject: [PATCH 11/33] Update lua.rb This adds Lua 5.4, bumps Lua 5.3 to (probably) the last version, and updates the copyright. --- lib/docs/scrapers/lua.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/lua.rb b/lib/docs/scrapers/lua.rb index e3608918..5192548a 100644 --- a/lib/docs/scrapers/lua.rb +++ b/lib/docs/scrapers/lua.rb @@ -8,12 +8,17 @@ module Docs options[:skip_links] = true options[:attribution] = <<-HTML - © 1994–2017 Lua.org, PUC-Rio.
+ © 1994–2020 Lua.org, PUC-Rio.
Licensed under the MIT License. HTML + version '5.4' do + self.release = '5.4.1' + self.base_url = 'https://www.lua.org/manual/5.4/' + end + version '5.3' do - self.release = '5.3.4' + self.release = '5.3.6' self.base_url = 'https://www.lua.org/manual/5.3/' end From c4a5cd85763363d80f1f2e8c27115c014dbf4d8e Mon Sep 17 00:00:00 2001 From: "Stuart P. Bentley" Date: Thu, 29 Oct 2020 20:27:56 -0700 Subject: [PATCH 12/33] Update Lua copyright in about_tmpl.coffee --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 8ac93ed4..d9589758 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -448,7 +448,7 @@ credits = [ 'https://raw.githubusercontent.com/lodash/lodash/master/LICENSE' ], [ 'Lua', - '1994–2017 Lua.org, PUC-Rio', + '1994–2020 Lua.org, PUC-Rio', 'MIT', 'http://www.lua.org/license.html' ], [ From 36a75ca260798f5031c5e64fb79de374cef7a822 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 6 Nov 2020 21:41:02 +0100 Subject: [PATCH 13/33] It's 2020 --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- assets/stylesheets/application.css.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 8ac93ed4..e2ada049 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -22,7 +22,7 @@ app.templates.aboutPage = -> """

- Copyright 2013–2019 Thibaut Courouble and other contributors
+ Copyright 2013–2020 Thibaut Courouble and other contributors
This software is licensed under the terms of the Mozilla Public License v2.0.
You may obtain a copy of the source code at github.com/freeCodeCamp/devdocs.
For more information, see the COPYRIGHT diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss index 1b1c3ad0..4a83095e 100644 --- a/assets/stylesheets/application.css.scss +++ b/assets/stylesheets/application.css.scss @@ -3,7 +3,7 @@ //= depend_on sprites/docs.json /*! - * Copyright 2013-2019 Thibaut Courouble and other contributors + * Copyright 2013-2020 Thibaut Courouble and other contributors * * This source code is licensed under the terms of the Mozilla * Public License, v. 2.0, a copy of which may be obtained at: From f1b464b1edc633efa7509121c3be5ce6e623cef8 Mon Sep 17 00:00:00 2001 From: Jasper van Merle Date: Fri, 6 Nov 2020 22:51:23 +0100 Subject: [PATCH 14/33] Fix broken get_latest_version implementations --- lib/docs/scrapers/ansible.rb | 2 +- lib/docs/scrapers/babel.rb | 3 +-- lib/docs/scrapers/chef.rb | 4 ++-- lib/docs/scrapers/codeigniter.rb | 5 ++--- lib/docs/scrapers/dart.rb | 3 +-- lib/docs/scrapers/docker.rb | 6 +++--- lib/docs/scrapers/elixir.rb | 2 +- lib/docs/scrapers/erlang.rb | 3 +-- lib/docs/scrapers/fish.rb | 3 +-- lib/docs/scrapers/gnu_cobol.rb | 8 +++++--- lib/docs/scrapers/gnuplot.rb | 4 ++++ lib/docs/scrapers/godot.rb | 3 +-- lib/docs/scrapers/influxdata.rb | 4 +--- lib/docs/scrapers/moment.rb | 3 +-- lib/docs/scrapers/pandas.rb | 3 +-- lib/docs/scrapers/perl.rb | 3 +-- lib/docs/scrapers/php.rb | 5 ++--- lib/docs/scrapers/python.rb | 2 +- lib/docs/scrapers/react_native.rb | 4 ++-- lib/docs/scrapers/scikit_learn.rb | 3 +-- lib/docs/scrapers/statsmodels.rb | 3 +-- lib/docs/scrapers/vagrant.rb | 3 +-- 22 files changed, 35 insertions(+), 44 deletions(-) diff --git a/lib/docs/scrapers/ansible.rb b/lib/docs/scrapers/ansible.rb index 6826b393..5a19e393 100644 --- a/lib/docs/scrapers/ansible.rb +++ b/lib/docs/scrapers/ansible.rb @@ -71,7 +71,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://docs.ansible.com/ansible/latest/index.html', opts) - doc.at_css('.DocSiteProduct-CurrentVersion').content.strip + doc.at_css('.version').content.strip end end end diff --git a/lib/docs/scrapers/babel.rb b/lib/docs/scrapers/babel.rb index c8d716f1..f8784e80 100644 --- a/lib/docs/scrapers/babel.rb +++ b/lib/docs/scrapers/babel.rb @@ -24,8 +24,7 @@ module Docs end def get_latest_version(opts) - doc = fetch_doc('https://babeljs.io/docs/en/', opts) - doc.at_css('a[href="/versions"] > h3').content + get_latest_github_release('babel', 'babel', opts) end end end diff --git a/lib/docs/scrapers/chef.rb b/lib/docs/scrapers/chef.rb index f0b7d6b0..3295f2e4 100644 --- a/lib/docs/scrapers/chef.rb +++ b/lib/docs/scrapers/chef.rb @@ -49,8 +49,8 @@ module Docs end def get_latest_version(opts) - doc = fetch_doc('https://downloads.chef.io/chef', opts) - doc.at_css('h1.product-heading > span').content.strip + doc = fetch_doc('https://downloads.chef.io/products/infra', opts) + doc.at_css('#versions > option').content.strip end end end diff --git a/lib/docs/scrapers/codeigniter.rb b/lib/docs/scrapers/codeigniter.rb index 05258d9a..b108887b 100644 --- a/lib/docs/scrapers/codeigniter.rb +++ b/lib/docs/scrapers/codeigniter.rb @@ -40,9 +40,8 @@ module Docs end def get_latest_version(opts) - doc = fetch_doc('https://codeigniter.com/user_guide/changelog.html', opts) - header = doc.at_css('#change-log h2') - header.content.scan(/([0-9.]+)/)[0][0] + tags = get_github_tags('codeigniter4', 'codeigniter4', opts) + tags[0]['name'][1..-1] end end end diff --git a/lib/docs/scrapers/dart.rb b/lib/docs/scrapers/dart.rb index e3b8c289..002cdce9 100644 --- a/lib/docs/scrapers/dart.rb +++ b/lib/docs/scrapers/dart.rb @@ -32,8 +32,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://api.dartlang.org/', opts) - label = doc.at_css('footer > span').content.strip - label.sub(/Dart /, '') + doc.at_css('footer > span').content.sub(/Dart/, '').strip end end end diff --git a/lib/docs/scrapers/docker.rb b/lib/docs/scrapers/docker.rb index 06c3344d..6328644b 100644 --- a/lib/docs/scrapers/docker.rb +++ b/lib/docs/scrapers/docker.rb @@ -260,9 +260,9 @@ module Docs end def get_latest_version(opts) - doc = fetch_doc('https://docs.docker.com/', opts) - label = doc.at_css('.nav-container button.dropdown-toggle').content.strip - label.scan(/([0-9.]+)/)[0][0] + doc = fetch_doc('https://docs.docker.com/engine/release-notes/', opts) + latest_version = doc.at_css('.content > section > h1[id^="version-"]').content.strip + latest_version.rpartition(' ')[-1] end end end diff --git a/lib/docs/scrapers/elixir.rb b/lib/docs/scrapers/elixir.rb index f3cc94b2..0888bd44 100644 --- a/lib/docs/scrapers/elixir.rb +++ b/lib/docs/scrapers/elixir.rb @@ -126,7 +126,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://hexdocs.pm/elixir/api-reference.html', opts) - doc.at_css('h2.sidebar-projectVersion').content.strip[1..-1] + doc.at_css('.sidebar-projectVersion').content.strip[1..-1] end end end diff --git a/lib/docs/scrapers/erlang.rb b/lib/docs/scrapers/erlang.rb index 14a87cf5..a888e511 100644 --- a/lib/docs/scrapers/erlang.rb +++ b/lib/docs/scrapers/erlang.rb @@ -57,8 +57,7 @@ module Docs end def get_latest_version(opts) - doc = fetch_doc('https://www.erlang.org/downloads', opts) - doc.at_css('.col-lg-3 > ul > li').content.strip.sub(/OTP /, '') + get_latest_github_release('erlang', 'otp', opts)[4..-1] end end end diff --git a/lib/docs/scrapers/fish.rb b/lib/docs/scrapers/fish.rb index 3dac427f..a8b1ce8b 100644 --- a/lib/docs/scrapers/fish.rb +++ b/lib/docs/scrapers/fish.rb @@ -54,8 +54,7 @@ module Docs end def get_latest_version(opts) - doc = fetch_doc('http://fishshell.com/docs/current/index.html', opts) - doc.at_css('#toc-index').content.scan(/([0-9.]+)/)[0][0] + get_latest_github_release('fish-shell', 'fish-shell', opts) end end end diff --git a/lib/docs/scrapers/gnu_cobol.rb b/lib/docs/scrapers/gnu_cobol.rb index 9965359d..a211ef49 100644 --- a/lib/docs/scrapers/gnu_cobol.rb +++ b/lib/docs/scrapers/gnu_cobol.rb @@ -18,9 +18,11 @@ module Docs HTML def get_latest_version(opts) - doc = fetch_doc('https://open-cobol.sourceforge.io/HTML/gnucobpg.html', opts) - title = doc.at_css('h1').content - title.scan(/([0-9.]+)/)[0][0] + fetch_doc('https://sourceforge.net/projects/gnucobol/files/gnucobol/', opts) + .css('#files_list > tbody > tr') + .map { |file| file['title'] } + .sort_by { |version| version.to_f } + .last end end end diff --git a/lib/docs/scrapers/gnuplot.rb b/lib/docs/scrapers/gnuplot.rb index 0682ade4..4753e195 100644 --- a/lib/docs/scrapers/gnuplot.rb +++ b/lib/docs/scrapers/gnuplot.rb @@ -37,5 +37,9 @@ module Docs Distributed under the gnuplot license (rights to distribute modified versions are withheld). HTML + def get_latest_version(opts) + doc = fetch_doc('https://sourceforge.net/projects/gnuplot/files/gnuplot/', opts) + doc.at_css('#files_list > tbody > tr:nth-child(2)')['title'] + end end end diff --git a/lib/docs/scrapers/godot.rb b/lib/docs/scrapers/godot.rb index 1ccf693f..03f8192e 100644 --- a/lib/docs/scrapers/godot.rb +++ b/lib/docs/scrapers/godot.rb @@ -44,8 +44,7 @@ module Docs end def get_latest_version(opts) - doc = fetch_doc('https://docs.godotengine.org/', opts) - doc.at_css('.version').content.strip + get_latest_github_release('godotengine', 'godot', opts).split('-')[0] end end end diff --git a/lib/docs/scrapers/influxdata.rb b/lib/docs/scrapers/influxdata.rb index db160f9c..6a6bff7e 100644 --- a/lib/docs/scrapers/influxdata.rb +++ b/lib/docs/scrapers/influxdata.rb @@ -48,9 +48,7 @@ module Docs HTML def get_latest_version(opts) - doc = fetch_doc('https://docs.influxdata.com/influxdb/', opts) - label = doc.at_css('.navbar--current-product').content.strip - label.scan(/([0-9.]+)/)[0][0] + get_latest_github_release('influxdata', 'influxdb', opts) end end end diff --git a/lib/docs/scrapers/moment.rb b/lib/docs/scrapers/moment.rb index 5b7491ea..e74163be 100644 --- a/lib/docs/scrapers/moment.rb +++ b/lib/docs/scrapers/moment.rb @@ -24,8 +24,7 @@ module Docs HTML def get_latest_version(opts) - doc = fetch_doc('http://momentjs.com/', opts) - doc.at_css('.hero-title > h1 > span').content + get_github_tags('moment', 'moment', opts)[0]['name'] end end end diff --git a/lib/docs/scrapers/pandas.rb b/lib/docs/scrapers/pandas.rb index e333da7f..c92d6228 100644 --- a/lib/docs/scrapers/pandas.rb +++ b/lib/docs/scrapers/pandas.rb @@ -63,8 +63,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('http://pandas.pydata.org/pandas-docs/stable/', opts) - label = doc.at_css('.body > .section > p').content - label.scan(/Version: ([0-9.]+)/)[0][0] + doc.at_css('#pandas-documentation').content.scan(/Version: ([0-9.]+)/)[0][0] end end end diff --git a/lib/docs/scrapers/perl.rb b/lib/docs/scrapers/perl.rb index ebf0a653..8c0462e5 100644 --- a/lib/docs/scrapers/perl.rb +++ b/lib/docs/scrapers/perl.rb @@ -46,8 +46,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://perldoc.perl.org/', opts) - header = doc.at_css('h2.h1').content - header.scan(/Perl ([0-9.]+)/)[0][0] + doc.at_css('#dropdownlink-stable').content end end end diff --git a/lib/docs/scrapers/php.rb b/lib/docs/scrapers/php.rb index 181d8b67..c6ab0581 100644 --- a/lib/docs/scrapers/php.rb +++ b/lib/docs/scrapers/php.rb @@ -68,9 +68,8 @@ module Docs HTML def get_latest_version(opts) - doc = fetch_doc('https://secure.php.net/manual/en/doc.changelog.php', opts) - label = doc.at_css('tbody.gen-changelog > tr > td').content - label.split(',').last.strip + doc = fetch_doc('https://www.php.net/supported-versions.php', opts) + doc.at_css('table > tbody > .stable:last-of-type > td > a').content.strip end end end diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index 89f1c3c0..f9a9768e 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -60,7 +60,7 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://docs.python.org/', opts) - doc.at_css('.version_switcher_placeholder').content + doc.at_css('title').content.split(' ')[0] end end end diff --git a/lib/docs/scrapers/react_native.rb b/lib/docs/scrapers/react_native.rb index fe87e492..d00e55c2 100644 --- a/lib/docs/scrapers/react_native.rb +++ b/lib/docs/scrapers/react_native.rb @@ -32,8 +32,8 @@ module Docs HTML def get_latest_version(opts) - doc = fetch_doc('https://facebook.github.io/react-native/docs/getting-started.html', opts) - doc.at_css('header > a > h3').content + doc = fetch_doc('https://reactnative.dev/docs/getting-started', opts) + doc.at_css('meta[name="docsearch:version"]')['content'] end end end diff --git a/lib/docs/scrapers/scikit_learn.rb b/lib/docs/scrapers/scikit_learn.rb index 973c9d7e..933484f0 100644 --- a/lib/docs/scrapers/scikit_learn.rb +++ b/lib/docs/scrapers/scikit_learn.rb @@ -26,8 +26,7 @@ module Docs HTML def get_latest_version(opts) - doc = fetch_doc('https://scikit-learn.org/stable/documentation.html', opts) - doc.at_css('.body h1').content.scan(/([0-9.]+)/)[0][0] + get_latest_github_release('scikit-learn', 'scikit-learn', opts) end end end diff --git a/lib/docs/scrapers/statsmodels.rb b/lib/docs/scrapers/statsmodels.rb index 3e8a357c..74dcaf9c 100644 --- a/lib/docs/scrapers/statsmodels.rb +++ b/lib/docs/scrapers/statsmodels.rb @@ -22,8 +22,7 @@ module Docs HTML def get_latest_version(opts) - doc = fetch_doc('http://www.statsmodels.org/stable/', opts) - doc.at_css('.sphinxsidebarwrapper h3 + p > b').content[1..-1] + get_latest_github_release('statsmodels', 'statsmodels', opts) end end end diff --git a/lib/docs/scrapers/vagrant.rb b/lib/docs/scrapers/vagrant.rb index 7400fc8c..fe38cc55 100644 --- a/lib/docs/scrapers/vagrant.rb +++ b/lib/docs/scrapers/vagrant.rb @@ -20,8 +20,7 @@ module Docs HTML def get_latest_version(opts) - contents = get_github_file_contents('hashicorp', 'vagrant', 'website/config.rb', opts) - contents.scan(/version\s+=\s+"([0-9.]+)"/)[0][0] + get_github_tags('hashicorp', 'vagrant', opts)[0]['name'][1..-1] end end end From d51553d5ae742a9db04a9c4a5f4d768e210914f2 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Mon, 9 Nov 2020 16:37:30 +0100 Subject: [PATCH 15/33] chore: add codeowners --- .github/CODEOWNERS | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..dd371d4e --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,4 @@ +# This controls who gets notified for review and allows branches to be protected. +# Protected branches can only be merged into after being approved by a codeowner. + +* @freeCodeCamp/devdocs From c9e2e9a9d2e77e1d30e2991550eaf61a9357a3f3 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 12 Nov 2020 21:53:21 +0100 Subject: [PATCH 16/33] leaflet: add version 1.7.1 https://leafletjs.com/2020/09/04/leaflet-1.7.1.html --- lib/docs/filters/leaflet/clean_html.rb | 14 +++++++------- lib/docs/scrapers/leaflet.rb | 5 +++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/docs/filters/leaflet/clean_html.rb b/lib/docs/filters/leaflet/clean_html.rb index 802463de..717b7c74 100644 --- a/lib/docs/filters/leaflet/clean_html.rb +++ b/lib/docs/filters/leaflet/clean_html.rb @@ -8,25 +8,25 @@ module Docs node.name = 'h2' end - at_css('> h2:first-child').name = 'h1' - - # remove "This reference reflects Leaflet 1.2.0." - css('h1 ~ p').each do |node| + # remove "This reference reflects Leaflet" + css('p:contains("This reference reflects Leaflet")').each do |node| node.remove break end + at_css('> h2:first-child').name = 'h1' + css('section', 'code b', '.accordion', '.accordion-overflow', '.accordion-content').each do |node| node.before(node.children).remove end css('pre > code').each do |node| node['class'] ||= '' - lang = if node['class'].include?('lang-html') || node.content =~ /\A Date: Thu, 12 Nov 2020 23:19:51 +0100 Subject: [PATCH 17/33] node: update release 12 and 14 --- lib/docs/scrapers/node.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/node.rb b/lib/docs/scrapers/node.rb index 39b55004..c448df10 100644 --- a/lib/docs/scrapers/node.rb +++ b/lib/docs/scrapers/node.rb @@ -23,12 +23,12 @@ module Docs HTML version do - self.release = '14.7.0' + self.release = '14.15.0' self.base_url = 'https://nodejs.org/dist/latest-v14.x/docs/api/' end version '12 LTS' do - self.release = '12.18.3' + self.release = '12.19.0' self.base_url = 'https://nodejs.org/dist/latest-v12.x/docs/api/' end From 97edd615031bed4307cf3e8c076027bee93d8c3c Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 13 Nov 2020 00:06:47 +0100 Subject: [PATCH 18/33] haxe: update release, clean html --- lib/docs/filters/haxe/clean_html.rb | 6 ++++-- lib/docs/scrapers/haxe.rb | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/docs/filters/haxe/clean_html.rb b/lib/docs/filters/haxe/clean_html.rb index 4e9bd635..c75316b5 100644 --- a/lib/docs/filters/haxe/clean_html.rb +++ b/lib/docs/filters/haxe/clean_html.rb @@ -2,7 +2,7 @@ module Docs class Haxe class CleanHtmlFilter < Filter def call - css('.viewsource', 'hr', 'h1 > small', '.inherited-fields').remove + css('.viewsource', 'hr', 'h1 > small', '.inherited-fields', '.label-meta').remove css('h4 + h1').each do |node| node.after(node.previous_element) @@ -28,8 +28,10 @@ module Docs end css('.field').each do |node| + h3 = node.at_css('h3:not(:empty)') + next unless h3.present? link = node.at_css('a[name]') - node.at_css('h3:not(:empty)')['id'] = link['name'] + h3['id'] = link['name'] link.before(link.children).remove node.before(node.children).remove end diff --git a/lib/docs/scrapers/haxe.rb b/lib/docs/scrapers/haxe.rb index 892085be..4950ed67 100644 --- a/lib/docs/scrapers/haxe.rb +++ b/lib/docs/scrapers/haxe.rb @@ -2,7 +2,7 @@ module Docs class Haxe < UrlScraper self.name = 'Haxe' self.type = 'simple' - self.release = '4.0.5' + self.release = '4.1.3' self.base_url = 'https://api.haxe.org/' html_filters.push 'haxe/clean_html', 'haxe/entries' From b915c03ed067f3c98dcaa6687063bb3c171b1bc0 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 13 Nov 2020 00:21:59 +0100 Subject: [PATCH 19/33] python: update releases 3.6, 3.7, 3.8 --- lib/docs/scrapers/python.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index 89f1c3c0..aa282e1e 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -23,22 +23,23 @@ module Docs Licensed under the PSF License. HTML + # mkdir -p docs/python~3.8 && cd docs/python~3.8 && curl -L https://docs.python.org/3.8/archives/python-3.8.6-docs-html.tar.bz2 | tar xj --strip-components=1 version '3.8' do # docs.python.org/3.8/download.html - self.release = '3.8.1' + self.release = '3.8.6' self.base_url = 'https://docs.python.org/3.8/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' end version '3.7' do # docs.python.org/3.7/download.html - self.release = '3.7.6' + self.release = '3.7.9' self.base_url = 'https://docs.python.org/3.7/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' end version '3.6' do # docs.python.org/3.6/download.html - self.release = '3.6.10' + self.release = '3.6.12' self.base_url = 'https://docs.python.org/3.6/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' From 3d4a0ffb14215b3769231570ceb8029867d01166 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 13 Nov 2020 00:23:28 +0100 Subject: [PATCH 20/33] python: add version 3.9 --- lib/docs/scrapers/python.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index aa282e1e..2e2aaafe 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -23,7 +23,14 @@ module Docs Licensed under the PSF License. HTML - # mkdir -p docs/python~3.8 && cd docs/python~3.8 && curl -L https://docs.python.org/3.8/archives/python-3.8.6-docs-html.tar.bz2 | tar xj --strip-components=1 + # mkdir -p docs/python~3.9 && cd docs/python~3.9 && curl -L https://docs.python.org/3.9/archives/python-3.9.0-docs-html.tar.bz2 | tar xj --strip-components=1 + version '3.9' do # docs.python.org/3.9/download.html + self.release = '3.9.0' + self.base_url = 'https://docs.python.org/3.9/' + + html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' + end + version '3.8' do # docs.python.org/3.8/download.html self.release = '3.8.6' self.base_url = 'https://docs.python.org/3.8/' From 67df9e296efec7d564f7f70383a5de25b2d1758f Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 13 Nov 2020 00:39:58 +0100 Subject: [PATCH 21/33] angularjs: add version 1.8 --- assets/javascripts/templates/pages/about_tmpl.coffee | 6 +++--- lib/docs/scrapers/angularjs.rb | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index f0cc4c5d..4aa5f185 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -83,9 +83,9 @@ app.templates.aboutPage = -> """ credits = [ [ 'Angular
Angular.js', - '2010-2019 Google, Inc.', - 'CC BY', - 'https://creativecommons.org/licenses/by/4.0/' + '2010-2020 Google, Inc.', + 'CC BY 3.0', + 'https://creativecommons.org/licenses/by/3.0/' ], [ 'Ansible', '2012-2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.', diff --git a/lib/docs/scrapers/angularjs.rb b/lib/docs/scrapers/angularjs.rb index 4e563c82..07c3fe1e 100644 --- a/lib/docs/scrapers/angularjs.rb +++ b/lib/docs/scrapers/angularjs.rb @@ -38,8 +38,8 @@ module Docs ] options[:attribution] = <<-HTML - © 2010–2018 Google, Inc.
- Licensed under the Creative Commons Attribution License 4.0. + © 2010–2020 Google, Inc.
+ Licensed under the Creative Commons Attribution License 3.0. HTML stub '' do @@ -49,6 +49,11 @@ module Docs capybara.execute_script("return document.querySelector('.side-navigation').innerHTML") end + version '1.8' do + self.release = '1.8.2' + self.base_url = "https://code.angularjs.org/#{release}/docs/partials/" + end + version '1.7' do self.release = '1.7.8' self.base_url = "https://code.angularjs.org/#{release}/docs/partials/" From 0eec0a85ae926f361d943b73113137b65f84d370 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 13 Nov 2020 00:44:10 +0100 Subject: [PATCH 22/33] postgresql: add version 13 --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/postgresql.rb | 7 ++++++- public/icons/docs/postgresql/SOURCE | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 4aa5f185..8c1c52d0 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -603,7 +603,7 @@ credits = [ 'https://raw.githubusercontent.com/ponylang/ponyc/master/LICENSE' ], [ 'PostgreSQL', - '1996-2019 The PostgreSQL Global Development Group
© 1994 The Regents of the University of California', + '1996-2020 The PostgreSQL Global Development Group
© 1994 The Regents of the University of California', 'PostgreSQL', 'https://www.postgresql.org/about/licence/' ], [ diff --git a/lib/docs/scrapers/postgresql.rb b/lib/docs/scrapers/postgresql.rb index 9483bfde..3c428bf8 100644 --- a/lib/docs/scrapers/postgresql.rb +++ b/lib/docs/scrapers/postgresql.rb @@ -51,10 +51,15 @@ module Docs /\Aunsupported-features/ ] options[:attribution] = <<-HTML - © 1996–2019 The PostgreSQL Global Development Group
+ © 1996–2020 The PostgreSQL Global Development Group
Licensed under the PostgreSQL License. HTML + version '13' do + self.release = '13.1' + self.base_url = "https://www.postgresql.org/docs/#{version}/" + end + version '12' do self.release = '12.1' self.base_url = "https://www.postgresql.org/docs/#{version}/" diff --git a/public/icons/docs/postgresql/SOURCE b/public/icons/docs/postgresql/SOURCE index 84ce600b..e9a53dcf 100644 --- a/public/icons/docs/postgresql/SOURCE +++ b/public/icons/docs/postgresql/SOURCE @@ -1 +1 @@ -http://www.postgresql.org/about/press/presskit93/#logos +https://www.postgresql.org/about/press/presskit93/#logos From b5d3298a3df834d85a153e7dd1c335b15ed9e643 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 13 Nov 2020 00:56:49 +0100 Subject: [PATCH 23/33] jest: update to 26.6 --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/filters/jest/entries.rb | 1 + lib/docs/scrapers/jest.rb | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 8c1c52d0..f7f66790 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -378,7 +378,7 @@ credits = [ 'https://raw.githubusercontent.com/jekyll/jekyll/master/LICENSE' ], [ 'Jest', - 'Facebook, Inc. and its affiliates.', + '2020 Facebook, Inc.', 'MIT', 'https://raw.githubusercontent.com/facebook/jest/master/LICENSE' ], [ diff --git a/lib/docs/filters/jest/entries.rb b/lib/docs/filters/jest/entries.rb index 14a697c2..82c346f9 100644 --- a/lib/docs/filters/jest/entries.rb +++ b/lib/docs/filters/jest/entries.rb @@ -19,6 +19,7 @@ module Docs def additional_entries return [] unless !root_page? && self.type == self.name # api page + return [] if self.slug == 'environment-variables' entries = [] diff --git a/lib/docs/scrapers/jest.rb b/lib/docs/scrapers/jest.rb index 4b60ba75..5591b4ce 100644 --- a/lib/docs/scrapers/jest.rb +++ b/lib/docs/scrapers/jest.rb @@ -1,7 +1,7 @@ module Docs class Jest < UrlScraper self.type = 'simple' - self.release = '24.9' + self.release = '26.6' self.base_url = 'https://jestjs.io/docs/en/' self.root_path = 'getting-started' self.links = { @@ -14,7 +14,7 @@ module Docs options[:container] = '.docMainWrapper' options[:attribution] = <<-HTML - © 2019 Facebook, Inc. and its affiliates.
+ © 2020 Facebook, Inc.
Licensed under the MIT License. HTML From 5130f8b8e0deffb2a2a179471140bd58d6620c93 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 13 Nov 2020 01:11:59 +0100 Subject: [PATCH 24/33] sqlite: update to 3.33.0 --- lib/docs/scrapers/sqlite.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/sqlite.rb b/lib/docs/scrapers/sqlite.rb index 9b245326..246ee6e9 100644 --- a/lib/docs/scrapers/sqlite.rb +++ b/lib/docs/scrapers/sqlite.rb @@ -2,7 +2,7 @@ module Docs class Sqlite < FileScraper self.name = 'SQLite' self.type = 'sqlite' - self.release = '3.30.1' + self.release = '3.33.0' self.base_url = 'https://sqlite.org/' self.root_path = 'docs.html' self.initial_paths = %w(keyword_index.html) From 72f1c5cb23224da6bf6c457d8068b118f5ea6353 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 13 Nov 2020 01:35:08 +0100 Subject: [PATCH 25/33] nginx: update to 1.19.3 --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/nginx.rb | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index f7f66790..487c5272 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -508,7 +508,7 @@ credits = [ 'https://github.com/LearnBoost/mongoose/blob/master/README.md#license' ], [ 'nginx', - '2002-2019 Igor Sysoev
© 2011-2019 Nginx, Inc.', + '2002-2020 Igor Sysoev
© 2011-2020 Nginx, Inc.', 'BSD', 'http://nginx.org/LICENSE' ], [ diff --git a/lib/docs/scrapers/nginx.rb b/lib/docs/scrapers/nginx.rb index 98a927fc..89a9db64 100644 --- a/lib/docs/scrapers/nginx.rb +++ b/lib/docs/scrapers/nginx.rb @@ -2,7 +2,7 @@ module Docs class Nginx < UrlScraper self.name = 'nginx' self.type = 'nginx' - self.release = '1.17.2' + self.release = '1.19.3' self.base_url = 'https://nginx.org/en/docs/' self.links = { home: 'https://nginx.org/', @@ -20,9 +20,10 @@ module Docs options[:skip_patterns] = [/\/faq\//] + # http://nginx.org/LICENSE options[:attribution] = <<-HTML - © 2002-2019 Igor Sysoev
- © 2011-2019 Nginx, Inc.
+ © 2002-2020 Igor Sysoev
+ © 2011-2020 Nginx, Inc.
Licensed under the BSD License. HTML From 17929f1ee9b2c8eab72e9615f98c5b0e65529f88 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 13 Nov 2020 08:50:54 +0100 Subject: [PATCH 26/33] ruby: update release 2.7.2 --- lib/docs/scrapers/rdoc/ruby.rb | 2 +- public/icons/docs/ruby/SOURCE | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/rdoc/ruby.rb b/lib/docs/scrapers/rdoc/ruby.rb index 8dab6bf4..157af2fe 100644 --- a/lib/docs/scrapers/rdoc/ruby.rb +++ b/lib/docs/scrapers/rdoc/ruby.rb @@ -70,7 +70,7 @@ module Docs HTML version '2.7' do - self.release = '2.7.1' + self.release = '2.7.2' end version '2.6' do diff --git a/public/icons/docs/ruby/SOURCE b/public/icons/docs/ruby/SOURCE index d1822cdc..73b53b6d 100644 --- a/public/icons/docs/ruby/SOURCE +++ b/public/icons/docs/ruby/SOURCE @@ -1 +1,2 @@ -http://commons.wikimedia.org/wiki/File:Ruby_logo.svg +https://www.ruby-lang.org/en/about/logo/ +https://commons.wikimedia.org/wiki/File:Ruby_logo.svg From c3f0b3d56de3225ba6a922e132c6e39793f80afc Mon Sep 17 00:00:00 2001 From: MasterEnoc Date: Fri, 13 Nov 2020 14:07:44 -0600 Subject: [PATCH 27/33] Update pug to 3.0.0 --- lib/docs/scrapers/pug.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/docs/scrapers/pug.rb b/lib/docs/scrapers/pug.rb index 79a1b0a8..f95f3d9b 100644 --- a/lib/docs/scrapers/pug.rb +++ b/lib/docs/scrapers/pug.rb @@ -3,7 +3,7 @@ module Docs self.type = 'pug' self.base_url = 'https://pugjs.org/' self.root_path = 'api/getting-started.html' - self.release = '2.0.3' + self.release = '3.0.0' self.links = { home: 'https://pugjs.org/', code: 'https://github.com/pugjs/pug' @@ -18,6 +18,10 @@ module Docs Licensed under the MIT license. HTML + options[:skip_patterns] = [ + /support/ + ] + def get_latest_version(opts) get_npm_version('pug', opts) end From c29777ff1ee3d7f5a268dfac8703f88440ff6aff Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 13 Nov 2020 21:26:32 +0100 Subject: [PATCH 28/33] react: update to 17.0.1 https://reactjs.org/versions/ --- lib/docs/scrapers/react.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/react.rb b/lib/docs/scrapers/react.rb index f6dc599c..2a9990b0 100644 --- a/lib/docs/scrapers/react.rb +++ b/lib/docs/scrapers/react.rb @@ -2,7 +2,7 @@ module Docs class React < UrlScraper self.name = 'React' self.type = 'simple' - self.release = '16.13.1' + self.release = '17.0.1' self.base_url = 'https://reactjs.org/docs/' self.root_path = 'hello-world.html' self.links = { From 8bfc654a846ff7f4f3e5e31daab49749229514a2 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 13 Nov 2020 23:17:55 +0100 Subject: [PATCH 29/33] openjdk: add version 11 --- .../templates/pages/about_tmpl.coffee | 2 +- docs/file-scrapers.md | 18 ++++++++++++++++++ lib/docs/filters/openjdk/clean_html.rb | 7 +++++-- lib/docs/scrapers/openjdk.rb | 9 ++++++++- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 487c5272..e747cf6c 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -548,7 +548,7 @@ credits = [ 'https://octave.org/doc/interpreter/' ], [ 'OpenJDK', - '1993-2017, Oracle and/or its affiliates. All rights reserved.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses.
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.', + '1993, 2020, Oracle and/or its affiliates. All rights reserved.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses.
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.', 'GPLv2', 'http://openjdk.java.net/legal/gplv2+ce.html' ], [ diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index 855c0a3f..506e9a59 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -80,6 +80,24 @@ $GS = '/usr/local/opt/ghostscript/bin/gs'; # GhostScript ## OpenJDK +https://packages.debian.org/sid/openjdk-11-doc + +```sh +mkdir docs/openjdk~11 +curl --remote-name http://ftp.debian.org/debian/pool/main/o/openjdk-11/openjdk-11-doc_11.0.9.1+1-1_all.deb +bsdtar --extract --to-stdout --file openjdk-11-doc_11.0.9.1+1-1_all.deb data.tar.xz | \ +bsdtar --extract --xz --file - --strip-components=6 --directory=docs/openjdk\~11/ ./usr/share/doc/openjdk-11-jre-headless/api/ +``` + +https://packages.debian.org/sid/openjdk-8-doc + +```sh +mkdir docs/openjdk~8 +curl --remote-name http://ftp.debian.org/debian/pool/main/o/openjdk-8/openjdk-8-doc_8u272-b10-1_all.deb +bsdtar --extract --to-stdout --file openjdk-8-doc_8u272-b10-1_all.deb data.tar.xz | \ +bsdtar --extract --xz --file - --strip-components=6 --directory=docs/openjdk\~8/ ./usr/share/doc/openjdk-8-jre-headless/api/ +``` + ## Perl ## PHP diff --git a/lib/docs/filters/openjdk/clean_html.rb b/lib/docs/filters/openjdk/clean_html.rb index 240bde57..44b4d9e1 100644 --- a/lib/docs/filters/openjdk/clean_html.rb +++ b/lib/docs/filters/openjdk/clean_html.rb @@ -33,7 +33,7 @@ module Docs node.content = node.content.remove(' Summary').remove(' Detail').pluralize end - if root_page? + if root_page? && version == '8' css('.header')[1].remove css('.contentContainer')[0].remove css('.contentContainer')[-1].remove @@ -45,7 +45,10 @@ module Docs end end - at_css('h1').content = "OpenJDK #{release} Documentation" + (version != release ? " (#{version.split(' ').last})" : '') + end + + if root_page? + at_css('h1').content = "OpenJDK #{release} Documentation" end css('table').each do |node| diff --git a/lib/docs/scrapers/openjdk.rb b/lib/docs/scrapers/openjdk.rb index c26bce4c..20656e8d 100644 --- a/lib/docs/scrapers/openjdk.rb +++ b/lib/docs/scrapers/openjdk.rb @@ -18,13 +18,20 @@ module Docs /doc-files\//] options[:attribution] = <<-HTML - © 1993–2017, Oracle and/or its affiliates. All rights reserved.
+ © 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates. HTML + version '11' do + self.release = '11.0.9' + self.root_path = 'index.html' + self.base_url = 'https://docs.oracle.com/en/java/javase/11/docs/api/' + options[:only_patterns] = [/\Ajava\./] + end + version '8' do self.release = '8' From ca3b54f566381e6a5c3917979c62e7d1ddbc20ed Mon Sep 17 00:00:00 2001 From: Phil Scherer Date: Tue, 10 Nov 2020 20:34:25 +0000 Subject: [PATCH 30/33] Update Ansible scrapers --- lib/docs/filters/ansible/entries.rb | 13 +++++++++++++ lib/docs/scrapers/ansible.rb | 11 ++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/lib/docs/filters/ansible/entries.rb b/lib/docs/filters/ansible/entries.rb index d1097b99..a2af6062 100644 --- a/lib/docs/filters/ansible/entries.rb +++ b/lib/docs/filters/ansible/entries.rb @@ -7,6 +7,13 @@ module Docs name.remove! %r{ \- .*} name.remove! 'Introduction To ' name.remove! %r{ Guide\z} + + if version == "2.10" + if slug =~ /\Acollections\// and slug !~ /index$/ + name = name.split('.')[2] + end + end + name end @@ -21,6 +28,12 @@ module Docs end end + if version == "2.10" + if slug =~ /\Acollections\// + return "Collection #{slug.split('/')[1..-2].join(".")}" + end + end + if slug =~ /\Acli\// 'CLI Reference' elsif slug =~ /\Anetwork\// diff --git a/lib/docs/scrapers/ansible.rb b/lib/docs/scrapers/ansible.rb index 5a19e393..d839095a 100644 --- a/lib/docs/scrapers/ansible.rb +++ b/lib/docs/scrapers/ansible.rb @@ -30,18 +30,23 @@ module Docs /\Aroadmap.*/i, ] + version '2.10' do + self.release = '2.10.3' + self.base_url = "https://docs.ansible.com/ansible/#{version}/" + end + version '2.9' do - self.release = '2.9.1' + self.release = '2.9.15' self.base_url = "https://docs.ansible.com/ansible/#{version}/" end version '2.8' do - self.release = '2.8.7' + self.release = '2.8.16' self.base_url = "https://docs.ansible.com/ansible/#{version}/" end version '2.7' do - self.release = '2.7.15' + self.release = '2.7.17' self.base_url = "https://docs.ansible.com/ansible/#{version}/" end From 76b82ac2708090a3397618dfc2d4ac2d4c276dbc Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 7 Feb 2020 19:54:07 +0100 Subject: [PATCH 31/33] angular: add version 9 --- .../templates/pages/about_tmpl.coffee | 7 +++++- lib/docs/scrapers/angular.rb | 24 +++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index e747cf6c..64bb94d6 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -82,10 +82,15 @@ app.templates.aboutPage = -> """ """ credits = [ - [ 'Angular
Angular.js', + [ 'Angular.js', '2010-2020 Google, Inc.', 'CC BY 3.0', 'https://creativecommons.org/licenses/by/3.0/' + ], [ + 'Angular', + '2010-2020 Google, Inc.', + 'CC BY', + 'https://creativecommons.org/licenses/by/4.0/' ], [ 'Ansible', '2012-2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.', diff --git a/lib/docs/scrapers/angular.rb b/lib/docs/scrapers/angular.rb index 5ca1a35d..2ef3c9a1 100644 --- a/lib/docs/scrapers/angular.rb +++ b/lib/docs/scrapers/angular.rb @@ -11,7 +11,7 @@ module Docs options[:max_image_size] = 256_000 options[:attribution] = <<-HTML - © 2010–2019 Google, Inc.
+ © 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0. HTML @@ -59,8 +59,28 @@ module Docs end version do + self.release = '9.1.12' + self.base_url = 'https://v9.angular.io/' + self.root_path = 'docs' + + html_filters.push 'angular/clean_html', 'angular/entries' + + options[:follow_links] = false + options[:only_patterns] = [/\Aguide/, /\Atutorial/, /\Aapi/] + options[:fix_urls_before_parse] = ->(url) do + url.sub! %r{\Aguide/}, '/guide/' + url.sub! %r{\Atutorial/}, '/tutorial/' + url.sub! %r{\Aapi/}, '/api/' + url.sub! %r{\Agenerated/}, '/generated/' + url + end + + include Docs::Angular::Common + end + + version '8' do self.release = '8.2.14' - self.base_url = 'https://angular.io/' + self.base_url = 'https://v8.angular.io/' self.root_path = 'docs' html_filters.push 'angular/clean_html', 'angular/entries' From 5c9f26e0d669ece0ad8d6f4d39572f12fe0740f5 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 12 Nov 2020 21:27:43 +0100 Subject: [PATCH 32/33] angular: add version 10 --- lib/docs/scrapers/angular.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/docs/scrapers/angular.rb b/lib/docs/scrapers/angular.rb index 2ef3c9a1..7775623c 100644 --- a/lib/docs/scrapers/angular.rb +++ b/lib/docs/scrapers/angular.rb @@ -59,6 +59,26 @@ module Docs end version do + self.release = '10.2.3' + self.base_url = 'https://v10.angular.io/' + self.root_path = 'docs' + + html_filters.push 'angular/clean_html', 'angular/entries' + + options[:follow_links] = false + options[:only_patterns] = [/\Aguide/, /\Atutorial/, /\Aapi/] + options[:fix_urls_before_parse] = ->(url) do + url.sub! %r{\Aguide/}, '/guide/' + url.sub! %r{\Atutorial/}, '/tutorial/' + url.sub! %r{\Aapi/}, '/api/' + url.sub! %r{\Agenerated/}, '/generated/' + url + end + + include Docs::Angular::Common + end + + version '9' do self.release = '9.1.12' self.base_url = 'https://v9.angular.io/' self.root_path = 'docs' From 539e7b9cf8afc0ac57193d86710346040057fff4 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 14 Nov 2020 11:25:13 +0100 Subject: [PATCH 33/33] angular: add version 11 --- lib/docs/scrapers/angular.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/docs/scrapers/angular.rb b/lib/docs/scrapers/angular.rb index 7775623c..0c4b9f43 100644 --- a/lib/docs/scrapers/angular.rb +++ b/lib/docs/scrapers/angular.rb @@ -59,6 +59,26 @@ module Docs end version do + self.release = '11.0.0' + self.base_url = 'https://angular.io/' + self.root_path = 'docs' + + html_filters.push 'angular/clean_html', 'angular/entries' + + options[:follow_links] = false + options[:only_patterns] = [/\Aguide/, /\Atutorial/, /\Aapi/] + options[:fix_urls_before_parse] = ->(url) do + url.sub! %r{\Aguide/}, '/guide/' + url.sub! %r{\Atutorial/}, '/tutorial/' + url.sub! %r{\Aapi/}, '/api/' + url.sub! %r{\Agenerated/}, '/generated/' + url + end + + include Docs::Angular::Common + end + + version '10' do self.release = '10.2.3' self.base_url = 'https://v10.angular.io/' self.root_path = 'docs'