vertx.rb 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. module Docs
  2. class Vertx < UrlScraper
  3. self.name = 'Vert.x'
  4. self.slug = 'vertx'
  5. self.type = 'vertx'
  6. self.links = {
  7. home: 'http://vertx.io',
  8. code: 'https://github.com/eclipse-vertx/vert.x'
  9. }
  10. html_filters.push 'vertx/entries', 'vertx/clean_html'
  11. options[:attribution] = <<-HTML
  12. © 2025 Eclipse Vert.x™</br>
  13. Eclipse Vert.x™ is open source and dual-licensed under the Eclipse Public License 2.0 and the Apache License 2.0.</br>
  14. Website design by Michel Krämer.
  15. HTML
  16. options[:skip_patterns] = [
  17. /api/,
  18. /5.0.0/,
  19. /apidocs/,
  20. /blog/,
  21. ]
  22. version '5' do
  23. self.release = '5.0.0'
  24. self.base_url = "https://vertx.io/docs/"
  25. end
  26. version '4' do
  27. self.release = '4.5.15'
  28. self.base_url = "https://vertx.io/docs/#{self.release}"
  29. end
  30. version '3' do
  31. self.release = '3.9.16'
  32. self.base_url = "https://vertx.io/docs/#{self.release}"
  33. end
  34. def get_latest_version(opts)
  35. doc = fetch_doc('https://repo1.maven.org/maven2/io/vertx/vertx-stack-manager/maven-metadata.xml', opts)
  36. doc.css('version')[-1].text
  37. end
  38. end
  39. end