Update get_latest_version algorithms
@@ -26,8 +26,7 @@ module Docs
HTML
def get_latest_version(opts)
- doc = fetch_doc('https://www.electronjs.org/releases/stable', opts)
- doc.at_css('.release-card__metadata>a')['href'].gsub!(/[a-zA-Z\/:]/, '')[1..-1]
+ get_latest_github_release('electron', 'electron', opts)
end
@@ -23,7 +23,7 @@ module Docs
doc = fetch_doc('https://nixos.org/manual/nix/stable/', opts)
- doc.at_css('a.active')['href'].scan(/([0-9.]+)/)[0][0]
+ doc.at_css('h1.menu-title').content.scan(/([0-9.]+)/).first.first
@@ -21,8 +21,7 @@ module Docs
- body = fetch('http://download.redis.io/redis-stable/00-RELEASENOTES', opts)
- body.scan(/Redis Community Edition ([0-9.]+)/)[0][0]
+ get_latest_github_release('redis', 'redis', opts)
private