codeigniter.rb 1.1 KB

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