History

Merge branch 'master' into master

Simon Legner committed 5 years ago

Commit 44eb7ec2 parents 830af65 0f8a44651 files · +257 −94Browse files

Unified · Split

51 files
  1. .github/CODEOWNERS +4 −0
  2. Gemfile.lock +1 −1
  3. README.md +4 −0
  4. assets/javascripts/templates/pages/about_tmpl.coffee +13 −8
  5. assets/stylesheets/application.css.scss +1 −1
  6. docs/file-scrapers.md +18 −0
  7. lib/docs/core/doc.rb +2 −0
  8. lib/docs/filters/ansible/entries.rb +13 −0
  9. lib/docs/filters/haxe/clean_html.rb +4 −2
  10. lib/docs/filters/jest/entries.rb +1 −0
  11. lib/docs/filters/leaflet/clean_html.rb +7 −7
  12. lib/docs/filters/openjdk/clean_html.rb +5 −2
  13. lib/docs/scrapers/angular.rb +62 −2
  14. lib/docs/scrapers/angularjs.rb +7 −2
  15. lib/docs/scrapers/ansible.rb +9 −4
  16. lib/docs/scrapers/babel.rb +1 −2
  17. lib/docs/scrapers/chef.rb +2 −2
  18. lib/docs/scrapers/codeigniter.rb +2 −3
  19. lib/docs/scrapers/dart.rb +1 −1
  20. lib/docs/scrapers/docker.rb +3 −3
  21. lib/docs/scrapers/elixir.rb +1 −1
  22. lib/docs/scrapers/erlang.rb +1 −2
  23. lib/docs/scrapers/fish.rb +1 −2
  24. lib/docs/scrapers/gnu_cobol.rb +5 −3
  25. lib/docs/scrapers/gnuplot.rb +5 −0
  26. lib/docs/scrapers/go.rb +1 −1
  27. lib/docs/scrapers/godot.rb +1 −2
  28. lib/docs/scrapers/haxe.rb +7 −3
  29. lib/docs/scrapers/influxdata.rb +1 −3
  30. lib/docs/scrapers/jest.rb +2 −2
  31. lib/docs/scrapers/leaflet.rb +5 −0
  32. lib/docs/scrapers/lua.rb +7 −2
  33. lib/docs/scrapers/moment.rb +1 −2
  34. lib/docs/scrapers/nginx.rb +4 −3
  35. lib/docs/scrapers/node.rb +6 −1
  36. lib/docs/scrapers/openjdk.rb +8 −1
  37. lib/docs/scrapers/pandas.rb +1 −3
  38. lib/docs/scrapers/perl.rb +1 −2
  39. lib/docs/scrapers/php.rb +2 −3
  40. lib/docs/scrapers/postgresql.rb +6 −1
  41. lib/docs/scrapers/pug.rb +5 −1
  42. lib/docs/scrapers/python.rb +12 −4
  43. lib/docs/scrapers/rdoc/ruby.rb +4 −0
  44. lib/docs/scrapers/react.rb +1 −1
  45. lib/docs/scrapers/react_native.rb +2 −2
  46. lib/docs/scrapers/scikit_learn.rb +1 −2
  47. lib/docs/scrapers/sqlite.rb +1 −1
  48. lib/docs/scrapers/statsmodels.rb +1 −2
  49. lib/docs/scrapers/vagrant.rb +1 −2
  50. public/icons/docs/postgresql/SOURCE +1 −1
  51. public/icons/docs/ruby/SOURCE +2 −1
