[\r\n\s]*<\/div>/m).nil? and \
+ response.body.index(/
TODO: write this dox page!<\/p>/).nil?
+ end
+ end
+end
diff --git a/lib/docs/scrapers/electron.rb b/lib/docs/scrapers/electron.rb
index d2341f61..9b8c8e46 100644
--- a/lib/docs/scrapers/electron.rb
+++ b/lib/docs/scrapers/electron.rb
@@ -2,7 +2,7 @@ module Docs
class Electron < UrlScraper
self.type = 'simple'
self.base_url = 'https://www.electronjs.org/docs/latest'
- self.release = '16.0.2'
+ self.release = '20.0.0'
self.links = {
home: 'https://www.electronjs.org/',
code: 'https://github.com/electron/electron'
diff --git a/lib/docs/scrapers/elisp.rb b/lib/docs/scrapers/elisp.rb
index 767b9f82..4ddffefe 100644
--- a/lib/docs/scrapers/elisp.rb
+++ b/lib/docs/scrapers/elisp.rb
@@ -1,7 +1,7 @@
module Docs
class Elisp < FileScraper
self.type = 'elisp'
- self.release = '27.2'
+ self.release = '28.2'
self.base_url= 'https://www.gnu.org/software/emacs/manual/html_node/elisp/'
self.root_path = 'index.html'
self.links = {
@@ -57,7 +57,7 @@ module Docs
end
options[:attribution]= <<-HTML
- Copyright © 1990-1996, 1998-2021 Free Software Foundation, Inc.
+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
HTML
diff --git a/lib/docs/scrapers/elixir.rb b/lib/docs/scrapers/elixir.rb
index 26fd00e3..c7e66585 100644
--- a/lib/docs/scrapers/elixir.rb
+++ b/lib/docs/scrapers/elixir.rb
@@ -33,6 +33,32 @@ module Docs
"https://elixir-lang.org/getting-started/introduction.html" ]
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 = [
diff --git a/lib/docs/scrapers/ember.rb b/lib/docs/scrapers/ember.rb
index c5c3ac72..78b2ebb2 100644
--- a/lib/docs/scrapers/ember.rb
+++ b/lib/docs/scrapers/ember.rb
@@ -42,18 +42,27 @@ module Docs
]
options[:attribution] = <<-HTML
- © 2020 Yehuda Katz, Tom Dale and Ember.js contributors
+ © 2022 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
HTML
options[:decode_and_clean_paths] = true # handle paths like @ember/application
+ version '4' do
+ self.release = '4.9.0'
+ self.base_urls = %w[
+ https://guides.emberjs.com/v4.9.0/
+ https://api.emberjs.com/ember/4.9/
+ https://api.emberjs.com/ember-data/4.9/
+ ]
+ end
+
version '3' do
- self.release = '3.25.0'
+ self.release = '3.28.0'
self.base_urls = %w[
- https://guides.emberjs.com/v3.25.0/
- https://api.emberjs.com/ember/3.25/
- https://api.emberjs.com/ember-data/3.25/
+ https://guides.emberjs.com/v3.28.0/
+ https://api.emberjs.com/ember/3.28/
+ https://api.emberjs.com/ember-data/3.28/
]
end
diff --git a/lib/docs/scrapers/erlang.rb b/lib/docs/scrapers/erlang.rb
index b0e7231b..0330111a 100644
--- a/lib/docs/scrapers/erlang.rb
+++ b/lib/docs/scrapers/erlang.rb
@@ -36,10 +36,14 @@ module Docs
]
options[:attribution] = <<-HTML
- © 2010–2021 Ericsson AB
+ © 2010–2022 Ericsson AB
Licensed under the Apache License, Version 2.0.
HTML
+ version '25' do
+ self.release = '25.1'
+ end
+
version '24' do
self.release = '24.0'
end
diff --git a/lib/docs/scrapers/esbuild.rb b/lib/docs/scrapers/esbuild.rb
index 5484f155..b65fcc2c 100644
--- a/lib/docs/scrapers/esbuild.rb
+++ b/lib/docs/scrapers/esbuild.rb
@@ -16,7 +16,7 @@ module Docs
Licensed under the MIT License.
HTML
- self.release = '0.14.2'
+ self.release = '0.16.10'
self.base_url = 'https://esbuild.github.io/'
html_filters.push 'esbuild/clean_html', 'esbuild/entries'
diff --git a/lib/docs/scrapers/eslint.rb b/lib/docs/scrapers/eslint.rb
index d4f41a02..4a2d7bcb 100644
--- a/lib/docs/scrapers/eslint.rb
+++ b/lib/docs/scrapers/eslint.rb
@@ -2,8 +2,8 @@ module Docs
class Eslint < UrlScraper
self.name = 'ESLint'
self.type = 'simple'
- self.release = '8.4.0'
- self.base_url = 'https://eslint.org/docs/'
+ self.release = '8.30.0'
+ self.base_url = 'https://eslint.org/docs/latest/'
self.root_path = 'user-guide/getting-started'
self.links = {
home: 'https://eslint.org/',
@@ -13,7 +13,7 @@ module Docs
html_filters.push 'eslint/entries', 'eslint/clean_html'
options[:skip_patterns] = [/maintainer-guide/]
- options[:skip] = %w(about about/ rules)
+ options[:skip] = %w(about about/ rules versions)
options[:replace_paths] = { 'user-guide' => 'user-guide/' }
options[:attribution] = <<-HTML
diff --git a/lib/docs/scrapers/express.rb b/lib/docs/scrapers/express.rb
index 229f1c7d..2f0a93ce 100644
--- a/lib/docs/scrapers/express.rb
+++ b/lib/docs/scrapers/express.rb
@@ -2,15 +2,15 @@ module Docs
class Express < UrlScraper
self.name = 'Express'
self.type = 'express'
- self.release = '4.17.1'
- self.base_url = 'http://expressjs.com/en/'
+ self.release = '4.18.1'
+ self.base_url = 'https://expressjs.com/en/'
self.root_path = '4x/api.html'
self.initial_paths = %w(
starter/installing.html
guide/routing.html
advanced/developing-template-engines.html )
self.links = {
- home: 'http://expressjs.com/',
+ home: 'https://expressjs.com/',
code: 'https://github.com/strongloop/express/'
}
diff --git a/lib/docs/scrapers/fastapi.rb b/lib/docs/scrapers/fastapi.rb
new file mode 100644
index 00000000..760603b9
--- /dev/null
+++ b/lib/docs/scrapers/fastapi.rb
@@ -0,0 +1,31 @@
+module Docs
+ class Fastapi < UrlScraper
+ self.name = 'FastAPI'
+ self.type = 'fastapi'
+ self.release = '0.88.0'
+ self.base_url = 'https://fastapi.tiangolo.com/'
+ self.root_path = '/'
+ self.links = {
+ home: 'https://fastapi.tiangolo.com/',
+ code: 'https://github.com/tiangolo/fastapi'
+ }
+
+ options[:only_patterns] = [
+ /\Afeatures\//, /\Apython-types\//,
+ /\Atutorial\//, /\Aadvanced\//, /\Aasync\//,
+ /\Adeployment\//, /\Aproject-generation\//
+ ]
+
+ html_filters.push 'fastapi/container', 'fastapi/clean_html', 'fastapi/entries'
+
+ options[:attribution] = <<-HTML
+ © 2018 Sebastián Ramírez
+ Licensed under the MIT License.
+ HTML
+
+ def get_latest_version(opts)
+ get_latest_github_release('tiangolo', 'fastapi', opts)
+ end
+
+ end
+end
diff --git a/lib/docs/scrapers/fish.rb b/lib/docs/scrapers/fish.rb
index f828d7aa..bf2f09db 100644
--- a/lib/docs/scrapers/fish.rb
+++ b/lib/docs/scrapers/fish.rb
@@ -12,10 +12,34 @@ module Docs
# https://fishshell.com/docs/current/license.html
options[:attribution] = <<-HTML
- © 2021 fish-shell developers
+ © 2005-2009 Axel Liljencrantz, 2009-2023 fish-shell contributors
Licensed under the GNU General Public License, version 2.
HTML
+ version '3.6' do
+ self.release = '3.6.0'
+ self.base_url = "https://fishshell.com/docs/#{version}/"
+
+ options[:skip].concat %w(genindex.html relnotes.html)
+ html_filters.push 'sphinx/clean_html', 'fish/clean_html_sphinx', 'fish/entries_sphinx'
+ end
+
+ version '3.5' do
+ self.release = '3.5.0'
+ self.base_url = "https://fishshell.com/docs/#{version}/"
+
+ options[:skip].concat %w(genindex.html relnotes.html)
+ html_filters.push 'sphinx/clean_html', 'fish/clean_html_sphinx', 'fish/entries_sphinx'
+ end
+
+ version '3.4' do
+ self.release = '3.4.0'
+ self.base_url = "https://fishshell.com/docs/#{version}/"
+
+ options[:skip].concat %w(genindex.html relnotes.html)
+ html_filters.push 'sphinx/clean_html', 'fish/clean_html_sphinx', 'fish/entries_sphinx'
+ end
+
version '3.3' do
self.release = '3.3.0'
self.base_url = "https://fishshell.com/docs/#{version}/"
diff --git a/lib/docs/scrapers/flask.rb b/lib/docs/scrapers/flask.rb
index 4251a61b..314405b7 100755
--- a/lib/docs/scrapers/flask.rb
+++ b/lib/docs/scrapers/flask.rb
@@ -9,15 +9,25 @@ module Docs
html_filters.push 'flask/entries', 'sphinx/clean_html'
- options[:container] = '.body > .section'
+ options[:container] = '.body > section'
options[:skip] = %w(extensiondev/ styleguide/ upgrading/ changelog/ license/ contributing/)
options[:skip_patterns] = [/\Atutorial\//]
options[:attribution] = <<-HTML
- © 2007–2021 Pallets
+ © 2007–2022 Pallets
Licensed under the BSD 3-clause License.
HTML
+ version '2.2' do
+ self.release = '2.2.x'
+ self.base_url = "https://flask.palletsprojects.com/en/#{self.release}/"
+ end
+
+ version '2.1' do
+ self.release = '2.1.x'
+ self.base_url = "https://flask.palletsprojects.com/en/#{self.release}/"
+ end
+
version '2.0' do
self.release = '2.0.x'
self.base_url = "https://flask.palletsprojects.com/en/#{self.release}/"
diff --git a/lib/docs/scrapers/flow.rb b/lib/docs/scrapers/flow.rb
index 274353b3..ef6217d6 100644
--- a/lib/docs/scrapers/flow.rb
+++ b/lib/docs/scrapers/flow.rb
@@ -1,7 +1,7 @@
module Docs
class Flow < UrlScraper
self.type = 'simple'
- self.release = '0.169.0'
+ self.release = '0.186.0'
self.base_url = 'https://flow.org/en/docs/'
self.links = {
home: 'https://flow.org/',
diff --git a/lib/docs/scrapers/git.rb b/lib/docs/scrapers/git.rb
index 85bddfb1..a5de307a 100644
--- a/lib/docs/scrapers/git.rb
+++ b/lib/docs/scrapers/git.rb
@@ -1,7 +1,7 @@
module Docs
class Git < UrlScraper
self.type = 'git'
- self.release = '2.34.0'
+ self.release = '2.39.0'
self.base_url = 'https://git-scm.com/docs'
self.initial_paths = %w(/git.html)
self.links = {
@@ -16,7 +16,7 @@ module Docs
options[:skip] = %w(/howto-index.html)
options[:attribution] = <<-HTML
- © 2012–2021 Scott Chacon and others
+ © 2012–2022 Scott Chacon and others
Licensed under the MIT License.
HTML
diff --git a/lib/docs/scrapers/gnu/gcc.rb b/lib/docs/scrapers/gnu/gcc.rb
index 7de85af0..e9f934e6 100644
--- a/lib/docs/scrapers/gnu/gcc.rb
+++ b/lib/docs/scrapers/gnu/gcc.rb
@@ -46,6 +46,16 @@ module Docs
'Wtrigraphs.html' => 'Invocation.html'
}
+ version '12' do
+ self.release = '12.2.0'
+ self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
+ end
+
+ version '12 CPP' do
+ self.release = '12.1.0'
+ self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/cpp/"
+ end
+
version '11' do
self.release = '11.1.0'
self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gcc/"
diff --git a/lib/docs/scrapers/gnu/gnu_fortran.rb b/lib/docs/scrapers/gnu/gnu_fortran.rb
index 6eec43ab..72c516f9 100644
--- a/lib/docs/scrapers/gnu/gnu_fortran.rb
+++ b/lib/docs/scrapers/gnu/gnu_fortran.rb
@@ -6,6 +6,11 @@ module Docs
home: 'https://gcc.gnu.org/fortran/'
}
+ version '12' do
+ self.release = '12.1.0'
+ self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"
+ end
+
version '11' do
self.release = '11.1.0'
self.base_url = "https://gcc.gnu.org/onlinedocs/gcc-#{release}/gfortran/"
diff --git a/lib/docs/scrapers/gnu_make.rb b/lib/docs/scrapers/gnu_make.rb
index a2837a46..98c4e9e4 100644
--- a/lib/docs/scrapers/gnu_make.rb
+++ b/lib/docs/scrapers/gnu_make.rb
@@ -4,7 +4,7 @@ module Docs
self.name = 'GNU Make'
self.type = 'gnu_make'
self.slug = 'gnu_make'
- self.release = '4.3'
+ self.release = '4.4'
self.base_url= 'https://www.gnu.org/software/make/manual/html_node/'
self.root_path = 'index.html'
self.links = {
@@ -21,7 +21,7 @@ module Docs
]
options[:attribution]= <<-HTML
- Copyright © 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Free Software Foundation, Inc.
+ Copyright © 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Free Software Foundation, Inc.
Licensed under the GNU Free Documentation License.
HTML
diff --git a/lib/docs/scrapers/go.rb b/lib/docs/scrapers/go.rb
index da23bb32..4523018c 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.17.5'
+ self.release = '1.19.0'
self.base_url = 'https://golang.org/pkg/'
self.links = {
home: 'https://golang.org/',
@@ -10,9 +10,10 @@ module Docs
# Run godoc locally, since https://golang.org/pkg/ redirects to https://pkg.go.dev/std with rate limiting / scraping protection.
- # curl -LO https://golang.org/dl/go1.17.5.windows-amd64.zip
- # go install golang.org/x/tools/cmd/godoc@latest
- # go/bin/godoc -zip=go1.17.5.windows-amd64.zip -goroot=/go
+ # docker run --expose=6060 --rm -it docker.io/golang:1.18.0
+ #docker# go install golang.org/x/tools/cmd/godoc@latest
+ #docker# rm -r /usr/local/go/test/
+ #docker# godoc -http 0.0.0.0:6060 -v
self.base_url = 'http://localhost:6060/pkg/'
html_filters.push 'clean_local_urls'
diff --git a/lib/docs/scrapers/godot.rb b/lib/docs/scrapers/godot.rb
index 144a9fc5..f3cfb08b 100644
--- a/lib/docs/scrapers/godot.rb
+++ b/lib/docs/scrapers/godot.rb
@@ -6,41 +6,59 @@ module Docs
code: 'https://github.com/godotengine/godot'
}
- html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html'
-
- options[:download_images] = false
options[:container] = '.document .section'
- options[:only_patterns] = [/\Alearning\//, /\Aclasses\//]
- options[:skip] = %w(classes/class_@global\ scope.html)
+ options[:download_images] = false
+ options[:only_patterns] = [/\Agetting_started\//, /\Aclasses\//]
options[:attribution] = ->(filter) do
if filter.subpath.start_with?('classes')
<<-HTML
- © 2014–2021 Juan Linietsky, Ariel Manzur, Godot Engine contributors
+ © 2014–2022 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
HTML
else
<<-HTML
- © 2014–2021 Juan Linietsky, Ariel Manzur and the Godot community
+ © 2014–2022 Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
HTML
end
end
+ version '3.5' do
+ self.release = '3.5.1'
+ self.base_url = "https://docs.godotengine.org/en/#{self.version}/"
+ options[:container] = '.document > [itemprop="articleBody"] > section[id]'
+ html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html'
+ end
+
+ version '3.4' do
+ self.release = '3.4.5'
+ self.base_url = "https://docs.godotengine.org/en/#{self.version}/"
+ options[:container] = '.document > [itemprop="articleBody"] > section[id]'
+ html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html'
+ end
+
version '3.3' do
self.release = '3.3.0'
self.base_url = "https://docs.godotengine.org/en/#{self.version}/"
+ html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html'
end
version '3.2' do
self.release = '3.2.3'
self.base_url = "https://docs.godotengine.org/en/#{self.version}/"
+ html_filters.push 'godot/entries', 'godot/clean_html', 'sphinx/clean_html'
end
version '2.1' do
self.release = '2.1.6'
self.base_url = "https://docs.godotengine.org/en/#{self.version}/"
+
+ options[:skip] = %w(classes/class_@global\ scope.html)
+ options[:only_patterns] = [/\Alearning\//, /\Aclasses\//]
+
+ html_filters.push 'godot/entries_v2', 'godot/clean_html_v2', 'sphinx/clean_html'
end
def get_latest_version(opts)
diff --git a/lib/docs/scrapers/groovy.rb b/lib/docs/scrapers/groovy.rb
index be0e24a0..37197372 100755
--- a/lib/docs/scrapers/groovy.rb
+++ b/lib/docs/scrapers/groovy.rb
@@ -19,10 +19,15 @@ module Docs
]
options[:attribution] = <<-HTML
- © 2003-2020 The Apache Software Foundation
+ © 2003-2022 The Apache Software Foundation
Licensed under the Apache license.
HTML
+ version '4.0' do
+ self.release = '4.0.0'
+ self.base_url = "https://docs.groovy-lang.org/#{self.release}/html/gapi/"
+ end
+
version '3.0' do
self.release = '3.0.9'
self.base_url = "https://docs.groovy-lang.org/#{self.release}/html/gapi/"
diff --git a/lib/docs/scrapers/gtk.rb b/lib/docs/scrapers/gtk.rb
index cfa85956..5ac6c370 100644
--- a/lib/docs/scrapers/gtk.rb
+++ b/lib/docs/scrapers/gtk.rb
@@ -74,7 +74,7 @@ module Docs
version '4.0' do
self.release = '4.0.0'
- self.base_url = "https://developer.gnome.org/gtk4/#{self.version}/"
+ self.base_url = "https://developer-old.gnome.org/gtk4/#{self.version}/"
options[:root_title] = 'GTK 4 Reference Manual'
options[:skip] = GTK4_SKIP
diff --git a/lib/docs/scrapers/haproxy.rb b/lib/docs/scrapers/haproxy.rb
index 6c354787..8fb07165 100644
--- a/lib/docs/scrapers/haproxy.rb
+++ b/lib/docs/scrapers/haproxy.rb
@@ -6,7 +6,7 @@ module Docs
self.initial_paths = %w(intro.html configuration.html management.html)
self.links = {
home: 'https://www.haproxy.org/',
- code: 'https://github.com/haproxy/haproxy/'
+ code: 'https://github.com/haproxy/haproxy'
}
html_filters.push 'haproxy/clean_html', 'haproxy/entries'
@@ -16,13 +16,28 @@ module Docs
options[:follow_links] = false
options[:attribution] = <<-HTML
- © 2021 Willy Tarreau, HAProxy contributors
+ © 2022 Willy Tarreau, HAProxy contributors
Licensed under the GNU General Public License version 2.
HTML
+ version '2.7' do
+ self.release = '2.7.0'
+ self.base_url = "https://docs.haproxy.org/#{self.version}/"
+ end
+
+ version '2.6' do
+ self.release = '2.6.5'
+ self.base_url = "https://docs.haproxy.org/#{self.version}/"
+ end
+
+ version '2.5' do
+ self.release = '2.5.8'
+ self.base_url = "https://docs.haproxy.org/#{self.version}/"
+ end
+
version '2.4' do
- self.release = '2.4.0'
- self.base_url = "https://cbonte.github.io/haproxy-dconv/#{self.version}/"
+ self.release = '2.4.18'
+ self.base_url = "https://docs.haproxy.org/#{self.version}/"
end
version '2.3' do
@@ -61,8 +76,8 @@ module Docs
end
def get_latest_version(opts)
- doc = fetch_doc('http://www.haproxy.org', opts)
- doc.at_css('table[cols=6]').css('tr')[1].at_css('td').content
+ doc = fetch_doc('https://www.haproxy.org', opts)
+ doc.at_css('table[cols=6]').at_css('tr:not(:first-child) > td:first-child:not(:contains("dev"))').content
end
end
end
diff --git a/lib/docs/scrapers/haskell.rb b/lib/docs/scrapers/haskell.rb
index 471a7e0d..9cfe7f66 100755
--- a/lib/docs/scrapers/haskell.rb
+++ b/lib/docs/scrapers/haskell.rb
@@ -59,8 +59,8 @@ module Docs
end
version '9' do
- self.release = '9.2.1'
- self.base_url = "https://downloads.haskell.org/~ghc/#{release}/docs/html/"
+ self.release = '9.4.2'
+ self.base_url = "https://downloads.haskell.org/~ghc/#{release}/docs/"
options[:container] = ->(filter) {filter.subpath.start_with?('users_guide') ? '.document' : '#content'}
end
@@ -78,9 +78,9 @@ module Docs
end
def get_latest_version(opts)
- doc = fetch_doc('https://downloads.haskell.org/~ghc/latest/docs/html/', opts)
+ doc = fetch_doc('https://www.haskell.org/ghc/download.html', opts)
links = doc.css('a').to_a
- versions = links.map {|link| link['href'].scan(/ghc-([0-9.]+)/)}
+ versions = links.map {|link| link.content.scan(/\A([0-9.]+)\Z/)}
versions.find {|version| !version.empty?}[0][0]
end
diff --git a/lib/docs/scrapers/homebrew.rb b/lib/docs/scrapers/homebrew.rb
index 6a7b5aed..ae2cbec2 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.1.2'
+ self.release = '3.5.10'
self.base_url = 'https://docs.brew.sh/'
self.links = {
home: 'https://brew.sh',
@@ -13,7 +13,7 @@ module Docs
options[:container] = ->(filter) { filter.root_page? ? '#home' : '#page' }
- options[:skip_patterns] = [/maintainer/i, /core\-contributor/i, /kickstarter/i]
+ options[:skip_patterns] = [/maintainer/i, /core\-contributor/i, /kickstarter/i, /governance/i]
options[:attribution] = <<-HTML
© 2009–present Homebrew contributors
diff --git a/lib/docs/scrapers/http.rb b/lib/docs/scrapers/http.rb
index f1fb5ab5..b8f38218 100644
--- a/lib/docs/scrapers/http.rb
+++ b/lib/docs/scrapers/http.rb
@@ -2,7 +2,7 @@ module Docs
class Http < Mdn
include MultipleBaseUrls
- # release = '2021-10-22'
+ # release = '2022-11-17'
self.name = 'HTTP'
self.base_urls = [
'https://developer.mozilla.org/en-US/docs/Web/HTTP',
@@ -16,10 +16,10 @@ module Docs
filter.current_url.host == 'datatracker.ietf.org' ? false : filter.default_title
end
options[:container] = ->(filter) do
- filter.current_url.host == 'datatracker.ietf.org' ? '.content .draftcontent' : Docs::Mdn.options[:container]
+ filter.current_url.host == 'datatracker.ietf.org' ? '.content' : Docs::Mdn.options[:container]
end
options[:skip_links] = ->(filter) do
- filter.current_url.host == 'datatracker.ietf.org' ? true : false
+ filter.current_url.host == 'datatracker.ietf.org'
end
options[:replace_paths] = { '/Access_control_CORS' => '/CORS' }
options[:fix_urls] = ->(url) do
@@ -37,15 +37,12 @@ module Docs
def initial_urls
%w(https://developer.mozilla.org/en-US/docs/Web/HTTP
- https://datatracker.ietf.org/doc/html/rfc2616
https://datatracker.ietf.org/doc/html/rfc4918
- https://datatracker.ietf.org/doc/html/rfc7230
- https://datatracker.ietf.org/doc/html/rfc7231
- https://datatracker.ietf.org/doc/html/rfc7232
- https://datatracker.ietf.org/doc/html/rfc7233
- https://datatracker.ietf.org/doc/html/rfc7234
- https://datatracker.ietf.org/doc/html/rfc7235
- https://datatracker.ietf.org/doc/html/rfc7540
+ https://datatracker.ietf.org/doc/html/rfc9110
+ https://datatracker.ietf.org/doc/html/rfc9111
+ https://datatracker.ietf.org/doc/html/rfc9112
+ https://datatracker.ietf.org/doc/html/rfc9113
+ https://datatracker.ietf.org/doc/html/rfc9114
https://datatracker.ietf.org/doc/html/rfc5023)
end
end
diff --git a/lib/docs/scrapers/i3.rb b/lib/docs/scrapers/i3.rb
index abc4e791..6e5fbd70 100644
--- a/lib/docs/scrapers/i3.rb
+++ b/lib/docs/scrapers/i3.rb
@@ -3,7 +3,7 @@ module Docs
self.name = 'i3'
self.type = 'simple'
self.slug = 'i3'
- self.release = '4.20.1'
+ self.release = '4.22'
self.base_url = 'https://i3wm.org/docs/userguide.html'
self.links = {
home: 'https://i3wm.org/',
diff --git a/lib/docs/scrapers/immutable.rb b/lib/docs/scrapers/immutable.rb
index 1768ac66..f4266923 100644
--- a/lib/docs/scrapers/immutable.rb
+++ b/lib/docs/scrapers/immutable.rb
@@ -3,8 +3,8 @@ module Docs
self.name = 'Immutable.js'
self.slug = 'immutable'
self.type = 'simple'
- self.release = '4.0.0'
- self.base_url = 'https://immutable-js.com/docs/v4.0.0/'
+ self.release = '4.2.1'
+ self.base_url = "https://immutable-js.com/docs/v#{release}/"
self.links = {
home: 'https://immutable-js.com/',
code: 'https://github.com/facebook/immutable-js'
diff --git a/lib/docs/scrapers/jasmine.rb b/lib/docs/scrapers/jasmine.rb
index bdcb3626..753e6134 100644
--- a/lib/docs/scrapers/jasmine.rb
+++ b/lib/docs/scrapers/jasmine.rb
@@ -1,8 +1,8 @@
module Docs
class Jasmine < UrlScraper
- self.type = 'simple'
- self.release = '3.7.1'
- self.base_url = 'https://jasmine.github.io/api/3.7/'
+ self.type = 'jasmine'
+ self.release = '4.0.0'
+ self.base_url = 'https://jasmine.github.io/api/4.0/'
self.root_path = 'index.html'
self.links = {
home: 'https://jasmine.github.io/',
diff --git a/lib/docs/scrapers/jest.rb b/lib/docs/scrapers/jest.rb
index b2ab00b2..03529e33 100644
--- a/lib/docs/scrapers/jest.rb
+++ b/lib/docs/scrapers/jest.rb
@@ -2,7 +2,7 @@ module Docs
class Jest < UrlScraper
include MultipleBaseUrls
self.type = 'simple'
- self.release = '27.4.3'
+ self.release = '29.0.1'
self.base_urls = [
'https://jestjs.io/docs/',
@@ -19,11 +19,12 @@ module Docs
options[:skip_patterns] = [
/^next/,
+ /upgrading-to-/,
/\d+\.[x\d]/ # avoid deprecated versions
]
options[:attribution] = <<-HTML
- © 2021 Facebook, Inc.
+ © 2022 Facebook, Inc.
Licensed under the MIT License.
HTML
diff --git a/lib/docs/scrapers/julia.rb b/lib/docs/scrapers/julia.rb
index f7a03e53..f1669dec 100644
--- a/lib/docs/scrapers/julia.rb
+++ b/lib/docs/scrapers/julia.rb
@@ -7,10 +7,21 @@ module Docs
options[:attribution] = <<-HTML
- © 2009–2021 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors
+ © 2009–2022 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors
Licensed under the MIT License.
HTML
+ version '1.8' do
+ self.release = '1.8.0'
+ self.base_url = "https://docs.julialang.org/en/v#{release}/"
+ self.type = 'julia'
+
+ html_filters.push 'julia/entries', 'julia/clean_html'
+
+ options[:container] = '.docs-main'
+ options[:only_patterns] = [/\Amanual\//, /\Abase\//, /\Astdlib\//]
+ end
+
version '1.7' do
self.release = '1.7.0'
self.base_url = "https://docs.julialang.org/en/v#{release}/"
diff --git a/lib/docs/scrapers/kotlin.rb b/lib/docs/scrapers/kotlin.rb
index c9291a89..99248ffa 100644
--- a/lib/docs/scrapers/kotlin.rb
+++ b/lib/docs/scrapers/kotlin.rb
@@ -27,12 +27,21 @@ module Docs
end
options[:attribution] = <<-HTML
- © 2010–2021 JetBrains s.r.o. and Kotlin Programming Language contributors
+ © 2010–2023 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
HTML
+ version '1.8' do
+ self.release = '1.8.0'
+ self.headers = { 'User-Agent' => 'devdocs.io' , 'Cookie' => 'x-ab-test-spring-boot-learning-path=0; userToken=r33dgpe8x3q5vswekg16a' }
+ end
+
+ version '1.7' do
+ self.release = '1.7.20'
+ end
+
version '1.6' do
- self.release = '1.6.0'
+ self.release = '1.6.20'
end
version '1.4' do
@@ -49,5 +58,10 @@ module Docs
return false unless super
response.body !~ /http-equiv="refresh"/i
end
+
+ def parse(response)
+ response.body.gsub! %r{
]*>([\W\w]+?)
}, '
\2
'
+ super
+ end
end
end
diff --git a/lib/docs/scrapers/kubectl.rb b/lib/docs/scrapers/kubectl.rb
new file mode 100644
index 00000000..42cff8c7
--- /dev/null
+++ b/lib/docs/scrapers/kubectl.rb
@@ -0,0 +1,37 @@
+module Docs
+ class Kubectl < UrlScraper
+ self.name = 'Kubectl'
+ self.type = 'kubectl'
+ self.root_path = ''
+ self.links = {
+ home: 'https://kubernetes.io/docs/reference/kubectl/',
+ code: 'https://github.com/kubernetes/kubernetes'
+ }
+ self.base_url = "https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands"
+
+ html_filters.push 'kubectl/entries', 'kubectl/clean_html'
+
+ options[:container] = '#page-content-wrapper'
+
+ options[:attribution] = <<-HTML
+ © 2022 The Kubernetes Authors | Documentation Distributed under CC BY 4.0
+ Copyright © 2022 The Linux Foundation ®. All rights reserved.
+ HTML
+
+ # latest version has a special URL that does not include the version identifier
+ version do
+ self.release = "1.26"
+ self.base_url = "https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands"
+ end
+
+ version '1.20' do
+ self.release = "#{version}"
+ self.base_url = "https://v#{version.sub('.', '-')}.docs.kubernetes.io/docs/reference/generated/kubectl/kubectl-commands"
+ end
+
+ def get_latest_version(opts)
+ get_latest_github_release('kubernetes', 'kubernetes', opts)
+ end
+
+ end
+end
diff --git a/lib/docs/scrapers/kubernetes.rb b/lib/docs/scrapers/kubernetes.rb
new file mode 100644
index 00000000..2eb30c63
--- /dev/null
+++ b/lib/docs/scrapers/kubernetes.rb
@@ -0,0 +1,37 @@
+module Docs
+ class Kubernetes < UrlScraper
+ self.name = 'Kubernetes'
+ self.type = 'kubernetes'
+ self.root_path = '/'
+ self.links = {
+ home: 'https://kubernetes.io/',
+ code: 'https://github.com/kubernetes/kubernetes'
+ }
+
+ # https://kubernetes.io/docs/reference/kubernetes-api/
+ html_filters.push 'kubernetes/entries', 'kubernetes/clean_html'
+
+ options[:container] = '.td-content'
+
+ options[:attribution] = <<-HTML
+ © 2022 The Kubernetes Authors | Documentation Distributed under CC BY 4.0
+ Copyright © 2022 The Linux Foundation ®. All rights reserved.
+ HTML
+
+ # latest version has a special URL that does not include the version identifier
+ version do
+ self.release = "1.26"
+ self.base_url = "https://kubernetes.io/docs/reference/kubernetes-api/"
+ end
+
+ version '1.20' do
+ self.release = "#{version}"
+ self.base_url = "https://v#{version.sub('.', '-')}.docs.kubernetes.io/docs/reference/kubernetes-api/"
+ end
+
+ def get_latest_version(opts)
+ get_latest_github_release('kubernetes', 'kubernetes', opts)
+ end
+
+ end
+end
diff --git a/lib/docs/scrapers/laravel.rb b/lib/docs/scrapers/laravel.rb
index 51a0cced..7641afd0 100644
--- a/lib/docs/scrapers/laravel.rb
+++ b/lib/docs/scrapers/laravel.rb
@@ -10,7 +10,7 @@ module Docs
html_filters.push 'laravel/entries', 'laravel/clean_html'
options[:container] = ->(filter) {
- filter.subpath.start_with?('/api') ? '#content' : '.page_contain'
+ filter.subpath.start_with?('/api') ? '#content' : '#docsScreen'
}
options[:skip_patterns] = [
@@ -29,6 +29,20 @@ module Docs
Laravel is a trademark of Taylor Otwell.
HTML
+ version '9' do
+ self.release = '9.3.8'
+ self.root_path = '/api/9.x/index.html'
+ self.initial_paths = %w(/docs/9.x/installation /api/9.x/classes.html)
+
+ options[:only_patterns] = [%r{\A/api/9\.x/}, %r{\A/docs/9\.x/}]
+
+ options[:fix_urls] = ->(url) do
+ url.sub! %r{9.x/+}, "9.x/"
+ url.sub! %r{#{Regexp.escape(Laravel.base_url)}/docs\/(?!\d)}, "#{Laravel.base_url}/docs/9.x/"
+ url
+ end
+ end
+
version '8' do
self.release = '8.4.1'
self.root_path = '/api/8.x/index.html'
diff --git a/lib/docs/scrapers/latex.rb b/lib/docs/scrapers/latex.rb
index 816f1d64..9fe51a91 100644
--- a/lib/docs/scrapers/latex.rb
+++ b/lib/docs/scrapers/latex.rb
@@ -4,7 +4,7 @@ module Docs
self.name = 'LaTeX'
self.slug = 'latex'
self.type = 'simple'
- self.release = 'April 2021'
+ self.release = 'May 2022'
self.links = {
home: 'https://ctan.org/pkg/latex2e-help-texinfo/'
}
diff --git a/lib/docs/scrapers/leaflet.rb b/lib/docs/scrapers/leaflet.rb
index 31ec27e7..404ce9ed 100644
--- a/lib/docs/scrapers/leaflet.rb
+++ b/lib/docs/scrapers/leaflet.rb
@@ -14,14 +14,24 @@ module Docs
options[:skip_links] = true
options[:attribution] = <<-HTML
- © 2010–2021 Vladimir Agafonkin
+ © 2010–2022 Vladimir Agafonkin
© 2010–2011, CloudMade
Maps © OpenStreetMap contributors.
HTML
+ version '1.9' do
+ self.release = '1.9.1'
+ self.base_url = "https://leafletjs.com/reference.html"
+ end
+
+ version '1.8' do
+ self.release = '1.8.0'
+ self.base_url = "https://leafletjs.com/reference-#{release}.html"
+ end
+
version '1.7' do
self.release = '1.7.1'
- self.base_url = "https://leafletjs.com/reference.html"
+ self.base_url = "https://leafletjs.com/reference-#{release}.html"
end
version '1.6' do
@@ -31,7 +41,7 @@ module Docs
version '1.5' do
self.release = '1.5.1'
- self.base_url = "https://leafletjs.com/reference-1.5.0.html"
+ self.base_url = "https://leafletjs.com/reference-#{release}.html"
end
version '1.4' do
@@ -60,9 +70,7 @@ module Docs
end
def get_latest_version(opts)
- doc = fetch_doc('https://leafletjs.com/reference-versions.html', opts)
- link = doc.at_css('.container > ul > li:last-child > a').content
- link.sub(/[a-zA-Z\s]*/, '')
+ get_npm_version('leaflet', opts)
end
end
end
diff --git a/lib/docs/scrapers/mariadb.rb b/lib/docs/scrapers/mariadb.rb
index cf2c69c3..f34667f7 100644
--- a/lib/docs/scrapers/mariadb.rb
+++ b/lib/docs/scrapers/mariadb.rb
@@ -2,7 +2,7 @@ module Docs
class Mariadb < UrlScraper
self.name = 'MariaDB'
self.type = 'mariadb'
- self.release = '10.6.4'
+ self.release = '10.9.2'
self.base_url = 'https://mariadb.com/kb/en/'
self.root_path = 'documentation/'
self.links = {
@@ -24,7 +24,7 @@ module Docs
]
options[:attribution] = <<-HTML
- © 2021 MariaDB
+ © 2022 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
HTML
diff --git a/lib/docs/scrapers/matplotlib.rb b/lib/docs/scrapers/matplotlib.rb
index a2add6bf..e262b3aa 100644
--- a/lib/docs/scrapers/matplotlib.rb
+++ b/lib/docs/scrapers/matplotlib.rb
@@ -16,10 +16,19 @@ module Docs
options[:skip] = %w(api_changes.html tutorial.html faq.html)
options[:attribution] = <<-HTML
- © 2012–2021 Matplotlib Development Team. All rights reserved.
+ © 2012–2022 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
HTML
+ version '3.6' do
+ self.release = '3.6.0'
+ self.base_urls = [
+ "https://matplotlib.org/stable/api/",
+ "https://matplotlib.org/stable/mpl_toolkits/mplot3d/",
+ "https://matplotlib.org/stable/mpl_toolkits/axes_grid/api/"
+ ]
+ end
+
version '3.5' do
self.release = '3.5.1'
self.base_urls = [
diff --git a/lib/docs/scrapers/mdn/css.rb b/lib/docs/scrapers/mdn/css.rb
index 19f10217..724a6fec 100644
--- a/lib/docs/scrapers/mdn/css.rb
+++ b/lib/docs/scrapers/mdn/css.rb
@@ -1,6 +1,6 @@
module Docs
class Css < Mdn
- # release = '2021-12-21'
+ # release = '2023-01-06'
self.name = 'CSS'
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/CSS'
self.root_path = '/Reference'
diff --git a/lib/docs/scrapers/mdn/dom.rb b/lib/docs/scrapers/mdn/dom.rb
index 21abd46c..7af13d55 100644
--- a/lib/docs/scrapers/mdn/dom.rb
+++ b/lib/docs/scrapers/mdn/dom.rb
@@ -1,7 +1,7 @@
module Docs
class Dom < Mdn
- # release = '2021-12-07'
+ # release = '2023-01-06'
self.name = 'Web APIs'
self.slug = 'dom'
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/API'
diff --git a/lib/docs/scrapers/mdn/html.rb b/lib/docs/scrapers/mdn/html.rb
index 195b6208..be7e7bae 100644
--- a/lib/docs/scrapers/mdn/html.rb
+++ b/lib/docs/scrapers/mdn/html.rb
@@ -2,7 +2,7 @@ module Docs
class Html < Mdn
prepend FixInternalUrlsBehavior
- # release = '2021-12-21'
+ # release = '2023-01-06'
self.name = 'HTML'
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML'
diff --git a/lib/docs/scrapers/mdn/javascript.rb b/lib/docs/scrapers/mdn/javascript.rb
index e2b93aef..8c1a64bc 100644
--- a/lib/docs/scrapers/mdn/javascript.rb
+++ b/lib/docs/scrapers/mdn/javascript.rb
@@ -3,7 +3,7 @@ module Docs
prepend FixInternalUrlsBehavior
prepend FixRedirectionsBehavior
- # release = '2022-01-09'
+ # release = '2023-01-06'
self.name = 'JavaScript'
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference'
diff --git a/lib/docs/scrapers/mdn/mdn.rb b/lib/docs/scrapers/mdn/mdn.rb
index 2b31668a..54856e47 100644
--- a/lib/docs/scrapers/mdn/mdn.rb
+++ b/lib/docs/scrapers/mdn/mdn.rb
@@ -13,7 +13,7 @@ module Docs
}
options[:attribution] = <<-HTML
- © 2005–2021 MDN contributors.
+ © 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
HTML
diff --git a/lib/docs/scrapers/mdn/svg.rb b/lib/docs/scrapers/mdn/svg.rb
index 43510a39..689fae99 100644
--- a/lib/docs/scrapers/mdn/svg.rb
+++ b/lib/docs/scrapers/mdn/svg.rb
@@ -3,7 +3,7 @@ module Docs
prepend FixInternalUrlsBehavior
prepend FixRedirectionsBehavior
- # release = '2021-12-21'
+ # release = '2022-09-06'
self.name = 'SVG'
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/SVG'
diff --git a/lib/docs/scrapers/mdn/web_extensions.rb b/lib/docs/scrapers/mdn/web_extensions.rb
index d9481732..664ca985 100644
--- a/lib/docs/scrapers/mdn/web_extensions.rb
+++ b/lib/docs/scrapers/mdn/web_extensions.rb
@@ -1,6 +1,6 @@
module Docs
class WebExtensions < Mdn
- # release = '2021-10-22'
+ # release = '2022-09-06'
self.name = 'Web Extensions'
self.slug = 'web_extensions'
self.links = {
diff --git a/lib/docs/scrapers/mdn/xslt_xpath.rb b/lib/docs/scrapers/mdn/xslt_xpath.rb
index 26a298b6..950db8ef 100644
--- a/lib/docs/scrapers/mdn/xslt_xpath.rb
+++ b/lib/docs/scrapers/mdn/xslt_xpath.rb
@@ -1,6 +1,6 @@
module Docs
class XsltXpath < Mdn
- # release = '2021-10-22'
+ # release = '2022-09-06'
self.name = 'XSLT & XPath'
self.slug = 'xslt_xpath'
self.base_url = 'https://developer.mozilla.org/en-US/docs/Web'
diff --git a/lib/docs/scrapers/mkdocs/django_rest_framework.rb b/lib/docs/scrapers/mkdocs/django_rest_framework.rb
index 54ea2694..8a940536 100644
--- a/lib/docs/scrapers/mkdocs/django_rest_framework.rb
+++ b/lib/docs/scrapers/mkdocs/django_rest_framework.rb
@@ -1,7 +1,7 @@
module Docs
class DjangoRestFramework < Mkdocs
self.name = 'Django REST Framework'
- self.release = '3.12.4'
+ self.release = '3.14.0'
self.slug = 'django_rest_framework'
self.base_url = 'https://www.django-rest-framework.org/'
self.root_path = 'index.html'
diff --git a/lib/docs/scrapers/moment.rb b/lib/docs/scrapers/moment.rb
index e74163be..8d56470d 100644
--- a/lib/docs/scrapers/moment.rb
+++ b/lib/docs/scrapers/moment.rb
@@ -3,8 +3,8 @@ module Docs
self.name = 'Moment.js'
self.slug = 'moment'
self.type = 'moment'
- self.release = '2.22.1'
- self.base_url = 'http://momentjs.com'
+ self.release = '2.29.4'
+ self.base_url = 'https://momentjs.com'
self.root_path = '/docs/'
self.initial_paths = %w(/guides/)
self.links = {
diff --git a/lib/docs/scrapers/moment_timezone.rb b/lib/docs/scrapers/moment_timezone.rb
new file mode 100644
index 00000000..225d35f3
--- /dev/null
+++ b/lib/docs/scrapers/moment_timezone.rb
@@ -0,0 +1,30 @@
+module Docs
+ class MomentTimezone < UrlScraper
+ self.name = 'Moment.js Timezone'
+ self.slug = 'moment_timezone'
+ self.type = 'moment'
+ self.release = '0.5.37'
+ self.base_url = 'https://momentjs.com/timezone'
+ self.root_path = '/docs/'
+ self.initial_paths = %w(/docs/)
+ self.links = {
+ home: 'https://momentjs.com/timezone/',
+ code: 'https://github.com/moment/moment-timezone/'
+ }
+
+ html_filters.push 'moment/clean_html', 'moment_timezone/entries', 'title'
+
+ options[:title] = 'Moment.js Timezone'
+ options[:container] = '.docs-content'
+ options[:skip_links] = true
+
+ options[:attribution] = <<-HTML
+ © JS Foundation and other contributors
+ Licensed under the MIT License.
+ HTML
+
+ def get_latest_version(opts)
+ get_github_tags('moment', 'moment-timezone', opts)[0]['name']
+ end
+ end
+end
diff --git a/lib/docs/scrapers/nginx.rb b/lib/docs/scrapers/nginx.rb
index e53781dc..4881260c 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.21.0'
+ self.release = '1.23.1'
self.base_url = 'https://nginx.org/en/docs/'
self.links = {
home: 'https://nginx.org/',
@@ -23,7 +23,7 @@ module Docs
# http://nginx.org/LICENSE
options[:attribution] = <<-HTML
© 2002-2021 Igor Sysoev
- © 2011-2021 Nginx, Inc.
+ © 2011-2022 Nginx, Inc.
Licensed under the BSD License.
HTML
diff --git a/lib/docs/scrapers/nix.rb b/lib/docs/scrapers/nix.rb
new file mode 100644
index 00000000..5be27ffa
--- /dev/null
+++ b/lib/docs/scrapers/nix.rb
@@ -0,0 +1,31 @@
+module Docs
+ class Nix < UrlScraper
+ self.type = 'simple'
+ self.release = '2.11.0'
+ self.base_url = 'https://nixos.org/manual/'
+ self.root_path = 'nix/stable/expressions/builtins.html'
+ self.initial_paths = %w(
+ nix/stable/expressions/builtins.html
+ nixpkgs/stable/index.html)
+ self.links = {
+ home: 'https://nixos.org/',
+ code: 'https://github.com/NixOS/nix'
+ }
+
+ html_filters.push 'nix/clean_html', 'nix/entries'
+
+ options[:skip_links] = true
+
+ options[:attribution] = <<-HTML
+ © 2022 NixOS Contributors
+ Licensed under the LGPL License.
+ HTML
+
+ def get_latest_version(opts)
+ doc = fetch_doc('https://nixos.org/manual/nix/stable/', opts)
+ json = JSON.parse(doc.at_css('body')['data-nix-channels'])
+ channel = json.find { |c| c['channel'] == 'stable' }
+ channel['version']
+ end
+ end
+end
diff --git a/lib/docs/scrapers/node.rb b/lib/docs/scrapers/node.rb
index ce595f2a..d8623fc3 100644
--- a/lib/docs/scrapers/node.rb
+++ b/lib/docs/scrapers/node.rb
@@ -24,10 +24,20 @@ module Docs
HTML
version do
- self.release = '17.0.1'
+ self.release = '19.0.1'
self.base_url = 'https://nodejs.org/api/'
end
+ version '18 LTS' do
+ self.release = '18.12.1'
+ self.base_url = 'https://nodejs.org/dist/latest-v18.x/docs/api/'
+ end
+
+ version '16 LTS' do
+ self.release = '16.13.2'
+ self.base_url = 'https://nodejs.org/dist/latest-v16.x/docs/api/'
+ end
+
version '14 LTS' do
self.release = '14.17.0'
self.base_url = 'https://nodejs.org/dist/latest-v14.x/docs/api/'
diff --git a/lib/docs/scrapers/numpy.rb b/lib/docs/scrapers/numpy.rb
index 22fba843..a31ba8ed 100644
--- a/lib/docs/scrapers/numpy.rb
+++ b/lib/docs/scrapers/numpy.rb
@@ -22,18 +22,24 @@ module Docs
]
options[:attribution] = <<-HTML
- © 2005–2021 NumPy Developers
+ © 2005–2022 NumPy Developers
Licensed under the 3-clause BSD License.
HTML
+ version '1.23' do
+ self.release = '1.23.0'
+ self.base_url = "https://numpy.org/doc/#{self.version}/"
+ options[:container] = nil
+ end
+
version '1.22' do
- self.release = '1.22.0'
+ self.release = '1.22.4'
self.base_url = "https://numpy.org/doc/#{self.version}/"
options[:container] = nil
end
version '1.21' do
- self.release = '1.21.5'
+ self.release = '1.21.6'
self.base_url = "https://numpy.org/doc/#{self.version}/"
options[:container] = nil
end
diff --git a/lib/docs/scrapers/ocaml.rb b/lib/docs/scrapers/ocaml.rb
index e681fcd8..c26572ac 100644
--- a/lib/docs/scrapers/ocaml.rb
+++ b/lib/docs/scrapers/ocaml.rb
@@ -3,8 +3,6 @@ module Docs
self.name = 'OCaml'
self.type = 'ocaml'
self.root_path = 'index.html'
- self.release = '4.13'
- self.base_url = "https://www.ocaml.org/releases/#{self.release}/htmlman/"
self.links = {
home: 'https://ocaml.org/',
code: 'https://github.com/ocaml/ocaml'
@@ -23,12 +21,28 @@ module Docs
]
options[:attribution] = <<-HTML
- © 1995-2021 INRIA.
+ © 1995-2022 INRIA.
HTML
+ version '' do
+ self.release = '5.0'
+ self.base_url = "https://v2.ocaml.org/releases/#{self.release}/htmlman/"
+ end
+
+ version '4.14' do
+ self.release = '4.14'
+ self.base_url = "https://v2.ocaml.org/releases/#{self.release}/htmlman/"
+ end
+
def get_latest_version(opts)
- doc = fetch_doc('https://www.ocaml.org/releases/', opts)
- doc.css('#main-contents li > a').first.content
+ get_latest_github_release('ocaml', 'ocaml', opts)
+ end
+
+ private
+
+ def parse(response) # Hook here because Nokogori removes whitespace from code fragments
+ response.body.gsub! %r{
]*>([\W\w]+?)
}, '
\2
'
+ super
end
end
diff --git a/lib/docs/scrapers/octave.rb b/lib/docs/scrapers/octave.rb
index 72f64651..c44a1f6c 100644
--- a/lib/docs/scrapers/octave.rb
+++ b/lib/docs/scrapers/octave.rb
@@ -23,20 +23,25 @@ module Docs
options[:root_title] = 'GNU Octave'
options[:attribution] = <<-HTML
- © 1996–2020 John W. Eaton
+ © 1996–2022 The Octave Project Developers
Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.
HTML
+ version '7' do
+ self.release = '7.2.0'
+ self.base_url = "https://docs.octave.org/v#{self.release}/"
+ end
+
version '6' do
self.release = '6.4.0'
- self.base_url = "https://octave.org/doc/v#{self.release}/"
+ self.base_url = "https://docs.octave.org/v#{self.release}/"
end
version '5' do
self.release = '5.2.0'
- self.base_url = "https://octave.org/doc/v#{self.release}/"
+ self.base_url = "https://docs.octave.org/v#{self.release}/"
end
def get_latest_version(opts)
diff --git a/lib/docs/scrapers/openjdk.rb b/lib/docs/scrapers/openjdk.rb
index 8bd5e719..2ede8d5d 100644
--- a/lib/docs/scrapers/openjdk.rb
+++ b/lib/docs/scrapers/openjdk.rb
@@ -28,7 +28,7 @@ module Docs
]
options[:attribution] = <<-HTML
- © 1993, 2021, Oracle and/or its affiliates. All rights reserved.
+ © 1993, 2022, 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).
@@ -37,6 +37,26 @@ module Docs
NEWFILTERS = ['openjdk/entries_new', 'openjdk/clean_html_new']
+ version '19' do
+ self.release = '19'
+ self.root_path = 'index.html'
+ self.base_url = 'https://docs.oracle.com/en/java/javase/19/docs/api/'
+
+ html_filters.push NEWFILTERS
+
+ options[:container] = 'main'
+ end
+
+ version '18' do
+ self.release = '18'
+ self.root_path = 'index.html'
+ self.base_url = 'https://docs.oracle.com/en/java/javase/18/docs/api/'
+
+ html_filters.push NEWFILTERS
+
+ options[:container] = 'main'
+ end
+
version '17' do
self.release = '17'
self.root_path = 'index.html'
@@ -133,10 +153,10 @@ module Docs
def get_latest_version(opts)
doc = fetch_doc("https://jdk.java.net/archive/", opts)
- puts doc
version = doc.at_css('#downloads > table > tr > th').content
version.gsub!(/\(.*\)/, '')
version.gsub!(/[a-zA-z]/, '')
+ version
end
end
end
diff --git a/lib/docs/scrapers/pandas.rb b/lib/docs/scrapers/pandas.rb
index 925c9e04..d748c297 100644
--- a/lib/docs/scrapers/pandas.rb
+++ b/lib/docs/scrapers/pandas.rb
@@ -12,12 +12,12 @@ module Docs
options[:skip_patterns] = [/whatsnew\//]
options[:attribution] = <<-HTML
- © 2008–2021, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
+ © 2008–2022, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
HTML
version '1' do
- self.release = '1.3.4'
+ self.release = '1.5.0'
self.base_url = "https://pandas.pydata.org/pandas-docs/version/#{self.release}/"
html_filters.push 'pandas/clean_html', 'pandas/entries'
diff --git a/lib/docs/scrapers/perl.rb b/lib/docs/scrapers/perl.rb
index a98ced4b..740b3ba4 100644
--- a/lib/docs/scrapers/perl.rb
+++ b/lib/docs/scrapers/perl.rb
@@ -24,44 +24,49 @@ module Docs
The Perl logo is a trademark of the Perl Foundation.
HTML
+ version '5.36' do
+ self.release = '5.36.0'
+ self.base_url = "https://perldoc.perl.org/#{release}/"
+ end
+
version '5.34' do
self.release = '5.34.0'
- self.base_url = "https://perldoc.perl.org/#{self.release}/"
+ self.base_url = "https://perldoc.perl.org/#{release}/"
end
version '5.32' do
self.release = '5.32.0'
- self.base_url = "https://perldoc.perl.org/#{self.release}/"
+ self.base_url = "https://perldoc.perl.org/#{release}/"
end
version '5.30' do
self.release = '5.30.3'
- self.base_url = "https://perldoc.perl.org/#{self.release}/"
+ self.base_url = "https://perldoc.perl.org/#{release}/"
end
version '5.28' do
self.release = '5.28.3'
- self.base_url = "https://perldoc.perl.org/#{self.release}/"
+ self.base_url = "https://perldoc.perl.org/#{release}/"
end
version '5.26' do
self.release = '5.26.3'
- self.base_url = "https://perldoc.perl.org/#{self.release}/"
+ self.base_url = "https://perldoc.perl.org/#{release}/"
end
version '5.24' do
self.release = '5.24.4'
- self.base_url = "https://perldoc.perl.org/#{self.release}/"
+ self.base_url = "https://perldoc.perl.org/#{release}/"
end
version '5.22' do
self.release = '5.22.4'
- self.base_url = "https://perldoc.perl.org/#{self.release}/"
+ self.base_url = "https://perldoc.perl.org/#{release}/"
end
version '5.20' do
self.release = '5.20.3'
- self.base_url = "https://perldoc.perl.org/#{self.release}/"
+ self.base_url = "https://perldoc.perl.org/#{release}/"
end
def get_latest_version(opts)
diff --git a/lib/docs/scrapers/phoenix.rb b/lib/docs/scrapers/phoenix.rb
index 1aaba7ce..d115ef05 100644
--- a/lib/docs/scrapers/phoenix.rb
+++ b/lib/docs/scrapers/phoenix.rb
@@ -1,7 +1,7 @@
module Docs
class Phoenix < UrlScraper
self.type = 'elixir'
- self.release = '1.5.6'
+ self.release = '1.6.11'
self.base_url = 'https://hexdocs.pm/'
self.root_path = 'phoenix/Phoenix.html'
self.initial_paths = %w(
@@ -20,7 +20,7 @@ module Docs
options[:container] = '#content'
- options[:skip_patterns] = [/extra-api-reference/]
+ options[:skip_patterns] = [/extra-api-reference/, /js/, /\d+\.\d+\.\d+/]
options[:only_patterns] = [
/\Aphoenix\//,
/\Aecto\//,
diff --git a/lib/docs/scrapers/php.rb b/lib/docs/scrapers/php.rb
index e07b1e44..5c02d6c5 100644
--- a/lib/docs/scrapers/php.rb
+++ b/lib/docs/scrapers/php.rb
@@ -5,7 +5,7 @@ module Docs
self.name = 'PHP'
self.type = 'php'
- self.release = '8.1'
+ self.release = '8.2'
self.base_url = 'https://www.php.net/manual/en/'
self.root_path = 'index.html'
self.initial_paths = %w(
@@ -62,7 +62,7 @@ module Docs
options[:skip_patterns] = [/mysqlnd/, /xdevapi/i]
options[:attribution] = <<-HTML
- © 1997–2021 The PHP Documentation Group
+ © 1997–2022 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
HTML
diff --git a/lib/docs/scrapers/postgresql.rb b/lib/docs/scrapers/postgresql.rb
index 704dd959..68a431a1 100644
--- a/lib/docs/scrapers/postgresql.rb
+++ b/lib/docs/scrapers/postgresql.rb
@@ -51,12 +51,17 @@ module Docs
/\Aunsupported-features/ ]
options[:attribution] = <<-HTML
- © 1996–2021 The PostgreSQL Global Development Group
+ © 1996–2022 The PostgreSQL Global Development Group
Licensed under the PostgreSQL License.
HTML
+ version '15' do
+ self.release = '15.0'
+ self.base_url = "https://www.postgresql.org/docs/#{version}/"
+ end
+
version '14' do
- self.release = '14.0'
+ self.release = '14.5'
self.base_url = "https://www.postgresql.org/docs/#{version}/"
end
diff --git a/lib/docs/scrapers/prettier.rb b/lib/docs/scrapers/prettier.rb
index 7027d9fa..f9963501 100644
--- a/lib/docs/scrapers/prettier.rb
+++ b/lib/docs/scrapers/prettier.rb
@@ -2,7 +2,7 @@ module Docs
class Prettier < UrlScraper
self.name = 'Prettier'
self.type = 'simple'
- self.release = '2.5.1'
+ self.release = '2.8.0'
self.base_url = 'https://prettier.io/docs/en/'
self.links = {
home: 'https://prettier.io/',
@@ -10,7 +10,7 @@ module Docs
}
# Docusaurus like react_native
- html_filters.push 'prettier/entries', 'react_native/clean_html'
+ html_filters.push 'prettier/entries', 'prettier/clean_html'
options[:container] = '.docMainWrapper'
diff --git a/lib/docs/scrapers/puppeteer.rb b/lib/docs/scrapers/puppeteer.rb
index e2214568..357e65f2 100644
--- a/lib/docs/scrapers/puppeteer.rb
+++ b/lib/docs/scrapers/puppeteer.rb
@@ -16,8 +16,7 @@ module Docs
HTML
def get_latest_version(opts)
- contents = get_github_file_contents('GoogleChrome', 'puppeteer', 'README.md', opts)
- contents.scan(/\/v([0-9.]+)\/docs\/api\.md/)[0][0]
+ get_npm_version('puppeteer', opts)
end
end
end
diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb
index fe104503..e3617e90 100644
--- a/lib/docs/scrapers/python.rb
+++ b/lib/docs/scrapers/python.rb
@@ -7,22 +7,7 @@ module Docs
code: 'https://github.com/python/cpython'
}
- options[:only_patterns] = [
- # /\Ac-api/,
- /\Adistributing/,
- # /\Adistutils/,
- /\Aextending/,
- /\Afaq/,
- /\Ahowto/,
- /\Aindex.html/,
- # /\Ainstall/,
- /\Ainstalling/,
- /\Alibrary/,
- /\Areference/,
- /\Atutorial/,
- /\Ausing/,
- ]
-
+ options[:skip_patterns] = [/whatsnew/]
options[:skip] = %w(
library/2to3.html
library/formatter.html
@@ -32,33 +17,40 @@ module Docs
library/sunau.html)
options[:attribution] = <<-HTML
- © 2001–2021 Python Software Foundation
+ © 2001–2022 Python Software Foundation
Licensed under the PSF License.
HTML
+ version '3.11' do
+ self.release = '3.11.0'
+ self.base_url = "https://docs.python.org/#{self.version}/"
+
+ html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
+ end
+
version '3.10' do
- self.release = '3.10.1'
+ self.release = '3.10.8'
self.base_url = "https://docs.python.org/#{self.version}/"
html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
end
version '3.9' do
- self.release = '3.9.4'
+ self.release = '3.9.14'
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
- self.release = '3.8.6'
+ self.release = '3.8.14'
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
- self.release = '3.7.9'
+ self.release = '3.7.14'
self.base_url = 'https://docs.python.org/3.7/'
html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
diff --git a/lib/docs/scrapers/qunit.rb b/lib/docs/scrapers/qunit.rb
new file mode 100644
index 00000000..f0d649f5
--- /dev/null
+++ b/lib/docs/scrapers/qunit.rb
@@ -0,0 +1,39 @@
+# frozen_string_literal: true
+
+module Docs
+ class Qunit < UrlScraper
+ self.name = 'QUnit'
+ self.type = 'qunit'
+ self.release = '2.19.3'
+ self.base_url = 'https://api.qunitjs.com/'
+ self.root_path = '/'
+ self.links = {
+ home: 'https://qunitjs.com/',
+ code: 'https://github.com/qunitjs/qunit'
+ }
+
+ html_filters.push 'qunit/entries', 'qunit/clean_html'
+
+ options[:trailing_slash] = false
+
+ options[:container] = '.main'
+ options[:skip_patterns] = [
+ /deprecated/,
+ /^QUnit$/,
+ /^assert$/,
+ /^callbacks$/,
+ /^async$/,
+ /^config$/,
+ /^extension$/,
+ ]
+
+ options[:attribution] = <<-HTML
+ © OpenJS Foundation and contributors.
+ Licensed under the MIT license.
+ HTML
+
+ def get_latest_version(opts)
+ get_npm_version('qunit', opts)
+ end
+ end
+end
diff --git a/lib/docs/scrapers/rdoc/minitest.rb b/lib/docs/scrapers/rdoc/minitest.rb
index 2a4249fc..884dc0a6 100644
--- a/lib/docs/scrapers/rdoc/minitest.rb
+++ b/lib/docs/scrapers/rdoc/minitest.rb
@@ -8,10 +8,11 @@ module Docs
self.name = 'Ruby / Minitest'
self.slug = 'minitest'
- self.release = '5.11.3'
+ self.release = '5.17.0'
self.links = {
- code: 'https://github.com/seattlerb/minitest'
+ code: 'https://github.com/minitest/minitest'
}
+ self.base_url = 'https://docs.seattlerb.org/minitest/'
html_filters.replace 'rdoc/entries', 'minitest/entries'
diff --git a/lib/docs/scrapers/rdoc/rails.rb b/lib/docs/scrapers/rdoc/rails.rb
index 3f2e1f27..68381b79 100644
--- a/lib/docs/scrapers/rdoc/rails.rb
+++ b/lib/docs/scrapers/rdoc/rails.rb
@@ -76,15 +76,15 @@ module Docs
end
version '7.0' do
- self.release = '7.0.0'
+ self.release = '7.0.4'
end
version '6.1' do
- self.release = '6.1.4'
+ self.release = '6.1.7'
end
version '6.0' do
- self.release = '6.0.4'
+ self.release = '6.0.6'
end
version '5.2' do
diff --git a/lib/docs/scrapers/rdoc/ruby.rb b/lib/docs/scrapers/rdoc/ruby.rb
index ed7891b4..2850061a 100644
--- a/lib/docs/scrapers/rdoc/ruby.rb
+++ b/lib/docs/scrapers/rdoc/ruby.rb
@@ -63,12 +63,20 @@ module Docs
/\AXMP/]
options[:attribution] = <<-HTML
- Ruby Core © 1993–2020 Yukihiro Matsumoto
+ Ruby Core © 1993–2022 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.
HTML
+ version '3.2' do
+ self.release = '3.2.0'
+ end
+
+ version '3.1' do
+ self.release = '3.1.3'
+ end
+
version '3' do
self.release = '3.0.0'
end
diff --git a/lib/docs/scrapers/react.rb b/lib/docs/scrapers/react.rb
index eeba46aa..eeececf6 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 = '17.0.2'
+ self.release = '18.2.0'
self.base_url = 'https://reactjs.org/docs/'
self.root_path = 'hello-world.html'
self.links = {
diff --git a/lib/docs/scrapers/react_native.rb b/lib/docs/scrapers/react_native.rb
index 39249b4e..651e0b1d 100644
--- a/lib/docs/scrapers/react_native.rb
+++ b/lib/docs/scrapers/react_native.rb
@@ -3,7 +3,7 @@ module Docs
self.name = 'React Native'
self.slug = 'react_native'
self.type = 'react_native'
- self.release = '0.66'
+ self.release = '0.69'
self.base_url = 'https://reactnative.dev/docs/'
self.root_path = 'getting-started.html'
self.links = {
diff --git a/lib/docs/scrapers/react_router.rb b/lib/docs/scrapers/react_router.rb
index 6cb84c41..64318f5b 100644
--- a/lib/docs/scrapers/react_router.rb
+++ b/lib/docs/scrapers/react_router.rb
@@ -3,19 +3,21 @@ module Docs
self.name = 'React Router'
self.slug = 'react_router'
self.type = 'simple'
- self.release = '6.2.1'
- self.base_url = 'https://reactrouterdotcom.fly.dev/docs/en/v6/api'
+ self.release = '6.4.1'
+ self.base_url = 'https://reactrouterdotcom.fly.dev/docs/en/v6'
self.links = {
home: 'https://reactrouterdotcom.fly.dev/',
code: 'https://github.com/remix-run/react-router'
}
- html_filters.push 'react_router/entries', 'react_router/clean_html', 'title'
+ html_filters.push 'react_router/entries', 'react_router/clean_html'
+
+ options[:skip_patterns] = [/upgrading/]
options[:attribution] = <<-HTML
© React Training 2015-2019
- © Remix Software 2020-2021
+ © Remix Software 2020-2022
Licensed under the MIT License (MIT).
HTML
diff --git a/lib/docs/scrapers/redux.rb b/lib/docs/scrapers/redux.rb
index 62482f8d..4ef1a527 100644
--- a/lib/docs/scrapers/redux.rb
+++ b/lib/docs/scrapers/redux.rb
@@ -14,12 +14,12 @@ module Docs
options[:container] = '.markdown'
options[:attribution] = <<-HTML
- © 2015–2021 Dan Abramov
+ © 2015–2022 Dan Abramov
Licensed under the MIT License.
HTML
version do
- self.release = '4.1.2'
+ self.release = '4.2.0'
end
version '3' do
diff --git a/lib/docs/scrapers/requests.rb b/lib/docs/scrapers/requests.rb
new file mode 100755
index 00000000..d031e375
--- /dev/null
+++ b/lib/docs/scrapers/requests.rb
@@ -0,0 +1,25 @@
+module Docs
+ class Requests < UrlScraper
+ self.type = 'sphinx'
+ self.root_path = 'index.html'
+ self.links = {
+ home: 'https://requests.readthedocs.io/',
+ code: 'https://github.com/psf/requests'
+ }
+ self.release = '2.28.1'
+ self.base_url = "https://requests.readthedocs.io/en/latest/api/"
+
+ html_filters.push 'requests/entries', 'sphinx/clean_html'
+
+ options[:container] = '.body > section'
+
+ options[:attribution] = <<-HTML
+ © 2011-2022 Kenneth Reitz and other contributors
+ Licensed under the Apache license.
+ HTML
+
+ def get_latest_version(opts)
+ get_latest_github_release('psf', 'requests', opts)
+ end
+ end
+end
diff --git a/lib/docs/scrapers/rust.rb b/lib/docs/scrapers/rust.rb
index 8b5e8fe6..8aa58a8c 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.57.0'
+ self.release = '1.65.0'
self.base_url = 'https://doc.rust-lang.org/'
self.root_path = 'book/index.html'
self.initial_paths = %w(
diff --git a/lib/docs/scrapers/rxjs.rb b/lib/docs/scrapers/rxjs.rb
index d6cac2e0..69d2fffc 100644
--- a/lib/docs/scrapers/rxjs.rb
+++ b/lib/docs/scrapers/rxjs.rb
@@ -4,7 +4,7 @@ module Docs
class Rxjs < UrlScraper
self.name = 'RxJS'
self.type = 'rxjs'
- self.release = '7.1.0'
+ self.release = '7.5.5'
self.base_url = 'https://rxjs.dev/'
self.root_path = 'guide/overview'
self.links = {
@@ -27,7 +27,7 @@ module Docs
options[:max_image_size] = 256_000
options[:attribution] = <<-HTML
- © 2015–2021 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors.
+ © 2015–2022 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors.
Code licensed under an Apache-2.0 License. Documentation licensed under CC BY 4.0.
HTML
diff --git a/lib/docs/scrapers/sanctuary.rb b/lib/docs/scrapers/sanctuary.rb
new file mode 100644
index 00000000..70ac4c92
--- /dev/null
+++ b/lib/docs/scrapers/sanctuary.rb
@@ -0,0 +1,37 @@
+module Docs
+
+ class Sanctuary < UrlScraper
+ self.name = "Sanctuary"
+ self.slug = "sanctuary"
+ self.type = "sanctuary"
+ self.release = "3.1.0"
+ self.base_url = "https://sanctuary.js.org/"
+ self.links = {
+ home: "https://sanctuary.js.org/",
+ code: "https://github.com/sanctuary-js/sanctuary",
+ }
+
+ html_filters.push "sanctuary/entries", "sanctuary/clean_html"
+
+ options[:container] = '#css-main'
+ options[:title] = "Sanctuary"
+ options[:attribution] = <<-HTML
+ © 2020 Sanctuary
+ © 2016 Plaid Technologies, Inc.
+ Licensed under the MIT License.
+ HTML
+
+ def get_latest_version(opts)
+ get_npm_version("sanctuary", opts)
+ end
+
+ private
+
+ def parse(response) # Hook here because Nokogori removes whitespace from textareas
+ response.body.gsub! %r{
]*>([\W\w]+?)
}, '
\1
'
+ super
+ end
+
+ end
+
+end
diff --git a/lib/docs/scrapers/sass.rb b/lib/docs/scrapers/sass.rb
index 84b3c47e..90be9e05 100644
--- a/lib/docs/scrapers/sass.rb
+++ b/lib/docs/scrapers/sass.rb
@@ -1,7 +1,7 @@
module Docs
class Sass < UrlScraper
self.type = 'yard'
- self.release = '3.6.4'
+ self.release = '1.56.1'
self.base_url = 'https://sass-lang.com/documentation'
self.root_path = 'index.html'
self.links = {
@@ -9,22 +9,21 @@ module Docs
code: 'https://github.com/sass/sass'
}
- html_filters.push 'sass/clean_html', 'sass/entries', 'title'
+ html_filters.push 'sass/entries', 'sass/clean_html'
options[:root_title] = false
- options[:title] = 'Sass Functions'
options[:skip_patterns] = [/breaking-changes/]
# options[:container] = '#main-content'
options[:attribution] = <<-HTML
- © 2006–2020 Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein
+ © 2006–2022 the Sass team, and numerous contributors
Licensed under the MIT License.
HTML
def get_latest_version(opts)
- get_latest_github_release('sass', 'libsass', opts)
+ get_npm_version('sass', opts)
end
end
diff --git a/lib/docs/scrapers/scala.rb b/lib/docs/scrapers/scala.rb
index dc268960..ca4ff651 100644
--- a/lib/docs/scrapers/scala.rb
+++ b/lib/docs/scrapers/scala.rb
@@ -3,24 +3,66 @@ module Docs
self.name = 'Scala'
self.type = 'scala'
self.links = {
- home: 'http://www.scala-lang.org/',
+ home: 'https://www.scala-lang.org/',
code: 'https://github.com/scala/scala'
}
- options[:container] = '#content-container'
options[:attribution] = <<-HTML
- © 2002-2019 EPFL, with contributions from Lightbend.
+ © 2002-2022 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
HTML
+ # For Scala 3, there is no official download link for the documentation
+ # (see https://contributors.scala-lang.org/t/5537).
+ #
+ # We currently need to build the docs ourselves. To do so:
+ # 1. Make sure that Scala 3 and sbt are installed
+ # (https://www.scala-lang.org/download/scala3.html)
+ # 2. Clone the Scala 3 (Dotty) repository (https://github.com/lampepfl/dotty)
+ # 3. From the Dotty folder, run this command in the terminal:
+ # $ sbt scaladoc/generateScalaDocumentation
+ # 4. Extract scaladoc/output/scala3/api/ into docs/scala~3.1
+ version '3.2' do
+ self.release = '3.2.0'
+ self.base_url = 'https://scala-lang.org/api/3.2.0/'
+ self.root_path = 'index.html'
+
+ options[:skip_patterns] = [
+ # Ignore class names with include “#”, which cause issues with the scraper
+ /%23/,
+
+ # Ignore local links to the Java documentation created by a Scaladoc bug
+ /java\/lang/,
+ ]
+
+ html_filters.push 'scala/entries_v3', 'scala/clean_html_v3'
+ end
+
+ version '3.1' do
+ self.release = '3.1.1'
+ self.base_url = 'https://scala-lang.org/api/3.1.1/'
+ self.root_path = 'index.html'
+
+ options[:skip_patterns] = [
+ # Ignore class names with include “#”, which cause issues with the scraper
+ /%23/,
+
+ # Ignore local links to the Java documentation created by a Scaladoc bug
+ /java\/lang/,
+ ]
+
+ html_filters.push 'scala/entries_v3', 'scala/clean_html_v3'
+ end
+
# https://downloads.lightbend.com/scala/2.13.0/scala-docs-2.13.0.zip
# Extract api/scala-library into docs/scala~2.13_library
version '2.13 Library' do
self.release = '2.13.0'
self.base_url = 'https://www.scala-lang.org/api/2.13.0/'
self.root_path = 'index.html'
+ options[:container] = '#content-container'
- html_filters.push 'scala/entries', 'scala/clean_html'
+ html_filters.push 'scala/entries_v2', 'scala/clean_html_v2'
end
# https://downloads.lightbend.com/scala/2.13.0/scala-docs-2.13.0.zip
@@ -29,8 +71,9 @@ module Docs
self.release = '2.13.0'
self.base_url = 'https://www.scala-lang.org/api/2.13.0/scala-reflect/'
self.root_path = 'index.html'
+ options[:container] = '#content-container'
- html_filters.push 'scala/entries', 'scala/clean_html'
+ html_filters.push 'scala/entries_v2', 'scala/clean_html_v2'
end
# https://downloads.lightbend.com/scala/2.12.9/scala-docs-2.12.9.zip
@@ -39,8 +82,9 @@ module Docs
self.release = '2.12.9'
self.base_url = 'https://www.scala-lang.org/api/2.12.9/'
self.root_path = 'index.html'
+ options[:container] = '#content-container'
- html_filters.push 'scala/entries', 'scala/clean_html'
+ html_filters.push 'scala/entries_v2', 'scala/clean_html_v2'
end
# https://downloads.lightbend.com/scala/2.12.9/scala-docs-2.12.9.zip
@@ -49,13 +93,14 @@ module Docs
self.release = '2.12.9'
self.base_url = 'https://www.scala-lang.org/api/2.12.9/scala-reflect/'
self.root_path = 'index.html'
+ options[:container] = '#content-container'
- html_filters.push 'scala/entries', 'scala/clean_html'
+ html_filters.push 'scala/entries_v2', 'scala/clean_html_v2'
end
def get_latest_version(opts)
- doc = fetch_doc('https://www.scala-lang.org/api/current/', opts)
- doc.at_css('#doc-version').content
+ doc = fetch_doc('https://www.scala-lang.org/api/3.x/', opts)
+ doc.at_css('.projectVersion').content
end
end
end
diff --git a/lib/docs/scrapers/scikit_learn.rb b/lib/docs/scrapers/scikit_learn.rb
index 9511e4ba..45268c4b 100644
--- a/lib/docs/scrapers/scikit_learn.rb
+++ b/lib/docs/scrapers/scikit_learn.rb
@@ -3,8 +3,8 @@ module Docs
self.name = 'scikit-learn'
self.slug = 'scikit_learn'
self.type = 'sphinx'
- self.release = '0.24.1'
- self.base_url = 'https://scikit-learn.org/0.24/'
+ self.release = '1.1.3'
+ self.base_url = "https://scikit-learn.org/1.1/"
self.root_path = 'index.html'
self.force_gzip = true
self.links = {
@@ -14,7 +14,7 @@ module Docs
html_filters.push 'scikit_learn/entries', 'scikit_learn/clean_html', 'sphinx/clean_html', 'title'
- options[:container] = ->(filter) { filter.root_page? ? 'body > .container' : '.section' }
+ options[:container] = ->(filter) { filter.root_page? ? 'body > .container' : '#sk-page-content-wrapper > .body' }
options[:skip] = %w(modules/generated/sklearn.experimental.enable_iterative_imputer.html
modules/generated/sklearn.experimental.enable_hist_gradient_boosting.html)
options[:only_patterns] = [/\Amodules/, /\Adatasets/, /\Atutorial/, /\Aauto_examples/]
@@ -24,7 +24,7 @@ module Docs
options[:max_image_size] = 256_000
options[:attribution] = <<-HTML
- © 2007–2020 The scikit-learn developers
+ © 2007–2022 The scikit-learn developers
Licensed under the 3-clause BSD License.
HTML
diff --git a/lib/docs/scrapers/sequelize.rb b/lib/docs/scrapers/sequelize.rb
index aecf54bf..f170abfe 100644
--- a/lib/docs/scrapers/sequelize.rb
+++ b/lib/docs/scrapers/sequelize.rb
@@ -1,5 +1,7 @@
module Docs
class Sequelize < UrlScraper
+ include MultipleBaseUrls
+
self.name = 'Sequelize'
self.slug = 'sequelize'
self.type = 'simple'
@@ -20,9 +22,20 @@ module Docs
Licensed under the MIT License.
HTML
+ def initial_urls
+ [
+ "https://sequelize.org/docs/v6/",
+ "https://sequelize.org/api/v6/identifiers.html",
+ ]
+ end
+
version '6' do
- self.release = '6.5.0'
- self.base_url = "https://sequelize.org/master/"
+ self.release = '6.23.2'
+ self.base_url = "https://sequelize.org/docs/v6/"
+ self.base_urls = [
+ "https://sequelize.org/docs/v6/",
+ "https://sequelize.org/api/v6/",
+ ]
end
version '5' do
diff --git a/lib/docs/scrapers/sinon.rb b/lib/docs/scrapers/sinon.rb
index a8a75f2d..2945b6fe 100644
--- a/lib/docs/scrapers/sinon.rb
+++ b/lib/docs/scrapers/sinon.rb
@@ -14,7 +14,7 @@ module Docs
options[:container] = '.content .container'
options[:attribution] = <<-HTML
- © 2010–2021 Christian Johansen
+ © 2010–2022 Christian Johansen
Licensed under the BSD License.
HTML
@@ -27,59 +27,29 @@ module Docs
url
end
- version '11' do
- self.release = '11.1.2'
- self.base_url = "https://sinonjs.org/releases/v#{release}/"
- end
-
- version '10' do
- self.release = '10.0.1'
- self.base_url = "https://sinonjs.org/releases/v#{release}/"
- end
-
- version '9' do
- self.release = '9.2.2'
- self.base_url = "https://sinonjs.org/releases/v#{release}/"
- end
-
- version '8' do
- self.release = '8.1.1'
- self.base_url = "https://sinonjs.org/releases/v#{release}/"
- end
-
- version '7' do
- self.release = '7.5.0'
- self.base_url = "https://sinonjs.org/releases/v#{release}/"
- end
-
- version '6' do
- self.release = '6.3.5'
- self.base_url = "https://sinonjs.org/releases/v#{release}/"
- end
-
- version '5' do
- self.release = '5.1.0'
- self.base_url = "https://sinonjs.org/releases/v#{release}/"
- end
-
- version '4' do
- self.release = '4.5.0'
- self.base_url = "https://sinonjs.org/releases/v#{release}/"
- end
-
- version '3' do
- self.release = '3.3.0'
- self.base_url = "https://sinonjs.org/releases/v#{release}/"
- end
-
- version '2' do
- self.release = '2.4.1'
- self.base_url = "https://sinonjs.org/releases/v#{release}/"
- end
+ RELEASE_MAPPINGS = {
+ '15' => '15.0.1',
+ '14' => '14.0.2',
+ '13' => '13.0.1',
+ '12' => '12.0.1',
+ '11' => '11.1.2',
+ '10' => '10.0.1',
+ '9' => '9.2.2.',
+ '8' => '8.1.1',
+ '7' => '7.5.0',
+ '6' => '6.3.5',
+ '5' => '5.1.0',
+ '4' => '4.5.0',
+ '3' => '3.3.0',
+ '2' => '2.4.1',
+ '1' => '1.17.7'
+ }
- version '1' do
- self.release = '1.17.7'
- self.base_url = "https://sinonjs.org/releases/v#{release}/"
+ RELEASE_MAPPINGS.each do |ver, release|
+ version ver do
+ self.release = release
+ self.base_url = "https://sinonjs.org/releases/v#{ver}/"
+ end
end
def get_latest_version(opts)
diff --git a/lib/docs/scrapers/socketio.rb b/lib/docs/scrapers/socketio.rb
index ec1f0f71..a9c91583 100644
--- a/lib/docs/scrapers/socketio.rb
+++ b/lib/docs/scrapers/socketio.rb
@@ -2,13 +2,13 @@ module Docs
class Socketio < UrlScraper
self.name = 'Socket.IO'
self.slug = 'socketio'
- self.type = 'socketio'
+ self.type = 'sphinx'
self.links = {
- home: 'http://socket.io/',
+ home: 'https://socket.io/',
code: 'https://github.com/socketio/socket.io'
}
- html_filters.push 'socketio/clean_html', 'socketio/entries'
+ html_filters.push 'socketio/clean_html', 'socketio/entries', 'sphinx/clean_html'
options[:trailing_slash] = false
options[:skip] = %w(/faq /glossary)
@@ -19,7 +19,7 @@ module Docs
HTML
version '4' do
- self.release = '4.1.2'
+ self.release = '4.5.2'
self.base_url = "https://socket.io/docs/v#{version}"
end
diff --git a/lib/docs/scrapers/spring_boot.rb b/lib/docs/scrapers/spring_boot.rb
index 224c48be..6cec5faf 100644
--- a/lib/docs/scrapers/spring_boot.rb
+++ b/lib/docs/scrapers/spring_boot.rb
@@ -13,11 +13,12 @@ module Docs
options[:skip_patterns] = [/legal/]
+ # https://github.com/spring-projects/spring-boot/blob/main/buildSrc/src/main/resources/NOTICE.txt
options[:attribution] = <<-HTML
- Copyright © 2002–2021 Pivotal, Inc. All Rights Reserved.
+ Copyright © 2002–2022 Pivotal, Inc. All Rights Reserved.
HTML
- self.release = '2.6.1'
+ self.release = '2.7.0'
self.base_url = "https://docs.spring.io/spring-boot/docs/#{release}/reference/html/"
def get_latest_version(opts)
diff --git a/lib/docs/scrapers/sqlite.rb b/lib/docs/scrapers/sqlite.rb
index d2111dcb..6b08d316 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.37.0'
+ self.release = '3.40.0'
self.base_url = 'https://sqlite.org/'
self.root_path = 'docs.html'
self.initial_paths = %w(keyword_index.html)
diff --git a/lib/docs/scrapers/support_tables.rb b/lib/docs/scrapers/support_tables.rb
index ac205264..2c86774c 100644
--- a/lib/docs/scrapers/support_tables.rb
+++ b/lib/docs/scrapers/support_tables.rb
@@ -1,13 +1,20 @@
require 'yajl/json_gem'
module Docs
- class SupportTables < Doc
+ class SupportTables < Scraper
include Instrumentable
self.name = 'Support Tables'
self.slug = 'browser_support_tables'
self.type = 'support_tables'
- self.release = '1.0.30001298'
+ self.release = '1.0.30001442'
+ self.base_url = 'https://github.com/Fyrd/caniuse/raw/main/'
+
+ # https://github.com/Fyrd/caniuse/blob/main/LICENSE
+ options[:attribution] = <<-HTML
+ © 2020 Alexis Deveria
+ Licensed under the Creative Commons Attribution 4.0 International License.
+ HTML
def build_pages
url = 'https://github.com/Fyrd/caniuse/raw/main/data.json'
@@ -29,7 +36,7 @@ module Docs
index_page = {
path: 'index',
store_path: 'index.html',
- output: ERB.new(INDEX_PAGE_ERB).result(binding),
+ output: ERB.new(INDEX_PAGE_ERB, trim_mode:">").result(binding),
entries: [Entry.new(nil, 'index', nil)]
}
@@ -49,7 +56,7 @@ module Docs
page = {
path: feature_id,
store_path: "#{feature_id}.html",
- output: ERB.new(PAGE_ERB).result(binding),
+ output: ERB.new(PAGE_ERB, trim_mode:">").result(binding).split("\n").map(&:strip).join("\n"),
entries: [Entry.new(name, feature_id, type)]
}
diff --git a/lib/docs/scrapers/svelte.rb b/lib/docs/scrapers/svelte.rb
new file mode 100644
index 00000000..2dc90ac0
--- /dev/null
+++ b/lib/docs/scrapers/svelte.rb
@@ -0,0 +1,28 @@
+module Docs
+ class Svelte < UrlScraper
+ self.name = 'Svelte'
+ self.slug = 'svelte'
+ self.type = 'simple'
+ self.links = {
+ home: 'https://svelte.dev/',
+ code: 'https://github.com/sveltejs/svelte'
+ }
+
+ options[:root_title] = 'Svelte'
+
+ options[:attribution] = <<-HTML
+ © 2016–2022 Rich Harris and contributors
+ Licensed under the MIT License.
+ HTML
+
+ options[:skip] = %w(team.html plugins/)
+
+ self.release = '3.55.0'
+ self.base_url = 'https://svelte.dev/docs'
+ html_filters.push 'svelte/entries', 'svelte/clean_html'
+
+ def get_latest_version(opts)
+ get_npm_version('svelte', opts)
+ end
+ end
+end
diff --git a/lib/docs/scrapers/tailwindcss.rb b/lib/docs/scrapers/tailwindcss.rb
new file mode 100644
index 00000000..e21fc13d
--- /dev/null
+++ b/lib/docs/scrapers/tailwindcss.rb
@@ -0,0 +1,59 @@
+module Docs
+ class Tailwindcss < UrlScraper
+ self.name = 'Tailwind CSS'
+ self.type = 'tailwindcss'
+ self.slug = 'tailwindcss'
+ self.base_url = 'https://tailwindcss.com/docs'
+ self.root_path = '/'
+ self.release = '3.1.8'
+ self.links = {
+ home: 'tps://tailwindcss.com/',
+ code: 'https://github.com/tailwindlabs/tailwindcss'
+ }
+
+ html_filters.push 'tailwindcss/entries', 'tailwindcss/clean_html'
+
+ # Disable the clean text filter which removes empty nodes - we'll do it ourselves more selectively
+ text_filters.replace("clean_text", "tailwindcss/noop")
+
+ # Fix redirects from older tailwind 2 docs
+ options[:fix_urls] = lambda do |url|
+ if url.include? "installation/"
+ break "/docs/installation"
+ end
+
+ if url.end_with? "/breakpoints"
+ break "/docs/screens#{/#.*$/.match(url)}"
+ end
+ if url.end_with? "/adding-base-styles"
+ break "/docs/adding-custom-styles#adding-base-styles"
+ end
+ if url.end_with? "/ring-opacity"
+ break "/docs/ring-color#changing-the-opacity"
+ end
+
+ if url.match(/\/colors#?/)
+ break "/docs/customizing-colors#{/#.*$/.match(url)}"
+ end
+ end
+
+ options[:skip_patterns] = [
+ # Skip setup instructions
+ /\/browser-support$/,
+ /\/editor-setup$/,
+ /\/installation$/,
+ /\/optimizing-for-production$/,
+ /\/upgrade-guide/,
+ /\/using-with-preprocessors/
+ ]
+
+ #Obtainable from https://github.com/tailwindlabs/tailwindcss/blob/master/LICENSE
+ options[:attribution] = <<-HTML
+ © 2022 Tailwind Labs Inc.
+ HTML
+
+ def get_latest_version(opts)
+ get_latest_github_release('tailwindlabs', 'tailwindcss', opts)
+ end
+ end
+end
diff --git a/lib/docs/scrapers/tensorflow/tensorflow.rb b/lib/docs/scrapers/tensorflow/tensorflow.rb
index 4e1c4777..fbd68abc 100644
--- a/lib/docs/scrapers/tensorflow/tensorflow.rb
+++ b/lib/docs/scrapers/tensorflow/tensorflow.rb
@@ -14,11 +14,16 @@ module Docs
options[:container] = '.devsite-main-content'
options[:attribution] = <<-HTML
- © 2020 The TensorFlow Authors. All rights reserved.
+ © 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
HTML
+ version '2.9' do
+ self.release = "2.9.1"
+ self.base_url = "https://www.tensorflow.org/versions/r#{version}/api_docs/python/tf"
+ end
+
version '2.4' do
self.release = "#{version}.0"
self.base_url = "https://www.tensorflow.org/versions/r#{version}/api_docs/python/tf"
diff --git a/lib/docs/scrapers/tensorflow/tensorflow_cpp.rb b/lib/docs/scrapers/tensorflow/tensorflow_cpp.rb
index feda35fd..e7dfbe9e 100644
--- a/lib/docs/scrapers/tensorflow/tensorflow_cpp.rb
+++ b/lib/docs/scrapers/tensorflow/tensorflow_cpp.rb
@@ -3,6 +3,11 @@ module Docs
self.name = 'TensorFlow C++'
self.slug = 'tensorflow_cpp'
+ version '2.9' do
+ self.release = "2.9.1"
+ self.base_url = "https://www.tensorflow.org/versions/r#{version}/api_docs/cc"
+ end
+
version '2.4' do
self.release = "#{version}.0"
self.base_url = "https://www.tensorflow.org/versions/r#{version}/api_docs/cc"
diff --git a/lib/docs/scrapers/typescript.rb b/lib/docs/scrapers/typescript.rb
index 7a1db58d..81fa5a70 100644
--- a/lib/docs/scrapers/typescript.rb
+++ b/lib/docs/scrapers/typescript.rb
@@ -4,7 +4,7 @@ module Docs
self.name = 'TypeScript'
self.type = 'typescript'
- self.release = '4.5.2'
+ self.release = '4.9.3'
self.base_urls = [
'https://www.typescriptlang.org/docs/handbook/',
'https://www.typescriptlang.org/'
@@ -35,7 +35,7 @@ module Docs
]
options[:attribution] = <<-HTML
- © 2012-2021 Microsoft
+ © 2012-2022 Microsoft
Licensed under the Apache License, Version 2.0.
HTML
diff --git a/lib/docs/scrapers/vite.rb b/lib/docs/scrapers/vite.rb
index c03e268c..eec42453 100644
--- a/lib/docs/scrapers/vite.rb
+++ b/lib/docs/scrapers/vite.rb
@@ -8,7 +8,6 @@ module Docs
code: 'https://github.com/vitejs/vite'
}
- options[:container] = 'main'
options[:root_title] = 'Vite'
options[:attribution] = <<-HTML
@@ -16,10 +15,20 @@ module Docs
Licensed under the MIT License.
HTML
- self.release = '2.7.5'
- self.base_url = 'https://vitejs.dev/'
+ options[:skip] = %w(team.html plugins/)
+
self.initial_paths = %w(guide/)
- html_filters.push 'vue/entries_v3', 'vue/clean_html'
+ html_filters.push 'vite/entries', 'vite/clean_html'
+
+ version do
+ self.release = '4.0.2'
+ self.base_url = 'https://vitejs.dev/'
+ end
+
+ version '3' do
+ self.release = '3.2.5'
+ self.base_url = 'https://v3.vitejs.dev/'
+ end
def get_latest_version(opts)
get_npm_version('vite', opts)
diff --git a/lib/docs/scrapers/vitest.rb b/lib/docs/scrapers/vitest.rb
new file mode 100644
index 00000000..c85798ef
--- /dev/null
+++ b/lib/docs/scrapers/vitest.rb
@@ -0,0 +1,28 @@
+module Docs
+ class Vitest < UrlScraper
+ self.name = 'Vitest'
+ self.slug = 'vitest'
+ self.type = 'simple'
+ self.links = {
+ home: 'https://vitest.dev/',
+ code: 'https://github.com/vitest-dev/vitest'
+ }
+
+ options[:root_title] = 'Vitest'
+
+ options[:attribution] = <<-HTML
+ © 2021-Present Anthony Fu
+ © 2021-Present Matias Capeletto
+ Licensed under the MIT License.
+ HTML
+
+ self.release = '0.26.1'
+ self.base_url = 'https://vitest.dev/'
+ self.initial_paths = %w(guide/)
+ html_filters.push 'vitest/entries', 'vite/clean_html'
+
+ def get_latest_version(opts)
+ get_npm_version('vitest', opts)
+ end
+ end
+end
diff --git a/lib/docs/scrapers/vue.rb b/lib/docs/scrapers/vue.rb
index b42a4b60..c68e049d 100644
--- a/lib/docs/scrapers/vue.rb
+++ b/lib/docs/scrapers/vue.rb
@@ -1,14 +1,14 @@
module Docs
class Vue < UrlScraper
- self.name = 'Vue.js'
+ self.name = 'Vue'
self.slug = 'vue'
self.type = 'vue'
self.links = {
home: 'https://vuejs.org/',
- code: 'https://github.com/vuejs/vue'
+ code: 'https://github.com/vuejs/core'
}
- options[:only_patterns] = [/guide\//, /api\//]
+ options[:only_patterns] = [/^$/ ,/guide\//, /api\//]
options[:skip] = %w(guide/team.html)
options[:skip_patterns] = [/guide\/contributing/]
options[:replace_paths] = { 'guide/' => 'guide/index.html' }
@@ -19,17 +19,15 @@ module Docs
HTML
version '3' do
- self.release = '3.2.26'
- self.base_url = 'https://v3.vuejs.org/'
- self.root_path = 'guide/introduction.html'
- self.initial_paths = %w(api/)
+ self.release = '3.2.45'
+ self.base_url = 'https://vuejs.org/'
+ self.initial_paths = %w(guide/introduction.html)
html_filters.push 'vue/entries_v3', 'vue/clean_html'
end
version '2' do
- self.release = '2.6.12'
- self.base_url = 'https://vuejs.org/v2/'
- self.root_path = 'guide/index.html'
+ self.release = '2.7.14'
+ self.base_url = 'https://v2.vuejs.org/v2/'
self.initial_paths = %w(api/)
html_filters.push 'vue/entries', 'vue/clean_html'
end
@@ -37,13 +35,12 @@ module Docs
version '1' do
self.release = '1.0.28'
self.base_url = 'https://v1.vuejs.org'
- self.root_path = '/guide/index.html'
self.initial_paths = %w(/api/index.html)
html_filters.push 'vue/entries', 'vue/clean_html'
end
def get_latest_version(opts)
- get_npm_version('vue', opts, 'next')
+ get_npm_version('vue', opts)
end
end
end
diff --git a/lib/docs/scrapers/vueuse.rb b/lib/docs/scrapers/vueuse.rb
new file mode 100644
index 00000000..87c7d574
--- /dev/null
+++ b/lib/docs/scrapers/vueuse.rb
@@ -0,0 +1,34 @@
+module Docs
+ class Vueuse < UrlScraper
+ self.name = 'VueUse'
+ self.slug = 'vueuse'
+ self.type = 'vueuse'
+ self.links = {
+ home: 'https://vueuse.org/',
+ code: 'https://github.com/vueuse/vueuse'
+ }
+
+ options[:skip] = %w(add-ons contributing ecosystem)
+ options[:skip_patterns] = [/index$/]
+ options[:fix_urls] = ->(url) do
+ url.sub! %r{/index$}, ''
+ url.sub! 'vueuse.org/on', 'vueuse.org/core/on'
+ url.sub! 'vueuse.org/use', 'vueuse.org/core/use'
+ url
+ end
+
+ options[:attribution] = <<-HTML
+ © 2019-present Anthony Fu
+ Licensed under the MIT License.
+ HTML
+
+ self.release = '9.10.0'
+ self.base_url = 'https://vueuse.org/'
+ self.initial_paths = %w(functions.html)
+ html_filters.push 'vueuse/entries', 'vite/clean_html', 'vueuse/clean_html'
+
+ def get_latest_version(opts)
+ get_npm_version('@vueuse/core', opts)
+ end
+ end
+end
diff --git a/lib/docs/scrapers/wagtail.rb b/lib/docs/scrapers/wagtail.rb
new file mode 100644
index 00000000..bc9d626d
--- /dev/null
+++ b/lib/docs/scrapers/wagtail.rb
@@ -0,0 +1,48 @@
+module Docs
+ class Wagtail < UrlScraper
+ self.name = 'Wagtail'
+ self.type = 'sphinx'
+ self.root_path = 'index.html'
+ self.links = {
+ home: 'https://wagtail.org/',
+ code: 'https://github.com/wagtail/wagtail'
+ }
+
+ # adding filters from lib/docs/filters/wagtail
+ html_filters.push 'wagtail/entries', 'sphinx/clean_html', 'wagtail/clean_html'
+
+ # attributions are seen at the bottom of every page(copyright and license etc. details)
+ options[:attribution] = <<-HTML
+ © 2014-present Torchbox Ltd and individual contributors.
+ All rights are reserved.
+ Licensed under the BSD License.
+ HTML
+
+ # no one wants to see docs about search or release notes
+ options[:skip] = %w[search.html]
+ options[:skip_patterns] = [
+ %r{\Areleases/}
+ ]
+
+ # updating release and base_url for different versions
+ version do
+ self.release = '4.1.1'
+ self.base_url = 'https://docs.wagtail.org/en/stable/'
+ end
+
+ version '3' do
+ self.release = '3.0.3'
+ self.base_url = "https://docs.wagtail.org/en/v#{release}/"
+ end
+
+ version '2' do
+ self.release = '2.16.3'
+ self.base_url = "https://docs.wagtail.org/en/v#{release}/"
+ end
+
+ # this method will fetch the latest version of wagtail
+ def get_latest_version(opts)
+ get_latest_github_release('wagtail', 'wagtail', opts)
+ end
+ end
+end
diff --git a/lib/docs/scrapers/webpack.rb b/lib/docs/scrapers/webpack.rb
index d0bbd63b..49eb2110 100644
--- a/lib/docs/scrapers/webpack.rb
+++ b/lib/docs/scrapers/webpack.rb
@@ -36,7 +36,7 @@ module Docs
HTML
version '5' do
- self.release = '5.65.0'
+ self.release = '5.75.0'
self.base_url = 'https://webpack.js.org/'
end
diff --git a/lib/docs/scrapers/werkzeug.rb b/lib/docs/scrapers/werkzeug.rb
index 905ee8a9..36642dc1 100755
--- a/lib/docs/scrapers/werkzeug.rb
+++ b/lib/docs/scrapers/werkzeug.rb
@@ -13,10 +13,20 @@ module Docs
options[:skip] = %w(changes/)
options[:attribution] = <<-HTML
- © 2007–2021 Pallets
+ © 2007–2022 Pallets
Licensed under the BSD 3-clause License.
HTML
+ version '2.2' do
+ self.release = '2.2.x'
+ self.base_url = "https://werkzeug.palletsprojects.com/en/#{self.release}/"
+ end
+
+ version '2.1' do
+ self.release = '2.1.x'
+ self.base_url = "https://werkzeug.palletsprojects.com/en/#{self.release}/"
+ end
+
version '2.0' do
self.release = '2.0.x'
self.base_url = "https://werkzeug.palletsprojects.com/en/#{self.release}/"
diff --git a/lib/docs/scrapers/wordpress.rb b/lib/docs/scrapers/wordpress.rb
index 029c05ae..b15a4fd0 100644
--- a/lib/docs/scrapers/wordpress.rb
+++ b/lib/docs/scrapers/wordpress.rb
@@ -2,7 +2,7 @@ module Docs
class Wordpress < UrlScraper
self.name = 'WordPress'
self.type = 'wordpress'
- self.release = '5.8'
+ self.release = '6.1'
self.base_url = 'https://developer.wordpress.org/reference/'
self.initial_paths = %w(
functions/
@@ -32,13 +32,13 @@ module Docs
]
options[:attribution] = <<-HTML
- © 2003–2021 WordPress Foundation
+ © 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
HTML
def get_latest_version(opts)
- doc = fetch_doc('https://wordpress.org/download/releases/', opts)
- doc.at_css('.releases.latest td').content
+ tags = get_github_tags('WordPress', 'wordpress-develop', opts)
+ tags[0]['name']
end
end
end
diff --git a/lib/docs/scrapers/zig.rb b/lib/docs/scrapers/zig.rb
index 004b8757..bcd3d0a9 100644
--- a/lib/docs/scrapers/zig.rb
+++ b/lib/docs/scrapers/zig.rb
@@ -2,8 +2,8 @@ module Docs
class Zig < UrlScraper
self.name = 'Zig'
self.type = 'simple'
- self.release = '0.9.0'
- self.base_url = 'https://ziglang.org/documentation/0.9.0/'
+ self.release = '0.10.0'
+ self.base_url = "https://ziglang.org/documentation/#{self.release}/"
self.links = {
home: 'https://ziglang.org/',
code: 'https://github.com/ziglang/zig'
@@ -13,7 +13,7 @@ module Docs
options[:follow_links] = false
options[:attribution] = <<-HTML
- © 2015–2021, Zig contributors
+ © 2015–2022, Zig contributors
HTML
def get_latest_version(opts)
diff --git a/lib/docs/storage/file_store.rb b/lib/docs/storage/file_store.rb
index 47c0e6b4..b0836b35 100644
--- a/lib/docs/storage/file_store.rb
+++ b/lib/docs/storage/file_store.rb
@@ -30,7 +30,7 @@ module Docs
end
def file_exist?(path)
- File.exists?(path)
+ File.exist?(path)
end
def file_mtime(path)
@@ -46,7 +46,7 @@ module Docs
next if file == path
Find.prune if File.basename(file)[0] == '.'
yield file
- Find.prune unless File.exists?(file)
+ Find.prune unless File.exist?(file)
end
end
end
diff --git a/lib/tasks/docs.thor b/lib/tasks/docs.thor
index 104c2da9..5670c7d9 100644
--- a/lib/tasks/docs.thor
+++ b/lib/tasks/docs.thor
@@ -175,12 +175,12 @@ class DocsCLI < Thor
# Verify files are present
docs.each do |doc|
- unless Dir.exists?(File.join(Docs.store_path, doc.path))
+ unless Dir.exist?(File.join(Docs.store_path, doc.path))
puts "ERROR: directory #{File.join(Docs.store_path, doc.path)} not found."
return
end
- unless File.exists?(File.join(Docs.store_path, "#{doc.path}.tar.gz"))
+ unless File.exist?(File.join(Docs.store_path, "#{doc.path}.tar.gz"))
puts "ERROR: package for '#{doc.slug}' documentation not found. Run 'thor docs:package #{doc.slug}' to create it."
return
end
diff --git a/public/icons/docs/astro/16.png b/public/icons/docs/astro/16.png
new file mode 100644
index 00000000..6a34a3ff
Binary files /dev/null and b/public/icons/docs/astro/16.png differ
diff --git a/public/icons/docs/astro/16@2x.png b/public/icons/docs/astro/16@2x.png
new file mode 100644
index 00000000..7e4c97e5
Binary files /dev/null and b/public/icons/docs/astro/16@2x.png differ
diff --git a/public/icons/docs/astro/SOURCE b/public/icons/docs/astro/SOURCE
new file mode 100644
index 00000000..40392a4a
--- /dev/null
+++ b/public/icons/docs/astro/SOURCE
@@ -0,0 +1,2 @@
+https://docs.astro.build/favicon.ico
+https://docs.astro.build/favicon.svg
diff --git a/public/icons/docs/axios/16.png b/public/icons/docs/axios/16.png
new file mode 100644
index 00000000..8cbd5d49
Binary files /dev/null and b/public/icons/docs/axios/16.png differ
diff --git a/public/icons/docs/axios/16@2x.png b/public/icons/docs/axios/16@2x.png
new file mode 100644
index 00000000..a80982e6
Binary files /dev/null and b/public/icons/docs/axios/16@2x.png differ
diff --git a/public/icons/docs/axios/SOURCE b/public/icons/docs/axios/SOURCE
new file mode 100644
index 00000000..fcf8b034
--- /dev/null
+++ b/public/icons/docs/axios/SOURCE
@@ -0,0 +1 @@
+https://raw.githubusercontent.com/axios/axios-docs/master/assets/favicon.png
diff --git a/public/icons/docs/backbone/SOURCE b/public/icons/docs/backbone/SOURCE
index 3225ed39..827f5551 100644
--- a/public/icons/docs/backbone/SOURCE
+++ b/public/icons/docs/backbone/SOURCE
@@ -1 +1 @@
-http://backbonejs.org/docs/images/favicon.ico
+https://github.com/jashkenas/backbone/blob/master/favicon.ico
diff --git a/public/icons/docs/cakephp/SOURCE b/public/icons/docs/cakephp/SOURCE
index e0d1c9dd..fd4749b2 100644
--- a/public/icons/docs/cakephp/SOURCE
+++ b/public/icons/docs/cakephp/SOURCE
@@ -1 +1 @@
-https://github.com/cakephp/cakephp-api-docs/blob/master/templates/cakephp/resources/favicon.png
+https://github.com/cakephp/cakephp-api-docs/tree/2.x/static/assets/resources/favicons
diff --git a/public/icons/docs/clojure/SOURCE b/public/icons/docs/clojure/SOURCE
index 2e1bba85..f3fc2c89 100644
--- a/public/icons/docs/clojure/SOURCE
+++ b/public/icons/docs/clojure/SOURCE
@@ -1 +1 @@
-http://en.wikipedia.org/wiki/File:Clojure_logo.gif
+https://en.wikipedia.org/wiki/File:Clojure_logo.svg
diff --git a/public/icons/docs/cordova/SOURCE b/public/icons/docs/cordova/SOURCE
index 1a7cbc98..fed50b12 100644
--- a/public/icons/docs/cordova/SOURCE
+++ b/public/icons/docs/cordova/SOURCE
@@ -1 +1 @@
-http://cordova.apache.org/artwork.html
+https://cordova.apache.org/artwork/
diff --git a/public/icons/docs/crystal/SOURCE b/public/icons/docs/crystal/SOURCE
index aa9d98c4..a0471d0f 100644
--- a/public/icons/docs/crystal/SOURCE
+++ b/public/icons/docs/crystal/SOURCE
@@ -1 +1 @@
-https://crystal-lang.org/images/favico.ico
+https://crystal-lang.org/media/
diff --git a/public/icons/docs/cypress/SOURCE b/public/icons/docs/cypress/SOURCE
index 3ea99830..62d5e08e 100644
--- a/public/icons/docs/cypress/SOURCE
+++ b/public/icons/docs/cypress/SOURCE
@@ -1 +1 @@
-https://github.com/cypress-io/cypress-documentation/raw/develop/themes/cypress/source/img/favicon.ico
+https://github.com/cypress-io/cypress/tree/develop/assets
diff --git a/public/icons/docs/dart/SOURCE b/public/icons/docs/dart/SOURCE
index dd21f7e7..1defd981 100644
--- a/public/icons/docs/dart/SOURCE
+++ b/public/icons/docs/dart/SOURCE
@@ -1 +1 @@
-https://github.com/dart-lang/logos
+https://dart.dev/brand
diff --git a/public/icons/docs/date_fns/16.png b/public/icons/docs/date_fns/16.png
new file mode 100644
index 00000000..f102d2e4
Binary files /dev/null and b/public/icons/docs/date_fns/16.png differ
diff --git a/public/icons/docs/date_fns/16@2x.png b/public/icons/docs/date_fns/16@2x.png
new file mode 100644
index 00000000..c918b60d
Binary files /dev/null and b/public/icons/docs/date_fns/16@2x.png differ
diff --git a/public/icons/docs/date_fns/SOURCE b/public/icons/docs/date_fns/SOURCE
new file mode 100644
index 00000000..568f4706
--- /dev/null
+++ b/public/icons/docs/date_fns/SOURCE
@@ -0,0 +1,2 @@
+https://date-fns.org/static/favicon-16x16.png
+https://date-fns.org/static/favicon-32x32.png
diff --git a/public/icons/docs/django/SOURCE b/public/icons/docs/django/SOURCE
index 2eaa39c2..87e06af3 100644
--- a/public/icons/docs/django/SOURCE
+++ b/public/icons/docs/django/SOURCE
@@ -1 +1 @@
-https://github.com/django/djangoproject.com/raw/master/static/favicon.ico
+https://github.com/django/djangoproject.com/blob/main/djangoproject/static/img/favicon.ico
diff --git a/public/icons/docs/docker/SOURCE b/public/icons/docs/docker/SOURCE
index 98fb4944..424bf8ed 100644
--- a/public/icons/docs/docker/SOURCE
+++ b/public/icons/docs/docker/SOURCE
@@ -1 +1,2 @@
-https://www.docker.com/brand-guidelines
+https://www.docker.com/company/newsroom/media-resources/
+https://www.docker.com/legal/trademark-guidelines/
diff --git a/public/icons/docs/eigen3/16.png b/public/icons/docs/eigen3/16.png
new file mode 100644
index 00000000..265a2f49
Binary files /dev/null and b/public/icons/docs/eigen3/16.png differ
diff --git a/public/icons/docs/eigen3/16@2x.png b/public/icons/docs/eigen3/16@2x.png
new file mode 100644
index 00000000..9cc98d2c
Binary files /dev/null and b/public/icons/docs/eigen3/16@2x.png differ
diff --git a/public/icons/docs/eigen3/SOURCE b/public/icons/docs/eigen3/SOURCE
new file mode 100644
index 00000000..439adb72
--- /dev/null
+++ b/public/icons/docs/eigen3/SOURCE
@@ -0,0 +1 @@
+https://gitlab.com/libeigen/eigen/-/blob/master/doc/Eigen_Silly_Professor_64x64.png
diff --git a/public/icons/docs/elixir/SOURCE b/public/icons/docs/elixir/SOURCE
index ba422b56..9bf12112 100644
--- a/public/icons/docs/elixir/SOURCE
+++ b/public/icons/docs/elixir/SOURCE
@@ -1,2 +1,2 @@
-http://elixir-lang.org/docs/stable/elixir/assets/logo.png
-with permission from José Valim (https://twitter.com/josevalim/status/657125748659126272)
+https://raw.githubusercontent.com/elixir-lang/elixir-lang.github.com/main/images/logo/logo-dark.png#gh-dark-mode-only
+https://elixir-lang.org/images/logo/logo.png
diff --git a/public/icons/docs/ember/SOURCE b/public/icons/docs/ember/SOURCE
index 87f67da0..cd344e13 100644
--- a/public/icons/docs/ember/SOURCE
+++ b/public/icons/docs/ember/SOURCE
@@ -1 +1 @@
-https://github.com/tschundeee/emberjsfavicon
+https://emberjs.com/logos/
diff --git a/public/icons/docs/fastapi/16.png b/public/icons/docs/fastapi/16.png
new file mode 100644
index 00000000..34d06370
Binary files /dev/null and b/public/icons/docs/fastapi/16.png differ
diff --git a/public/icons/docs/fastapi/16@2x.png b/public/icons/docs/fastapi/16@2x.png
new file mode 100644
index 00000000..79505801
Binary files /dev/null and b/public/icons/docs/fastapi/16@2x.png differ
diff --git a/public/icons/docs/fastapi/SOURCE b/public/icons/docs/fastapi/SOURCE
new file mode 100644
index 00000000..255202ba
--- /dev/null
+++ b/public/icons/docs/fastapi/SOURCE
@@ -0,0 +1 @@
+https://fastapi.tiangolo.com/img/favicon.png
diff --git a/public/icons/docs/gnu_cobol/SOURCE b/public/icons/docs/gnu_cobol/SOURCE
index 9aa7d9a2..6151bbab 100644
--- a/public/icons/docs/gnu_cobol/SOURCE
+++ b/public/icons/docs/gnu_cobol/SOURCE
@@ -1 +1 @@
-https://sourceforge.net/p/open-cobol/icon
+https://gnucobol.sourceforge.io/images/shire_200.png
diff --git a/public/icons/docs/immutable/SOURCE b/public/icons/docs/immutable/SOURCE
index 4ab56fe0..e1643a30 100644
--- a/public/icons/docs/immutable/SOURCE
+++ b/public/icons/docs/immutable/SOURCE
@@ -1 +1 @@
-https://raw.githubusercontent.com/facebook/immutable-js/master/pages/src/static/favicon.png
+https://github.com/immutable-js/immutable-js/blob/main/website/public/favicon.png
\ No newline at end of file
diff --git a/public/icons/docs/jasmine/SOURCE b/public/icons/docs/jasmine/SOURCE
index f1e94049..c411da55 100644
--- a/public/icons/docs/jasmine/SOURCE
+++ b/public/icons/docs/jasmine/SOURCE
@@ -1 +1 @@
-https://github.com/jasmine/jasmine.github.io/tree/main/images
+https://github.com/jasmine/jasmine/blob/main/images/jasmine_favicon.png
diff --git a/public/icons/docs/jest/SOURCE b/public/icons/docs/jest/SOURCE
index 5604f134..dab33c28 100644
--- a/public/icons/docs/jest/SOURCE
+++ b/public/icons/docs/jest/SOURCE
@@ -1 +1 @@
-https://github.com/facebook/jest/tree/master/website/src/jest/img
+https://github.com/facebook/jest/tree/main/website/static/img
diff --git a/public/icons/docs/julia/SOURCE b/public/icons/docs/julia/SOURCE
index 1f0e149f..ecc29dc1 100644
--- a/public/icons/docs/julia/SOURCE
+++ b/public/icons/docs/julia/SOURCE
@@ -1 +1 @@
-http://julialang.org/favicon.ico
+https://docs.julialang.org/en/v1/assets/logo-dark.svg
\ No newline at end of file
diff --git a/public/icons/docs/knockout/SOURCE b/public/icons/docs/knockout/SOURCE
index 69980549..72517033 100644
--- a/public/icons/docs/knockout/SOURCE
+++ b/public/icons/docs/knockout/SOURCE
@@ -1 +1,2 @@
http://learn.knockoutjs.com/
+http://learn.knockoutjs.com/Content/App/icon.png
\ No newline at end of file
diff --git a/public/icons/docs/kubectl/16.png b/public/icons/docs/kubectl/16.png
new file mode 100644
index 00000000..0dccf912
Binary files /dev/null and b/public/icons/docs/kubectl/16.png differ
diff --git a/public/icons/docs/kubectl/16@2x.png b/public/icons/docs/kubectl/16@2x.png
new file mode 100644
index 00000000..2261e8ec
Binary files /dev/null and b/public/icons/docs/kubectl/16@2x.png differ
diff --git a/public/icons/docs/kubectl/SOURCE b/public/icons/docs/kubectl/SOURCE
new file mode 100644
index 00000000..cedbe271
--- /dev/null
+++ b/public/icons/docs/kubectl/SOURCE
@@ -0,0 +1 @@
+https://cncf-branding.netlify.app/projects/kubernetes/
\ No newline at end of file
diff --git a/public/icons/docs/kubernetes/16.png b/public/icons/docs/kubernetes/16.png
new file mode 100644
index 00000000..79abeb07
Binary files /dev/null and b/public/icons/docs/kubernetes/16.png differ
diff --git a/public/icons/docs/kubernetes/16@2x.png b/public/icons/docs/kubernetes/16@2x.png
new file mode 100644
index 00000000..9291009d
Binary files /dev/null and b/public/icons/docs/kubernetes/16@2x.png differ
diff --git a/public/icons/docs/kubernetes/SOURCE b/public/icons/docs/kubernetes/SOURCE
new file mode 100644
index 00000000..cedbe271
--- /dev/null
+++ b/public/icons/docs/kubernetes/SOURCE
@@ -0,0 +1 @@
+https://cncf-branding.netlify.app/projects/kubernetes/
\ No newline at end of file
diff --git a/public/icons/docs/latex/SOURCE b/public/icons/docs/latex/SOURCE
index f7dad480..ce9397f5 100644
--- a/public/icons/docs/latex/SOURCE
+++ b/public/icons/docs/latex/SOURCE
@@ -1 +1,3 @@
Compiling \LaTeX with pdflatex https://www.tug.org/applications/pdftex/
+https://www.latex-project.org/img/latex-project-logo.svg
+https://www.latex-project.org/get/
\ No newline at end of file
diff --git a/public/icons/docs/love/SOURCE b/public/icons/docs/love/SOURCE
index a24a3802..51075acd 100644
--- a/public/icons/docs/love/SOURCE
+++ b/public/icons/docs/love/SOURCE
@@ -1 +1 @@
-https://bytebucket.org/rude/love/raw/default/platform/unix/love.svg
+https://love2d.org/wiki/L%C3%B6ve_Logo_Graphics
\ No newline at end of file
diff --git a/public/icons/docs/marionette/SOURCE b/public/icons/docs/marionette/SOURCE
index a5d77e17..306b48ad 100644
--- a/public/icons/docs/marionette/SOURCE
+++ b/public/icons/docs/marionette/SOURCE
@@ -1 +1,2 @@
-https://github.com/marionettejs/marionettejs.com
+https://github.com/marionettejs/marionettejs.com/blob/master/src/logo/logo.svg
+https://github.com/marionettejs/marionettejs.com
\ No newline at end of file
diff --git a/public/icons/docs/meteor/SOURCE b/public/icons/docs/meteor/SOURCE
index 4e7b8a25..44f19bac 100644
--- a/public/icons/docs/meteor/SOURCE
+++ b/public/icons/docs/meteor/SOURCE
@@ -1 +1,2 @@
-https://www.meteor.com/
+https://assets.website-files.com/5dd3f8176674eb0829f184d5/5dd41eb9049df81f8773946e_meteor-logo.svg
+https://www.meteor.com/
\ No newline at end of file
diff --git a/public/icons/docs/mocha/SOURCE b/public/icons/docs/mocha/SOURCE
new file mode 100644
index 00000000..cc629edb
--- /dev/null
+++ b/public/icons/docs/mocha/SOURCE
@@ -0,0 +1,2 @@
+https://mochajs.org/
+https://github.com/mochajs/mocha/tree/master/assets
\ No newline at end of file
diff --git a/public/icons/docs/moment_timezone/16.png b/public/icons/docs/moment_timezone/16.png
new file mode 100644
index 00000000..29c6b987
Binary files /dev/null and b/public/icons/docs/moment_timezone/16.png differ
diff --git a/public/icons/docs/moment_timezone/16@2x.png b/public/icons/docs/moment_timezone/16@2x.png
new file mode 100644
index 00000000..0f8a8e4b
Binary files /dev/null and b/public/icons/docs/moment_timezone/16@2x.png differ
diff --git a/public/icons/docs/moment_timezone/SOURCE b/public/icons/docs/moment_timezone/SOURCE
new file mode 100644
index 00000000..f3616477
--- /dev/null
+++ b/public/icons/docs/moment_timezone/SOURCE
@@ -0,0 +1 @@
+https://momentjs.com/static/img/moment-timezone-favicon.png
\ No newline at end of file
diff --git a/public/icons/docs/nginx/SOURCE b/public/icons/docs/nginx/SOURCE
index bc80fe73..547daa08 100644
--- a/public/icons/docs/nginx/SOURCE
+++ b/public/icons/docs/nginx/SOURCE
@@ -1 +1,2 @@
-http://nginx.org/
+http://nginx.org/nginx.png
+http://nginx.org/
\ No newline at end of file
diff --git a/public/icons/docs/nix/16.png b/public/icons/docs/nix/16.png
new file mode 100644
index 00000000..13ad550b
Binary files /dev/null and b/public/icons/docs/nix/16.png differ
diff --git a/public/icons/docs/nix/16@2x.png b/public/icons/docs/nix/16@2x.png
new file mode 100644
index 00000000..5c1d1368
Binary files /dev/null and b/public/icons/docs/nix/16@2x.png differ
diff --git a/public/icons/docs/nix/SOURCE b/public/icons/docs/nix/SOURCE
new file mode 100644
index 00000000..c2f6c583
--- /dev/null
+++ b/public/icons/docs/nix/SOURCE
@@ -0,0 +1 @@
+https://github.com/NixOS/nixos-homepage/blob/master/logo/nixos-logo-only-hires.png
diff --git a/public/icons/docs/perl/SOURCE b/public/icons/docs/perl/SOURCE
index 9e2313c2..cce8da16 100644
--- a/public/icons/docs/perl/SOURCE
+++ b/public/icons/docs/perl/SOURCE
@@ -1 +1 @@
-http://www.perlfoundation.org/perl_trademark
+https://www.perlfoundation.org/trademarks.html
\ No newline at end of file
diff --git a/public/icons/docs/phalcon/SOURCE b/public/icons/docs/phalcon/SOURCE
index 4676d6ce..69d17c4a 100644
--- a/public/icons/docs/phalcon/SOURCE
+++ b/public/icons/docs/phalcon/SOURCE
@@ -1 +1 @@
-https://github.com/phalcon/website/blob/master/public/img/phalcon-22.png
+https://github.com/phalcon/website/tree/master/public/images/icons
\ No newline at end of file
diff --git a/public/icons/docs/phaser/SOURCE b/public/icons/docs/phaser/SOURCE
index 94e71758..0e32c846 100644
--- a/public/icons/docs/phaser/SOURCE
+++ b/public/icons/docs/phaser/SOURCE
@@ -1 +1,2 @@
-https://phaser.io/
+https://phaser.io/images/img.png
+https://phaser.io/
\ No newline at end of file
diff --git a/public/icons/docs/point_cloud_library/16.png b/public/icons/docs/point_cloud_library/16.png
index 90f0b827..e952d096 100644
Binary files a/public/icons/docs/point_cloud_library/16.png and b/public/icons/docs/point_cloud_library/16.png differ
diff --git a/public/icons/docs/point_cloud_library/16@2x.png b/public/icons/docs/point_cloud_library/16@2x.png
index f56f6b4b..bd59a658 100644
Binary files a/public/icons/docs/point_cloud_library/16@2x.png and b/public/icons/docs/point_cloud_library/16@2x.png differ
diff --git a/public/icons/docs/pygame/SOURCE b/public/icons/docs/pygame/SOURCE
new file mode 100644
index 00000000..a867a9e8
--- /dev/null
+++ b/public/icons/docs/pygame/SOURCE
@@ -0,0 +1 @@
+https://www.pygame.org/news/2020/10/pygame-20th-birthday
\ No newline at end of file
diff --git a/public/icons/docs/qunit/16.png b/public/icons/docs/qunit/16.png
new file mode 100644
index 00000000..4d7fdb41
Binary files /dev/null and b/public/icons/docs/qunit/16.png differ
diff --git a/public/icons/docs/qunit/16@2x.png b/public/icons/docs/qunit/16@2x.png
new file mode 100644
index 00000000..b9ae2d2f
Binary files /dev/null and b/public/icons/docs/qunit/16@2x.png differ
diff --git a/public/icons/docs/qunit/SOURCE b/public/icons/docs/qunit/SOURCE
new file mode 100644
index 00000000..560740c2
--- /dev/null
+++ b/public/icons/docs/qunit/SOURCE
@@ -0,0 +1 @@
+https://raw.githubusercontent.com/qunitjs/qunitjs.com/main/img/logo.svg
diff --git a/public/icons/docs/react/SOURCE b/public/icons/docs/react/SOURCE
index 58f9cc30..bfd02fd2 100644
--- a/public/icons/docs/react/SOURCE
+++ b/public/icons/docs/react/SOURCE
@@ -1 +1,2 @@
-https://github.com/facebook/react/blob/master/docs/img/logo.svg
+https://es.m.wikipedia.org/wiki/React#/media/Archivo%3AReact.svg
+https://github.com/facebook/react/blob/master/docs/img/logo.svg
\ No newline at end of file
diff --git a/public/icons/docs/redux/SOURCE b/public/icons/docs/redux/SOURCE
index c63f6d4a..ccad6ccc 100644
--- a/public/icons/docs/redux/SOURCE
+++ b/public/icons/docs/redux/SOURCE
@@ -1 +1 @@
-http://redux.js.org/gitbook/images/favicon.ico
+https://redux.js.org/img/redux.svg
\ No newline at end of file
diff --git a/public/icons/docs/requests/16.png b/public/icons/docs/requests/16.png
new file mode 100644
index 00000000..e423927a
Binary files /dev/null and b/public/icons/docs/requests/16.png differ
diff --git a/public/icons/docs/requests/16@2x.png b/public/icons/docs/requests/16@2x.png
new file mode 100644
index 00000000..06a4550f
Binary files /dev/null and b/public/icons/docs/requests/16@2x.png differ
diff --git a/public/icons/docs/requests/SOURCE b/public/icons/docs/requests/SOURCE
new file mode 100644
index 00000000..eeae972f
--- /dev/null
+++ b/public/icons/docs/requests/SOURCE
@@ -0,0 +1 @@
+https://requests.readthedocs.io/en/latest/_static/requests-sidebar.png
diff --git a/public/icons/docs/sanctuary/16.png b/public/icons/docs/sanctuary/16.png
new file mode 100644
index 00000000..df0bbd4f
Binary files /dev/null and b/public/icons/docs/sanctuary/16.png differ
diff --git a/public/icons/docs/sanctuary/16@2x.png b/public/icons/docs/sanctuary/16@2x.png
new file mode 100644
index 00000000..0bf2b9f3
Binary files /dev/null and b/public/icons/docs/sanctuary/16@2x.png differ
diff --git a/public/icons/docs/sanctuary/SOURCE b/public/icons/docs/sanctuary/SOURCE
new file mode 100644
index 00000000..4aba6a0d
--- /dev/null
+++ b/public/icons/docs/sanctuary/SOURCE
@@ -0,0 +1 @@
+https://github.com/sanctuary-js/sanctuary-logo/tree/v1.1.0
diff --git a/public/icons/docs/sqlite/SOURCE b/public/icons/docs/sqlite/SOURCE
new file mode 100644
index 00000000..357998ff
--- /dev/null
+++ b/public/icons/docs/sqlite/SOURCE
@@ -0,0 +1 @@
+https://commons.wikimedia.org/wiki/File:SQLite370.svg
\ No newline at end of file
diff --git a/public/icons/docs/statsmodels/SOURCE b/public/icons/docs/statsmodels/SOURCE
index 42e40bd4..42a85eeb 100644
--- a/public/icons/docs/statsmodels/SOURCE
+++ b/public/icons/docs/statsmodels/SOURCE
@@ -1 +1 @@
-http://statsmodels.sourceforge.net/_static/statsmodels_hybi_favico.ico
\ No newline at end of file
+https://www.statsmodels.org/stable/_images/statsmodels-logo-v2-horizontal.svg
\ No newline at end of file
diff --git a/public/icons/docs/svelte/16.png b/public/icons/docs/svelte/16.png
new file mode 100644
index 00000000..d8482015
Binary files /dev/null and b/public/icons/docs/svelte/16.png differ
diff --git a/public/icons/docs/svelte/16@2x.png b/public/icons/docs/svelte/16@2x.png
new file mode 100644
index 00000000..d74293e1
Binary files /dev/null and b/public/icons/docs/svelte/16@2x.png differ
diff --git a/public/icons/docs/svelte/SOURCE b/public/icons/docs/svelte/SOURCE
new file mode 100644
index 00000000..b4d677f6
--- /dev/null
+++ b/public/icons/docs/svelte/SOURCE
@@ -0,0 +1 @@
+https://svelte.dev/favicon.png
diff --git a/public/icons/docs/tailwindcss/16.png b/public/icons/docs/tailwindcss/16.png
new file mode 100644
index 00000000..bee80120
Binary files /dev/null and b/public/icons/docs/tailwindcss/16.png differ
diff --git a/public/icons/docs/tailwindcss/16@2x.png b/public/icons/docs/tailwindcss/16@2x.png
new file mode 100644
index 00000000..a7378f5b
Binary files /dev/null and b/public/icons/docs/tailwindcss/16@2x.png differ
diff --git a/public/icons/docs/tailwindcss/SOURCE b/public/icons/docs/tailwindcss/SOURCE
new file mode 100644
index 00000000..2f5932a8
--- /dev/null
+++ b/public/icons/docs/tailwindcss/SOURCE
@@ -0,0 +1 @@
+https://tailwindcss.com/favicons/favicon.ico
diff --git a/public/icons/docs/tensorflow/SOURCE b/public/icons/docs/tensorflow/SOURCE
index 3d2bb927..393259cd 100644
--- a/public/icons/docs/tensorflow/SOURCE
+++ b/public/icons/docs/tensorflow/SOURCE
@@ -1 +1 @@
-https://www.tensorflow.org/images/favicon.png
\ No newline at end of file
+https://www.gstatic.com/devrel-devsite/prod/vc890b700b898929d6a9586ce333c0fb7d88f26c0e62aab16b11d9d648f110bfc/tensorflow/images/lockup.svg
\ No newline at end of file
diff --git a/public/icons/docs/tensorflow_cpp/SOURCE b/public/icons/docs/tensorflow_cpp/SOURCE
index 3d2bb927..393259cd 100644
--- a/public/icons/docs/tensorflow_cpp/SOURCE
+++ b/public/icons/docs/tensorflow_cpp/SOURCE
@@ -1 +1 @@
-https://www.tensorflow.org/images/favicon.png
\ No newline at end of file
+https://www.gstatic.com/devrel-devsite/prod/vc890b700b898929d6a9586ce333c0fb7d88f26c0e62aab16b11d9d648f110bfc/tensorflow/images/lockup.svg
\ No newline at end of file
diff --git a/public/icons/docs/terraform/SOURCE b/public/icons/docs/terraform/SOURCE
new file mode 100644
index 00000000..890ee526
--- /dev/null
+++ b/public/icons/docs/terraform/SOURCE
@@ -0,0 +1 @@
+https://www.hashicorp.com/brand
\ No newline at end of file
diff --git a/public/icons/docs/vagrant/SOURCE b/public/icons/docs/vagrant/SOURCE
index 7c6a05ed..a1a77368 100644
--- a/public/icons/docs/vagrant/SOURCE
+++ b/public/icons/docs/vagrant/SOURCE
@@ -1 +1,2 @@
-http://www.vagrantup.com
+https://www.vagrantup.com/vagrant-public/img/logo-hashicorp.svg
+http://www.vagrantup.com
\ No newline at end of file
diff --git a/public/icons/docs/vitest/16.png b/public/icons/docs/vitest/16.png
new file mode 100644
index 00000000..fd44a6bb
Binary files /dev/null and b/public/icons/docs/vitest/16.png differ
diff --git a/public/icons/docs/vitest/16@2x.png b/public/icons/docs/vitest/16@2x.png
new file mode 100644
index 00000000..051339ca
Binary files /dev/null and b/public/icons/docs/vitest/16@2x.png differ
diff --git a/public/icons/docs/vitest/SOURCE b/public/icons/docs/vitest/SOURCE
new file mode 100644
index 00000000..911a2163
--- /dev/null
+++ b/public/icons/docs/vitest/SOURCE
@@ -0,0 +1 @@
+https://vitest.dev/logo.svg
diff --git a/public/icons/docs/vue/SOURCE b/public/icons/docs/vue/SOURCE
index 97bd9e03..77d0fdf6 100644
--- a/public/icons/docs/vue/SOURCE
+++ b/public/icons/docs/vue/SOURCE
@@ -1 +1,2 @@
-http://vuejs.org/
+https://es.wikipedia.org/wiki/Archivo:Vue.js_Logo_2.svg
+http://vuejs.org/
\ No newline at end of file
diff --git a/public/icons/docs/vueuse/16.png b/public/icons/docs/vueuse/16.png
new file mode 100644
index 00000000..fd44a6bb
Binary files /dev/null and b/public/icons/docs/vueuse/16.png differ
diff --git a/public/icons/docs/vueuse/16@2x.png b/public/icons/docs/vueuse/16@2x.png
new file mode 100644
index 00000000..2ab84424
Binary files /dev/null and b/public/icons/docs/vueuse/16@2x.png differ
diff --git a/public/icons/docs/vueuse/SOURCE b/public/icons/docs/vueuse/SOURCE
new file mode 100644
index 00000000..cbe45ed1
--- /dev/null
+++ b/public/icons/docs/vueuse/SOURCE
@@ -0,0 +1,2 @@
+https://github.com/vueuse/vueuse/blob/main/packages/public/favicon-16x16.png
+https://github.com/vueuse/vueuse/blob/main/packages/public/favicon-32x32.png
diff --git a/public/icons/docs/vueuse/favicon-16x16.png b/public/icons/docs/vueuse/favicon-16x16.png
new file mode 100644
index 00000000..c3db4e7e
Binary files /dev/null and b/public/icons/docs/vueuse/favicon-16x16.png differ
diff --git a/public/icons/docs/wagtail/16.png b/public/icons/docs/wagtail/16.png
new file mode 100644
index 00000000..73a98e39
Binary files /dev/null and b/public/icons/docs/wagtail/16.png differ
diff --git a/public/icons/docs/wagtail/16@2x.png b/public/icons/docs/wagtail/16@2x.png
new file mode 100644
index 00000000..965b30f5
Binary files /dev/null and b/public/icons/docs/wagtail/16@2x.png differ
diff --git a/public/icons/docs/wagtail/SOURCE b/public/icons/docs/wagtail/SOURCE
new file mode 100644
index 00000000..76f5d4b1
--- /dev/null
+++ b/public/icons/docs/wagtail/SOURCE
@@ -0,0 +1 @@
+https://github.com/wagtail/wagtail/blob/main/docs/logo.png
diff --git a/public/manifest.json b/public/manifest.json
index 301c56d1..d458b9e0 100644
--- a/public/manifest.json
+++ b/public/manifest.json
@@ -1,4 +1,5 @@
{
+ "$schema": "https://json.schemastore.org/web-manifest-combined.json",
"name": "DevDocs",
"short_name": "DevDocs",
"description": "API Documentation Browser",
@@ -41,5 +42,10 @@
"sizes": "512x512",
"type": "image/png"
}
+ ],
+ "url_handlers": [
+ {
+ "origin": "https://devdocs.io"
+ }
]
}
diff --git a/renovate.json b/renovate.json
index 1e002cc4..e717dbd9 100644
--- a/renovate.json
+++ b/renovate.json
@@ -1,16 +1,3 @@
{
- "labels": ["renovate"],
- "extends": ["config:base"],
- "branchConcurrentLimit": 20,
- "dependencyDashboard": true,
- "major": {
- "dependencyDashboardApproval": true
- },
- "packageRules": [
- {
- "matchUpdateTypes": ["minor", "patch", "pin", "digest"],
- "matchCurrentVersion": "!/^0/",
- "automerge": true
- }
- ]
+ "extends": ["github>freecodecamp/renovate-config"]
}
diff --git a/test/lib/docs/core/doc_test.rb b/test/lib/docs/core/doc_test.rb
index b188ff0d..3da1fcfc 100644
--- a/test/lib/docs/core/doc_test.rb
+++ b/test/lib/docs/core/doc_test.rb
@@ -390,12 +390,16 @@ class DocsDocTest < MiniTest::Spec
it "compares versions" do
instance = doc.versions.first.new
+ assert_equal "Up-to-date", instance.outdated_state('0.0.2', '0.0.3')
+ assert_equal "Outdated major version", instance.outdated_state('0.2', '0.3')
assert_equal 'Up-to-date', instance.outdated_state('1', '1')
assert_equal 'Up-to-date', instance.outdated_state('1.2', '1.2')
assert_equal 'Up-to-date', instance.outdated_state('1.2.2', '1.2.2')
assert_equal 'Up-to-date', instance.outdated_state('1.2.2', '1.2.3')
assert_equal "Outdated major version", instance.outdated_state('1', '2')
- assert_equal "Outdated minor version", instance.outdated_state('1.2', '1.3')
+ assert_equal "Up-to-date", instance.outdated_state('1.0.2', '1.0.3')
+ assert_equal "Outdated major version", instance.outdated_state('1.2', '1.3')
+ assert_equal "Outdated minor version", instance.outdated_state('2.2', '2.3')
assert_equal "Outdated major version", instance.outdated_state('9', '10')
assert_equal "Outdated major version", instance.outdated_state('99', '101')
assert_equal 'Up-to-date', instance.outdated_state('2006-01-02', '2006-01-03')
diff --git a/test/lib/docs/core/manifest_test.rb b/test/lib/docs/core/manifest_test.rb
index 16484a70..14806e34 100644
--- a/test/lib/docs/core/manifest_test.rb
+++ b/test/lib/docs/core/manifest_test.rb
@@ -3,8 +3,9 @@ require 'docs'
class ManifestTest < MiniTest::Spec
let :doc do
- doc = Class.new Docs::Doc
+ doc = Class.new Docs::Scraper
doc.name = 'TestDoc'
+ doc.options[:attribution] = 'foo'
doc
end
@@ -57,13 +58,13 @@ class ManifestTest < MiniTest::Spec
context "when the doc has a meta file" do
before do
stub(store).exist?(meta_path) { true }
- stub(store).read(meta_path) { '{"name":"Test"}' }
+ stub(store).read(meta_path) { '{"name":"Test", "db_size": 776533}' }
end
it "includes the doc's meta representation" do
json = manifest.as_json
assert_equal 1, json.length
- assert_equal 'Test', json[0]['name']
+ assert_equal "{\"name\"=>\"Test\", \"db_size\"=>776533, :attribution=>\"foo\"}", json[0].to_s
end
end
diff --git a/test/lib/docs/core/response_test.rb b/test/lib/docs/core/response_test.rb
index 4e13b67a..4142752d 100644
--- a/test/lib/docs/core/response_test.rb
+++ b/test/lib/docs/core/response_test.rb
@@ -63,6 +63,17 @@ class DocsResponseTest < MiniTest::Spec
end
end
+ describe "#content_length" do
+ it "returns the content type" do
+ options.headers['Content-Length'] = '188420'
+ assert_equal 188420, response.content_length
+ end
+
+ it "defaults to 0" do
+ assert_equal 0, response.content_length
+ end
+ end
+
describe "#mime_type" do
it "returns the content type" do
options.headers['Content-Type'] = 'type'