rethinkdb.rb 772 B

1234567891011121314151617181920212223242526
  1. module Docs
  2. class Rethinkdb < UrlScraper
  3. self.name = 'RethinkDB'
  4. self.type = 'rethinkdb'
  5. self.version = '2.0.3'
  6. self.base_url = 'http://rethinkdb.com/api/javascript/'
  7. self.links = {
  8. home: 'http://rethinkdb.com/',
  9. code: 'https://github.com/rethinkdb/rethinkdb'
  10. }
  11. html_filters.push 'rethinkdb/entries', 'rethinkdb/clean_html'
  12. options[:trailing_slash] = false
  13. options[:container] = '.docs-article'
  14. options[:fix_urls] = ->(url) do
  15. url.sub! %r{rethinkdb.com/api/(?!javascript|ruby|python)}, 'rethinkdb.com/api/javascript/'
  16. end
  17. options[:attribution] = <<-HTML
  18. &copy; RethinkDB contributors<br>
  19. Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
  20. HTML
  21. end
  22. end