Fix get_latest_version procedure that were showing bad information
@@ -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
@@ -82,8 +82,8 @@ module Docs
- 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]
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
- 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]