1
0

codeigniter.rb 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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[:skip] = %w(
  12. license.html
  13. changelog.html
  14. DCO.html
  15. general/welcome.html
  16. general/requirements.html
  17. general/credits.html
  18. libraries/index.html
  19. helpers/index.html
  20. )
  21. options[:skip_patterns] = [
  22. /\Acontributing/,
  23. /\Adocumentation/,
  24. /\Achangelogs/,
  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. options[:container] = '.document > div'
  35. end
  36. version '3' do
  37. self.release = '3.1.8'
  38. self.base_url = 'https://codeigniter.com/userguide3/'
  39. options[:container] = '.document'
  40. end
  41. def get_latest_version(opts)
  42. tags = get_github_tags('codeigniter4', 'codeigniter4', opts)
  43. tags[0]['name'][1..-1]
  44. end
  45. end
  46. end