Prechádzať zdrojové kódy

Update MariaDB documentation (10.8.3)

Fixes #1796.
Simon Legner 3 rokov pred
rodič
commit
52e061ad08

+ 1 - 1
assets/javascripts/templates/pages/about_tmpl.coffee

@@ -528,7 +528,7 @@ credits = [
     'http://www.gnu.org/copyleft/fdl.html'
   ], [
     'MariaDB',
-    '2019 MariaDB',
+    '2022 MariaDB',
     'CC BY-SA & GFDL',
     'https://mariadb.com/kb/en/library/documentation/+license/'
   ], [

+ 1 - 0
lib/docs/filters/mariadb/entries.rb

@@ -9,6 +9,7 @@ module Docs
 
       def get_type
         return 'Type' if doc.inner_html == ''
+        return 'Tutorials' if at_css('a.crumb[href]:contains("Training & Tutorials")')
 
         link = at_css('#breadcrumbs > a:nth-child(4)')
         link.nil? ? at_css('#breadcrumbs > a:nth-child(3)').content : link.content

+ 3 - 1
lib/docs/filters/mariadb/erase_invalid_pages.rb

@@ -10,7 +10,9 @@ module Docs
         # If this page should not be scraped, we erase it's contents in here so that the internal urls are not picked up
         # The entries filter will make sure that no entry is saved for this page
 
-        if at_css('a.crumb[href="https://mariadb.com/kb/en/documentation/"]').nil?
+        if at_css('a.crumb[href="https://mariadb.com/kb/en/documentation/"]').nil? and at_css('a.crumb[href="https://mariadb.com/kb/en/training-tutorials/"]').nil?
+          doc.inner_html = ''
+        elsif at_css('.question') and at_css('.answer')
           doc.inner_html = ''
         end
 

+ 2 - 2
lib/docs/scrapers/mariadb.rb

@@ -2,7 +2,7 @@ module Docs
   class Mariadb < UrlScraper
     self.name = 'MariaDB'
     self.type = 'mariadb'
-    self.release = '10.6.4'
+    self.release = '10.8.3'
     self.base_url = 'https://mariadb.com/kb/en/'
     self.root_path = 'documentation/'
     self.links = {
@@ -24,7 +24,7 @@ module Docs
     ]
 
     options[:attribution] = <<-HTML
-      &copy; 2021 MariaDB<br>
+      &copy; 2022 MariaDB<br>
       Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
     HTML