Fix broken get_latest_version implementations

pull/1356/head
Simon Legner 4 years ago
parent 78fb2c812a
commit c0290b816d

@ -75,8 +75,8 @@ module Docs
end
def get_latest_version(opts)
doc = fetch_doc('https://docs.ansible.com/ansible/latest/index.html', opts)
doc.at_css('.version').content.strip
tags = get_github_tags('ansible', 'ansible', opts)
tags[0]['name'][1..-1]
end
end
end

@ -22,9 +22,7 @@ module Docs
HTML
def get_latest_version(opts)
json = fetch_json("https://developer.mozilla.org/en-US/docs/feeds/json/tag/#{options[:mdn_tag]}", opts)
dates = json.map { |i| i['pubdate'] }
DateTime.parse(dates.max).to_time.to_i
get_latest_github_commit_date('mdn', 'content', opts)
end
private

@ -66,8 +66,7 @@ module Docs
end
def get_latest_version(opts)
html = fetch('https://docs.scipy.org/doc/', opts)
html.scan(/Numpy ([0-9.]+) Reference Guide/)[0][0]
get_latest_github_release('numpy', 'numpy', opts)
end
end
end

@ -34,7 +34,7 @@ module Docs
end
def get_latest_version(opts)
get_latest_github_release('vuejs', 'vue', opts)
get_latest_github_release('vuejs', 'vue-next', opts)
end
end
end

Loading…
Cancel
Save