Unified · Split
| @@ -26,7 +26,7 @@ module Docs · 25 unmodified lines | ||
| 26 | 26 | HTML |
| 27 | 27 | |
| 28 | 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 | 30 | body.scan(/version \d*\.?\d*/)[0].sub('version', '') |
| 31 | 31 | end |
| 32 | 32 | |
| @@ -117,7 +117,8 @@ module Docs · 116 unmodified lines | ||
| 117 | 117 | |
| 118 | 118 | def get_latest_version(opts) |
| 119 | 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 | 122 | end |
| 122 | 123 | end |
| 123 | 124 | end |
| @@ -20,8 +20,8 @@ module Docs · 19 unmodified lines | ||
| 20 | 20 | HTML |
| 21 | 21 | |
| 22 | 22 | def get_latest_version(opts) |
| 23 | − contents = get_github_file_contents('hashicorp', 'terraform-website', 'content/config.rb', opts) | |
| 24 | − contents.scan(/version\s+=\s+"([0-9.]+)"/)[0][0] | |
| 23 | + contents = get_latest_github_release('hashicorp', 'terraform', opts) | |
| 24 | + contents.sub("v", "") | |
| 25 | 25 | end |
| 26 | 26 | end |
| 27 | 27 | end |