History

Fix merge conflicts

Jasper van Merle committed 5 years ago

Commit 7ca18dd2 parents f1b464b 8677f3320 files · +81 −40Browse files

Unified · Split

20 files
  1. Gemfile.lock +1 −1
  2. assets/javascripts/templates/pages/about_tmpl.coffee +7 −7
  3. assets/stylesheets/application.css.scss +1 −1
  4. lib/docs/filters/haxe/clean_html.rb +4 −2
  5. lib/docs/filters/jest/entries.rb +1 −0
  6. lib/docs/filters/leaflet/clean_html.rb +7 −7
  7. lib/docs/scrapers/angularjs.rb +7 −2
  8. lib/docs/scrapers/dart.rb +2 −1
  9. lib/docs/scrapers/gnuplot.rb +3 −2
  10. lib/docs/scrapers/go.rb +1 −1
  11. lib/docs/scrapers/haxe.rb +7 −3
  12. lib/docs/scrapers/jest.rb +2 −2
  13. lib/docs/scrapers/leaflet.rb +5 −0
  14. lib/docs/scrapers/lua.rb +7 −2
  15. lib/docs/scrapers/node.rb +6 −1
  16. lib/docs/scrapers/pandas.rb +1 −2
  17. lib/docs/scrapers/postgresql.rb +6 −1
  18. lib/docs/scrapers/python.rb +11 −3
  19. lib/docs/scrapers/sqlite.rb +1 −1
  20. public/icons/docs/postgresql/SOURCE +1 −1
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)
assets/javascripts/templates/pages/about_tmpl.coffee+7−7
@@ -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>
@@ -83,9 +83,9 @@ app.templates.aboutPage = -> """ · 54 unmodified lines
8383
8484 credits = [
8585 [ 'Angular<br>Angular.js',
86− '2010-2019 Google, Inc.',
87− 'CC BY',
88− 'https://creativecommons.org/licenses/by/4.0/'
86+ '2010-2020 Google, Inc.',
87+ 'CC BY 3.0',
88+ 'https://creativecommons.org/licenses/by/3.0/'
8989 ], [
9090 'Ansible',
9191 '2012-2018 Michael DeHaan<br>&copy; 2018–2019 Red Hat, Inc.',
@@ -378,7 +378,7 @@ credits = [ · 286 unmodified lines
378378 'https://raw.githubusercontent.com/jekyll/jekyll/master/LICENSE'
379379 ], [
380380 'Jest',
381− 'Facebook, Inc. and its affiliates.',
381+ '2020 Facebook, Inc.',
382382 'MIT',
383383 'https://raw.githubusercontent.com/facebook/jest/master/LICENSE'
384384 ], [
@@ -448,7 +448,7 @@ credits = [ · 63 unmodified lines
448448 'https://raw.githubusercontent.com/lodash/lodash/master/LICENSE'
449449 ], [
450450 'Lua',
451− '1994–2017 Lua.org, PUC-Rio',
451+ '1994–2020 Lua.org, PUC-Rio',
452452 'MIT',
453453 'http://www.lua.org/license.html'
454454 ], [
@@ -603,7 +603,7 @@ credits = [ · 148 unmodified lines
603603 'https://raw.githubusercontent.com/ponylang/ponyc/master/LICENSE'
604604 ], [
605605 'PostgreSQL',
606− '1996-2019 The PostgreSQL Global Development Group<br>&copy; 1994 The Regents of the University of California',
606+ '1996-2020 The PostgreSQL Global Development Group<br>&copy; 1994 The Regents of the University of California',
607607 'PostgreSQL',
608608 'https://www.postgresql.org/about/licence/'
609609 ], [
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:
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/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/dart.rb+2−1
@@ -32,7 +32,8 @@ module Docs · 31 unmodified lines
3232
3333 def get_latest_version(opts)
3434 doc = fetch_doc('https://api.dartlang.org/', opts)
35− doc.at_css('footer > span').content.sub(/Dart/, '').strip
35+ label = doc.at_css('footer > span').content.strip
36+ label.sub(/Dart\s*/, '')
3637 end
3738 end
3839 end
lib/docs/scrapers/gnuplot.rb+3−2
@@ -38,8 +38,9 @@ module Docs · 37 unmodified lines
3838 HTML
3939
4040 def get_latest_version(opts)
41− doc = fetch_doc('https://sourceforge.net/projects/gnuplot/files/gnuplot/', opts)
42− doc.at_css('#files_list > tbody > tr:nth-child(2)')['title']
41+ doc = fetch_doc('http://www.gnuplot.info/download.html', opts)
42+ label = doc.at_css('h2').content.strip
43+ label.sub(/[^0-9.]*/, '')
4344 end
4445 end
4546 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/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/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/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/pandas.rb+1−2
@@ -62,8 +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− doc.at_css('#pandas-documentation').content.scan(/Version: ([0-9.]+)/)[0][0]
65+ get_latest_github_release('pandas-dev', 'pandas', opts)
6766 end
6867 end
6968 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/python.rb+11−3
@@ -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'
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)
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