react_bootstrap.rb 907 B

12345678910111213141516171819202122232425262728293031323334
  1. module Docs
  2. class ReactBootstrap < UrlScraper
  3. self.slug = 'react_bootstrap'
  4. self.type = 'simple'
  5. self.release = '1.5.0'
  6. self.base_url = 'https://react-bootstrap.github.io/'
  7. self.links = {
  8. home: 'https://react-bootstrap.github.io',
  9. code: 'https://github.com/react-bootstrap/react-bootstrap'
  10. }
  11. html_filters.push 'react_bootstrap/entries', 'react_bootstrap/clean_html'
  12. options[:skip] = %w(
  13. react-overlays/
  14. )
  15. options[:replace_paths] = {
  16. }
  17. options[:trailing_slash] = true
  18. options[:attribution] = <<-HTML
  19. &copy; 2014&ndash;present Stephen J. Collings, Matthew Honnibal, Pieter Vanderwerff<br>
  20. Licensed under the MIT License (MIT).
  21. HTML
  22. def get_latest_version(opts)
  23. doc = fetch_doc('https://react-bootstrap.github.io/', opts)
  24. doc.at_css('#t-version>a').content.split()[0].strip[1..-1]
  25. end
  26. end
  27. end