puppeteer.rb 671 B

1234567891011121314151617181920212223
  1. module Docs
  2. class Puppeteer < Github
  3. self.release = '1.20.0'
  4. self.base_url = 'https://github.com/GoogleChrome/puppeteer/blob/v1.20.0/docs/api.md'
  5. self.links = {
  6. code: 'https://github.com/GoogleChrome/puppeteer'
  7. }
  8. html_filters.push 'puppeteer/entries', 'puppeteer/clean_html'
  9. options[:container] = '.markdown-body'
  10. options[:attribution] = <<-HTML
  11. &copy; 2017 Google Inc<br>
  12. Licensed under the Apache License 2.0.
  13. HTML
  14. def get_latest_version(opts)
  15. contents = get_github_file_contents('GoogleChrome', 'puppeteer', 'README.md', opts)
  16. contents.scan(/\/v([0-9.]+)\/docs\/api\.md/)[0][0]
  17. end
  18. end
  19. end