terraform.rb 743 B

123456789101112131415161718192021222324252627
  1. module Docs
  2. class Terraform < UrlScraper
  3. self.name = 'Terraform'
  4. self.type = 'terraform'
  5. self.release = '0.11.7'
  6. self.base_url = 'https://www.terraform.io/docs/'
  7. self.root_path = 'index.html'
  8. self.links = {
  9. home: 'https://www.terraform.io/',
  10. code: 'https://github.com/hashicorp/terraform'
  11. }
  12. html_filters.push 'terraform/entries', 'terraform/clean_html'
  13. options[:skip_patterns] = [/enterprise/, /enterprise-legacy/]
  14. options[:attribution] = <<-HTML
  15. &copy; 2018 HashiCorp</br>
  16. Licensed under the MPL 2.0 License.
  17. HTML
  18. def get_latest_version(opts)
  19. contents = get_latest_github_release('hashicorp', 'terraform', opts)
  20. contents.sub("v", "")
  21. end
  22. end
  23. end