mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Fix GNU Make, Rails and Terraform get_latest_version
This commit is contained in:
parent
3412d980aa
commit
437485140d
3 changed files with 5 additions and 4 deletions
|
@ -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…
Reference in a new issue