Chris Roberts 5 bulan lalu
induk
melakukan
63a1e666e8
1 mengubah file dengan 11 tambahan dan 3 penghapusan
  1. 11 3
      lib/docs/scrapers/tcl_tk.rb

+ 11 - 3
lib/docs/scrapers/tcl_tk.rb

@@ -3,9 +3,6 @@ module Docs
     self.name = 'Tcl/Tk'
     self.type = 'tcl_tk'
     self.slug = 'tcl_tk'
-    self.release = '8.6.6'
-    self.base_url = 'https://www.tcl-lang.org/man/tcl/'
-    self.root_path = 'contents.htm'
     self.links = {
       home: 'https://www.tcl-lang.org/',
       code: 'https://sourceforge.net/projects/tcl/files/Tcl/'
@@ -30,6 +27,17 @@ module Docs
       Licensed under <a href="http://www.tcl-lang.org/software/tcltk/license.html">Tcl/Tk terms</a>
     HTML
 
+    version '8.6' do
+      self.base_url = "https://www.tcl-lang.org/man/tcl#{self.version}/"
+      self.root_path = 'contents.htm'
+      self.release = '8.6.6'
+    end
+
+    version '9.0' do
+      self.base_url = "https://www.tcl-lang.org/man/tcl#{self.version}/"
+      self.release = '9.0.2'
+    end
+
     def get_latest_version(opts)
       doc = fetch_doc('https://www.tcl-lang.org/man/tcl/', opts)
       doc.at_css('h2').content.scan(/Tk([0-9.]+)/)[0][0]