1
0

codeigniter.rb 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. module Docs
  2. class Codeigniter < UrlScraper
  3. self.name = 'CodeIgniter'
  4. self.type = 'sphinx'
  5. self.root_path = 'index.html'
  6. self.links = {
  7. home: 'https://codeigniter.com/',
  8. code: 'https://github.com/bcit-ci/CodeIgniter'
  9. }
  10. html_filters.push 'codeigniter/entries', 'sphinx/clean_html'
  11. options[:container] = '.document'
  12. options[:skip] = %w(
  13. license.html
  14. changelog.html
  15. DCO.html
  16. general/welcome.html
  17. general/requirements.html
  18. general/credits.html
  19. libraries/index.html
  20. helpers/index.html
  21. )
  22. options[:skip_patterns] = [
  23. /\Acontributing/,
  24. /\Adocumentation/,
  25. /\Ainstallation\/upgrade/
  26. ]
  27. options[:attribution] = <<-HTML
  28. &copy; 2014&ndash;2020 British Columbia Institute of Technology<br>
  29. Licensed under the MIT License.
  30. HTML
  31. version '4' do
  32. self.release = '4.0.4'
  33. self.base_url = 'https://codeigniter.com/userguide4/'
  34. end
  35. version '3' do
  36. self.release = '3.1.8'
  37. self.base_url = 'https://codeigniter.com/userguide3/'
  38. end
  39. def get_latest_version(opts)
  40. tags = get_github_tags('codeigniter4', 'codeigniter4', opts)
  41. tags[0]['name'][1..-1]
  42. end
  43. end
  44. end