puppeteer.rb 710 B

123456789101112131415161718192021222324
  1. module Docs
  2. class Puppeteer < Github
  3. self.release = '1.10.0'
  4. self.base_url = 'https://github.com/GoogleChrome/puppeteer/blob/v1.8.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(options, &block)
  15. get_github_file_contents('GoogleChrome', 'puppeteer', 'README.md', options) do |contents|
  16. block.call contents.scan(/\/v([0-9.]+)\/docs\/api\.md/)[0][0]
  17. end
  18. end
  19. end
  20. end