1
0

react_bootstrap.rb 941 B

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