History

Update URLs for tcl_tk and fix version check

Chris Roberts committed 1 year ago

Commit 18ca2081 parent 8b3f5521 file · +4 −4Browse files

Showing the changes to lib/docs (1 of 1 file). Show all

Unified · Split

lib/docs/scrapers/tcl_tk.rb+4−4
@@ -4,10 +4,10 @@ module Docs · 3 unmodified lines
4 self.type = 'tcl_tk'4 self.type = 'tcl_tk'
5 self.slug = 'tcl_tk'5 self.slug = 'tcl_tk'
6 self.release = '8.6.6'6 self.release = '8.6.6'
7 self.base_url = 'https://www.tcl.tk/man/tcl/'7 self.base_url = 'https://www.tcl-lang.org/man/tcl/'
8 self.root_path = 'contents.htm'8 self.root_path = 'contents.htm'
9 self.links = {9 self.links = {
10 home: 'https://www.tcl.tk/',10 home: 'https://www.tcl-lang.org/',
11 code: 'https://sourceforge.net/projects/tcl/files/Tcl/'11 code: 'https://sourceforge.net/projects/tcl/files/Tcl/'
12 }12 }
13 13
@@ -27,11 +27,11 @@ module Docs · 13 unmodified lines
27 ]27 ]
28 28
29 options[:attribution] = <<-HTML29 options[:attribution] = <<-HTML
30 Licensed under <a href="http://tcl.tk/software/tcltk/license.html">Tcl/Tk terms</a>30 Licensed under <a href="http://www.tcl-lang.org/software/tcltk/license.html">Tcl/Tk terms</a>
31 HTML31 HTML
32 32
33 def get_latest_version(opts)33 def get_latest_version(opts)
34 doc = fetch_doc('https://www.tcl.tk/man/tcl/contents.htm', opts)34 doc = fetch_doc('https://www.tcl-lang.org/man/tcl/', opts)
35 doc.at_css('h2').content.scan(/Tk([0-9.]+)/)[0][0]35 doc.at_css('h2').content.scan(/Tk([0-9.]+)/)[0][0]
36 end36 end
37 end37 end