Merge pull request #2019 from ClasherKasten/fix/update-checks

pull/2020/head
Simon Legner 2 years ago committed by GitHub
commit a757d41e88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -150,7 +150,7 @@ module Docs
if path.empty? || path == '/'
root_url.to_s
else
File.join(base_url.to_s, path)
File.join(base_url.to_s, path.to_s)
end
end

@ -23,7 +23,7 @@ module Docs
# Check if the 'headers' page has changed
def get_latest_version(opts)
doc = fetch_doc(self.base_url + self.root_path, opts)
doc = fetch_doc((self.base_url + self.root_path).to_s, opts)
date = doc.at_css('#footer-info-lastmod').content
date = date.match(/[[:digit:]]{1,2} .* [[:digit:]]{4}/).to_s
date = DateTime.strptime(date, '%e %B %Y').to_time.to_i

@ -96,7 +96,7 @@ module Docs
def get_latest_version(opts)
doc = fetch_doc('https://docs.docker.com/engine/release-notes/', opts)
latest_version = doc.at_css('.content > section > h1[id^="version-"]').content.strip
latest_version = doc.at_css('.content > section > h2').content.strip
latest_version.rpartition(' ')[-1]
end
end

@ -27,7 +27,7 @@ module Docs
def get_latest_version(opts)
doc = fetch_doc('https://www.electronjs.org/releases/stable', opts)
doc.at_css(".tag").content.gsub!(/[a-zA-Z]/, '')
doc.at_css('.release-card__metadata>a')['href'].gsub!(/[a-zA-Z\/:]/, '')[1..-1]
end
end
end

@ -156,8 +156,8 @@ module Docs
def get_latest_version(opts)
doc = fetch_doc('https://gcc.gnu.org/onlinedocs/', opts)
label = doc.at_css('ul > li > ul > li > a').content.strip
label.scan(/([0-9.]+)/)[0][0]
label = doc.at_css('details > ul > li > a')['href'].strip
label.scan(/([0-9.]+)/)[2..-1][0][0]
end
end
end

@ -53,8 +53,8 @@ module Docs
def get_latest_version(opts)
doc = fetch_doc('https://gcc.gnu.org/onlinedocs/', opts)
label = doc.at_css('ul > li > ul > li > a').content.strip
label.scan(/([0-9.]+)/)[0][0]
label = doc.at_css('details > ul > li > a')['href'].strip
label.scan(/([0-9.]+)/)[2..-1][0][0]
end
end
end

@ -29,7 +29,7 @@ module Docs
def get_latest_version(opts)
doc = fetch_doc('https://react-bootstrap.github.io/', opts)
doc.at_css('#t-version>a').content.split()[0].strip[1..-1]
doc.at_css('.my-2').content.split()[-1].strip[0..-1]
end
end
end

Loading…
Cancel
Save