Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/docs/scrapers/electron.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class Electron < UrlScraper
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
end
end
2 changes: 1 addition & 1 deletion lib/docs/scrapers/nix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Nix < UrlScraper

def get_latest_version(opts)
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
end
end
end
3 changes: 1 addition & 2 deletions lib/docs/scrapers/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ class Redis < UrlScraper
HTML

def get_latest_version(opts)
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)
end

private
Expand Down