[devdocsgjs/main: 1243/1867] electron: update to 11.0.1




commit d495f49ef645c8eecdbb2b5cca77cc9b01946076
Author: samfundev <samdinner hotmail com>
Date:   Wed Nov 18 23:08:09 2020 -0500

    electron: update to 11.0.1

 assets/javascripts/templates/pages/about_tmpl.coffee |  2 +-
 lib/docs/filters/electron/clean_html.rb              |  4 ++++
 lib/docs/scrapers/electron.rb                        | 12 ++++++------
 3 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee 
b/assets/javascripts/templates/pages/about_tmpl.coffee
index 0dff557f..0c10bb48 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -258,7 +258,7 @@ credits = [
     'https://api.drupal.org/api/drupal/LICENSE.txt'
   ], [
     'Electron',
-    '2013-2018 GitHub Inc.',
+    'GitHub Inc.',
     'MIT',
     'https://raw.githubusercontent.com/electron/electron/master/LICENSE'
   ], [
diff --git a/lib/docs/filters/electron/clean_html.rb b/lib/docs/filters/electron/clean_html.rb
index 820cc87f..4459f913 100644
--- a/lib/docs/filters/electron/clean_html.rb
+++ b/lib/docs/filters/electron/clean_html.rb
@@ -11,9 +11,13 @@ module Docs
         if root_page?
           doc.child.before('<h1>Electron Documentation</h1>')
 
+          css("div.subtron, div.py-6").remove
+
           css('h2 > a').each do |node|
             node.before(node.children).remove
           end
+        else
+          @doc = doc.at_css('div.docs > div.markdown-body')
         end
 
         at_css('h2').name = 'h1' if !at_css('h1') && at_css('h2')
diff --git a/lib/docs/scrapers/electron.rb b/lib/docs/scrapers/electron.rb
index 8e635f49..49fb5193 100644
--- a/lib/docs/scrapers/electron.rb
+++ b/lib/docs/scrapers/electron.rb
@@ -1,17 +1,17 @@
 module Docs
   class Electron < UrlScraper
     self.type = 'simple'
-    self.base_url = 'https://electronjs.org/docs'
-    self.release = '2.0.2'
+    self.base_url = 'https://www.electronjs.org/docs'
+    self.release = '11.0.1'
     self.links = {
-      home: 'https://electronjs.org/',
+      home: 'https://www.electronjs.org/',
       code: 'https://github.com/electron/electron'
     }
 
     html_filters.push 'electron/clean_html', 'electron/entries'
 
     options[:trailing_slash] = false
-    options[:container] = '.page-section > .container, .page-section > .container-narrow'
+    options[:container] = 'main'
     options[:skip] = %w(guides development tutorial versions all)
     options[:skip_patterns] = [/\/history\z/]
     options[:replace_paths] = {
@@ -19,12 +19,12 @@ module Docs
     }
 
     options[:attribution] = <<-HTML
-      &copy; 2013&ndash;2018 GitHub Inc.<br>
+      &copy; GitHub Inc.<br>
       Licensed under the MIT license.
     HTML
 
     def get_latest_version(opts)
-      doc = fetch_doc('https://electronjs.org/docs', opts)
+      doc = fetch_doc('https://www.electronjs.org/docs', opts)
       doc.at_css('.docs-version').content
     end
   end


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]