Fix GNU Make, Rails and Terraform get_latest_version

pull/1688/head
Enoc 3 years ago
parent 3412d980aa
commit 437485140d

@ -26,7 +26,7 @@ module Docs
HTML
def get_latest_version(opts)
body = fetch(self.base_url, opts)
body = fetch("https://www.gnu.org/software/make/manual/html_node/", opts)
body.scan(/version \d*\.?\d*/)[0].sub('version', '')
end

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

@ -20,8 +20,8 @@ module Docs
HTML
def get_latest_version(opts)
contents = get_github_file_contents('hashicorp', 'terraform-website', 'content/config.rb', opts)
contents.scan(/version\s+=\s+"([0-9.]+)"/)[0][0]
contents = get_latest_github_release('hashicorp', 'terraform', opts)
contents.sub("v", "")
end
end
end

Loading…
Cancel
Save