فهرست منبع

Update HAProxy documentation (2.6.5)

Simon Legner 3 سال پیش
والد
کامیت
d55d41b03c
2فایلهای تغییر یافته به همراه13 افزوده شده و 8 حذف شده
  1. 1 1
      assets/javascripts/templates/pages/about_tmpl.coffee
  2. 12 7
      lib/docs/scrapers/haproxy.rb

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

@@ -388,7 +388,7 @@ credits = [
     'https://raw.githubusercontent.com/wycats/handlebars.js/master/LICENSE'
   ], [
     'HAProxy',
-    '2021 Willy Tarreau, HAProxy contributors',
+    '2022 Willy Tarreau, HAProxy contributors',
     'GPLv2',
     'https://raw.githubusercontent.com/haproxy/haproxy/master/LICENSE'
   ], [

+ 12 - 7
lib/docs/scrapers/haproxy.rb

@@ -16,18 +16,23 @@ module Docs
     options[:follow_links] = false
 
     options[:attribution] = <<-HTML
-      &copy; 2021 Willy Tarreau, HAProxy contributors<br>
+      &copy; 2022 Willy Tarreau, HAProxy contributors<br>
       Licensed under the GNU General Public License version 2.
     HTML
 
+    version '2.6' do
+      self.release = '2.6.5'
+      self.base_url = "https://docs.haproxy.org/#{self.version}/"
+    end
+
     version '2.5' do
-      self.release = '2.5.0'
-      self.base_url = "https://cbonte.github.io/haproxy-dconv/#{self.version}/"
+      self.release = '2.5.8'
+      self.base_url = "https://docs.haproxy.org/#{self.version}/"
     end
 
     version '2.4' do
-      self.release = '2.4.0'
-      self.base_url = "https://cbonte.github.io/haproxy-dconv/#{self.version}/"
+      self.release = '2.4.18'
+      self.base_url = "https://docs.haproxy.org/#{self.version}/"
     end
 
     version '2.3' do
@@ -66,8 +71,8 @@ module Docs
     end
 
     def get_latest_version(opts)
-      doc = fetch_doc('http://www.haproxy.org', opts)
-      doc.at_css('table[cols=6]').css('tr')[1].at_css('td').content
+      doc = fetch_doc('https://www.haproxy.org', opts)
+      doc.at_css('table[cols=6]').at_css('tr:not(:first-child) > td:first-child:not(:contains("dev"))').content
     end
   end
 end