Merge pull request #1296 from MasterEnoc/fixLatestVersion

Fix get_latest_version procedure that were showing bad information
pull/1364/head
Simon Legner 4 years ago committed by GitHub
commit 5f2105a93b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,8 +35,8 @@ module Docs
HTML
def get_latest_version(opts)
doc = fetch_doc('http://httpd.apache.org/docs/', opts)
doc.at_css('#apcontents > ul a')['href'][0...-1]
doc = fetch_doc('http://httpd.apache.org/download', opts)
doc.at_css('#apcontents li > a').content
end
end
end

@ -82,8 +82,8 @@ module Docs
end
def get_latest_version(opts)
doc = fetch_doc('https://api.cakephp.org/3.7/', opts)
doc.at_css('.version-picker .dropdown-toggle').content.strip
doc = fetch_doc('https://cakephp.org', opts)
doc.at_css('.title-home h1').content.scan(/\d\.\d*\.*\d*\.*\d*\.*/)[0]
end
private

@ -2,7 +2,7 @@ module Docs
class Markdown < UrlScraper
self.name = 'Markdown'
self.type = 'simple'
self.base_url = 'http://daringfireball.net/projects/markdown/syntax'
self.base_url = 'https://daringfireball.net/projects/markdown/syntax'
html_filters.push 'markdown/clean_html', 'markdown/entries'

@ -108,7 +108,8 @@ module Docs
end
def get_latest_version(opts)
get_latest_github_release('rails', 'rails', opts)
doc = fetch_doc('https://rubyonrails.org/', opts)
doc.at_css('.version p a').content.scan(/\d\.\d*\.*\d*\.*\d*/)[0]
end
end
end

Loading…
Cancel
Save