socketio.rb 947 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. module Docs
  2. class Socketio < UrlScraper
  3. self.name = 'Socket.IO'
  4. self.slug = 'socketio'
  5. self.type = 'socketio'
  6. self.links = {
  7. home: 'http://socket.io/',
  8. code: 'https://github.com/socketio/socket.io'
  9. }
  10. html_filters.push 'socketio/clean_html', 'socketio/entries'
  11. options[:trailing_slash] = false
  12. options[:skip] = %w(/faq /glossary)
  13. options[:attribution] = <<-HTML
  14. &copy; 2014&ndash;2021 Automattic<br>
  15. Licensed under the MIT License.
  16. HTML
  17. version '4' do
  18. self.release = '4.0.0'
  19. self.base_url = "https://socket.io/docs/v#{version}"
  20. end
  21. version '3' do
  22. self.release = '3.1.2'
  23. self.base_url = "https://socket.io/docs/v#{version}"
  24. end
  25. version '2' do
  26. self.release = '2.4.0'
  27. self.base_url = "https://socket.io/docs/v#{version}"
  28. end
  29. def get_latest_version(opts)
  30. get_npm_version('socket.io', opts)
  31. end
  32. end
  33. end