rails.rb 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. module Docs
  2. class Rails < Rdoc
  3. include FixInternalUrlsBehavior
  4. self.name = 'Ruby on Rails'
  5. self.slug = 'rails'
  6. self.dir = '/Users/Thibaut/DevDocs/Docs/RDoc/Rails'
  7. self.initial_paths = %w(guides/index.html)
  8. self.links = {
  9. home: 'http://rubyonrails.org/',
  10. code: 'https://github.com/rails/rails'
  11. }
  12. html_filters.replace 'rdoc/entries', 'rails/entries'
  13. html_filters.push 'rails/clean_html_guides'
  14. options[:skip_rdoc_filters?] = ->(filter) { filter.slug.start_with?('guides/') }
  15. options[:root_title] = 'Ruby on Rails'
  16. options[:skip] += %w(
  17. guides/credits.html
  18. guides/ruby_on_rails_guides_guidelines.html
  19. guides/contributing_to_ruby_on_rails.html
  20. guides/development_dependencies_install.html
  21. guides/api_documentation_guidelines.html
  22. ActionController/Instrumentation.html
  23. ActionController/Rendering.html
  24. ActionDispatch/DebugExceptions.html
  25. ActionDispatch/Journey/Parser.html
  26. ActionDispatch/Reloader.html
  27. ActionDispatch/Routing/HtmlTableFormatter.html
  28. ActionDispatch/ShowExceptions.html
  29. ActionView/FixtureResolver.html
  30. ActionView/LogSubscriber.html
  31. ActionView/TestCase/Behavior/RenderedViewsCollection.html
  32. ActiveRecord/Tasks/DatabaseTasks.html
  33. ActiveSupport/Dependencies/WatchStack.html
  34. ActiveSupport/Notifications/Fanout.html)
  35. options[:skip_patterns] += [
  36. /release_notes/,
  37. /\AActionController\/Testing/,
  38. /\AActionView\/LookupContext/,
  39. /\AActionView\/Resolver/,
  40. /\AActiveSupport\/Multibyte\/Unicode\//,
  41. /\AActiveSupport\/XML/i,
  42. /\ASourceAnnotationExtractor/,
  43. /\AI18n\/Railtie/,
  44. /\AMinitest/,
  45. /\ARails\/API/,
  46. /\ARails\/AppBuilder/,
  47. /\ARails\/PluginBuilder/,
  48. /\ARails\/Generators\/Testing/]
  49. options[:attribution] = ->(filter) do
  50. if filter.slug.start_with?('guides')
  51. <<-HTML
  52. &copy; 2004&ndash;2017 David Heinemeier Hansson<br>
  53. Licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
  54. HTML
  55. else
  56. <<-HTML
  57. &copy; 2004&ndash;2017 David Heinemeier Hansson<br>
  58. Licensed under the MIT License.
  59. HTML
  60. end
  61. end
  62. version '5.1' do
  63. self.release = '5.1.4'
  64. end
  65. version '5.0' do
  66. self.release = '5.0.6'
  67. end
  68. version '4.2' do
  69. self.release = '4.2.10'
  70. end
  71. version '4.1' do
  72. self.release = '4.1.16'
  73. end
  74. end
  75. end