diff --git a/lib/docs/scrapers/gnu_make.rb b/lib/docs/scrapers/gnu_make.rb index 88b78745..a2837a46 100644 --- a/lib/docs/scrapers/gnu_make.rb +++ b/lib/docs/scrapers/gnu_make.rb @@ -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 diff --git a/lib/docs/scrapers/rdoc/rails.rb b/lib/docs/scrapers/rdoc/rails.rb index 40baecb9..1d353539 100644 --- a/lib/docs/scrapers/rdoc/rails.rb +++ b/lib/docs/scrapers/rdoc/rails.rb @@ -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 diff --git a/lib/docs/scrapers/terraform.rb b/lib/docs/scrapers/terraform.rb index 0965ad06..411af235 100644 --- a/lib/docs/scrapers/terraform.rb +++ b/lib/docs/scrapers/terraform.rb @@ -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