codeception.rb 752 B

123456789101112131415161718192021222324252627
  1. module Docs
  2. class Codeception < UrlScraper
  3. self.name = 'Codeception'
  4. self.type = 'codeception'
  5. self.release = '3.0.3'
  6. self.base_url = 'https://codeception.com/docs/'
  7. self.root_path = 'index.html'
  8. self.links = {
  9. home: 'https://codeception.com/',
  10. code: 'https://github.com/Codeception/Codeception'
  11. }
  12. html_filters.push 'codeception/entries', 'codeception/clean_html'
  13. options[:skip_patterns] = [/install/]
  14. options[:attribution] = <<-HTML
  15. &copy; 2011 Michael Bodnarchuk and contributors<br>
  16. Licensed under the MIT License.
  17. HTML
  18. def get_latest_version(opts)
  19. doc = fetch_doc('https://codeception.com/changelog', opts)
  20. doc.at_css('#page > h4').content
  21. end
  22. end
  23. end