.github/CODEOWNERS+4−0
@@ -0,0 +1,4 @@
1+# This controls who gets notified for review and allows branches to be protected.
2+# Protected branches can only be merged into after being approved by a codeowner.
3+
4+* @freeCodeCamp/devdocs
Gemfile.lock+1−1
@@ -26,7 +26,7 @@ GEM · 25 unmodified lines
2626 eventmachine (1.2.7)
2727 execjs (2.7.0)
2828 exifr (1.3.6)
29− ffi (1.11.1)
29+ ffi (1.12.2)
3030 fspath (3.1.2)
3131 highline (2.0.3)
3232 html-pipeline (2.12.0)
README.md+4−0
@@ -4,6 +4,10 @@ DevDocs combines multiple developer documentations in a clean and organized web · 3 unmodified lines
44
55 DevDocs was created by [Thibaut Courouble](https://thibaut.me) and is operated by [freeCodeCamp](https://www.freecodecamp.org).
66
7+## We are currently searching for maintainers
8+
9+Please reach out to the community on [Gitter](https://gitter.im/FreeCodeCamp/DevDocs) if you would like to join the team!
10+
711 Keep track of development news:
812
913 * Join the contributor chat room on [Gitter](https://gitter.im/FreeCodeCamp/DevDocs)
assets/javascripts/templates/pages/about_tmpl.coffee+13−8
@@ -22,7 +22,7 @@ app.templates.aboutPage = -> """ · 21 unmodified lines
2222
2323 <h2 class="_block-heading" id="copyright">Copyright and License</h2>
2424 <p class="_note">
25− <strong>Copyright 2013&ndash;2019 Thibaut Courouble and <a href="https://github.com/freeCodeCamp/devdocs/graphs/contributors">other contributors</a></strong><br>
25+ <strong>Copyright 2013&ndash;2020 Thibaut Courouble and <a href="https://github.com/freeCodeCamp/devdocs/graphs/contributors">other contributors</a></strong><br>
2626 This software is licensed under the terms of the Mozilla Public License v2.0.<br>
2727 You may obtain a copy of the source code at <a href="https://github.com/freeCodeCamp/devdocs">github.com/freeCodeCamp/devdocs</a>.<br>
2828 For more information, see the <a href="https://github.com/freeCodeCamp/devdocs/blob/master/COPYRIGHT">COPYRIGHT</a>
@@ -82,8 +82,13 @@ app.templates.aboutPage = -> """ · 53 unmodified lines
8282 """
8383
8484 credits = [
85− [ 'Angular<br>Angular.js',
86− '2010-2019 Google, Inc.',
85+ [ 'Angular.js',
86+ '2010-2020 Google, Inc.',
87+ 'CC BY 3.0',
88+ 'https://creativecommons.org/licenses/by/3.0/'
89+ ], [
90+ 'Angular',
91+ '2010-2020 Google, Inc.',
8792 'CC BY',
8893 'https://creativecommons.org/licenses/by/4.0/'
8994 ], [
@@ -378,7 +383,7 @@ credits = [ · 288 unmodified lines
378383 'https://raw.githubusercontent.com/jekyll/jekyll/master/LICENSE'
379384 ], [
380385 'Jest',
381− 'Facebook, Inc. and its affiliates.',
386+ '2020 Facebook, Inc.',
382387 'MIT',
383388 'https://raw.githubusercontent.com/facebook/jest/master/LICENSE'
384389 ], [
@@ -448,7 +453,7 @@ credits = [ · 63 unmodified lines
448453 'https://raw.githubusercontent.com/lodash/lodash/master/LICENSE'
449454 ], [
450455 'Lua',
451− '1994–2017 Lua.org, PUC-Rio',
456+ '1994–2020 Lua.org, PUC-Rio',
452457 'MIT',
453458 'http://www.lua.org/license.html'
454459 ], [
@@ -508,7 +513,7 @@ credits = [ · 53 unmodified lines
508513 'https://github.com/LearnBoost/mongoose/blob/master/README.md#license'
509514 ], [
510515 'nginx',
511− '2002-2019 Igor Sysoev<br>&copy; 2011-2019 Nginx, Inc.',
516+ '2002-2020 Igor Sysoev<br>&copy; 2011-2020 Nginx, Inc.',
512517 'BSD',
513518 'http://nginx.org/LICENSE'
514519 ], [
@@ -548,7 +553,7 @@ credits = [ · 33 unmodified lines
548553 'https://octave.org/doc/interpreter/'
549554 ], [
550555 'OpenJDK',
551− '1993-2017, Oracle and/or its affiliates. All rights reserved.<br>Licensed under the GNU General Public License, version 2, with the Classpath Exception.<br>Various third party code in OpenJDK is licensed under different licenses.<br>Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.',
556+ '1993, 2020, Oracle and/or its affiliates. All rights reserved.<br>Licensed under the GNU General Public License, version 2, with the Classpath Exception.<br>Various third party code in OpenJDK is licensed under different licenses.<br>Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.',
552557 'GPLv2',
553558 'http://openjdk.java.net/legal/gplv2+ce.html'
554559 ], [
@@ -603,7 +608,7 @@ credits = [ · 48 unmodified lines
603608 'https://raw.githubusercontent.com/ponylang/ponyc/master/LICENSE'
604609 ], [
605610 'PostgreSQL',
606− '1996-2019 The PostgreSQL Global Development Group<br>&copy; 1994 The Regents of the University of California',
611+ '1996-2020 The PostgreSQL Global Development Group<br>&copy; 1994 The Regents of the University of California',
607612 'PostgreSQL',
608613 'https://www.postgresql.org/about/licence/'
609614 ], [
assets/stylesheets/application.css.scss+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
33 //= depend_on sprites/docs.json
44
55 /*!
6− * Copyright 2013-2019 Thibaut Courouble and other contributors
6+ * Copyright 2013-2020 Thibaut Courouble and other contributors
77 *
88 * This source code is licensed under the terms of the Mozilla
99 * Public License, v. 2.0, a copy of which may be obtained at:
docs/file-scrapers.md+18−0
@@ -80,6 +80,24 @@ $GS = '/usr/local/opt/ghostscript/bin/gs'; # GhostScript · 79 unmodified lines
8080
8181 ## OpenJDK
8282
83+https://packages.debian.org/sid/openjdk-11-doc
84+
85+```sh
86+mkdir docs/openjdk~11
87+curl --remote-name http://ftp.debian.org/debian/pool/main/o/openjdk-11/openjdk-11-doc_11.0.9.1+1-1_all.deb
88+bsdtar --extract --to-stdout --file openjdk-11-doc_11.0.9.1+1-1_all.deb data.tar.xz | \
89+bsdtar --extract --xz --file - --strip-components=6 --directory=docs/openjdk\~11/ ./usr/share/doc/openjdk-11-jre-headless/api/
90+```
91+
92+https://packages.debian.org/sid/openjdk-8-doc
93+
94+```sh
95+mkdir docs/openjdk~8
96+curl --remote-name http://ftp.debian.org/debian/pool/main/o/openjdk-8/openjdk-8-doc_8u272-b10-1_all.deb
97+bsdtar --extract --to-stdout --file openjdk-8-doc_8u272-b10-1_all.deb data.tar.xz | \
98+bsdtar --extract --xz --file - --strip-components=6 --directory=docs/openjdk\~8/ ./usr/share/doc/openjdk-8-jre-headless/api/
99+```
100+
83101 ## Perl
84102
85103 ## PHP
lib/docs/core/doc.rb+2−0
@@ -220,6 +220,8 @@ module Docs · 219 unmodified lines
220220
221221 if opts.key?(:github_token) and url.start_with?('https://api.github.com/')
222222 headers['Authorization'] = "token #{opts[:github_token]}"
223+ elsif ENV['GITHUB_TOKEN'] and url.start_with?('https://api.github.com/')
224+ headers['Authorization'] = "token #{ENV['GITHUB_TOKEN']}"
223225 end
224226
225227 opts[:logger].debug("Fetching #{url}")
lib/docs/filters/ansible/entries.rb+13−0
@@ -7,6 +7,13 @@ module Docs · 6 unmodified lines
77 name.remove! %r{ \- .*}
88 name.remove! 'Introduction To '
99 name.remove! %r{ Guide\z}
10+
11+ if version == "2.10"
12+ if slug =~ /\Acollections\// and slug !~ /index$/
13+ name = name.split('.')[2]
14+ end
15+ end
16+
1017 name
1118 end
1219
@@ -21,6 +28,12 @@ module Docs · 8 unmodified lines
2128 end
2229 end
2330
31+ if version == "2.10"
32+ if slug =~ /\Acollections\//
33+ return "Collection #{slug.split('/')[1..-2].join(".")}"
34+ end
35+ end
36+
2437 if slug =~ /\Acli\//
2538 'CLI Reference'
2639 elsif slug =~ /\Anetwork\//
lib/docs/filters/haxe/clean_html.rb+4−2
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Haxe
33 class CleanHtmlFilter < Filter
44 def call
5− css('.viewsource', 'hr', 'h1 > small', '.inherited-fields').remove
5+ css('.viewsource', 'hr', 'h1 > small', '.inherited-fields', '.label-meta').remove
66
77 css('h4 + h1').each do |node|
88 node.after(node.previous_element)
@@ -28,8 +28,10 @@ module Docs · 19 unmodified lines
2828 end
2929
3030 css('.field').each do |node|
31+ h3 = node.at_css('h3:not(:empty)')
32+ next unless h3.present?
3133 link = node.at_css('a[name]')
32− node.at_css('h3:not(:empty)')['id'] = link['name']
34+ h3['id'] = link['name']
3335 link.before(link.children).remove
3436 node.before(node.children).remove
3537 end
lib/docs/filters/jest/entries.rb+1−0
@@ -19,6 +19,7 @@ module Docs · 18 unmodified lines
1919
2020 def additional_entries
2121 return [] unless !root_page? && self.type == self.name # api page
22+ return [] if self.slug == 'environment-variables'
2223
2324 entries = []
2425
lib/docs/filters/leaflet/clean_html.rb+7−7
@@ -8,25 +8,25 @@ module Docs · 7 unmodified lines
88 node.name = 'h2'
99 end
1010
11− at_css('> h2:first-child').name = 'h1'
12−
13− # remove "This reference reflects Leaflet 1.2.0."
14− css('h1 ~ p').each do |node|
11+ # remove "This reference reflects Leaflet"
12+ css('p:contains("This reference reflects Leaflet")').each do |node|
1513 node.remove
1614 break
1715 end
1816
17+ at_css('> h2:first-child').name = 'h1'
18+
1919 css('section', 'code b', '.accordion', '.accordion-overflow', '.accordion-content').each do |node|
2020 node.before(node.children).remove
2121 end
2222
2323 css('pre > code').each do |node|
2424 node['class'] ||= ''
25− lang = if node['class'].include?('lang-html') || node.content =~ /\A</
25+ lang = if node['class'].include?('lang-html') || node['class'].include?('language-html') || node.content =~ /\A</
2626 'html'
27− elsif node['class'].include?('lang-css')
27+ elsif node['class'].include?('lang-css') || node['class'].include?('language-css')
2828 'css'
29− elsif node['class'].include?('lang-js') || node['class'].include?('lang-javascript')
29+ elsif node['class'].include?('lang-js') || node['class'].include?('language-js') || node['class'].include?('lang-javascript')
3030 'javascript'
3131 end
3232 node.parent['data-language'] = lang if lang
lib/docs/filters/openjdk/clean_html.rb+5−2
@@ -33,7 +33,7 @@ module Docs · 32 unmodified lines
3333 node.content = node.content.remove(' Summary').remove(' Detail').pluralize
3434 end
3535
36− if root_page?
36+ if root_page? && version == '8'
3737 css('.header')[1].remove
3838 css('.contentContainer')[0].remove
3939 css('.contentContainer')[-1].remove
@@ -45,7 +45,10 @@ module Docs · 5 unmodified lines
4545 end
4646 end
4747
48− at_css('h1').content = "OpenJDK #{release} Documentation" + (version != release ? " (#{version.split(' ').last})" : '')
48+ end
49+
50+ if root_page?
51+ at_css('h1').content = "OpenJDK #{release} Documentation"
4952 end
5053
5154 css('table').each do |node|
lib/docs/scrapers/angular.rb+62−2
@@ -11,7 +11,7 @@ module Docs · 10 unmodified lines
1111 options[:max_image_size] = 256_000
1212
1313 options[:attribution] = <<-HTML
14− &copy; 2010&ndash;2019 Google, Inc.<br>
14+ &copy; 2010&ndash;2020 Google, Inc.<br>
1515 Licensed under the Creative Commons Attribution License 4.0.
1616 HTML
1717
@@ -59,7 +59,7 @@ module Docs · 41 unmodified lines
5959 end
6060
6161 version do
62− self.release = '8.2.14'
62+ self.release = '11.0.0'
6363 self.base_url = 'https://angular.io/'
6464 self.root_path = 'docs'
6565
@@ -78,6 +78,66 @@ module Docs · 12 unmodified lines
7878 include Docs::Angular::Common
7979 end
8080
81+ version '10' do
82+ self.release = '10.2.3'
83+ self.base_url = 'https://v10.angular.io/'
84+ self.root_path = 'docs'
85+
86+ html_filters.push 'angular/clean_html', 'angular/entries'
87+
88+ options[:follow_links] = false
89+ options[:only_patterns] = [/\Aguide/, /\Atutorial/, /\Aapi/]
90+ options[:fix_urls_before_parse] = ->(url) do
91+ url.sub! %r{\Aguide/}, '/guide/'
92+ url.sub! %r{\Atutorial/}, '/tutorial/'
93+ url.sub! %r{\Aapi/}, '/api/'
94+ url.sub! %r{\Agenerated/}, '/generated/'
95+ url
96+ end
97+
98+ include Docs::Angular::Common
99+ end
100+
101+ version '9' do
102+ self.release = '9.1.12'
103+ self.base_url = 'https://v9.angular.io/'
104+ self.root_path = 'docs'
105+
106+ html_filters.push 'angular/clean_html', 'angular/entries'
107+
108+ options[:follow_links] = false
109+ options[:only_patterns] = [/\Aguide/, /\Atutorial/, /\Aapi/]
110+ options[:fix_urls_before_parse] = ->(url) do
111+ url.sub! %r{\Aguide/}, '/guide/'
112+ url.sub! %r{\Atutorial/}, '/tutorial/'
113+ url.sub! %r{\Aapi/}, '/api/'
114+ url.sub! %r{\Agenerated/}, '/generated/'
115+ url
116+ end
117+
118+ include Docs::Angular::Common
119+ end
120+
121+ version '8' do
122+ self.release = '8.2.14'
123+ self.base_url = 'https://v8.angular.io/'
124+ self.root_path = 'docs'
125+
126+ html_filters.push 'angular/clean_html', 'angular/entries'
127+
128+ options[:follow_links] = false
129+ options[:only_patterns] = [/\Aguide/, /\Atutorial/, /\Aapi/]
130+ options[:fix_urls_before_parse] = ->(url) do
131+ url.sub! %r{\Aguide/}, '/guide/'
132+ url.sub! %r{\Atutorial/}, '/tutorial/'
133+ url.sub! %r{\Aapi/}, '/api/'
134+ url.sub! %r{\Agenerated/}, '/generated/'
135+ url
136+ end
137+
138+ include Docs::Angular::Common
139+ end
140+
81141 version '7' do
82142 self.release = '7.2.15'
83143 self.base_url = 'https://v7.angular.io/'
lib/docs/scrapers/angularjs.rb+7−2
@@ -38,8 +38,8 @@ module Docs · 37 unmodified lines
3838 ]
3939
4040 options[:attribution] = <<-HTML
41− &copy; 2010&ndash;2018 Google, Inc.<br>
42− Licensed under the Creative Commons Attribution License 4.0.
41+ &copy; 2010&ndash;2020 Google, Inc.<br>
42+ Licensed under the Creative Commons Attribution License 3.0.
4343 HTML
4444
4545 stub '' do
@@ -49,6 +49,11 @@ module Docs · 3 unmodified lines
4949 capybara.execute_script("return document.querySelector('.side-navigation').innerHTML")
5050 end
5151
52+ version '1.8' do
53+ self.release = '1.8.2'
54+ self.base_url = "https://code.angularjs.org/#{release}/docs/partials/"
55+ end
56+
5257 version '1.7' do
5358 self.release = '1.7.8'
5459 self.base_url = "https://code.angularjs.org/#{release}/docs/partials/"
lib/docs/scrapers/ansible.rb+9−4
@@ -30,18 +30,23 @@ module Docs · 29 unmodified lines
3030 /\Aroadmap.*/i,
3131 ]
3232
33+ version '2.10' do
34+ self.release = '2.10.3'
35+ self.base_url = "https://docs.ansible.com/ansible/#{version}/"
36+ end
37+
3338 version '2.9' do
34− self.release = '2.9.1'
39+ self.release = '2.9.15'
3540 self.base_url = "https://docs.ansible.com/ansible/#{version}/"
3641 end
3742
3843 version '2.8' do
39− self.release = '2.8.7'
44+ self.release = '2.8.16'
4045 self.base_url = "https://docs.ansible.com/ansible/#{version}/"
4146 end
4247
4348 version '2.7' do
44− self.release = '2.7.15'
49+ self.release = '2.7.17'
4550 self.base_url = "https://docs.ansible.com/ansible/#{version}/"
4651 end
4752
@@ -71,7 +76,7 @@ module Docs · 23 unmodified lines
7176
7277 def get_latest_version(opts)
7378 doc = fetch_doc('https://docs.ansible.com/ansible/latest/index.html', opts)
74− doc.at_css('.DocSiteProduct-CurrentVersion').content.strip
79+ doc.at_css('.version').content.strip
7580 end
7681 end
7782 end
lib/docs/scrapers/babel.rb+1−2
@@ -24,8 +24,7 @@ module Docs · 23 unmodified lines
2424 end
2525
2626 def get_latest_version(opts)
27− doc = fetch_doc('https://babeljs.io/docs/en/', opts)
28− doc.at_css('a[href="/versions"] > h3').content
27+ get_latest_github_release('babel', 'babel', opts)
2928 end
3029 end
3130 end
lib/docs/scrapers/chef.rb+2−2
@@ -49,8 +49,8 @@ module Docs · 48 unmodified lines
4949 end
5050
5151 def get_latest_version(opts)
52− doc = fetch_doc('https://downloads.chef.io/chef', opts)
53− doc.at_css('h1.product-heading > span').content.strip
52+ doc = fetch_doc('https://downloads.chef.io/products/infra', opts)
53+ doc.at_css('#versions > option').content.strip
5454 end
5555 end
5656 end
lib/docs/scrapers/codeigniter.rb+2−3
@@ -40,9 +40,8 @@ module Docs · 39 unmodified lines
4040 end
4141
4242 def get_latest_version(opts)
43− doc = fetch_doc('https://codeigniter.com/userguide3/changelog.html', opts)
44− header = doc.at_css('#change-log h2')
45− header.content.scan(/([0-9.]+)/)[0][0]
43+ tags = get_github_tags('codeigniter4', 'codeigniter4', opts)
44+ tags[0]['name'][1..-1]
4645 end
4746 end
4847 end
lib/docs/scrapers/dart.rb+1−1
@@ -33,7 +33,7 @@ module Docs · 32 unmodified lines
3333 def get_latest_version(opts)
3434 doc = fetch_doc('https://api.dartlang.org/', opts)
3535 label = doc.at_css('footer > span').content.strip
36− label.sub(/Dart /, '')
36+ label.sub(/Dart\s*/, '')
3737 end
3838 end
3939 end
lib/docs/scrapers/docker.rb+3−3
@@ -260,9 +260,9 @@ module Docs · 259 unmodified lines
260260 end
261261
262262 def get_latest_version(opts)
263− doc = fetch_doc('https://docs.docker.com/', opts)
264− label = doc.at_css('.nav-container button.dropdown-toggle').content.strip
265− label.scan(/([0-9.]+)/)[0][0]
263+ doc = fetch_doc('https://docs.docker.com/engine/release-notes/', opts)
264+ latest_version = doc.at_css('.content > section > h1[id^="version-"]').content.strip
265+ latest_version.rpartition(' ')[-1]
266266 end
267267 end
268268 end
lib/docs/scrapers/elixir.rb+1−1
@@ -126,7 +126,7 @@ module Docs · 125 unmodified lines
126126
127127 def get_latest_version(opts)
128128 doc = fetch_doc('https://hexdocs.pm/elixir/api-reference.html', opts)
129− doc.at_css('h2.sidebar-projectVersion').content.strip[1..-1]
129+ doc.at_css('.sidebar-projectVersion').content.strip[1..-1]
130130 end
131131 end
132132 end
lib/docs/scrapers/erlang.rb+1−2
@@ -57,8 +57,7 @@ module Docs · 56 unmodified lines
5757 end
5858
5959 def get_latest_version(opts)
60− doc = fetch_doc('https://www.erlang.org/downloads', opts)
61− doc.at_css('.col-lg-3 > ul > li').content.strip.sub(/OTP /, '')
60+ get_latest_github_release('erlang', 'otp', opts)[4..-1]
6261 end
6362 end
6463 end
lib/docs/scrapers/fish.rb+1−2
@@ -54,8 +54,7 @@ module Docs · 53 unmodified lines
5454 end
5555
5656 def get_latest_version(opts)
57− doc = fetch_doc('http://fishshell.com/docs/current/index.html', opts)
58− doc.at_css('#toc-index').content.scan(/([0-9.]+)/)[0][0]
57+ get_latest_github_release('fish-shell', 'fish-shell', opts)
5958 end
6059 end
6160 end
lib/docs/scrapers/gnu_cobol.rb+5−3
@@ -18,9 +18,11 @@ module Docs · 17 unmodified lines
1818 HTML
1919
2020 def get_latest_version(opts)
21− doc = fetch_doc('https://open-cobol.sourceforge.io/HTML/gnucobpg.html', opts)
22− title = doc.at_css('h1').content
23− title.scan(/([0-9.]+)/)[0][0]
21+ fetch_doc('https://sourceforge.net/projects/gnucobol/files/gnucobol/', opts)
22+ .css('#files_list > tbody > tr')
23+ .map { |file| file['title'] }
24+ .sort_by { |version| version.to_f }
25+ .last
2426 end
2527 end
2628 end
lib/docs/scrapers/gnuplot.rb+5−0
@@ -37,5 +37,10 @@ module Docs · 36 unmodified lines
3737 Distributed under the <a href="https://sourceforge.net/p/gnuplot/gnuplot-main/ci/master/tree/Copyright">gnuplot license</a> (rights to distribute modified versions are withheld).
3838 HTML
3939
40+ def get_latest_version(opts)
41+ doc = fetch_doc('http://www.gnuplot.info/download.html', opts)
42+ label = doc.at_css('h2').content.strip
43+ label.sub(/[^0-9.]*/, '')
44+ end
4045 end
4146 end
lib/docs/scrapers/go.rb+1−1
@@ -1,7 +1,7 @@
11 module Docs
22 class Go < UrlScraper
33 self.type = 'go'
4− self.release = '1.13'
4+ self.release = '1.15'
55 self.base_url = 'https://golang.org/pkg/'
66 self.links = {
77 home: 'https://golang.org/',
lib/docs/scrapers/godot.rb+1−2
@@ -44,8 +44,7 @@ module Docs · 43 unmodified lines
4444 end
4545
4646 def get_latest_version(opts)
47− doc = fetch_doc('https://docs.godotengine.org/', opts)
48− doc.at_css('.version').content.strip
47+ get_latest_github_release('godotengine', 'godot', opts).split('-')[0]
4948 end
5049 end
5150 end
lib/docs/scrapers/haxe.rb+7−3
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Haxe < UrlScraper
33 self.name = 'Haxe'
44 self.type = 'simple'
5− self.release = '3.4.7'
5+ self.release = '4.1.3'
66 self.base_url = 'https://api.haxe.org/'
77
88 html_filters.push 'haxe/clean_html', 'haxe/entries'
@@ -10,7 +10,7 @@ module Docs · 1 unmodified line
1010 options[:container] = '.span9'
1111
1212 options[:attribution] = <<-HTML
13− &copy; 2005&ndash;2018 Haxe Foundation<br>
13+ &copy; 2005&ndash;2020 Haxe Foundation<br>
1414 Licensed under a MIT license.
1515 HTML
1616
@@ -20,7 +20,7 @@ module Docs · 3 unmodified lines
2020 code: 'https://github.com/HaxeFoundation/haxe'
2121 }
2222
23− options[:skip_patterns] = [/\A(?:cpp|cs|flash|java|js|neko|php|python|lua|hl|sys)/i]
23+ options[:skip_patterns] = [/\A(?:cpp|cs|flash|java|js|neko|php|python|lua|hl|sys|eval)/i]
2424 end
2525
2626 version 'C++' do
@@ -67,6 +67,10 @@ module Docs · 40 unmodified lines
6767 self.base_url = 'https://api.haxe.org/python/'
6868 end
6969
70+ version 'Eval' do
71+ self.base_url = 'https://api.haxe.org/eval/'
72+ end
73+
7074 def get_latest_version(opts)
7175 doc = fetch_doc('https://api.haxe.org/', opts)
7276 label = doc.at_css('.container.main-content h1 > small').content
lib/docs/scrapers/influxdata.rb+1−3
@@ -48,9 +48,7 @@ module Docs · 47 unmodified lines
4848 HTML
4949
5050 def get_latest_version(opts)
51− doc = fetch_doc('https://docs.influxdata.com/influxdb/', opts)
52− label = doc.at_css('.navbar--current-product').content.strip
53− label.scan(/([0-9.]+)/)[0][0]
51+ get_latest_github_release('influxdata', 'influxdb', opts)
5452 end
5553 end
5654 end
lib/docs/scrapers/jest.rb+2−2
@@ -1,7 +1,7 @@
11 module Docs
22 class Jest < UrlScraper
33 self.type = 'simple'
4− self.release = '24.9'
4+ self.release = '26.6'
55 self.base_url = 'https://jestjs.io/docs/en/'
66 self.root_path = 'getting-started'
77 self.links = {
@@ -14,7 +14,7 @@ module Docs · 6 unmodified lines
1414 options[:container] = '.docMainWrapper'
1515
1616 options[:attribution] = <<-HTML
17− &copy; 2019 Facebook, Inc. and its affiliates.<br>
17+ &copy; 2020 Facebook, Inc.<br>
1818 Licensed under the MIT License.
1919 HTML
2020
lib/docs/scrapers/leaflet.rb+5−0
@@ -19,6 +19,11 @@ module Docs · 18 unmodified lines
1919 Maps &copy; OpenStreetMap contributors.
2020 HTML
2121
22+ version '1.7' do
23+ self.release = '1.7.1'
24+ self.base_url = "https://leafletjs.com/reference-#{release}.html"
25+ end
26+
2227 version '1.6' do
2328 self.release = '1.6.0'
2429 self.base_url = "https://leafletjs.com/reference-#{release}.html"
lib/docs/scrapers/lua.rb+7−2
@@ -8,12 +8,17 @@ module Docs · 7 unmodified lines
88 options[:skip_links] = true
99
1010 options[:attribution] = <<-HTML
11− &copy; 1994&ndash;2017 Lua.org, PUC-Rio.<br>
11+ &copy; 1994&ndash;2020 Lua.org, PUC-Rio.<br>
1212 Licensed under the MIT License.
1313 HTML
1414
15+ version '5.4' do
16+ self.release = '5.4.1'
17+ self.base_url = 'https://www.lua.org/manual/5.4/'
18+ end
19+
1520 version '5.3' do
16− self.release = '5.3.4'
21+ self.release = '5.3.6'
1722 self.base_url = 'https://www.lua.org/manual/5.3/'
1823 end
1924
lib/docs/scrapers/moment.rb+1−2
@@ -24,8 +24,7 @@ module Docs · 23 unmodified lines
2424 HTML
2525
2626 def get_latest_version(opts)
27− doc = fetch_doc('http://momentjs.com/', opts)
28− doc.at_css('.hero-title > h1 > span').content
27+ get_github_tags('moment', 'moment', opts)[0]['name']
2928 end
3029 end
3130 end
lib/docs/scrapers/nginx.rb+4−3
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Nginx < UrlScraper
33 self.name = 'nginx'
44 self.type = 'nginx'
5− self.release = '1.17.2'
5+ self.release = '1.19.3'
66 self.base_url = 'https://nginx.org/en/docs/'
77 self.links = {
88 home: 'https://nginx.org/',
@@ -20,9 +20,10 @@ module Docs · 11 unmodified lines
2020
2121 options[:skip_patterns] = [/\/faq\//]
2222
23+ # http://nginx.org/LICENSE
2324 options[:attribution] = <<-HTML
24− &copy; 2002-2019 Igor Sysoev<br>
25− &copy; 2011-2019 Nginx, Inc.<br>
25+ &copy; 2002-2020 Igor Sysoev<br>
26+ &copy; 2011-2020 Nginx, Inc.<br>
2627 Licensed under the BSD License.
2728 HTML
2829
lib/docs/scrapers/node.rb+6−1
@@ -23,7 +23,12 @@ module Docs · 22 unmodified lines
2323 HTML
2424
2525 version do
26− self.release = '12.9.1'
26+ self.release = '14.15.0'
27+ self.base_url = 'https://nodejs.org/dist/latest-v14.x/docs/api/'
28+ end
29+
30+ version '12 LTS' do
31+ self.release = '12.19.0'
2732 self.base_url = 'https://nodejs.org/dist/latest-v12.x/docs/api/'
2833 end
2934
lib/docs/scrapers/openjdk.rb+8−1
@@ -18,13 +18,20 @@ module Docs · 17 unmodified lines
1818 /doc-files\//]
1919
2020 options[:attribution] = <<-HTML
21− &copy; 1993&ndash;2017, Oracle and/or its affiliates. All rights reserved.<br>
21+ &copy; 1993, 2020, Oracle and/or its affiliates. All rights reserved.<br>
2222 Documentation extracted from Debian's OpenJDK Development Kit package.<br>
2323 Licensed under the GNU General Public License, version 2, with the Classpath Exception.<br>
2424 Various third party code in OpenJDK is licensed under different licenses (see Debian package).<br>
2525 Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
2626 HTML
2727
28+ version '11' do
29+ self.release = '11.0.9'
30+ self.root_path = 'index.html'
31+ self.base_url = 'https://docs.oracle.com/en/java/javase/11/docs/api/'
32+ options[:only_patterns] = [/\Ajava\./]
33+ end
34+
2835 version '8' do
2936 self.release = '8'
3037
lib/docs/scrapers/pandas.rb+1−3
@@ -62,9 +62,7 @@ module Docs · 61 unmodified lines
6262 end
6363
6464 def get_latest_version(opts)
65− doc = fetch_doc('http://pandas.pydata.org/pandas-docs/stable/', opts)
66− label = doc.at_css('.body > .section > p').content
67− label.scan(/Version: ([0-9.]+)/)[0][0]
65+ get_latest_github_release('pandas-dev', 'pandas', opts)
6866 end
6967 end
7068 end
lib/docs/scrapers/perl.rb+1−2
@@ -46,8 +46,7 @@ module Docs · 45 unmodified lines
4646
4747 def get_latest_version(opts)
4848 doc = fetch_doc('https://perldoc.perl.org/', opts)
49− header = doc.at_css('h2.h1').content
50− header.scan(/Perl ([0-9.]+)/)[0][0]
49+ doc.at_css('#dropdownlink-stable').content
5150 end
5251 end
5352 end
lib/docs/scrapers/php.rb+2−3
@@ -68,9 +68,8 @@ module Docs · 67 unmodified lines
6868 HTML
6969
7070 def get_latest_version(opts)
71− doc = fetch_doc('https://secure.php.net/manual/en/doc.changelog.php', opts)
72− label = doc.at_css('tbody.gen-changelog > tr > td').content
73− label.split(',').last.strip
71+ doc = fetch_doc('https://www.php.net/supported-versions.php', opts)
72+ doc.at_css('table > tbody > .stable:last-of-type > td > a').content.strip
7473 end
7574 end
7675 end
lib/docs/scrapers/postgresql.rb+6−1
@@ -51,10 +51,15 @@ module Docs · 50 unmodified lines
5151 /\Aunsupported-features/ ]
5252
5353 options[:attribution] = <<-HTML
54− &copy; 1996&ndash;2019 The PostgreSQL Global Development Group<br>
54+ &copy; 1996&ndash;2020 The PostgreSQL Global Development Group<br>
5555 Licensed under the PostgreSQL License.
5656 HTML
5757
58+ version '13' do
59+ self.release = '13.1'
60+ self.base_url = "https://www.postgresql.org/docs/#{version}/"
61+ end
62+
5863 version '12' do
5964 self.release = '12.1'
6065 self.base_url = "https://www.postgresql.org/docs/#{version}/"
lib/docs/scrapers/pug.rb+5−1
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
33 self.type = 'pug'
44 self.base_url = 'https://pugjs.org/'
55 self.root_path = 'api/getting-started.html'
6− self.release = '2.0.3'
6+ self.release = '3.0.0'
77 self.links = {
88 home: 'https://pugjs.org/',
99 code: 'https://github.com/pugjs/pug'
@@ -18,6 +18,10 @@ module Docs · 8 unmodified lines
1818 Licensed under the MIT license.
1919 HTML
2020
21+ options[:skip_patterns] = [
22+ /support/
23+ ]
24+
2125 def get_latest_version(opts)
2226 get_npm_version('pug', opts)
2327 end
lib/docs/scrapers/python.rb+12−4
@@ -23,22 +23,30 @@ module Docs · 22 unmodified lines
2323 Licensed under the PSF License.
2424 HTML
2525
26+ # 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
27+ version '3.9' do # docs.python.org/3.9/download.html
28+ self.release = '3.9.0'
29+ self.base_url = 'https://docs.python.org/3.9/'
30+
31+ html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
32+ end
33+
2634 version '3.8' do # docs.python.org/3.8/download.html
27− self.release = '3.8.1'
35+ self.release = '3.8.6'
2836 self.base_url = 'https://docs.python.org/3.8/'
2937
3038 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
3139 end
3240
3341 version '3.7' do # docs.python.org/3.7/download.html
34− self.release = '3.7.6'
42+ self.release = '3.7.9'
3543 self.base_url = 'https://docs.python.org/3.7/'
3644
3745 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
3846 end
3947
4048 version '3.6' do # docs.python.org/3.6/download.html
41− self.release = '3.6.10'
49+ self.release = '3.6.12'
4250 self.base_url = 'https://docs.python.org/3.6/'
4351
4452 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
@@ -60,7 +68,7 @@ module Docs · 15 unmodified lines
6068
6169 def get_latest_version(opts)
6270 doc = fetch_doc('https://docs.python.org/', opts)
63− doc.at_css('.version_switcher_placeholder').content
71+ doc.at_css('title').content.split(' ')[0]
6472 end
6573 end
6674 end
lib/docs/scrapers/rdoc/ruby.rb+4−0
@@ -69,6 +69,10 @@ module Docs · 68 unmodified lines
6969 Licensed under their own licenses.
7070 HTML
7171
72+ version '2.7' do
73+ self.release = '2.7.2'
74+ end
75+
7276 version '2.6' do
7377 self.release = '2.6.3'
7478 end
lib/docs/scrapers/react.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class React < UrlScraper
33 self.name = 'React'
44 self.type = 'simple'
5− self.release = '16.12.0'
5+ self.release = '17.0.1'
66 self.base_url = 'https://reactjs.org/docs/'
77 self.root_path = 'hello-world.html'
88 self.links = {
lib/docs/scrapers/react_native.rb+2−2
@@ -32,8 +32,8 @@ module Docs · 31 unmodified lines
3232 HTML
3333
3434 def get_latest_version(opts)
35− doc = fetch_doc('https://facebook.github.io/react-native/docs/getting-started.html', opts)
36− doc.at_css('header > a > h3').content
35+ doc = fetch_doc('https://reactnative.dev/docs/getting-started', opts)
36+ doc.at_css('meta[name="docsearch:version"]')['content']
3737 end
3838 end
3939 end
lib/docs/scrapers/scikit_learn.rb+1−2
@@ -26,8 +26,7 @@ module Docs · 25 unmodified lines
2626 HTML
2727
2828 def get_latest_version(opts)
29− doc = fetch_doc('https://scikit-learn.org/stable/documentation.html', opts)
30− doc.at_css('.body h1').content.scan(/([0-9.]+)/)[0][0]
29+ get_latest_github_release('scikit-learn', 'scikit-learn', opts)
3130 end
3231 end
3332 end
lib/docs/scrapers/sqlite.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Sqlite < FileScraper
33 self.name = 'SQLite'
44 self.type = 'sqlite'
5− self.release = '3.30.1'
5+ self.release = '3.33.0'
66 self.base_url = 'https://sqlite.org/'
77 self.root_path = 'docs.html'
88 self.initial_paths = %w(keyword_index.html)
lib/docs/scrapers/statsmodels.rb+1−2
@@ -22,8 +22,7 @@ module Docs · 21 unmodified lines
2222 HTML
2323
2424 def get_latest_version(opts)
25− doc = fetch_doc('http://www.statsmodels.org/stable/', opts)
26− doc.at_css('.sphinxsidebarwrapper h3 + p > b').content[1..-1]
25+ get_latest_github_release('statsmodels', 'statsmodels', opts)
2726 end
2827 end
2928 end
lib/docs/scrapers/vagrant.rb+1−2
@@ -20,8 +20,7 @@ module Docs · 19 unmodified lines
2020 HTML
2121
2222 def get_latest_version(opts)
23− contents = get_github_file_contents('hashicorp', 'vagrant', 'website/config.rb', opts)
24− contents.scan(/version\s+=\s+"([0-9.]+)"/)[0][0]
23+ get_github_tags('hashicorp', 'vagrant', opts)[0]['name'][1..-1]
2524 end
2625 end
2726 end
public/icons/docs/postgresql/SOURCE+1−1
@@ -1 +1 @@
1−http://www.postgresql.org/about/press/presskit93/#logos
1+https://www.postgresql.org/about/press/presskit93/#logos
public/icons/docs/ruby/SOURCE+2−1
@@ -1 +1,2 @@
1−http://commons.wikimedia.org/wiki/File:Ruby_logo.svg
1+https://www.ruby-lang.org/en/about/logo/
2+https://commons.wikimedia.org/wiki/File:Ruby_logo.svg