diff --git a/Gemfile.lock b/Gemfile.lock index 473542b6..a73db036 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,7 +26,7 @@ GEM eventmachine (1.2.7) execjs (2.7.0) exifr (1.3.6) - ffi (1.11.1) + ffi (1.12.2) fspath (3.1.2) highline (2.0.3) html-pipeline (2.12.0) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 8ac93ed4..f7f66790 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -22,7 +22,7 @@ app.templates.aboutPage = -> """

- Copyright 2013–2019 Thibaut Courouble and other contributors
+ Copyright 2013–2020 Thibaut Courouble and other contributors
This software is licensed under the terms of the Mozilla Public License v2.0.
You may obtain a copy of the source code at github.com/freeCodeCamp/devdocs.
For more information, see the COPYRIGHT @@ -83,9 +83,9 @@ app.templates.aboutPage = -> """ credits = [ [ 'Angular
Angular.js', - '2010-2019 Google, Inc.', - 'CC BY', - 'https://creativecommons.org/licenses/by/4.0/' + '2010-2020 Google, Inc.', + 'CC BY 3.0', + 'https://creativecommons.org/licenses/by/3.0/' ], [ 'Ansible', '2012-2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.', @@ -378,7 +378,7 @@ credits = [ 'https://raw.githubusercontent.com/jekyll/jekyll/master/LICENSE' ], [ 'Jest', - 'Facebook, Inc. and its affiliates.', + '2020 Facebook, Inc.', 'MIT', 'https://raw.githubusercontent.com/facebook/jest/master/LICENSE' ], [ @@ -448,7 +448,7 @@ credits = [ 'https://raw.githubusercontent.com/lodash/lodash/master/LICENSE' ], [ 'Lua', - '1994–2017 Lua.org, PUC-Rio', + '1994–2020 Lua.org, PUC-Rio', 'MIT', 'http://www.lua.org/license.html' ], [ @@ -603,7 +603,7 @@ credits = [ 'https://raw.githubusercontent.com/ponylang/ponyc/master/LICENSE' ], [ 'PostgreSQL', - '1996-2019 The PostgreSQL Global Development Group
© 1994 The Regents of the University of California', + '1996-2020 The PostgreSQL Global Development Group
© 1994 The Regents of the University of California', 'PostgreSQL', 'https://www.postgresql.org/about/licence/' ], [ diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss index 1b1c3ad0..4a83095e 100644 --- a/assets/stylesheets/application.css.scss +++ b/assets/stylesheets/application.css.scss @@ -3,7 +3,7 @@ //= depend_on sprites/docs.json /*! - * Copyright 2013-2019 Thibaut Courouble and other contributors + * Copyright 2013-2020 Thibaut Courouble and other contributors * * This source code is licensed under the terms of the Mozilla * Public License, v. 2.0, a copy of which may be obtained at: diff --git a/lib/docs/filters/haxe/clean_html.rb b/lib/docs/filters/haxe/clean_html.rb index 4e9bd635..c75316b5 100644 --- a/lib/docs/filters/haxe/clean_html.rb +++ b/lib/docs/filters/haxe/clean_html.rb @@ -2,7 +2,7 @@ module Docs class Haxe class CleanHtmlFilter < Filter def call - css('.viewsource', 'hr', 'h1 > small', '.inherited-fields').remove + css('.viewsource', 'hr', 'h1 > small', '.inherited-fields', '.label-meta').remove css('h4 + h1').each do |node| node.after(node.previous_element) @@ -28,8 +28,10 @@ module Docs end css('.field').each do |node| + h3 = node.at_css('h3:not(:empty)') + next unless h3.present? link = node.at_css('a[name]') - node.at_css('h3:not(:empty)')['id'] = link['name'] + h3['id'] = link['name'] link.before(link.children).remove node.before(node.children).remove end diff --git a/lib/docs/filters/jest/entries.rb b/lib/docs/filters/jest/entries.rb index 14a697c2..82c346f9 100644 --- a/lib/docs/filters/jest/entries.rb +++ b/lib/docs/filters/jest/entries.rb @@ -19,6 +19,7 @@ module Docs def additional_entries return [] unless !root_page? && self.type == self.name # api page + return [] if self.slug == 'environment-variables' entries = [] diff --git a/lib/docs/filters/leaflet/clean_html.rb b/lib/docs/filters/leaflet/clean_html.rb index 802463de..717b7c74 100644 --- a/lib/docs/filters/leaflet/clean_html.rb +++ b/lib/docs/filters/leaflet/clean_html.rb @@ -8,25 +8,25 @@ module Docs node.name = 'h2' end - at_css('> h2:first-child').name = 'h1' - - # remove "This reference reflects Leaflet 1.2.0." - css('h1 ~ p').each do |node| + # remove "This reference reflects Leaflet" + css('p:contains("This reference reflects Leaflet")').each do |node| node.remove break end + at_css('> h2:first-child').name = 'h1' + css('section', 'code b', '.accordion', '.accordion-overflow', '.accordion-content').each do |node| node.before(node.children).remove end css('pre > code').each do |node| node['class'] ||= '' - lang = if node['class'].include?('lang-html') || node.content =~ /\A - Licensed under the Creative Commons Attribution License 4.0. + © 2010–2020 Google, Inc.
+ Licensed under the Creative Commons Attribution License 3.0. HTML stub '' do @@ -49,6 +49,11 @@ module Docs capybara.execute_script("return document.querySelector('.side-navigation').innerHTML") end + version '1.8' do + self.release = '1.8.2' + self.base_url = "https://code.angularjs.org/#{release}/docs/partials/" + end + version '1.7' do self.release = '1.7.8' self.base_url = "https://code.angularjs.org/#{release}/docs/partials/" diff --git a/lib/docs/scrapers/dart.rb b/lib/docs/scrapers/dart.rb index 002cdce9..4522762b 100644 --- a/lib/docs/scrapers/dart.rb +++ b/lib/docs/scrapers/dart.rb @@ -32,7 +32,8 @@ module Docs def get_latest_version(opts) doc = fetch_doc('https://api.dartlang.org/', opts) - doc.at_css('footer > span').content.sub(/Dart/, '').strip + label = doc.at_css('footer > span').content.strip + label.sub(/Dart\s*/, '') end end end diff --git a/lib/docs/scrapers/gnuplot.rb b/lib/docs/scrapers/gnuplot.rb index 4753e195..d63f0dea 100644 --- a/lib/docs/scrapers/gnuplot.rb +++ b/lib/docs/scrapers/gnuplot.rb @@ -38,8 +38,9 @@ module Docs HTML def get_latest_version(opts) - doc = fetch_doc('https://sourceforge.net/projects/gnuplot/files/gnuplot/', opts) - doc.at_css('#files_list > tbody > tr:nth-child(2)')['title'] + doc = fetch_doc('http://www.gnuplot.info/download.html', opts) + label = doc.at_css('h2').content.strip + label.sub(/[^0-9.]*/, '') end end end diff --git a/lib/docs/scrapers/go.rb b/lib/docs/scrapers/go.rb index 05f8a531..210ef1f6 100644 --- a/lib/docs/scrapers/go.rb +++ b/lib/docs/scrapers/go.rb @@ -1,7 +1,7 @@ module Docs class Go < UrlScraper self.type = 'go' - self.release = '1.13' + self.release = '1.15' self.base_url = 'https://golang.org/pkg/' self.links = { home: 'https://golang.org/', diff --git a/lib/docs/scrapers/haxe.rb b/lib/docs/scrapers/haxe.rb index 2dbab01a..4950ed67 100644 --- a/lib/docs/scrapers/haxe.rb +++ b/lib/docs/scrapers/haxe.rb @@ -2,7 +2,7 @@ module Docs class Haxe < UrlScraper self.name = 'Haxe' self.type = 'simple' - self.release = '3.4.7' + self.release = '4.1.3' self.base_url = 'https://api.haxe.org/' html_filters.push 'haxe/clean_html', 'haxe/entries' @@ -10,7 +10,7 @@ module Docs options[:container] = '.span9' options[:attribution] = <<-HTML - © 2005–2018 Haxe Foundation
+ © 2005–2020 Haxe Foundation
Licensed under a MIT license. HTML @@ -20,7 +20,7 @@ module Docs code: 'https://github.com/HaxeFoundation/haxe' } - options[:skip_patterns] = [/\A(?:cpp|cs|flash|java|js|neko|php|python|lua|hl|sys)/i] + options[:skip_patterns] = [/\A(?:cpp|cs|flash|java|js|neko|php|python|lua|hl|sys|eval)/i] end version 'C++' do @@ -67,6 +67,10 @@ module Docs self.base_url = 'https://api.haxe.org/python/' end + version 'Eval' do + self.base_url = 'https://api.haxe.org/eval/' + end + def get_latest_version(opts) doc = fetch_doc('https://api.haxe.org/', opts) label = doc.at_css('.container.main-content h1 > small').content diff --git a/lib/docs/scrapers/jest.rb b/lib/docs/scrapers/jest.rb index 4b60ba75..5591b4ce 100644 --- a/lib/docs/scrapers/jest.rb +++ b/lib/docs/scrapers/jest.rb @@ -1,7 +1,7 @@ module Docs class Jest < UrlScraper self.type = 'simple' - self.release = '24.9' + self.release = '26.6' self.base_url = 'https://jestjs.io/docs/en/' self.root_path = 'getting-started' self.links = { @@ -14,7 +14,7 @@ module Docs options[:container] = '.docMainWrapper' options[:attribution] = <<-HTML - © 2019 Facebook, Inc. and its affiliates.
+ © 2020 Facebook, Inc.
Licensed under the MIT License. HTML diff --git a/lib/docs/scrapers/leaflet.rb b/lib/docs/scrapers/leaflet.rb index ca75ea57..69abef25 100644 --- a/lib/docs/scrapers/leaflet.rb +++ b/lib/docs/scrapers/leaflet.rb @@ -19,6 +19,11 @@ module Docs Maps © OpenStreetMap contributors. HTML + version '1.7' do + self.release = '1.7.1' + self.base_url = "https://leafletjs.com/reference-#{release}.html" + end + version '1.6' do self.release = '1.6.0' self.base_url = "https://leafletjs.com/reference-#{release}.html" diff --git a/lib/docs/scrapers/lua.rb b/lib/docs/scrapers/lua.rb index e3608918..5192548a 100644 --- a/lib/docs/scrapers/lua.rb +++ b/lib/docs/scrapers/lua.rb @@ -8,12 +8,17 @@ module Docs options[:skip_links] = true options[:attribution] = <<-HTML - © 1994–2017 Lua.org, PUC-Rio.
+ © 1994–2020 Lua.org, PUC-Rio.
Licensed under the MIT License. HTML + version '5.4' do + self.release = '5.4.1' + self.base_url = 'https://www.lua.org/manual/5.4/' + end + version '5.3' do - self.release = '5.3.4' + self.release = '5.3.6' self.base_url = 'https://www.lua.org/manual/5.3/' end diff --git a/lib/docs/scrapers/node.rb b/lib/docs/scrapers/node.rb index c5ac060c..c448df10 100644 --- a/lib/docs/scrapers/node.rb +++ b/lib/docs/scrapers/node.rb @@ -23,7 +23,12 @@ module Docs HTML version do - self.release = '12.9.1' + self.release = '14.15.0' + self.base_url = 'https://nodejs.org/dist/latest-v14.x/docs/api/' + end + + version '12 LTS' do + self.release = '12.19.0' self.base_url = 'https://nodejs.org/dist/latest-v12.x/docs/api/' end diff --git a/lib/docs/scrapers/pandas.rb b/lib/docs/scrapers/pandas.rb index c92d6228..fedba47b 100644 --- a/lib/docs/scrapers/pandas.rb +++ b/lib/docs/scrapers/pandas.rb @@ -62,8 +62,7 @@ module Docs end def get_latest_version(opts) - doc = fetch_doc('http://pandas.pydata.org/pandas-docs/stable/', opts) - doc.at_css('#pandas-documentation').content.scan(/Version: ([0-9.]+)/)[0][0] + get_latest_github_release('pandas-dev', 'pandas', opts) end end end diff --git a/lib/docs/scrapers/postgresql.rb b/lib/docs/scrapers/postgresql.rb index 9483bfde..3c428bf8 100644 --- a/lib/docs/scrapers/postgresql.rb +++ b/lib/docs/scrapers/postgresql.rb @@ -51,10 +51,15 @@ module Docs /\Aunsupported-features/ ] options[:attribution] = <<-HTML - © 1996–2019 The PostgreSQL Global Development Group
+ © 1996–2020 The PostgreSQL Global Development Group
Licensed under the PostgreSQL License. HTML + version '13' do + self.release = '13.1' + self.base_url = "https://www.postgresql.org/docs/#{version}/" + end + version '12' do self.release = '12.1' self.base_url = "https://www.postgresql.org/docs/#{version}/" diff --git a/lib/docs/scrapers/python.rb b/lib/docs/scrapers/python.rb index f9a9768e..2676b5bf 100644 --- a/lib/docs/scrapers/python.rb +++ b/lib/docs/scrapers/python.rb @@ -23,22 +23,30 @@ module Docs Licensed under the PSF License. HTML + # mkdir -p docs/python~3.9 && cd docs/python~3.9 && curl -L https://docs.python.org/3.9/archives/python-3.9.0-docs-html.tar.bz2 | tar xj --strip-components=1 + version '3.9' do # docs.python.org/3.9/download.html + self.release = '3.9.0' + self.base_url = 'https://docs.python.org/3.9/' + + html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' + end + version '3.8' do # docs.python.org/3.8/download.html - self.release = '3.8.1' + self.release = '3.8.6' self.base_url = 'https://docs.python.org/3.8/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' end version '3.7' do # docs.python.org/3.7/download.html - self.release = '3.7.6' + self.release = '3.7.9' self.base_url = 'https://docs.python.org/3.7/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' end version '3.6' do # docs.python.org/3.6/download.html - self.release = '3.6.10' + self.release = '3.6.12' self.base_url = 'https://docs.python.org/3.6/' html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html' diff --git a/lib/docs/scrapers/sqlite.rb b/lib/docs/scrapers/sqlite.rb index 9b245326..246ee6e9 100644 --- a/lib/docs/scrapers/sqlite.rb +++ b/lib/docs/scrapers/sqlite.rb @@ -2,7 +2,7 @@ module Docs class Sqlite < FileScraper self.name = 'SQLite' self.type = 'sqlite' - self.release = '3.30.1' + self.release = '3.33.0' self.base_url = 'https://sqlite.org/' self.root_path = 'docs.html' self.initial_paths = %w(keyword_index.html) diff --git a/public/icons/docs/postgresql/SOURCE b/public/icons/docs/postgresql/SOURCE index 84ce600b..e9a53dcf 100644 --- a/public/icons/docs/postgresql/SOURCE +++ b/public/icons/docs/postgresql/SOURCE @@ -1 +1 @@ -http://www.postgresql.org/about/press/presskit93/#logos +https://www.postgresql.org/about/press/presskit93/#logos