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
26 eventmachine (1.2.7)26 eventmachine (1.2.7)
27 execjs (2.7.0)27 execjs (2.7.0)
28 exifr (1.3.6)28 exifr (1.3.6)
29 ffi (1.11.1)29 ffi (1.12.2)
30 fspath (3.1.2)30 fspath (3.1.2)
31 highline (2.0.3)31 highline (2.0.3)
32 html-pipeline (2.12.0)32 html-pipeline (2.12.0)
assets/javascripts/templates/pages/about_tmpl.coffee+7−7
@@ -22,7 +22,7 @@ app.templates.aboutPage = -> """ · 21 unmodified lines
22 22
23 <h2 class="_block-heading" id="copyright">Copyright and License</h2>23 <h2 class="_block-heading" id="copyright">Copyright and License</h2>
24 <p class="_note">24 <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>
26 This software is licensed under the terms of the Mozilla Public License v2.0.<br>26 This software is licensed under the terms of the Mozilla Public License v2.0.<br>
27 You may obtain a copy of the source code at <a href="https://github.com/freeCodeCamp/devdocs">github.com/freeCodeCamp/devdocs</a>.<br>27 You may obtain a copy of the source code at <a href="https://github.com/freeCodeCamp/devdocs">github.com/freeCodeCamp/devdocs</a>.<br>
28 For more information, see the <a href="https://github.com/freeCodeCamp/devdocs/blob/master/COPYRIGHT">COPYRIGHT</a>28 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
83 83
84credits = [84credits = [
85 [ 'Angular<br>Angular.js',85 [ 'Angular<br>Angular.js',
86 '2010-2019 Google, Inc.',86 '2010-2020 Google, Inc.',
87 'CC BY',87 'CC BY 3.0',
88 'https://creativecommons.org/licenses/by/4.0/'88 'https://creativecommons.org/licenses/by/3.0/'
89 ], [89 ], [
90 'Ansible',90 'Ansible',
91 '2012-2018 Michael DeHaan<br>&copy; 2018–2019 Red Hat, Inc.',91 '2012-2018 Michael DeHaan<br>&copy; 2018–2019 Red Hat, Inc.',
@@ -378,7 +378,7 @@ credits = [ · 286 unmodified lines
378 'https://raw.githubusercontent.com/jekyll/jekyll/master/LICENSE'378 'https://raw.githubusercontent.com/jekyll/jekyll/master/LICENSE'
379 ], [379 ], [
380 'Jest',380 'Jest',
381 'Facebook, Inc. and its affiliates.',381 '2020 Facebook, Inc.',
382 'MIT',382 'MIT',
383 'https://raw.githubusercontent.com/facebook/jest/master/LICENSE'383 'https://raw.githubusercontent.com/facebook/jest/master/LICENSE'
384 ], [384 ], [
@@ -448,7 +448,7 @@ credits = [ · 63 unmodified lines
448 'https://raw.githubusercontent.com/lodash/lodash/master/LICENSE'448 'https://raw.githubusercontent.com/lodash/lodash/master/LICENSE'
449 ], [449 ], [
450 'Lua',450 'Lua',
451 '1994–2017 Lua.org, PUC-Rio',451 '1994–2020 Lua.org, PUC-Rio',
452 'MIT',452 'MIT',
453 'http://www.lua.org/license.html'453 'http://www.lua.org/license.html'
454 ], [454 ], [
@@ -603,7 +603,7 @@ credits = [ · 148 unmodified lines
603 'https://raw.githubusercontent.com/ponylang/ponyc/master/LICENSE'603 'https://raw.githubusercontent.com/ponylang/ponyc/master/LICENSE'
604 ], [604 ], [
605 'PostgreSQL',605 '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',
607 'PostgreSQL',607 'PostgreSQL',
608 'https://www.postgresql.org/about/licence/'608 'https://www.postgresql.org/about/licence/'
609 ], [609 ], [
assets/stylesheets/application.css.scss+1−1
@@ -3,7 +3,7 @@ · 2 unmodified lines
3//= depend_on sprites/docs.json3//= depend_on sprites/docs.json
4 4
5/*!5/*!
6 * Copyright 2013-2019 Thibaut Courouble and other contributors6 * Copyright 2013-2020 Thibaut Courouble and other contributors
7 *7 *
8 * This source code is licensed under the terms of the Mozilla8 * This source code is licensed under the terms of the Mozilla
9 * Public License, v. 2.0, a copy of which may be obtained at:9 * 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
2 class Haxe2 class Haxe
3 class CleanHtmlFilter < Filter3 class CleanHtmlFilter < Filter
4 def call4 def call
5 css('.viewsource', 'hr', 'h1 > small', '.inherited-fields').remove5 css('.viewsource', 'hr', 'h1 > small', '.inherited-fields', '.label-meta').remove
6 6
7 css('h4 + h1').each do |node|7 css('h4 + h1').each do |node|
8 node.after(node.previous_element)8 node.after(node.previous_element)
@@ -28,8 +28,10 @@ module Docs · 19 unmodified lines
28 end28 end
29 29
30 css('.field').each do |node|30 css('.field').each do |node|
31 h3 = node.at_css('h3:not(:empty)')
32 next unless h3.present?
31 link = node.at_css('a[name]')33 link = node.at_css('a[name]')
32 node.at_css('h3:not(:empty)')['id'] = link['name']34 h3['id'] = link['name']
33 link.before(link.children).remove35 link.before(link.children).remove
34 node.before(node.children).remove36 node.before(node.children).remove
35 end37 end
lib/docs/filters/jest/entries.rb+1−0
@@ -19,6 +19,7 @@ module Docs · 18 unmodified lines
19 19
20 def additional_entries20 def additional_entries
21 return [] unless !root_page? && self.type == self.name # api page21 return [] unless !root_page? && self.type == self.name # api page
22 return [] if self.slug == 'environment-variables'
22 23
23 entries = []24 entries = []
24 25
lib/docs/filters/leaflet/clean_html.rb+7−7
@@ -8,25 +8,25 @@ module Docs · 7 unmodified lines
8 node.name = 'h2'8 node.name = 'h2'
9 end9 end
10 10
11 at_css('> h2:first-child').name = 'h1'11 # remove "This reference reflects Leaflet"
12 12 css('p:contains("This reference reflects Leaflet")').each do |node|
13 # remove "This reference reflects Leaflet 1.2.0."
14 css('h1 ~ p').each do |node|
15 node.remove13 node.remove
16 break14 break
17 end15 end
18 16
17 at_css('> h2:first-child').name = 'h1'
18
19 css('section', 'code b', '.accordion', '.accordion-overflow', '.accordion-content').each do |node|19 css('section', 'code b', '.accordion', '.accordion-overflow', '.accordion-content').each do |node|
20 node.before(node.children).remove20 node.before(node.children).remove
21 end21 end
22 22
23 css('pre > code').each do |node|23 css('pre > code').each do |node|
24 node['class'] ||= ''24 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</
26 'html'26 'html'
27 elsif node['class'].include?('lang-css')27 elsif node['class'].include?('lang-css') || node['class'].include?('language-css')
28 'css'28 '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')
30 'javascript'30 'javascript'
31 end31 end
32 node.parent['data-language'] = lang if lang32 node.parent['data-language'] = lang if lang
lib/docs/scrapers/angularjs.rb+7−2
@@ -38,8 +38,8 @@ module Docs · 37 unmodified lines
38 ]38 ]
39 39
40 options[:attribution] = <<-HTML40 options[:attribution] = <<-HTML
41 &copy; 2010&ndash;2018 Google, Inc.<br>41 &copy; 2010&ndash;2020 Google, Inc.<br>
42 Licensed under the Creative Commons Attribution License 4.0.42 Licensed under the Creative Commons Attribution License 3.0.
43 HTML43 HTML
44 44
45 stub '' do45 stub '' do
@@ -49,6 +49,11 @@ module Docs · 3 unmodified lines
49 capybara.execute_script("return document.querySelector('.side-navigation').innerHTML")49 capybara.execute_script("return document.querySelector('.side-navigation').innerHTML")
50 end50 end
51 51
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
52 version '1.7' do57 version '1.7' do
53 self.release = '1.7.8'58 self.release = '1.7.8'
54 self.base_url = "https://code.angularjs.org/#{release}/docs/partials/"59 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
32 32
33 def get_latest_version(opts)33 def get_latest_version(opts)
34 doc = fetch_doc('https://api.dartlang.org/', opts)34 doc = fetch_doc('https://api.dartlang.org/', opts)
35 doc.at_css('footer > span').content.sub(/Dart/, '').strip35 label = doc.at_css('footer > span').content.strip
36 label.sub(/Dart\s*/, '')
36 end37 end
37 end38 end
38end39end
lib/docs/scrapers/gnuplot.rb+3−2
@@ -38,8 +38,9 @@ module Docs · 37 unmodified lines
38 HTML38 HTML
39 39
40 def get_latest_version(opts)40 def get_latest_version(opts)
41 doc = fetch_doc('https://sourceforge.net/projects/gnuplot/files/gnuplot/', opts)41 doc = fetch_doc('http://www.gnuplot.info/download.html', opts)
42 doc.at_css('#files_list > tbody > tr:nth-child(2)')['title']42 label = doc.at_css('h2').content.strip
43 label.sub(/[^0-9.]*/, '')
43 end44 end
44 end45 end
45end46end
lib/docs/scrapers/go.rb+1−1
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Go < UrlScraper2 class Go < UrlScraper
3 self.type = 'go'3 self.type = 'go'
4 self.release = '1.13'4 self.release = '1.15'
5 self.base_url = 'https://golang.org/pkg/'5 self.base_url = 'https://golang.org/pkg/'
6 self.links = {6 self.links = {
7 home: 'https://golang.org/',7 home: 'https://golang.org/',
lib/docs/scrapers/haxe.rb+7−3
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class Haxe < UrlScraper2 class Haxe < UrlScraper
3 self.name = 'Haxe'3 self.name = 'Haxe'
4 self.type = 'simple'4 self.type = 'simple'
5 self.release = '3.4.7'5 self.release = '4.1.3'
6 self.base_url = 'https://api.haxe.org/'6 self.base_url = 'https://api.haxe.org/'
7 7
8 html_filters.push 'haxe/clean_html', 'haxe/entries'8 html_filters.push 'haxe/clean_html', 'haxe/entries'
@@ -10,7 +10,7 @@ module Docs · 1 unmodified line
10 options[:container] = '.span9'10 options[:container] = '.span9'
11 11
12 options[:attribution] = <<-HTML12 options[:attribution] = <<-HTML
13 &copy; 2005&ndash;2018 Haxe Foundation<br>13 &copy; 2005&ndash;2020 Haxe Foundation<br>
14 Licensed under a MIT license.14 Licensed under a MIT license.
15 HTML15 HTML
16 16
@@ -20,7 +20,7 @@ module Docs · 3 unmodified lines
20 code: 'https://github.com/HaxeFoundation/haxe'20 code: 'https://github.com/HaxeFoundation/haxe'
21 }21 }
22 22
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]
24 end24 end
25 25
26 version 'C++' do26 version 'C++' do
@@ -67,6 +67,10 @@ module Docs · 40 unmodified lines
67 self.base_url = 'https://api.haxe.org/python/'67 self.base_url = 'https://api.haxe.org/python/'
68 end68 end
69 69
70 version 'Eval' do
71 self.base_url = 'https://api.haxe.org/eval/'
72 end
73
70 def get_latest_version(opts)74 def get_latest_version(opts)
71 doc = fetch_doc('https://api.haxe.org/', opts)75 doc = fetch_doc('https://api.haxe.org/', opts)
72 label = doc.at_css('.container.main-content h1 > small').content76 label = doc.at_css('.container.main-content h1 > small').content
lib/docs/scrapers/jest.rb+2−2
@@ -1,7 +1,7 @@
1module Docs1module Docs
2 class Jest < UrlScraper2 class Jest < UrlScraper
3 self.type = 'simple'3 self.type = 'simple'
4 self.release = '24.9'4 self.release = '26.6'
5 self.base_url = 'https://jestjs.io/docs/en/'5 self.base_url = 'https://jestjs.io/docs/en/'
6 self.root_path = 'getting-started'6 self.root_path = 'getting-started'
7 self.links = {7 self.links = {
@@ -14,7 +14,7 @@ module Docs · 6 unmodified lines
14 options[:container] = '.docMainWrapper'14 options[:container] = '.docMainWrapper'
15 15
16 options[:attribution] = <<-HTML16 options[:attribution] = <<-HTML
17 &copy; 2019 Facebook, Inc. and its affiliates.<br>17 &copy; 2020 Facebook, Inc.<br>
18 Licensed under the MIT License.18 Licensed under the MIT License.
19 HTML19 HTML
20 20
lib/docs/scrapers/leaflet.rb+5−0
@@ -19,6 +19,11 @@ module Docs · 18 unmodified lines
19 Maps &copy; OpenStreetMap contributors.19 Maps &copy; OpenStreetMap contributors.
20 HTML20 HTML
21 21
22 version '1.7' do
23 self.release = '1.7.1'
24 self.base_url = "https://leafletjs.com/reference-#{release}.html"
25 end
26
22 version '1.6' do27 version '1.6' do
23 self.release = '1.6.0'28 self.release = '1.6.0'
24 self.base_url = "https://leafletjs.com/reference-#{release}.html"29 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
8 options[:skip_links] = true8 options[:skip_links] = true
9 9
10 options[:attribution] = <<-HTML10 options[:attribution] = <<-HTML
11 &copy; 1994&ndash;2017 Lua.org, PUC-Rio.<br>11 &copy; 1994&ndash;2020 Lua.org, PUC-Rio.<br>
12 Licensed under the MIT License.12 Licensed under the MIT License.
13 HTML13 HTML
14 14
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
15 version '5.3' do20 version '5.3' do
16 self.release = '5.3.4'21 self.release = '5.3.6'
17 self.base_url = 'https://www.lua.org/manual/5.3/'22 self.base_url = 'https://www.lua.org/manual/5.3/'
18 end23 end
19 24
lib/docs/scrapers/node.rb+6−1
@@ -23,7 +23,12 @@ module Docs · 22 unmodified lines
23 HTML23 HTML
24 24
25 version do25 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'
27 self.base_url = 'https://nodejs.org/dist/latest-v12.x/docs/api/'32 self.base_url = 'https://nodejs.org/dist/latest-v12.x/docs/api/'
28 end33 end
29 34
lib/docs/scrapers/pandas.rb+1−2
@@ -62,8 +62,7 @@ module Docs · 61 unmodified lines
62 end62 end
63 63
64 def get_latest_version(opts)64 def get_latest_version(opts)
65 doc = fetch_doc('http://pandas.pydata.org/pandas-docs/stable/', opts)65 get_latest_github_release('pandas-dev', 'pandas', opts)
66 doc.at_css('#pandas-documentation').content.scan(/Version: ([0-9.]+)/)[0][0]
67 end66 end
68 end67 end
69end68end
lib/docs/scrapers/postgresql.rb+6−1
@@ -51,10 +51,15 @@ module Docs · 50 unmodified lines
51 /\Aunsupported-features/ ]51 /\Aunsupported-features/ ]
52 52
53 options[:attribution] = <<-HTML53 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>
55 Licensed under the PostgreSQL License.55 Licensed under the PostgreSQL License.
56 HTML56 HTML
57 57
58 version '13' do
59 self.release = '13.1'
60 self.base_url = "https://www.postgresql.org/docs/#{version}/"
61 end
62
58 version '12' do63 version '12' do
59 self.release = '12.1'64 self.release = '12.1'
60 self.base_url = "https://www.postgresql.org/docs/#{version}/"65 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
23 Licensed under the PSF License.23 Licensed under the PSF License.
24 HTML24 HTML
25 25
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
26 version '3.8' do # docs.python.org/3.8/download.html34 version '3.8' do # docs.python.org/3.8/download.html
27 self.release = '3.8.1'35 self.release = '3.8.6'
28 self.base_url = 'https://docs.python.org/3.8/'36 self.base_url = 'https://docs.python.org/3.8/'
29 37
30 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'38 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
31 end39 end
32 40
33 version '3.7' do # docs.python.org/3.7/download.html41 version '3.7' do # docs.python.org/3.7/download.html
34 self.release = '3.7.6'42 self.release = '3.7.9'
35 self.base_url = 'https://docs.python.org/3.7/'43 self.base_url = 'https://docs.python.org/3.7/'
36 44
37 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'45 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'
38 end46 end
39 47
40 version '3.6' do # docs.python.org/3.6/download.html48 version '3.6' do # docs.python.org/3.6/download.html
41 self.release = '3.6.10'49 self.release = '3.6.12'
42 self.base_url = 'https://docs.python.org/3.6/'50 self.base_url = 'https://docs.python.org/3.6/'
43 51
44 html_filters.push 'python/entries_v3', 'sphinx/clean_html', 'python/clean_html'52 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
2 class Sqlite < FileScraper2 class Sqlite < FileScraper
3 self.name = 'SQLite'3 self.name = 'SQLite'
4 self.type = 'sqlite'4 self.type = 'sqlite'
5 self.release = '3.30.1'5 self.release = '3.33.0'
6 self.base_url = 'https://sqlite.org/'6 self.base_url = 'https://sqlite.org/'
7 self.root_path = 'docs.html'7 self.root_path = 'docs.html'
8 self.initial_paths = %w(keyword_index.html)8 self.initial_paths = %w(keyword_index.html)
public/icons/docs/postgresql/SOURCE+1−1
@@ -1 +1 @@
1http://www.postgresql.org/about/press/presskit93/#logos1https://www.postgresql.org/about/press/presskit93/#logos