Unified · Split
| @@ -26,7 +26,7 @@ module Docs · 25 unmodified lines | |||
| 26 | HTML | 26 | HTML |
| 27 | 27 | ||
| 28 | def get_latest_version(opts) | 28 | def get_latest_version(opts) |
| 29 | body = fetch(self.base_url, opts) | 29 | body = fetch("https://www.gnu.org/software/make/manual/html_node/", opts) |
| 30 | body.scan(/version \d*\.?\d*/)[0].sub('version', '') | 30 | body.scan(/version \d*\.?\d*/)[0].sub('version', '') |
| 31 | end | 31 | end |
| 32 | 32 | ||
| @@ -117,7 +117,8 @@ module Docs · 116 unmodified lines | |||
| 117 | 117 | ||
| 118 | def get_latest_version(opts) | 118 | def get_latest_version(opts) |
| 119 | doc = fetch_doc('https://rubyonrails.org/', opts) | 119 | doc = fetch_doc('https://rubyonrails.org/', opts) |
| 120 | doc.at_css('.version p a').content.scan(/\d\.\d*\.*\d*\.*\d*/)[0] | 120 | doc |
| 121 | doc.at_css('.heading__button span').content.scan(/\d\.\d*\.*\d*\.*\d*/)[0] | ||
| 121 | end | 122 | end |
| 122 | end | 123 | end |
| 123 | end | 124 | end |
| @@ -20,8 +20,8 @@ module Docs · 19 unmodified lines | |||
| 20 | HTML | 20 | HTML |
| 21 | 21 | ||
| 22 | def get_latest_version(opts) | 22 | def get_latest_version(opts) |
| 23 | contents = get_github_file_contents('hashicorp', 'terraform-website', 'content/config.rb', opts) | 23 | contents = get_latest_github_release('hashicorp', 'terraform', opts) |
| 24 | contents.scan(/version\s+=\s+"([0-9.]+)"/)[0][0] | 24 | contents.sub("v", "") |
| 25 | end | 25 | end |
| 26 | end | 26 | end |
| 27 | end | 27 | end |