From b32c719ce41957c4487e5da5f5b25454d4768cde Mon Sep 17 00:00:00 2001 From: Enoc Date: Fri, 19 Feb 2021 00:28:51 -0600 Subject: [PATCH 0001/2191] Add overloaded methods to openjdk11 & 8 --- lib/docs/filters/openjdk/entries.rb | 31 +++++++---------------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/lib/docs/filters/openjdk/entries.rb b/lib/docs/filters/openjdk/entries.rb index 753c411e8e..62ab7bbe69 100644 --- a/lib/docs/filters/openjdk/entries.rb +++ b/lib/docs/filters/openjdk/entries.rb @@ -27,34 +27,17 @@ def get_type end def additional_entries - # Only keep the first found entry with a unique name, - # i.e. overloaded methods are skipped in index - if version == '8' || version == '8 Gui' || version == '8 Web' - css('a[name$=".summary"]').each_with_object({}) do |summary, entries| - next if summary['name'].include?('nested') || summary['name'].include?('constructor') || - summary['name'].include?('field') || summary['name'].include?('constant') - summary.parent.css('.memberNameLink a').each do |node| - name = node.parent.parent.content.strip - name.sub! %r{\(.+?\)}m, '()' - id = node['href'].remove(%r{.*#}) - entries[name] ||= ["#{self.name}.#{name}", id] - end - end.values + entries = [] - else - css('a[id$=".summary"]').each_with_object({}) do |summary, entries| - next if summary['id'].include?('nested') || summary['id'].include?('constructor') || - summary['id'].include?('field') || summary['id'].include?('constant') - summary.parent.css('.memberNameLink a').each do |node| - name = node.parent.parent.content.strip - name.sub! %r{\(.+?\)}m, '()' - id = node['href'].remove(%r{.*#}) - entries[name] ||= ["#{self.name}.#{name}", id] - end - end.values + css('.memberNameLink a').each do |node| + next if !(node['href'].match?(/\(/)) # skip non-methods + entries << [self.name + '.' + node.content + '()', slug.downcase + node['href']] end + entries + end + end end end From cc32a355d732b631805530a57dfbd8ff49ee1764 Mon Sep 17 00:00:00 2001 From: Vadim Kazakov Date: Fri, 19 Feb 2021 11:56:01 -0700 Subject: [PATCH 0002/2191] update Ember docs to latest version * fix ember parsing to handle current guides/docs --- .../templates/pages/about_tmpl.coffee | 2 +- lib/docs/filters/ember/clean_html.rb | 22 ++++--- lib/docs/filters/ember/entries.rb | 58 ++++++++----------- lib/docs/scrapers/ember.rb | 37 +++++++----- 4 files changed, 60 insertions(+), 59 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index a868b281c0..0ff146b586 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -273,7 +273,7 @@ credits = [ 'https://www.gnu.org/licenses/gpl-3.0.html' ], [ 'Ember.js', - '2017 Yehuda Katz, Tom Dale and Ember.js contributors', + '2020 Yehuda Katz, Tom Dale and Ember.js contributors', 'MIT', 'https://raw.githubusercontent.com/emberjs/ember.js/master/LICENSE' ], [ diff --git a/lib/docs/filters/ember/clean_html.rb b/lib/docs/filters/ember/clean_html.rb index 4f210ce252..031a7951c6 100644 --- a/lib/docs/filters/ember/clean_html.rb +++ b/lib/docs/filters/ember/clean_html.rb @@ -2,8 +2,14 @@ module Docs class Ember class CleanHtmlFilter < Filter def call - css('hr', '.edit-page').remove + css('hr', '.edit-page', '.heading__link__edit', 'aside').remove + base_url.host.start_with?('api') ? api : guide + + doc + end + + def api # Remove code highlighting css('.highlight').each do |node| node.before(%(
#{node.at_css('thead').content.strip}
)) if node.at_css('thead') @@ -13,12 +19,6 @@ def call node['data-language'] = node['data-language'].sub(/(hbs|handlebars)/, 'html') end - base_url.path.start_with?('/api') ? api : guide - - doc - end - - def api css('h1 .access').each do |node| node.replace(" (#{node.content})") end @@ -72,7 +72,13 @@ def api end def guide - @doc = at_css('article') + # Remove code highlighting + css('.filename').each do |node| + node.content = node.at_css('pre code').content + node.name = 'pre' + node['data-language'] = node['class'][/(javascript|js|html|hbs|handlebars)/, 1] + node['data-language'] = node['data-language'].sub(/(hbs|handlebars)/, 'html') + end if root_page? at_css('h1').content = 'Ember.js' diff --git a/lib/docs/filters/ember/entries.rb b/lib/docs/filters/ember/entries.rb index 39125adc94..e896afad63 100644 --- a/lib/docs/filters/ember/entries.rb +++ b/lib/docs/filters/ember/entries.rb @@ -2,60 +2,50 @@ module Docs class Ember class EntriesFilter < Docs::EntriesFilter def get_name - if base_url.path.start_with?('/api') - name = at_css('h1').child.content.strip - # Remove "Ember." prefix if the next character is uppercase - name.sub! %r{\AEmber\.([A-Z])(?!EATURES)}, '\1' + name = at_css('h1').content + if base_url.host.start_with?('api') + name.gsub!('Package', '') + name.gsub!('Class', '') + name.strip! name << ' (methods)' if subpath.end_with?('/methods') name << ' (properties)' if subpath.end_with?('/properties') name << ' (events)' if subpath.end_with?('/events') - name - else - name = at_css('article h1').content.remove('Edit Page').strip - name = at_css('li.toc-level-0.selected > a').content if name == 'Introduction' - name end + name end def get_type - if base_url.path.start_with?('/api') + if base_url.host.start_with?('api') name = self.name.remove(/ \(.*/) - if name =~ /\A[a-z\-]+\z/ - 'Modules' - elsif name.start_with?('DS') - 'Data' - elsif name.start_with?('RSVP') - 'RSVP' - elsif name.start_with?('Test') - 'Test' - elsif name.start_with?('Ember') - name.split('.')[0..1].join('.') + if name.start_with?('@') || name == 'rsvp' + 'Packages' + elsif name == 'Function' + 'Functions' else - name.split('.').first + 'Classes' end else - if node = at_css('li.toc-level-0.selected > a') - "Guide: #{node.content.strip}" - else - 'Guide' - end + 'Guide' end end + def include_default_entry? + return false if name == 'Function' # these should be included in the corresponding Package page + + super + end + def additional_entries - return [] unless base_url.path.start_with?('/api') + return [] unless base_url.host.start_with?('api') css('section').each_with_object [] do |node, entries| - next unless heading = node.at_css('h3[data-anchor]') - next if node.at_css('.github-link').content.include?('Inherited') + next unless heading = node.at_css('> h3[data-anchor]') + name = heading.at_css('span').content.strip - # Give their own type to "Ember.platform", "Ember.run", etc. - if self.type != 'Data' && name.include?('.') - type = "#{self.name.remove(/ \(.*/)}.#{name.split('.').first}" - end + next if name.start_with?('_') # exclude private methods/properties - name.prepend "#{self.name.remove(/ \(.*/)}." + name.prepend "#{self.name.remove(/ \(.*/)}." unless self.name == 'Function' name << '()' if node['class'].include?('method') name << ' (event)' if node['class'].include?('event') diff --git a/lib/docs/scrapers/ember.rb b/lib/docs/scrapers/ember.rb index 6f853bb9e3..5563b5224f 100644 --- a/lib/docs/scrapers/ember.rb +++ b/lib/docs/scrapers/ember.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Docs class Ember < UrlScraper include MultipleBaseUrls @@ -5,11 +7,11 @@ class Ember < UrlScraper self.name = 'Ember.js' self.slug = 'ember' self.type = 'ember' - self.release = '2.15.0' - self.base_urls = [ - 'https://guides.emberjs.com/v2.15.0/', - 'https://emberjs.com/api/ember/2.15/', - 'https://emberjs.com/api/ember-data/2.14/' + self.release = '3.25.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/ ] self.links = { home: 'https://emberjs.com/', @@ -21,10 +23,10 @@ class Ember < UrlScraper options[:trailing_slash] = false options[:container] = ->(filter) do - if filter.base_url.path.start_with?('/api') - 'main article' - else + if filter.base_url.host.start_with?('api') 'main' + else + 'main article' end end @@ -39,26 +41,29 @@ class Ember < UrlScraper options[:skip_patterns] = [ /\._/, /contributing/, - /classes\/String/, - /namespaces\/Ember/, - /namespaces\/DS/ + /tutorial/, + /js-primer/, + /in-depth-topics$/, + /managing-dependencies$/ ] options[:attribution] = <<-HTML - © 2017 Yehuda Katz, Tom Dale and Ember.js contributors
+ © 2020 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 + def initial_urls %w( - https://guides.emberjs.com/v2.15.0/ - https://emberjs.com/api/ember/2.15/classes/Ember - https://emberjs.com/api/ember-data/2.14/classes/DS + https://guides.emberjs.com/v3.25.0/ + https://api.emberjs.com/ember/3.25/ + https://api.emberjs.com/ember-data/3.25/ ) end def get_latest_version(opts) - doc = fetch_doc('https://emberjs.com/api/ember/release', opts) + doc = fetch_doc('https://api.emberjs.com/ember/release', opts) doc.at_css('.sidebar > .select-container .ember-power-select-selected-item').content.strip end end From 8f9d01c3b8b31c29996f0ee4b6c7bcd21250825c Mon Sep 17 00:00:00 2001 From: Enoc Date: Fri, 19 Feb 2021 23:25:34 -0600 Subject: [PATCH 0003/2191] Fix cleant_html filter for openjdk 8 --- lib/docs/filters/openjdk/entries.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/docs/filters/openjdk/entries.rb b/lib/docs/filters/openjdk/entries.rb index 62ab7bbe69..b11fdca631 100644 --- a/lib/docs/filters/openjdk/entries.rb +++ b/lib/docs/filters/openjdk/entries.rb @@ -30,8 +30,15 @@ def additional_entries entries = [] css('.memberNameLink a').each do |node| - next if !(node['href'].match?(/\(/)) # skip non-methods - entries << [self.name + '.' + node.content + '()', slug.downcase + node['href']] + next unless node['href'].match?(/[-(]/) # skip non-methods + + if (version=='8' || version == '8 GUI' || version == '8 Web') + id = node['href'].gsub(/.*#/, '') + else + id = slug.downcase + node['href'] + end + + entries << [self.name + '.' + node.content + '()', id] end entries From 4d885efd716a2a798248234dc1c1929605500193 Mon Sep 17 00:00:00 2001 From: Enoc Date: Sat, 20 Feb 2021 01:12:26 -0600 Subject: [PATCH 0004/2191] Do not show shortcut help when typing '?' in the search box --- assets/javascripts/app/shortcuts.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/app/shortcuts.coffee b/assets/javascripts/app/shortcuts.coffee index 5755a71dff..7cdfe9e4cd 100644 --- a/assets/javascripts/app/shortcuts.coffee +++ b/assets/javascripts/app/shortcuts.coffee @@ -37,7 +37,7 @@ class app.Shortcuts return onKeypress: (event) => - return if @buggyEvent(event) + return if @buggyEvent(event) or (event.charCode == 63 and document.activeElement.tagName == 'INPUT') unless event.ctrlKey or event.metaKey result = @handleKeypressEvent event event.preventDefault() if result is false From 6f1a9aab21feb3d5996b565d4ca47bf0ee59fe38 Mon Sep 17 00:00:00 2001 From: dohsimpson Date: Sat, 20 Feb 2021 11:50:37 -0500 Subject: [PATCH 0005/2191] Added Documentation for React-bootstrap --- .../filters/react_bootstrap/clean_html.rb | 17 +++++++++ lib/docs/filters/react_bootstrap/entries.rb | 23 ++++++++++++ lib/docs/scrapers/react_bootstrap.rb | 34 ++++++++++++++++++ public/icons/docs/react_bootstrap/16.png | Bin 0 -> 642 bytes public/icons/docs/react_bootstrap/16@2x.png | Bin 0 -> 1445 bytes public/icons/docs/react_bootstrap/SOURCE | 1 + 6 files changed, 75 insertions(+) create mode 100644 lib/docs/filters/react_bootstrap/clean_html.rb create mode 100644 lib/docs/filters/react_bootstrap/entries.rb create mode 100644 lib/docs/scrapers/react_bootstrap.rb create mode 100644 public/icons/docs/react_bootstrap/16.png create mode 100644 public/icons/docs/react_bootstrap/16@2x.png create mode 100644 public/icons/docs/react_bootstrap/SOURCE diff --git a/lib/docs/filters/react_bootstrap/clean_html.rb b/lib/docs/filters/react_bootstrap/clean_html.rb new file mode 100644 index 0000000000..6f73ab4680 --- /dev/null +++ b/lib/docs/filters/react_bootstrap/clean_html.rb @@ -0,0 +1,17 @@ +module Docs + class ReactBootstrap + class CleanHtmlFilter < Filter + def call + css('.flex-column.d-flex').remove + css('header').remove + css('.bs-example').remove + css('.position-relative').each do |node| + code = node.at_css('textarea') + code.name = 'pre' + code['style'] = code['style'] + '; border: solid 1px;' + end + doc + end + end + end +end diff --git a/lib/docs/filters/react_bootstrap/entries.rb b/lib/docs/filters/react_bootstrap/entries.rb new file mode 100644 index 0000000000..45df5da33a --- /dev/null +++ b/lib/docs/filters/react_bootstrap/entries.rb @@ -0,0 +1,23 @@ +module Docs + class ReactBootstrap + class EntriesFilter < Docs::EntriesFilter + def get_name + name = at_css('#rb-docs-content h1, #rb-docs-content h2').content + if name.end_with? '#' + name = name[0..-2] + end + name + end + + def get_type + type = slug.split('/')[0..-2].join(': ') + if type == '' + type = slug.split('/').join('') + end + type.gsub!('-', ' ') + type.split.map(&:capitalize).join(' ') + type + end + end + end +end diff --git a/lib/docs/scrapers/react_bootstrap.rb b/lib/docs/scrapers/react_bootstrap.rb new file mode 100644 index 0000000000..9f60e855c8 --- /dev/null +++ b/lib/docs/scrapers/react_bootstrap.rb @@ -0,0 +1,34 @@ +module Docs + class ReactBootstrap < UrlScraper + self.slug = 'react_bootstrap' + self.type = 'simple' + self.release = '1.5.0' + self.base_url = 'https://react-bootstrap.github.io/' + + self.links = { + home: 'https://react-bootstrap.github.io', + code: 'https://github.com/react-bootstrap/react-bootstrap' + } + + html_filters.push 'react_bootstrap/entries', 'react_bootstrap/clean_html' + + options[:skip] = %w( + react-overlays/ + ) + + options[:replace_paths] = { + } + + options[:trailing_slash] = true + + options[:attribution] = <<-HTML + © 2014–present Stephen J. Collings, Matthew Honnibal, Pieter Vanderwerff
+ Licensed under the MIT License (MIT). + HTML + + def get_latest_version(opts) + doc = fetch_doc('https://react-bootstrap.github.io/', opts) + doc.at_css('#t-version>a').content.split()[0].strip[1..-1] + end + end +end diff --git a/public/icons/docs/react_bootstrap/16.png b/public/icons/docs/react_bootstrap/16.png new file mode 100644 index 0000000000000000000000000000000000000000..99a688b9a15414f414bac9849baabc3dabf871aa GIT binary patch literal 642 zcmV-|0)737P)@6b{|%)F=K^YQFT=;%T9FNc|T3usSn^9pB+;bKkcQe0kKZ34qY5 z=M^|zzg@@&<}J=jf?Lr(*XH!G`OKY{#(Qh=G`8|qfe@2Y2JrR;vuDg=Z7{VYmK)s= zeEBtK6|kpNk3+2j_8Tc|>8-|PD3%bTz#y=JOnb{68U|Q5?2ar?BevG$06kTA1^KA) zM(_lp04hd@6>{3#N(vS%QY=&Hw-a literal 0 HcmV?d00001 diff --git a/public/icons/docs/react_bootstrap/16@2x.png b/public/icons/docs/react_bootstrap/16@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..368fdaeca8b571f5b55ea5dde1a62217add1624d GIT binary patch literal 1445 zcmV;W1zP%vP)L0lvf$Xf6w^_W<{-(OKU5z7sb>zR##hzG18r-f~}(e zlvJBkV%nM*O{no&bdl6vOdGT&8XGbFgEp-Z8)HbtHY^MTgQg~kO>MPwcV>YNDi>Km zmYw;|;~(?QGVJb5cWZr;nVk1~FVAz%ck<3Vq6OC2$?;O`v$zwO3x3Jy7gdGF_O|O} ztK8{At(-lj^kKo*rf?m%{ncVevIWWi7Xd2|`m#zc4gqPg&g5O`I(*T9Cud&n3LLUY&-WN!|V{xh#kprh#M5!oMrzN1L zoPJa0`?jAicIH0R=*#ZLCX01hkrRe_uen_qF>I-fhV}Igg=Uc?Sr(JdM1`UI^jN$HAlEcX9L5mj zMU%*fe4S$4REyJZz}Er`v+C;|;`0}kvhuR7xA;0RrWlC9?K zF2|Qtj%Q;M|0e0zKqqiMC48oSnWlq$HF^4C3KmQfu>6qUTPUSl9O9ma$L|JaH^vF> z+tZ=_(DcmTMa+7Z_=Eb~R+pPBvF`DepJGa(1~ z$jg2!@TSbHR3pPVfWn}c#cKQ&P`_};437#%fQNtuF_4$J48V%(wqBEr%~U`>pMKI= z>oM97GhUue3c zlE2X3u6+Oj^Kk%~4UOdE1!LGUZdluPb?Lywm>J?M*5zyLq$YszF4p#%sbT7_I77@g zJbbJie_AUkwgFgdC=B|BiO~*m?FGZ1T3&K@tLnBtpD4U@;>QXf1)gdMy=%pgug@uj zZ##`Q0}D~y(L0#lpRa}ow=dQC)x(~1W-Q*4B~*c2g6{)9(L%z}9qk&J!Z85sEtKOt z>{S4%<85K*VjW2dtAHUOXYt+9S+P_orR&dB;+?=Hz?k4G8Ntnk!OE&ur_l0*Vtll| zmgxxqdpfkgqVRsqFEiiUf%`E(%Iu>Np9E^{S>chJUU6finl@rCd9}g3V!RXXZP&?N zoyo0s=ms9AcI0&|5qbi6M`m9&IxB8?JpzI+>ag=B{T38E_2*q3$>;3&v4+QofjA-b z8$Cn5Zl(g{^y&t4r1?Y?v@lzq+0`DF*x}7-60QZ`0vrT#it(u%U-jFjOWtGWu+}xG zd9mp{;HX7e^C}^^2&2FYzzZt|{7MXQAMmbf@Z*hxr3l?UJ-o4x{Fh@NtC-r1hp z4C=3GBxzQs2~H`7Tc2I56Rn2Q;{cBF(uux}b|{q6d%?XkBt9c}A|-V1?9v`+F_ebr zAxlVlU(cZD7CZHCfaN8>XZMgF0aj+AFIwSVQ$5kFmSV0#;8@!j2e&WP`HOtbl6r={ zKx6R`&<5&9ehzCH_|s57ay`>l(QVnN^}5jd&uKY*Q07}xxJD3tH!KN1-Y8A%4{w}+ zHFk2m9PcsQ1uPW29O3CChM)I$=^y_KaUK5!=r%jj*n#1$00000NkvXXu0mjfZB@x- literal 0 HcmV?d00001 diff --git a/public/icons/docs/react_bootstrap/SOURCE b/public/icons/docs/react_bootstrap/SOURCE new file mode 100644 index 0000000000..1dd0687aa8 --- /dev/null +++ b/public/icons/docs/react_bootstrap/SOURCE @@ -0,0 +1 @@ +https://github.com/react-bootstrap/react-bootstrap/blob/master/www/static/logo.svg From 5c99f2cf24228941544aa5c744e8709e983b5c00 Mon Sep 17 00:00:00 2001 From: Vadim Kazakov Date: Sat, 20 Feb 2021 09:49:16 -0700 Subject: [PATCH 0006/2191] update Ember docs * better organization of items (put classes at top level) * add both v3 and v2 docs --- lib/docs/filters/ember/clean_html.rb | 2 +- lib/docs/filters/ember/entries.rb | 14 ++++++++------ lib/docs/scrapers/ember.rb | 23 ++++++++++++++--------- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/lib/docs/filters/ember/clean_html.rb b/lib/docs/filters/ember/clean_html.rb index 031a7951c6..d33547af19 100644 --- a/lib/docs/filters/ember/clean_html.rb +++ b/lib/docs/filters/ember/clean_html.rb @@ -2,7 +2,7 @@ module Docs class Ember class CleanHtmlFilter < Filter def call - css('hr', '.edit-page', '.heading__link__edit', 'aside').remove + css('hr', '.edit-page', '.heading__link__edit', 'aside', '.old-version-warning').remove base_url.host.start_with?('api') ? api : guide diff --git a/lib/docs/filters/ember/entries.rb b/lib/docs/filters/ember/entries.rb index e896afad63..4c46927282 100644 --- a/lib/docs/filters/ember/entries.rb +++ b/lib/docs/filters/ember/entries.rb @@ -17,15 +17,17 @@ def get_name def get_type if base_url.host.start_with?('api') name = self.name.remove(/ \(.*/) - if name.start_with?('@') || name == 'rsvp' - 'Packages' - elsif name == 'Function' - 'Functions' + if name == 'Function' + '3. Functions' + elsif at_css('h1').content.start_with?('Package') + '2. Packages' else - 'Classes' + name = name.remove(' (methods)').remove(' (properties)').remove(' (events)') + # Reference gets sorted to the top by default, need to have it with other classes so add a zero width space + name == 'Reference' ? 'Reference​' : name end else - 'Guide' + '1. Guide' end end diff --git a/lib/docs/scrapers/ember.rb b/lib/docs/scrapers/ember.rb index 5563b5224f..c5c3ac728d 100644 --- a/lib/docs/scrapers/ember.rb +++ b/lib/docs/scrapers/ember.rb @@ -7,12 +7,6 @@ class Ember < UrlScraper self.name = 'Ember.js' self.slug = 'ember' self.type = 'ember' - self.release = '3.25.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/ - ] self.links = { home: 'https://emberjs.com/', code: 'https://github.com/emberjs/ember.js' @@ -54,12 +48,23 @@ class Ember < UrlScraper options[:decode_and_clean_paths] = true # handle paths like @ember/application - def initial_urls - %w( + version '3' do + self.release = '3.25.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/ - ) + ] + end + + version '2' do + self.release = '2.18.0' + self.base_urls = %w[ + https://guides.emberjs.com/v2.18.0/ + https://api.emberjs.com/ember/2.18/ + https://api.emberjs.com/ember-data/2.18/ + ] + options[:skip_patterns].push(/handlebars-basics$/) end def get_latest_version(opts) From ffd8023a2c10ba766b7d21e892e376000b25deb2 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Mon, 22 Feb 2021 20:38:05 +0100 Subject: [PATCH 0007/2191] openjdk 8: add base_url --- lib/docs/scrapers/openjdk.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/docs/scrapers/openjdk.rb b/lib/docs/scrapers/openjdk.rb index 5680190f61..bb45343221 100644 --- a/lib/docs/scrapers/openjdk.rb +++ b/lib/docs/scrapers/openjdk.rb @@ -59,6 +59,7 @@ class Openjdk < FileScraper version '8' do self.release = '8' + self.base_url = 'https://docs.oracle.com/javase/8/docs/api/' html_filters.push OLDFILTERS @@ -90,6 +91,7 @@ class Openjdk < FileScraper version '8 GUI' do self.release = '8' + self.base_url = 'https://docs.oracle.com/javase/8/docs/api/' html_filters.push OLDFILTERS @@ -102,6 +104,7 @@ class Openjdk < FileScraper version '8 Web' do self.release = '8' + self.base_url = 'https://docs.oracle.com/javase/8/docs/api/' html_filters.push OLDFILTERS From 6b2ed83fd9145f5746fe029d51f67af01e0a819d Mon Sep 17 00:00:00 2001 From: Doh Date: Mon, 22 Feb 2021 23:25:53 -0500 Subject: [PATCH 0008/2191] Update lib/docs/filters/react_bootstrap/entries.rb Co-authored-by: Simon Legner --- lib/docs/filters/react_bootstrap/entries.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/filters/react_bootstrap/entries.rb b/lib/docs/filters/react_bootstrap/entries.rb index 45df5da33a..e0cc3d739b 100644 --- a/lib/docs/filters/react_bootstrap/entries.rb +++ b/lib/docs/filters/react_bootstrap/entries.rb @@ -15,7 +15,7 @@ def get_type type = slug.split('/').join('') end type.gsub!('-', ' ') - type.split.map(&:capitalize).join(' ') + type = type.split.map(&:capitalize).join(' ') type end end From 0339b078a5478183ea2ef681d47b5598df38a7e2 Mon Sep 17 00:00:00 2001 From: dohsimpson Date: Tue, 23 Feb 2021 00:20:46 -0500 Subject: [PATCH 0009/2191] Fix styling and added licnese to about page --- assets/javascripts/templates/pages/about_tmpl.coffee | 5 +++++ lib/docs/filters/react_bootstrap/clean_html.rb | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index a868b281c0..d231e7174e 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -686,6 +686,11 @@ credits = [ '2013-present Facebook Inc.', 'MIT', 'https://raw.githubusercontent.com/facebook/react/master/LICENSE' + ], [ + 'React Bootstrap', + '2014-present Stephen J. Collings, Matthew Honnibal, Pieter Vanderwerff', + 'MIT', + 'https://raw.githubusercontent.com/react-bootstrap/react-bootstrap/master/LICENSE' ], [ 'ReactiveX', 'ReactiveX contributors', diff --git a/lib/docs/filters/react_bootstrap/clean_html.rb b/lib/docs/filters/react_bootstrap/clean_html.rb index 6f73ab4680..a8117a9ada 100644 --- a/lib/docs/filters/react_bootstrap/clean_html.rb +++ b/lib/docs/filters/react_bootstrap/clean_html.rb @@ -5,10 +5,12 @@ def call css('.flex-column.d-flex').remove css('header').remove css('.bs-example').remove - css('.position-relative').each do |node| - code = node.at_css('textarea') - code.name = 'pre' - code['style'] = code['style'] + '; border: solid 1px;' + + css('.position-relative pre').each do |node| + # node.content = node.content + node.remove_attribute('style') + node['data-language'] = 'jsx' + node.parent.replace(node) end doc end From 306b264d763ce96d9ef47c2305f54727cc6f2214 Mon Sep 17 00:00:00 2001 From: dohsimpson Date: Tue, 23 Feb 2021 00:53:29 -0500 Subject: [PATCH 0010/2191] Remove unnecessary classes --- lib/docs/filters/react_bootstrap/clean_html.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/docs/filters/react_bootstrap/clean_html.rb b/lib/docs/filters/react_bootstrap/clean_html.rb index a8117a9ada..f7bd995d9b 100644 --- a/lib/docs/filters/react_bootstrap/clean_html.rb +++ b/lib/docs/filters/react_bootstrap/clean_html.rb @@ -12,6 +12,14 @@ def call node['data-language'] = 'jsx' node.parent.replace(node) end + + css('div, main, pre, h1, h2, h3, h4, h5, h6, a, p').each do |node| + node.delete 'class' + end + + css('#___gatsby, #gatsby-focus-wrapper').each do |node| + node.delete 'id' + end doc end end From 8ceba764dd6c0913b8e6ad0789623979ac213239 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 26 Feb 2021 08:24:59 +0100 Subject: [PATCH 0011/2191] react_bootstrap: clean html --- lib/docs/filters/react_bootstrap/clean_html.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/docs/filters/react_bootstrap/clean_html.rb b/lib/docs/filters/react_bootstrap/clean_html.rb index f7bd995d9b..761e96172d 100644 --- a/lib/docs/filters/react_bootstrap/clean_html.rb +++ b/lib/docs/filters/react_bootstrap/clean_html.rb @@ -2,12 +2,14 @@ module Docs class ReactBootstrap class CleanHtmlFilter < Filter def call + @doc = doc.at_css('main') + css('.flex-column.d-flex').remove css('header').remove css('.bs-example').remove css('.position-relative pre').each do |node| - # node.content = node.content + node.content = node.children.map(&:content).join("\n") node.remove_attribute('style') node['data-language'] = 'jsx' node.parent.replace(node) @@ -16,6 +18,10 @@ def call css('div, main, pre, h1, h2, h3, h4, h5, h6, a, p').each do |node| node.delete 'class' end + css('h1, h2, h3, h4, h5, h6').each do |node| + node.css('a').remove + node.content = node.content + end css('#___gatsby, #gatsby-focus-wrapper').each do |node| node.delete 'id' From 11d3a4e1f0a7ff20f05355af00c2def0fbaf4808 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 26 Feb 2021 08:25:59 +0100 Subject: [PATCH 0012/2191] react_bootstrap: set doc name --- lib/docs/scrapers/react_bootstrap.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/docs/scrapers/react_bootstrap.rb b/lib/docs/scrapers/react_bootstrap.rb index 9f60e855c8..80df23124e 100644 --- a/lib/docs/scrapers/react_bootstrap.rb +++ b/lib/docs/scrapers/react_bootstrap.rb @@ -1,5 +1,6 @@ module Docs class ReactBootstrap < UrlScraper + self.name = 'React Bootstrap' self.slug = 'react_bootstrap' self.type = 'simple' self.release = '1.5.0' From b425f182152850153700017c38868420ec29dff2 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 26 Feb 2021 08:26:38 +0100 Subject: [PATCH 0013/2191] Update news.json --- assets/javascripts/news.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/javascripts/news.json b/assets/javascripts/news.json index 6e5d9eacc5..02e3d67d57 100644 --- a/assets/javascripts/news.json +++ b/assets/javascripts/news.json @@ -1,4 +1,8 @@ [ + [ + "2021-02-26", + "New documentation: React Bootstrap" + ], [ "2021-01-03", "New documentation: OCaml" From 6f7ff4ddd365df598dcb097a548fe88a7c16517a Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 2 Mar 2021 08:26:01 +0100 Subject: [PATCH 0014/2191] Update Fish documentation (3.2.0) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/filters/fish/entries_sphinx.rb | 6 ++++-- lib/docs/scrapers/fish.rb | 10 +++++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 52b97fb782..3d155409c3 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -303,7 +303,7 @@ credits = [ 'https://raw.githubusercontent.com/falconry/falcon/master/LICENSE' ], [ 'Fish', - '2005-2009 Axel Liljencrantz', + '2005-2009 Axel Liljencrantz, 2009-2020 fish-shell contributors', 'GPLv2', 'https://fishshell.com/docs/current/license.html' ], [ diff --git a/lib/docs/filters/fish/entries_sphinx.rb b/lib/docs/filters/fish/entries_sphinx.rb index f4fc939d4e..5034182388 100755 --- a/lib/docs/filters/fish/entries_sphinx.rb +++ b/lib/docs/filters/fish/entries_sphinx.rb @@ -4,6 +4,8 @@ class EntriesSphinxFilter < Docs::EntriesFilter def get_name if slug == 'faq' 'FAQ' + elsif slug == 'fish_for_bash_users' + 'Fish for Bash Users' elsif slug.starts_with?('cmds/') slug.split('/').last else @@ -12,9 +14,9 @@ def get_name end def get_type - if root_page? || slug == 'faq' + if root_page? || slug == 'faq' || slug == 'completions' || slug == 'fish_for_bash_users' 'Manual' - elsif slug.starts_with?('cmds') + elsif slug.starts_with?('cmds') || slug == 'commands' 'Commands' elsif slug == 'tutorial' 'Tutorial' diff --git a/lib/docs/scrapers/fish.rb b/lib/docs/scrapers/fish.rb index 175c95e545..08f240e9db 100644 --- a/lib/docs/scrapers/fish.rb +++ b/lib/docs/scrapers/fish.rb @@ -12,10 +12,18 @@ class Fish < UrlScraper # https://fishshell.com/docs/current/license.html options[:attribution] = <<-HTML - © 2019 fish-shell developers
+ © 2020 fish-shell developers
Licensed under the GNU General Public License, version 2. HTML + version '3.2' do + self.release = '3.2.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.1' do self.release = '3.1.2' self.base_url = "https://fishshell.com/docs/#{version}/" From 1f6d31933469b0ea44fd0b821ae0f7a5041f81ed Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 2 Mar 2021 09:11:22 +0100 Subject: [PATCH 0015/2191] Update OCaml documentation (4.12) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/filters/ocaml/entries.rb | 2 +- lib/docs/scrapers/ocaml.rb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 3d155409c3..0fa37258a5 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -578,7 +578,7 @@ credits = [ 'https://raw.githubusercontent.com/numpy/numpy/master/LICENSE.txt' ], [ 'OCaml', - '1995-2020 Inria', + '1995-2021 INRIA', 'CC BY-SA', 'https://ocaml.org/docs/' ], [ diff --git a/lib/docs/filters/ocaml/entries.rb b/lib/docs/filters/ocaml/entries.rb index 068faeba9b..088d1d3c89 100644 --- a/lib/docs/filters/ocaml/entries.rb +++ b/lib/docs/filters/ocaml/entries.rb @@ -2,7 +2,7 @@ module Docs class Ocaml class EntriesFilter < Docs::EntriesFilter def get_name - title = context[:html_title].gsub(/\u00A0/, " ") + title = context[:html_title].gsub(/[[:space:]\u200d]+/, " ") title = title.split.join(" ").strip title.gsub!(/^Chapter /, "") diff --git a/lib/docs/scrapers/ocaml.rb b/lib/docs/scrapers/ocaml.rb index bd98222e79..9f5cab47fc 100644 --- a/lib/docs/scrapers/ocaml.rb +++ b/lib/docs/scrapers/ocaml.rb @@ -3,7 +3,7 @@ class Ocaml < FileScraper self.name = 'OCaml' self.type = 'ocaml' self.root_path = 'index.html' - self.release = '4.11' + self.release = '4.12' self.base_url = "https://www.ocaml.org/releases/#{self.release}/htmlman/" self.links = { home: 'https://ocaml.org/', @@ -23,7 +23,7 @@ class Ocaml < FileScraper ] options[:attribution] = <<-HTML - © INRIA 1995-2020. + © 1995-2021 INRIA. HTML def get_latest_version(opts) From 6109a773c4ad96a2c4d3502551a4c74c13ce218a Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 2 Mar 2021 09:13:38 +0100 Subject: [PATCH 0016/2191] Update file-scrapers.md for ocaml --- docs/file-scrapers.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/file-scrapers.md b/docs/file-scrapers.md index 81451dce08..7c96f7bcbe 100644 --- a/docs/file-scrapers.md +++ b/docs/file-scrapers.md @@ -127,9 +127,8 @@ https://ocaml.org/releases/4.11/ocaml-4.11-refman-html.tar.gz and extract it as `/path/to/devdocs/docs/ocaml`: ```sh -cd /path/to/devdocs/docs -wget https://ocaml.org/releases/4.11/ocaml-4.11-refman-html.tar.gz -tar xf ocaml-4.10-refman-html.tar.gz --transform 's/htmlman/ocaml/' +curl https://ocaml.org/releases/$VERSION/ocaml-$VERSION-refman-html.tar.gz | \ +tar xz --transform 's/htmlman/ocaml/' --directory docs/ ``` ## OpenJDK From a86b914bd742b402db3580cac46ac7e14bfea834 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 2 Mar 2021 09:15:09 +0100 Subject: [PATCH 0017/2191] Update TypeScript documentation (4.2.2) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/typescript.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 0fa37258a5..4d4fbd2a78 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -818,7 +818,7 @@ credits = [ 'https://twig.symfony.com/license' ], [ 'TypeScript', - '2012-2020 Microsoft', + '2012-2021 Microsoft', 'Apache', 'https://raw.githubusercontent.com/Microsoft/TypeScript-Handbook/master/LICENSE' ], [ diff --git a/lib/docs/scrapers/typescript.rb b/lib/docs/scrapers/typescript.rb index df5dc22e90..6b2c2cb418 100644 --- a/lib/docs/scrapers/typescript.rb +++ b/lib/docs/scrapers/typescript.rb @@ -4,7 +4,7 @@ class Typescript < UrlScraper self.name = 'TypeScript' self.type = 'simple' - self.release = '4.1.3' + self.release = '4.2.2' self.base_urls = [ 'https://www.typescriptlang.org/docs/handbook/', 'https://www.typescriptlang.org/' @@ -35,7 +35,7 @@ def initial_urls ] options[:attribution] = <<-HTML - © 2012-2020 Microsoft
+ © 2012-2021 Microsoft
Licensed under the Apache License, Version 2.0. HTML From 2824f75cd5e3862290829e2a399d3ab754da47b4 Mon Sep 17 00:00:00 2001 From: Enoc Date: Tue, 2 Mar 2021 20:49:38 -0600 Subject: [PATCH 0018/2191] Fix sidebar when the mouse leave the window --- assets/javascripts/views/sidebar/sidebar.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/views/sidebar/sidebar.coffee b/assets/javascripts/views/sidebar/sidebar.coffee index f3ae3bd406..3dce0fc16c 100644 --- a/assets/javascripts/views/sidebar/sidebar.coffee +++ b/assets/javascripts/views/sidebar/sidebar.coffee @@ -28,10 +28,14 @@ class app.views.Sidebar extends app.View app.on 'ready', @onReady - $.on document.documentElement, 'mouseleave', (event) => @display() unless event.clientX <= 0 + $.on document.documentElement, 'mouseleave', => @hide() $.on document.documentElement, 'mouseenter', => @resetDisplay(forceNoHover: false) return + hide: -> + @removeClass 'show' + return + display: -> @addClass 'show' return From b5bc2e0ef01af4537f9e19007f80956b344fafa4 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 3 Mar 2021 21:17:08 +0100 Subject: [PATCH 0019/2191] Update SQLite documentation (3.34.0) --- assets/stylesheets/pages/_sqlite.scss | 6 ++++++ lib/docs/filters/core/clean_text.rb | 1 + lib/docs/filters/sqlite/clean_html.rb | 23 +++++++++++++++++++++-- lib/docs/scrapers/sqlite.rb | 3 ++- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/assets/stylesheets/pages/_sqlite.scss b/assets/stylesheets/pages/_sqlite.scss index 98b850afdc..b84047a54d 100644 --- a/assets/stylesheets/pages/_sqlite.scss +++ b/assets/stylesheets/pages/_sqlite.scss @@ -4,3 +4,9 @@ dt { @extend %block-label, %label-blue; } .todo { @extend %note, %note-red; } } + +svg { + text.fill { fill: var(--textColor); } + .fill { fill: var(--textColorLighter); } + .stroke { fill: none; stroke-width: 2.16; stroke: var(--textColorLighter); } +} diff --git a/lib/docs/filters/core/clean_text.rb b/lib/docs/filters/core/clean_text.rb index d49e14481f..181ab638c4 100644 --- a/lib/docs/filters/core/clean_text.rb +++ b/lib/docs/filters/core/clean_text.rb @@ -5,6 +5,7 @@ class CleanTextFilter < Filter EMPTY_NODES_RGX = /<(?!td|th|iframe|mspace)(\w+)[^>]*>[[:space:]]*<\/\1>/ def call + return html if context[:clean_text] == false html.strip! while html.gsub!(EMPTY_NODES_RGX, ''); end html diff --git a/lib/docs/filters/sqlite/clean_html.rb b/lib/docs/filters/sqlite/clean_html.rb index 09d152d388..0917589616 100644 --- a/lib/docs/filters/sqlite/clean_html.rb +++ b/lib/docs/filters/sqlite/clean_html.rb @@ -7,13 +7,14 @@ def call css('.rightsidebar', 'hr', '.sh_mark', '.fancy_toc > a', '.fancy_toc_mark', 'h[style*="none"]', 'a[href$="intro.html"] > h2', 'a[href$="intro"] > h2', '#document_title + #toc_header', '#document_title ~ #toc').remove + css('a[href$="intro.html"]:empty', 'a[href$="intro"]:empty').remove css('.fancy_title', '> h2[align=center]', '#document_title').each do |node| node.name = 'h1' end unless at_css('h1') - if at_css('h2').content == context[:html_title] + if at_css('h2') && at_css('h2').content == context[:html_title] at_css('h2').name = 'h1' else doc.child.before("

#{context[:html_title]}

") @@ -81,8 +82,26 @@ def call node.remove_attribute('onclick') end - css('*[align]').remove_attr('align') + css('svg *[style], svg *[fill]').each do |node| + # transform style in SVG diagrams, e.g. on https://sqlite.org/lang_insert.html + if node['style'] == 'fill:rgb(0,0,0)' or node['fill'] == 'rgb(0,0,0)' + node.add_class('fill') + node.remove_attribute('fill') + elsif node['style'] == 'fill:none;stroke-width:2.16;stroke:rgb(0,0,0);' + node.add_class('stroke') + elsif node['style'] == 'fill:none;stroke-width:3.24;stroke:rgb(211,211,211);' + node.add_class('stroke') + elsif node['style'] + raise NotImplementedError, "SVG style #{node['style']}" + end + node.remove_attribute('style') + end + + css('.imgcontainer > div[style]').add_class('imgcontainer') css('*[style]:not(.imgcontainer)').remove_attr('style') + css('.imgcontainer').remove_class('imgcontainer') + + css('*[align]').remove_attr('align') css('table[border]').remove_attr('border') doc diff --git a/lib/docs/scrapers/sqlite.rb b/lib/docs/scrapers/sqlite.rb index 246ee6e92d..650a2b01ca 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.33.0' + self.release = '3.34.0' self.base_url = 'https://sqlite.org/' self.root_path = 'docs.html' self.initial_paths = %w(keyword_index.html) @@ -14,6 +14,7 @@ class Sqlite < FileScraper html_filters.insert_before 'clean_html', 'sqlite/clean_js_tables' html_filters.push 'sqlite/entries', 'sqlite/clean_html' + options[:clean_text] = false # keep SVG elements options[:only_patterns] = [/\.html\z/] options[:skip_patterns] = [/releaselog/, /consortium/] options[:skip] = %w( From 1a7ba5962bbc151547b84700b4951bdeed909774 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 3 Mar 2021 21:37:15 +0100 Subject: [PATCH 0020/2191] Update TensorFlow documentation (2.4.0) --- assets/javascripts/templates/pages/about_tmpl.coffee | 4 ++-- lib/docs/scrapers/tensorflow/tensorflow.rb | 7 ++++++- lib/docs/scrapers/tensorflow/tensorflow_cpp.rb | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 4d4fbd2a78..e1d7e9ea34 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -798,9 +798,9 @@ credits = [ 'http://tcl.tk/software/tcltk/license.html' ], [ 'TensorFlow', - '2019 The TensorFlow Authors', + '2020 The TensorFlow Authors', 'CC BY', - 'https://creativecommons.org/licenses/by/3.0/' + 'https://creativecommons.org/licenses/by/4.0/' ], [ 'Terraform', '2018 HashiCorp', diff --git a/lib/docs/scrapers/tensorflow/tensorflow.rb b/lib/docs/scrapers/tensorflow/tensorflow.rb index 70f9db4375..4e1c47776e 100644 --- a/lib/docs/scrapers/tensorflow/tensorflow.rb +++ b/lib/docs/scrapers/tensorflow/tensorflow.rb @@ -15,10 +15,15 @@ class Tensorflow < UrlScraper options[:attribution] = <<-HTML © 2020 The TensorFlow Authors. All rights reserved.
- Licensed under the Creative Commons Attribution License 3.0.
+ Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License. HTML + version '2.4' do + self.release = "#{version}.0" + self.base_url = "https://www.tensorflow.org/versions/r#{version}/api_docs/python/tf" + end + version '2.3' 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 2bfcc6e3e8..feda35fdce 100644 --- a/lib/docs/scrapers/tensorflow/tensorflow_cpp.rb +++ b/lib/docs/scrapers/tensorflow/tensorflow_cpp.rb @@ -3,6 +3,11 @@ class TensorflowCpp < Tensorflow self.name = 'TensorFlow C++' self.slug = 'tensorflow_cpp' + version '2.4' do + self.release = "#{version}.0" + self.base_url = "https://www.tensorflow.org/versions/r#{version}/api_docs/cc" + end + version '2.3' do self.release = "#{version}.0" self.base_url = "https://www.tensorflow.org/versions/r#{version}/api_docs/cc" From dbc3ebd326619f576d8ba8a6469026ba4556f1e1 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 3 Mar 2021 21:41:16 +0100 Subject: [PATCH 0021/2191] Update jQuery documentation (3.6.0) --- lib/docs/scrapers/jquery/jquery_core.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/jquery/jquery_core.rb b/lib/docs/scrapers/jquery/jquery_core.rb index 6ad10aa36b..4b893fe70b 100644 --- a/lib/docs/scrapers/jquery/jquery_core.rb +++ b/lib/docs/scrapers/jquery/jquery_core.rb @@ -1,7 +1,7 @@ module Docs class JqueryCore < Jquery self.name = 'jQuery' - self.release = '3.5.1' + self.release = '3.6.0' self.base_url = 'https://api.jquery.com/' self.initial_paths = %w(/index/index) self.links = { From 9ae7cbd890badf1f4c8d9c435bd2549f7bef9d24 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Wed, 3 Mar 2021 21:46:26 +0100 Subject: [PATCH 0022/2191] Update Sequelize documentation (6.5.0) --- lib/docs/scrapers/sequelize.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/sequelize.rb b/lib/docs/scrapers/sequelize.rb index 8d934d80dc..aecf54bf55 100644 --- a/lib/docs/scrapers/sequelize.rb +++ b/lib/docs/scrapers/sequelize.rb @@ -21,7 +21,7 @@ class Sequelize < UrlScraper HTML version '6' do - self.release = '6.3.5' + self.release = '6.5.0' self.base_url = "https://sequelize.org/master/" end From 5e368388a277c10e7c24d0d63c973c82e9e78ccf Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 5 Mar 2021 08:33:25 +0100 Subject: [PATCH 0023/2191] Update PyTorch documentation (1.8.0) --- lib/docs/scrapers/pytorch.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/pytorch.rb b/lib/docs/scrapers/pytorch.rb index 29b480d6b1..927d0be3e4 100644 --- a/lib/docs/scrapers/pytorch.rb +++ b/lib/docs/scrapers/pytorch.rb @@ -21,7 +21,7 @@ class Pytorch < UrlScraper HTML version do - self.release = '1.7.0' + self.release = '1.8.0' self.base_url = "https://pytorch.org/docs/#{release}/" end From b9de596b2efa538985ec6e473dd32f2f8ba2d608 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 5 Mar 2021 08:39:06 +0100 Subject: [PATCH 0024/2191] Update Redis documentation (6.2.1) --- lib/docs/scrapers/redis.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/redis.rb b/lib/docs/scrapers/redis.rb index 37639f1463..cffe2b1f8f 100644 --- a/lib/docs/scrapers/redis.rb +++ b/lib/docs/scrapers/redis.rb @@ -1,7 +1,7 @@ module Docs class Redis < UrlScraper self.type = 'redis' - self.release = '6.0.9' + self.release = '6.2.1' self.base_url = 'https://redis.io/commands' self.links = { home: 'https://redis.io/', From d48df8f3f3ba828dfc34e7da4edb1d9509119456 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 5 Mar 2021 08:44:46 +0100 Subject: [PATCH 0025/2191] Remove MaxCDN from docs --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- docs/maintainers.md | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index e1d7e9ea34..59d7636ab3 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -53,7 +53,7 @@ app.templates.aboutPage = -> """

Special thanks to:

    -
  • MaxCDN, Sentry and Gauges for offering a free account to DevDocs +
  • Sentry and Gauges for offering a free account to DevDocs
  • MaxCDN, Shopify, JetBrains and Code School for sponsoring DevDocs in the past
  • Heroku and New Relic for providing awesome free service
  • Jeremy Kratz for the C/C++ logo diff --git a/docs/maintainers.md b/docs/maintainers.md index 2343e2eb24..be8786dff7 100644 --- a/docs/maintainers.md +++ b/docs/maintainers.md @@ -36,19 +36,13 @@ In order to deploy DevDocs, you must: aws configure --profile devdocs ``` -- be provided with DevDocs's MaxCDN push zone credentials, and add them to your `.bash_profile` as such: - ``` - export DEVDOCS_DL_USERNAME="username" - export DEVDOCS_DL_PASSWORD="password" - ``` - ## Thor commands In addition to the [publicly-documented commands](https://github.com/freeCodeCamp/devdocs#available-commands), the following commands are aimed at DevDocs maintainers: - `thor docs:package` - Generates packages for one or more documentations. Those packages are intended to be uploaded to DevDocs's MaxCDN push zone by maintainers via the `thor docs:upload` command, and downloaded by users via the `thor docs:download` command. + Generates packages for one or more documentations. Those packages are intended to be uploaded to DevDocs's S3 bundle zone by maintainers via the `thor docs:upload` command, and downloaded by users via the `thor docs:download` command. Versions can be specified as such: `thor docs:package rails@5.2 node@10\ LTS`. @@ -59,9 +53,9 @@ In addition to the [publicly-documented commands](https://github.com/freeCodeCam This command does two operations: 1. sync the files for the specified documentations with S3 (used by the Heroku app); - 2. upload the documentations' packages to DevDocs's MaxCDN push zone (used by the `thor docs:download` command). + 2. upload the documentations' packages to DevDocs's S3 bundle zone (used by the `thor docs:download` command). - For the command to work, you must have the AWS CLI and MaxCDN credentials configured as indicated above. + For the command to work, you must have the AWS CLI configured as indicated above. **Important:** the app should always be deployed immediately after this command has finished running. Do not run this command unless you are able and ready to deploy DevDocs. From c8a62bd4ff271e1ea30e9b8f6e4ae38d823bd4ed Mon Sep 17 00:00:00 2001 From: Enoc Date: Fri, 5 Mar 2021 09:55:48 -0600 Subject: [PATCH 0026/2191] Update Cmake to 3.20 --- lib/docs/scrapers/cmake.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/docs/scrapers/cmake.rb b/lib/docs/scrapers/cmake.rb index 3b002f2837..69a8c2f62e 100644 --- a/lib/docs/scrapers/cmake.rb +++ b/lib/docs/scrapers/cmake.rb @@ -16,10 +16,15 @@ class Cmake < UrlScraper options[:skip_patterns] = [/\Agenerator/, /\Acpack_gen/, /\Ainclude/, /\Arelease/] options[:attribution] = <<-HTML - © 2000–2020 Kitware, Inc. and Contributors
    + © 2000–2021 Kitware, Inc. and Contributors
    Licensed under the BSD 3-clause License. HTML + version '3.20' do + self.release = '3.20' + self.base_url = "https://cmake.org/cmake/help/v#{self.version}/" + end + version '3.19' do self.release = '3.19.0' self.base_url = "https://cmake.org/cmake/help/v#{self.version}/" From 91138ad50894e0ba2159bf7f0192f33ae426d83f Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 6 Mar 2021 00:37:42 +0100 Subject: [PATCH 0027/2191] Update TypeScript documentation (New Handbook) https://devblogs.microsoft.com/typescript/announcing-the-new-typescript-handbook/ --- assets/stylesheets/application.css.scss | 1 + assets/stylesheets/pages/_typescript.scss | 4 ++++ lib/docs/filters/typescript/clean_html.rb | 11 ++++++++++- lib/docs/filters/typescript/entries.rb | 18 +++++++++++++++++- lib/docs/scrapers/typescript.rb | 5 ++--- 5 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 assets/stylesheets/pages/_typescript.scss diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss index 6d94564c1c..94881c2e49 100644 --- a/assets/stylesheets/application.css.scss +++ b/assets/stylesheets/application.css.scss @@ -116,6 +116,7 @@ 'pages/tcl_tk', 'pages/tensorflow', 'pages/terraform', + 'pages/typescript', 'pages/underscore', 'pages/vue', 'pages/webpack', diff --git a/assets/stylesheets/pages/_typescript.scss b/assets/stylesheets/pages/_typescript.scss new file mode 100644 index 0000000000..ffe7282a12 --- /dev/null +++ b/assets/stylesheets/pages/_typescript.scss @@ -0,0 +1,4 @@ +._typescript { + @extend %simple; + .deprecated { @extend %label-red; } +} diff --git a/lib/docs/filters/typescript/clean_html.rb b/lib/docs/filters/typescript/clean_html.rb index 4b9d72fe69..8bcc1bd2b7 100644 --- a/lib/docs/filters/typescript/clean_html.rb +++ b/lib/docs/filters/typescript/clean_html.rb @@ -24,7 +24,11 @@ def root def other if base_url.path == '/docs/handbook/' + deprecated = at_css('#deprecated-content') + deprecated.css('h3', '#deprecated-icon').remove if deprecated + deprecated.add_class('deprecated') if deprecated @doc = at_css('article > .whitespace > .markdown') + doc.child.before(deprecated) if deprecated else # tsconfig page @doc = at_css('.markdown > div') @@ -36,9 +40,14 @@ def other css('pre').each do |node| language = node.at_css('.language-id') ? node.at_css('.language-id').content : 'typescript' node.css('.language-id').remove - node.content = node.content + if node.at_css('.line').nil? + node.content = node.content + else + node.content = node.css('.line').map(&:content).join("\n") + end node['data-language'] = LANGUAGE_REPLACE[language] || language node.remove_attribute('class') + node.remove_attribute('style') end end diff --git a/lib/docs/filters/typescript/entries.rb b/lib/docs/filters/typescript/entries.rb index 842afbead0..8073f3eaa1 100644 --- a/lib/docs/filters/typescript/entries.rb +++ b/lib/docs/filters/typescript/entries.rb @@ -2,15 +2,31 @@ module Docs class Typescript class EntriesFilter < Docs::EntriesFilter + DEPRECATED_PAGES = %w( + advanced-types + basic-types + classes + functions + generics + interfaces + literal-types + unions-and-intersections + ) + def get_name at_css('h1') ? at_css('h1').content : at_css('h2').content end def get_type - name + if DEPRECATED_PAGES.include? slug + 'Handbook (deprecated)' + else + name + end end def additional_entries + return [] if DEPRECATED_PAGES.include? slug base_url.path == '/' ? tsconfig_entries : handbook_entries end diff --git a/lib/docs/scrapers/typescript.rb b/lib/docs/scrapers/typescript.rb index 6b2c2cb418..dbc6dab626 100644 --- a/lib/docs/scrapers/typescript.rb +++ b/lib/docs/scrapers/typescript.rb @@ -3,8 +3,8 @@ class Typescript < UrlScraper include MultipleBaseUrls self.name = 'TypeScript' - self.type = 'simple' - self.release = '4.2.2' + self.type = 'typescript' + self.release = '4.2.3' self.base_urls = [ 'https://www.typescriptlang.org/docs/handbook/', 'https://www.typescriptlang.org/' @@ -29,7 +29,6 @@ def initial_urls ] options[:skip_patterns] = [ - /2/, /release-notes/, /play\// ] From 2bc92cf72ba752d9e4251faf59ebeffa9dad09da Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Tue, 9 Mar 2021 21:18:33 +0100 Subject: [PATCH 0028/2191] Update Electron documentation (12.0.0) --- lib/docs/filters/electron/clean_html.rb | 2 +- lib/docs/scrapers/electron.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/filters/electron/clean_html.rb b/lib/docs/filters/electron/clean_html.rb index 4459f9135f..7a906a7082 100644 --- a/lib/docs/filters/electron/clean_html.rb +++ b/lib/docs/filters/electron/clean_html.rb @@ -2,7 +2,7 @@ module Docs class Electron class CleanHtmlFilter < Filter def call - css('.header-link', 'hr + .text-center', 'hr').remove + css('.header-link', 'hr + .text-center', 'hr', '.docs__actions-bar').remove css('.grid', '.row', '.col-ms-12', 'ul.docs-list > ul.docs-list', '.sub-section').each do |node| node.before(node.children).remove diff --git a/lib/docs/scrapers/electron.rb b/lib/docs/scrapers/electron.rb index 49fb51934c..da105f3911 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' - self.release = '11.0.1' + self.release = '12.0.0' self.links = { home: 'https://www.electronjs.org/', code: 'https://github.com/electron/electron' From 4d9f725578eaeeafb06cee593a30fd4bfc00184d Mon Sep 17 00:00:00 2001 From: RUSshy Date: Thu, 11 Mar 2021 16:05:01 +0100 Subject: [PATCH 0029/2191] Update D to latest version --- lib/docs/scrapers/d.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/d.rb b/lib/docs/scrapers/d.rb index d0340450cd..7ecd9e0af2 100644 --- a/lib/docs/scrapers/d.rb +++ b/lib/docs/scrapers/d.rb @@ -2,7 +2,7 @@ module Docs class D < UrlScraper include MultipleBaseUrls - self.release = '2.094.2' + self.release = '2.095.1' self.type = 'd' self.base_urls = ['https://dlang.org/phobos/', 'https://dlang.org/spec/'] self.root_path = 'index.html' @@ -19,7 +19,7 @@ class D < UrlScraper options[:title] = false options[:attribution] = <<-HTML - © 1999–2020 The D Language Foundation
    + © 1999–2021 The D Language Foundation
    Licensed under the Boost License 1.0. HTML From e59155e1ade97cc8e45e2b2e7b20b3cb15b23dac Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 11 Mar 2021 18:55:40 +0100 Subject: [PATCH 0030/2191] Update about_tmpl.coffee --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index e1d7e9ea34..90d9583377 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -218,7 +218,7 @@ credits = [ 'https://raw.githubusercontent.com/cypress-io/cypress-documentation/develop/LICENSE.md' ], [ 'D', - '1999-2020 The D Language Foundation', + '1999-2021 The D Language Foundation', 'Boost', 'https://raw.githubusercontent.com/dlang/phobos/master/LICENSE_1_0.txt' ], [ From 7a10bd4e7d23ecb0a9a8670acfd97e820b5e2d72 Mon Sep 17 00:00:00 2001 From: Enoc Date: Thu, 11 Mar 2021 12:41:59 -0600 Subject: [PATCH 0031/2191] Update ESLint documentation (7.21.0) --- lib/docs/scrapers/eslint.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/eslint.rb b/lib/docs/scrapers/eslint.rb index 9fb0e2683e..6f2dd1d74c 100644 --- a/lib/docs/scrapers/eslint.rb +++ b/lib/docs/scrapers/eslint.rb @@ -2,7 +2,7 @@ module Docs class Eslint < UrlScraper self.name = 'ESLint' self.type = 'simple' - self.release = '7.17.0' + self.release = '7.21.0' self.base_url = 'https://eslint.org/docs/' self.root_path = 'user-guide/getting-started' self.links = { From 006b12dc2dd9ea93b52cd4892d34027668e025a2 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 11 Mar 2021 20:18:38 +0100 Subject: [PATCH 0032/2191] Update WordPress documentation (5.7) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/wordpress.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 90d9583377..b996a670a9 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -863,7 +863,7 @@ credits = [ 'https://github.com/pallets/werkzeug/blob/master/LICENSE.rst' ], [ 'Wordpress', - '2003-2020 WordPress Foundation', + '2003-2021 WordPress Foundation', 'GPLv2+', 'https://wordpress.org/about/license/' ], [ diff --git a/lib/docs/scrapers/wordpress.rb b/lib/docs/scrapers/wordpress.rb index 6f52b5e2f5..5c8939b513 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.6' + self.release = '5.7' self.base_url = 'https://developer.wordpress.org/reference/' self.initial_paths = %w( functions/ @@ -32,7 +32,7 @@ class Wordpress < UrlScraper ] options[:attribution] = <<-HTML - © 2003–2020 WordPress Foundation
    + © 2003–2021 WordPress Foundation
    Licensed under the GNU GPLv2+ License. HTML From 67f90950ad497e6a0653fd2185b1b0d2499a0537 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 11 Mar 2021 19:32:40 +0000 Subject: [PATCH 0033/2191] Update Socket.IO documentation (4.0.0) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/filters/socketio/clean_html.rb | 8 ++++++-- lib/docs/filters/socketio/entries.rb | 2 +- lib/docs/scrapers/socketio.rb | 9 +++++++-- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index b996a670a9..a0919a29ba 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -773,7 +773,7 @@ credits = [ 'https://raw.githubusercontent.com/sequelize/sequelize/master/LICENSE' ], [ 'Socket.io', - '2014-2015 Automattic', + '2014-2018 Automattic', 'MIT', 'https://raw.githubusercontent.com/Automattic/socket.io/master/LICENSE' ], [ diff --git a/lib/docs/filters/socketio/clean_html.rb b/lib/docs/filters/socketio/clean_html.rb index d0002c33e2..ec7da521e9 100644 --- a/lib/docs/filters/socketio/clean_html.rb +++ b/lib/docs/filters/socketio/clean_html.rb @@ -9,12 +9,16 @@ def call end # version documentation message - at_css('.warning').remove + css('.warning').remove css('header', 'footer', 'aside').remove css('pre').each do |node| - node.content = node.content + if node.at_css('.line').nil? + node.content = node.content + else + node.content = node.css('.line').map(&:content).join("\n") + end node['data-language'] = node.content =~ /\A\s* + © 2014–2021 Automattic
    Licensed under the MIT License. HTML + version '4' do + self.release = '4.0.0' + self.base_url = "https://socket.io/docs/v#{version}" + end + version '3' do - self.release = '3.0.5' + self.release = '3.1.2' self.base_url = "https://socket.io/docs/v#{version}" end From b8b98de57efa959b7b11f9ea07fb6a5c157bf303 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 11 Mar 2021 20:38:38 +0100 Subject: [PATCH 0034/2191] =?UTF-8?q?maintainers:=20Bryan=20Hern=C3=A1ndez?= =?UTF-8?q?,=20welcome!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/maintainers.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/maintainers.md b/docs/maintainers.md index 2343e2eb24..2641a1ed92 100644 --- a/docs/maintainers.md +++ b/docs/maintainers.md @@ -124,6 +124,7 @@ nginx The following people (used to) maintain DevDocs: - [Ahmad Abdolsaheb](https://github.com/ahmadabdolsaheb) +- [Bryan Hernández](https://github.com/MasterEnoc) - [Jasper van Merle](https://github.com/jmerle) - [Jed Fox](https://github.com/j-f1) - [Mrugesh Mohapatra](https://github.com/raisedadead) From 51c11307b22f1ca7699115dcfd6ce916cfcfed6b Mon Sep 17 00:00:00 2001 From: Enoc Date: Fri, 12 Mar 2021 10:06:48 -0600 Subject: [PATCH 0035/2191] Fix get_latest_version of Jest --- lib/docs/scrapers/jest.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/jest.rb b/lib/docs/scrapers/jest.rb index 5591b4ce7b..50fb339706 100644 --- a/lib/docs/scrapers/jest.rb +++ b/lib/docs/scrapers/jest.rb @@ -19,8 +19,8 @@ class Jest < UrlScraper HTML def get_latest_version(opts) - doc = fetch_doc('https://jestjs.io/docs/en/getting-started', opts) - doc.at_css('header > a > h3').content + doc = get_latest_github_release('facebook', 'jest', opts) end + end end From e54d9d4dfaf76b4e8b2e15c84425c8cf94ca1737 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 13 Mar 2021 09:20:36 +0100 Subject: [PATCH 0036/2191] Update SQLite documentation (3.35.0) --- lib/docs/filters/sqlite/clean_html.rb | 1 + lib/docs/scrapers/sqlite.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/docs/filters/sqlite/clean_html.rb b/lib/docs/filters/sqlite/clean_html.rb index 0917589616..5407677da8 100644 --- a/lib/docs/filters/sqlite/clean_html.rb +++ b/lib/docs/filters/sqlite/clean_html.rb @@ -5,6 +5,7 @@ def call at_css('.nosearch').remove css('.rightsidebar', 'hr', '.sh_mark', '.fancy_toc > a', '.fancy_toc_mark', 'h[style*="none"]', + '#docsearch', 'a[href$="intro.html"] > h2', 'a[href$="intro"] > h2', '#document_title + #toc_header', '#document_title ~ #toc').remove css('a[href$="intro.html"]:empty', 'a[href$="intro"]:empty').remove diff --git a/lib/docs/scrapers/sqlite.rb b/lib/docs/scrapers/sqlite.rb index 650a2b01ca..1c82bd3a15 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.34.0' + self.release = '3.35.0' self.base_url = 'https://sqlite.org/' self.root_path = 'docs.html' self.initial_paths = %w(keyword_index.html) From 7cf478e6ac276bb57f2e20e7df9222097428a8b0 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 13 Mar 2021 09:26:09 +0100 Subject: [PATCH 0037/2191] Update D3.js documentation (6.6.0) --- lib/docs/scrapers/d3.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/d3.rb b/lib/docs/scrapers/d3.rb index bcbdfe495b..cdfb068331 100644 --- a/lib/docs/scrapers/d3.rb +++ b/lib/docs/scrapers/d3.rb @@ -17,7 +17,7 @@ class D3 < UrlScraper HTML version '6' do - self.release = '6.5.0' + self.release = '6.6.0' self.base_url = 'https://github.com/d3/' self.root_path = 'd3/blob/master/API.md' From 3b1c55ab55339923de222568504938f3031d40aa Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 13 Mar 2021 09:29:59 +0100 Subject: [PATCH 0038/2191] Update Flow documentation (0.146.0) --- lib/docs/scrapers/flow.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/flow.rb b/lib/docs/scrapers/flow.rb index 8d9c0bb4cf..add723358c 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.145.0' + self.release = '0.146.0' self.base_url = 'https://flow.org/en/docs/' self.links = { home: 'https://flow.org/', From ddb59e32ce33201a0645e06fcffd7fe169fe4f9f Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 13 Mar 2021 09:45:13 +0100 Subject: [PATCH 0039/2191] Update scikit-image documentation (0.18.1) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/scikit_image.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index a0919a29ba..639428419c 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -755,7 +755,7 @@ credits = [ 'scikit-image', '2019 the scikit-image team', 'BSD', - 'http://scikit-image.org/docs/dev/license.html' + 'https://scikit-image.org/docs/dev/license.html' ], [ 'scikit-learn', '2007-2020 The scikit-learn developers', diff --git a/lib/docs/scrapers/scikit_image.rb b/lib/docs/scrapers/scikit_image.rb index 59ea0f4655..368e03f71e 100644 --- a/lib/docs/scrapers/scikit_image.rb +++ b/lib/docs/scrapers/scikit_image.rb @@ -3,8 +3,8 @@ class ScikitImage < UrlScraper self.name = 'scikit-image' self.slug = 'scikit_image' self.type = 'sphinx' - self.release = '0.17.2' - self.base_url = 'https://scikit-image.org/docs/0.17.x/' + self.release = '0.18.1' + self.base_url = 'https://scikit-image.org/docs/0.18.x/' self.links = { home: 'https://scikit-image.org/', code: 'https://github.com/scikit-image/scikit-image' From 4b1fdf38625f252cf46032626d17b8d811058416 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 13 Mar 2021 09:59:30 +0100 Subject: [PATCH 0040/2191] Update scikit-learn documentation (0.24.1) --- lib/docs/scrapers/scikit_learn.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/scikit_learn.rb b/lib/docs/scrapers/scikit_learn.rb index f211d7a56f..9511e4ba40 100644 --- a/lib/docs/scrapers/scikit_learn.rb +++ b/lib/docs/scrapers/scikit_learn.rb @@ -3,8 +3,8 @@ class ScikitLearn < UrlScraper self.name = 'scikit-learn' self.slug = 'scikit_learn' self.type = 'sphinx' - self.release = '0.23.2' - self.base_url = 'https://scikit-learn.org/0.23/' + self.release = '0.24.1' + self.base_url = 'https://scikit-learn.org/0.24/' self.root_path = 'index.html' self.force_gzip = true self.links = { From 484cb251957e1489c7c899a0f7422065c2abc954 Mon Sep 17 00:00:00 2001 From: Enoc Date: Sat, 13 Mar 2021 11:10:40 -0600 Subject: [PATCH 0041/2191] Add new issues templates --- .github/ISSUE_TEMPLATE.md | 10 ----- .github/ISSUE_TEMPLATE/bug_report.md | 46 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 ++++ .github/ISSUE_TEMPLATE/documentation_bug.md | 33 +++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 36 ++++++++++++++++ 5 files changed, 123 insertions(+), 10 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/documentation_bug.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 5df53ae93d..0000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,10 +0,0 @@ - diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000000..61ad57db37 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,46 @@ +--- +name: Bug report +about: Create a report to help us improve Devdocs +title: '' +labels: '' +assignees: '' +--- + + + +# Bug report + + + +## OS information + + + +## Steps to reproduce + + + +## More resources + + + +## Possible fix + + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..e117f5b694 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Question + about: "Ask and get involve on Gitter" + url: "https://gitter.im/FreeCodeCamp/DevDocs" + - name: New Documentation + about: "Request a new documentation on Trello" + url: "https://trello.com/b/6BmTulfx/devdocs-documentation" diff --git a/.github/ISSUE_TEMPLATE/documentation_bug.md b/.github/ISSUE_TEMPLATE/documentation_bug.md new file mode 100644 index 0000000000..b2f467a28b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation_bug.md @@ -0,0 +1,33 @@ +--- +name: Documentation style bug +about: Report documentation that has lost its style +title: '' +labels: '' +assignees: '' +--- + + + +# Documentation style bug + + + +## Summary + + +## Actual style + + +## Expected style + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000000..01ef5f3c83 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,36 @@ +--- +name: Feature request +about: Suggest a new feature +title: '' +labels: '' +assignees: '' +--- + + + +# Feature request + + + +## Summary + + + +## Examples + + From 7ae327ac5e0027a965eb841a318eb3b70533d953 Mon Sep 17 00:00:00 2001 From: Enoc Date: Sat, 13 Mar 2021 23:58:25 -0600 Subject: [PATCH 0042/2191] Improve templates --- .github/ISSUE_TEMPLATE/bug_report.md | 12 +++++------- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/ISSUE_TEMPLATE/documentation_bug.md | 6 +++--- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 61ad57db37..c0dfddfc54 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a report to help us improve Devdocs title: '' -labels: '' +labels: 'bug' assignees: '' --- @@ -13,9 +13,7 @@ If possible fill each section # Bug report @@ -23,14 +21,14 @@ Verify this steps before writing a new issue ## OS information ## Steps to reproduce ## More resources diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index e117f5b694..540de6ea5a 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,7 +1,7 @@ blank_issues_enabled: false contact_links: - name: Question - about: "Ask and get involve on Gitter" + about: "Ask questions and have discussions on Gitter" url: "https://gitter.im/FreeCodeCamp/DevDocs" - name: New Documentation about: "Request a new documentation on Trello" diff --git a/.github/ISSUE_TEMPLATE/documentation_bug.md b/.github/ISSUE_TEMPLATE/documentation_bug.md index b2f467a28b..9160c071d1 100644 --- a/.github/ISSUE_TEMPLATE/documentation_bug.md +++ b/.github/ISSUE_TEMPLATE/documentation_bug.md @@ -1,8 +1,8 @@ --- -name: Documentation style bug -about: Report documentation that has lost its style +name: Documentation bug +about: Report a problem with a specific documentation title: '' -labels: '' +labels: 'docs/improvement' assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 01ef5f3c83..593d59aa93 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest a new feature title: '' -labels: '' +labels: 'feature' assignees: '' --- From d3e6977be2133b73783d4d8ec33314e1e8a217bb Mon Sep 17 00:00:00 2001 From: Enoc Date: Sun, 14 Mar 2021 00:23:20 -0600 Subject: [PATCH 0043/2191] Update Mocha documentation (8.3.2) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/mocha.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 639428419c..0ad7229ae4 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -523,7 +523,7 @@ credits = [ 'https://github.com/seattlerb/minitest/blob/master/README.rdoc#license' ], [ 'Mocha', - '2011-2018 JS Foundation and contributors', + '2011-2021 JS Foundation and contributors', 'CC BY', 'https://creativecommons.org/licenses/by/4.0/' ], [ diff --git a/lib/docs/scrapers/mocha.rb b/lib/docs/scrapers/mocha.rb index 968b24f46d..db27a07652 100644 --- a/lib/docs/scrapers/mocha.rb +++ b/lib/docs/scrapers/mocha.rb @@ -1,7 +1,7 @@ module Docs class Mocha < UrlScraper self.type = 'simple' - self.release = '8.2.1' + self.release = '8.3.2' self.base_url = 'https://mochajs.org/' self.links = { home: 'https://mochajs.org/', @@ -15,7 +15,7 @@ class Mocha < UrlScraper options[:skip_links] = true options[:attribution] = <<-HTML - © 2011–2020 JS Foundation and contributors
    + © 2011–2021 JS Foundation and contributors
    Licensed under the Creative Commons Attribution 4.0 International License. HTML From 867c3b27bca50e03e305fa502f9ae9a902d0e026 Mon Sep 17 00:00:00 2001 From: Enoc Date: Sun, 21 Mar 2021 09:30:15 -0600 Subject: [PATCH 0044/2191] Update Git documentation (2.31.0) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/git.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 0ad7229ae4..fdd6d27519 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -318,7 +318,7 @@ credits = [ 'https://www.gnu.org/licenses/fdl-1.3.en.html' ], [ 'Git', - '2012-2018 Scott Chacon and others', + '2012-2021 Scott Chacon and others', 'MIT', 'https://raw.githubusercontent.com/git/git-scm.com/master/MIT-LICENSE.txt' ], [ diff --git a/lib/docs/scrapers/git.rb b/lib/docs/scrapers/git.rb index 2eca690a73..bc62ff5c7e 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.30.0' + self.release = '2.31.0' self.base_url = 'https://git-scm.com/docs' self.initial_paths = %w(/git.html) self.links = { @@ -16,7 +16,7 @@ class Git < UrlScraper options[:skip] = %w(/howto-index.html) options[:attribution] = <<-HTML - © 2012–2018 Scott Chacon and others
    + © 2012–2021 Scott Chacon and others
    Licensed under the MIT License. HTML From 3bfa3fbcce2a95940f71145abf64928adfc23200 Mon Sep 17 00:00:00 2001 From: Enoc Date: Sun, 21 Mar 2021 09:51:03 -0600 Subject: [PATCH 0045/2191] Update Chai documentation (4.3.4) --- lib/docs/scrapers/chai.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/chai.rb b/lib/docs/scrapers/chai.rb index a33ea28d76..16221ccc6a 100644 --- a/lib/docs/scrapers/chai.rb +++ b/lib/docs/scrapers/chai.rb @@ -2,7 +2,7 @@ module Docs class Chai < UrlScraper self.name = 'Chai' self.type = 'simple' - self.release = '4.2.0' + self.release = '4.3.4' self.base_url = 'https://www.chaijs.com' self.root_path = '/api/' self.initial_paths = %w(/guide/installation/) From 40fa61ebef9ad0317f1f9429b366c47142c505df Mon Sep 17 00:00:00 2001 From: Enoc Date: Sun, 21 Mar 2021 10:13:30 -0600 Subject: [PATCH 0046/2191] Update Cypress documentation (6.8.0) --- lib/docs/scrapers/cypress.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/scrapers/cypress.rb b/lib/docs/scrapers/cypress.rb index 5ed3be6adc..fee5a6e352 100644 --- a/lib/docs/scrapers/cypress.rb +++ b/lib/docs/scrapers/cypress.rb @@ -4,7 +4,7 @@ module Docs class Cypress < UrlScraper self.name = 'Cypress' self.type = 'cypress' - self.release = '6.1.0' + self.release = '6.8.0' self.base_url = 'https://docs.cypress.io' self.root_path = '/api/api/table-of-contents.html' self.links = { @@ -29,7 +29,7 @@ class Cypress < UrlScraper } options[:attribution] = <<-HTML - © 2020 Cypress.io
    + © 2017 Cypress.io
    Licensed under the MIT License. HTML From 0a4ef6ada9750203fad081f0588fbdffb37e77bf Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Mon, 22 Mar 2021 21:06:32 +0100 Subject: [PATCH 0047/2191] Update Crystal documentation (1.0.0) --- .../templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/crystal.rb | 20 +++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index fdd6d27519..6b9f7006db 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -208,7 +208,7 @@ credits = [ 'https://creativecommons.org/licenses/by-sa/2.5/' ], [ 'Crystal', - '2012-2020 Manas Technology Solutions', + '2012-2021 Manas Technology Solutions', 'Apache', 'https://raw.githubusercontent.com/crystal-lang/crystal/master/LICENSE' ], [ diff --git a/lib/docs/scrapers/crystal.rb b/lib/docs/scrapers/crystal.rb index 998d64e00e..8dd794ef9b 100644 --- a/lib/docs/scrapers/crystal.rb +++ b/lib/docs/scrapers/crystal.rb @@ -19,24 +19,22 @@ class Crystal < UrlScraper HTML else <<-HTML - © 2012–2020 Manas Technology Solutions.
    + © 2012–2021 Manas Technology Solutions.
    Licensed under the Apache License, Version 2.0. HTML end } - version do - self.release = '0.36.1' - self.root_path = "api/#{release}/index.html" + self.release = '1.0.0' + self.root_path = "api/#{release}/index.html" - options[:only_patterns] = [/\Aapi\/#{release}\//, /\Areference\//] - options[:skip_patterns] = [/debug/i] + options[:only_patterns] = [/\Aapi\/#{release}\//, /\Areference\//] + options[:skip_patterns] = [/debug/i] - options[:replace_paths] = { - "api/#{release}/" => "api/#{release}/index.html", - 'reference/' => 'reference/index.html' - } - end + options[:replace_paths] = { + "api/#{release}/" => "api/#{release}/index.html", + 'reference/' => 'reference/index.html' + } def get_latest_version(opts) doc = fetch_doc('https://crystal-lang.org/', opts) From 3c407a8ea633bd6b5691e37ca512a33530d2e213 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Mon, 22 Mar 2021 21:15:56 +0100 Subject: [PATCH 0048/2191] Update Angular documentation (11.2.6) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/angular.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 6b9f7006db..ca6f5e377a 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -88,7 +88,7 @@ credits = [ 'https://creativecommons.org/licenses/by/3.0/' ], [ 'Angular', - '2010-2020 Google, Inc.', + '2010-2021 Google, Inc.', 'CC BY', 'https://creativecommons.org/licenses/by/4.0/' ], [ diff --git a/lib/docs/scrapers/angular.rb b/lib/docs/scrapers/angular.rb index 0c4b9f4306..28c39ad435 100644 --- a/lib/docs/scrapers/angular.rb +++ b/lib/docs/scrapers/angular.rb @@ -11,7 +11,7 @@ class Angular < UrlScraper options[:max_image_size] = 256_000 options[:attribution] = <<-HTML - © 2010–2020 Google, Inc.
    + © 2010–2021 Google, Inc.
    Licensed under the Creative Commons Attribution License 4.0. HTML @@ -59,7 +59,7 @@ def handle_response(response) end version do - self.release = '11.0.0' + self.release = '11.2.6' self.base_url = 'https://angular.io/' self.root_path = 'docs' From 633262ac0690be1349ff485f66da7b31193b2023 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Mon, 22 Mar 2021 21:19:39 +0100 Subject: [PATCH 0049/2191] Update Jasmine documentation (3.7.1) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/jasmine.rb | 4 ++-- public/icons/docs/jasmine/SOURCE | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index ca6f5e377a..7926154c1f 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -400,7 +400,7 @@ credits = [ 'Jasmine', '2008-2019 Pivotal Labs', 'MIT', - 'https://raw.githubusercontent.com/jasmine/jasmine/master/MIT.LICENSE' + 'https://raw.githubusercontent.com/jasmine/jasmine/main/MIT.LICENSE' ], [ 'Jekyll', '2020 Jekyll Core Team and contributors', diff --git a/lib/docs/scrapers/jasmine.rb b/lib/docs/scrapers/jasmine.rb index faf2ec1806..bdcb362694 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.6.0' - self.base_url = 'https://jasmine.github.io/api/3.6/' + self.release = '3.7.1' + self.base_url = 'https://jasmine.github.io/api/3.7/' self.root_path = 'index.html' self.links = { home: 'https://jasmine.github.io/', diff --git a/public/icons/docs/jasmine/SOURCE b/public/icons/docs/jasmine/SOURCE index a961dae580..f1e9404942 100644 --- a/public/icons/docs/jasmine/SOURCE +++ b/public/icons/docs/jasmine/SOURCE @@ -1 +1 @@ -https://github.com/jasmine/jasmine.github.io/tree/master/images +https://github.com/jasmine/jasmine.github.io/tree/main/images From af3dd03378b74d514428ce0dd7499fe88bc3dbfe Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Mon, 22 Mar 2021 21:35:33 +0100 Subject: [PATCH 0050/2191] Update Dart documentation (2.12.2) --- lib/docs/scrapers/dart.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/dart.rb b/lib/docs/scrapers/dart.rb index 7bac53565f..c62a79e725 100644 --- a/lib/docs/scrapers/dart.rb +++ b/lib/docs/scrapers/dart.rb @@ -21,7 +21,7 @@ class Dart < FileScraper HTML version '2' do - self.release = '2.10.4' + self.release = '2.12.2' self.base_url = "https://api.dart.dev/stable/#{release}/" end From 9be424300538e8fa127de736679dcddfa034aaee Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Mon, 22 Mar 2021 21:52:44 +0100 Subject: [PATCH 0051/2191] Update PostgreSQL documentation (13.2) --- assets/javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/postgresql.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 7926154c1f..6b72985557 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -643,7 +643,7 @@ credits = [ 'https://raw.githubusercontent.com/ponylang/ponyc/master/LICENSE' ], [ 'PostgreSQL', - '1996-2020 The PostgreSQL Global Development Group
    © 1994 The Regents of the University of California', + '1996-2021 The PostgreSQL Global Development Group
    © 1994 The Regents of the University of California', 'PostgreSQL', 'https://www.postgresql.org/about/licence/' ], [ diff --git a/lib/docs/scrapers/postgresql.rb b/lib/docs/scrapers/postgresql.rb index 3c428bf85c..1778b64768 100644 --- a/lib/docs/scrapers/postgresql.rb +++ b/lib/docs/scrapers/postgresql.rb @@ -51,12 +51,12 @@ class Postgresql < UrlScraper /\Aunsupported-features/ ] options[:attribution] = <<-HTML - © 1996–2020 The PostgreSQL Global Development Group
    + © 1996–2021 The PostgreSQL Global Development Group
    Licensed under the PostgreSQL License. HTML version '13' do - self.release = '13.1' + self.release = '13.2' self.base_url = "https://www.postgresql.org/docs/#{version}/" end From 4479eeaa61455ac9c673ae9dd15ba36c1cc5be4b Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Thu, 25 Mar 2021 11:54:51 +0100 Subject: [PATCH 0052/2191] docs: add details about creating new VMs --- docs/maintainers.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/maintainers.md b/docs/maintainers.md index 2641a1ed92..2f2af79786 100644 --- a/docs/maintainers.md +++ b/docs/maintainers.md @@ -92,7 +92,9 @@ If this is your first deploy, make sure another maintainer is around to assist. The bundled documents are available at downloads.devdocs.io and the documents themselves at documents.devdocs.io. Download and document requests are proxied to S3 buckets devdocs-downloads.s3.amazonaws.com and devdocs-documents.s3.amazonaws.com respectively. -If there's ever a need to create a new proxy VM (and the `devdocs-proxy` snapshot is not available) then the new vm should be provisioned as follows: +New proxy VMs should be created from the `devdocs-proxy` snapshot. Before adding them to the load-balancer, it's necessary to add their IP addresses to the aws:SourceIp lists for both buckets, or their requests will be rejected. + +When creating a new proxy VM and the `devdocs-proxy` snapshot is not available, then the new vm should be provisioned as follows: ```bash # we need at least nginx 1.19.x From 5e5e46945aa1f5c865b214438202992f30aca2bb Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 27 Mar 2021 22:34:09 +0100 Subject: [PATCH 0053/2191] Update Julia documentation (1.6.0) --- .../javascripts/templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/julia.rb | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 6b72985557..07956a5033 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -433,7 +433,7 @@ credits = [ 'https://raw.githubusercontent.com/jquery/api.jqueryui.com/master/LICENSE.txt' ], [ 'Julia', - '2009-2020 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors', + '2009-2021 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors', 'MIT', 'https://raw.githubusercontent.com/JuliaLang/julia/master/LICENSE.md' ], [ diff --git a/lib/docs/scrapers/julia.rb b/lib/docs/scrapers/julia.rb index 39c9f9d029..8d5b4a3e4d 100644 --- a/lib/docs/scrapers/julia.rb +++ b/lib/docs/scrapers/julia.rb @@ -7,10 +7,21 @@ class Julia < UrlScraper options[:attribution] = <<-HTML - © 2009–2020 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors
    + © 2009–2021 Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors
    Licensed under the MIT License. HTML + version '1.6' do + self.release = '1.6.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.5' do self.release = '1.5.3' self.base_url = "https://docs.julialang.org/en/v#{release}/" From 57f395f02b3d7336a384608ba0bfe9a39fc4fb57 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 27 Mar 2021 22:41:23 +0100 Subject: [PATCH 0054/2191] Update Rust documentation (1.51.0) --- lib/docs/scrapers/rust.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/rust.rb b/lib/docs/scrapers/rust.rb index 55f1fb8c01..0ce412eaf6 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.50.0' + self.release = '1.51.0' self.base_url = 'https://doc.rust-lang.org/' self.root_path = 'book/index.html' self.initial_paths = %w( From 3a35f480ae4f61f41aed63c6820987b2d7c95caf Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 27 Mar 2021 22:54:40 +0100 Subject: [PATCH 0055/2191] Update Support Tables documentation (1.0.30001204) --- lib/docs/scrapers/support_tables.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/support_tables.rb b/lib/docs/scrapers/support_tables.rb index 01d477104f..b6764edd62 100644 --- a/lib/docs/scrapers/support_tables.rb +++ b/lib/docs/scrapers/support_tables.rb @@ -7,10 +7,10 @@ class SupportTables < Doc self.name = 'Support Tables' self.slug = 'browser_support_tables' self.type = 'support_tables' - self.release = '1.0.30001159' + self.release = '1.0.30001204' def build_pages - url = 'https://github.com/Fyrd/caniuse/raw/master/data.json' + url = 'https://github.com/Fyrd/caniuse/raw/main/data.json' instrument 'running.scraper', urls: [url] response = Request.run(url) @@ -36,7 +36,7 @@ def build_pages yield index_page data['data'].each do |feature_id, feature| - url = "https://github.com/Fyrd/caniuse/raw/master/features-json/#{feature_id}.json" + url = "https://github.com/Fyrd/caniuse/raw/main/features-json/#{feature_id}.json" response = Request.run(url) instrument 'process_response.scraper', response: response From 9bbfda1cc7298880b0efd9849f11d8bcec0b554c Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Mon, 29 Mar 2021 11:12:01 +0200 Subject: [PATCH 0056/2191] feat: deploy via GitHub action --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ .travis.yml | 26 -------------------------- 2 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..64b2cc5c9a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build + +on: + push: + branches: [ $default-branch ] + +jobs: + test: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2.3.4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1.66.1 + with: + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run tests + run: bundle exec rake + - name: Deploy to Heroku + uses: akhileshns/heroku-deploy@v3.12.12 + with: + heroku_api_key: ${{secrets.HEROKU_API_KEY}} + heroku_app_name: "devdocs" + heroku_email: "team@freecodecamp.com" + dontuseforce: true # --force should never be necessary + dontautocreate: true # The app exists, it should not be created diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 87c17ad915..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: ruby - -addons: - apt: - packages: - - libcurl4-openssl-dev - -cache: bundler - -before_install: - - "echo 'gem: --no-document' > ~/.gemrc" - - gem update --system - - gem install bundler - -script: - - if [ "$TRAVIS_EVENT_TYPE" != "cron" ]; then bundle exec rake; fi - - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then bundle exec thor updates:check --github-token $GH_TOKEN --upload; fi - -deploy: - provider: heroku - app: devdocs - on: - branch: master - condition: $TRAVIS_EVENT_TYPE != cron - api_key: - secure: NFfTIdMdNzm99u2bMq/iNo6Sl05XOcHvNEDrEpHvCWG79V1aTN53+sHww+PeTX1wgJA6ZrBAOyTduPlTZbmWH1iHkUhX2vagM1q680rJWkXccO42rJ1V0coKXIfN3/XYzim07YTT4PBdrDoBRd0NJN/fGXl6uNwBBX+7hHt5O4s= From 3c6dda7e0abfbf003dedd4021acbc600bbbef371 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Mon, 29 Mar 2021 13:43:28 +0200 Subject: [PATCH 0057/2191] Update .github/workflows/build.yml Co-authored-by: Simon Legner --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64b2cc5c9a..421369c60c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build +name: Deploy on: push: From 39624c26e5a9122d7974d7e130900118a1584579 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Mon, 29 Mar 2021 14:41:51 +0200 Subject: [PATCH 0058/2191] fix: set branch to master in deploy action --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 421369c60c..1de9ec36ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,8 @@ name: Deploy on: push: - branches: [ $default-branch ] + branches: + - master jobs: test: From 8142c9a9db0e49a53768cc20fc3bedda091b7ee5 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Mon, 29 Mar 2021 15:04:38 +0200 Subject: [PATCH 0059/2191] fix: remove Travis status badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f2e3fe3339..b30d378950 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# [DevDocs](https://devdocs.io) — API Documentation Browser [![Build Status](https://travis-ci.org/freeCodeCamp/devdocs.svg?branch=master)](https://travis-ci.org/freeCodeCamp/devdocs) +# [DevDocs](https://devdocs.io) — API Documentation Browser DevDocs combines multiple developer documentations in a clean and organized web UI with instant search, offline support, mobile version, dark theme, keyboard shortcuts, and more. From 047278debcd532f8186358075d834265ee870fc7 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Mon, 29 Mar 2021 15:11:39 +0200 Subject: [PATCH 0060/2191] fix: s/master/main/g --- .github/CONTRIBUTING.md | 4 +- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 4 +- .github/workflows/build.yml | 2 +- README.md | 2 +- .../templates/pages/about_tmpl.coffee | 4 +- .../templates/pages/root_tmpl.coffee.erb | 6 +-- docs/filter-reference.md | 34 ++++++++-------- docs/maintainers.md | 2 +- docs/scraper-reference.md | 40 +++++++++---------- 10 files changed, 50 insertions(+), 50 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 7363a5f67e..a756fd00bb 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -16,7 +16,7 @@ Want to contribute? Great. Please review the following guidelines carefully and ## Reporting bugs -1. Update to the most recent master release; the bug may already be fixed. +1. Update to the most recent main release; the bug may already be fixed. 2. Search for existing issues; it's possible someone has already encountered this bug. 3. Try to isolate the problem and include steps to reproduce it. 4. Share as much information as possible (e.g. browser/OS environment, log output, stack trace, screenshots, etc.). @@ -44,7 +44,7 @@ Use the [Trello board](https://trello.com/b/6BmTulfx/devdocs-documentation) wher ## Contributing new documentations -See the [`docs` folder](https://github.com/freeCodeCamp/devdocs/tree/master/docs) to learn how to add new documentations. +See the [`docs` folder](https://github.com/freeCodeCamp/devdocs/tree/main/docs) to learn how to add new documentations. **Important:** the documentation's license must permit alteration, redistribution and commercial use, and the documented software must be released under an open source license. Feel free to get in touch if you're not sure if a documentation meets those requirements. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 593d59aa93..a496a10d92 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -19,7 +19,7 @@ Verify this steps before suggeting a new feature: https://github.com/freeCodeCamp/devdocs/labels/feature - Make sure your feature fits DevDocs' vision - https://github.com/freeCodeCamp/devdocs/blob/master/README.md#vision + https://github.com/freeCodeCamp/devdocs/blob/main/README.md#vision --> ## Summary diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 5dc7eda4e5..f8bc663734 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ - + If you’re adding a new scraper, please ensure that you have: @@ -17,7 +17,7 @@ If you’re adding a new scraper, please ensure that you have: - [ ] `SOURCE`: A text file containing the URL to the page the image can be found on or the URL of the original image itself - + If you're updating an existing documentation to it's latest version, please ensure that you have: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1de9ec36ec..e9248ebe76 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: Deploy on: push: branches: - - master + - main jobs: test: diff --git a/README.md b/README.md index b30d378950..3536731347 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Finally, point your browser at [localhost:9292](http://localhost:9292) (the firs The `thor docs:download` command is used to download pre-generated documentations from DevDocs's servers (e.g. `thor docs:download html css`). You can see the list of available documentations and versions by running `thor docs:list`. To update all downloaded documentations, run `thor docs:download --installed`. To download and install all documentation this project has available, run `thor docs:download --all`. -**Note:** there is currently no update mechanism other than `git pull origin master` to update the code and `thor docs:download --installed` to download the latest version of the docs. To stay informed about new releases, be sure to [watch](https://github.com/freeCodeCamp/devdocs/subscription) this repository. +**Note:** there is currently no update mechanism other than `git pull origin main` to update the code and `thor docs:download --installed` to download the latest version of the docs. To stay informed about new releases, be sure to [watch](https://github.com/freeCodeCamp/devdocs/subscription) this repository. Alternatively, DevDocs may be started as a Docker container: diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 07956a5033..9397207516 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -25,8 +25,8 @@ app.templates.aboutPage = -> """ Copyright 2013–2021 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 - and LICENSE files. + For more information, see the COPYRIGHT + and LICENSE files.

    Plugins and Extensions

      diff --git a/assets/javascripts/templates/pages/root_tmpl.coffee.erb b/assets/javascripts/templates/pages/root_tmpl.coffee.erb index e4a7e593e0..77deab0eb3 100644 --- a/assets/javascripts/templates/pages/root_tmpl.coffee.erb +++ b/assets/javascripts/templates/pages/root_tmpl.coffee.erb @@ -15,10 +15,10 @@ app.templates.intro = """
    • To be notified about new versions, don't forget to watch the repository on GitHub.
    • The issue tracker is the preferred channel for bug reports and feature requests. For everything else, use Gitter. -
    • Contributions are welcome. See the guidelines. +
    • Contributions are welcome. See the guidelines.
    • DevDocs is licensed under the terms of the Mozilla Public License v2.0. For more information, - see the COPYRIGHT and - LICENSE files. + see the COPYRIGHT and + LICENSE files.

      Happy coding! diff --git a/docs/filter-reference.md b/docs/filter-reference.md index 6c1387710b..fcd552d291 100644 --- a/docs/filter-reference.md +++ b/docs/filter-reference.md @@ -11,7 +11,7 @@ Filters use the [HTML::Pipeline](https://github.com/jch/html-pipeline) library. They take an HTML string or [Nokogiri](http://nokogiri.org/) node as input, optionally perform modifications and/or extract information from it, and then outputs the result. Together they form a pipeline where each filter hands its output to the next filter's input. Every documentation page passes through this pipeline before being copied on the local filesystem. -Filters are subclasses of the [`Docs::Filter`](https://github.com/freeCodeCamp/devdocs/blob/master/lib/docs/core/filter.rb) class and require a `call` method. A basic implementation looks like this: +Filters are subclasses of the [`Docs::Filter`](https://github.com/freeCodeCamp/devdocs/blob/main/lib/docs/core/filter.rb) class and require a `call` method. A basic implementation looks like this: ```ruby module Docs @@ -46,7 +46,7 @@ The `call` method must return either `doc` or `html`, depending on the type of f - `:path` — the page's normalized path - `:store_path` — the path where the page will be stored (equal to `:path` with `.html` at the end) - `:internal_urls` — the list of distinct internal URLs found within the page - - `:entries` — the [`Entry`](https://github.com/freeCodeCamp/devdocs/blob/master/lib/docs/core/models/entry.rb) objects to add to the index + - `:entries` — the [`Entry`](https://github.com/freeCodeCamp/devdocs/blob/main/lib/docs/core/models/entry.rb) objects to add to the index * `css`, `at_css`, `xpath`, `at_xpath` Shortcuts for `doc.css`, `doc.xpath`, etc. @@ -73,23 +73,23 @@ The `call` method must return either `doc` or `html`, depending on the type of f ## Core filters -* [`ContainerFilter`](https://github.com/freeCodeCamp/devdocs/blob/master/lib/docs/filters/core/container.rb) — changes the root node of the document (remove everything outside) -* [`CleanHtmlFilter`](https://github.com/freeCodeCamp/devdocs/blob/master/lib/docs/filters/core/clean_html.rb) — removes HTML comments, ` - - """ - source.replace / +\ +` + ); + return source.replace(/ \ -` +`, ); return source.replace(/