moment.rb 793 B

123456789101112131415161718192021222324252627282930
  1. module Docs
  2. class Moment < UrlScraper
  3. self.name = 'Moment.js'
  4. self.slug = 'moment'
  5. self.type = 'moment'
  6. self.release = '2.22.1'
  7. self.base_url = 'http://momentjs.com'
  8. self.root_path = '/docs/'
  9. self.initial_paths = %w(/guides/)
  10. self.links = {
  11. home: 'http://momentjs.com/',
  12. code: 'https://github.com/moment/moment/'
  13. }
  14. html_filters.push 'moment/clean_html', 'moment/entries', 'title'
  15. options[:title] = 'Moment.js'
  16. options[:container] = '.docs-content'
  17. options[:skip_links] = true
  18. options[:attribution] = <<-HTML
  19. &copy; JS Foundation and other contributors<br>
  20. Licensed under the MIT License.
  21. HTML
  22. def get_latest_version(opts)
  23. get_github_tags('moment', 'moment', opts)[0]['name']
  24. end
  25. end
  26. end