1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Avoid documenting private or external classes

There are a lot of monkey patches inside the code base but there's
no need to document external constants so let's remove them from
the documentation

Also, since there are monkey patches for some test cases classes,
there were sometimes both documented and sneaked under the wrong
section in the sidebar.

Finally, for future references, the `active_support/vendor`
folder has been originally ignored in https://git.io/vDqfA but
no longer exists.

[ci skip]
This commit is contained in:
Robin Dupret 2017-01-31 21:33:50 +01:00
parent 6a1c0218df
commit b7dbfe1b4d
4 changed files with 18 additions and 7 deletions

View file

@ -2,6 +2,8 @@ require "active_support"
require "active_support/file_update_checker" require "active_support/file_update_checker"
require "active_support/core_ext/array/wrap" require "active_support/core_ext/array/wrap"
# :enddoc:
module I18n module I18n
class Railtie < Rails::Railtie class Railtie < Rails::Railtie
config.i18n = ActiveSupport::OrderedOptions.new config.i18n = ActiveSupport::OrderedOptions.new

View file

@ -74,5 +74,7 @@ module LibXML #:nodoc:
end end
end end
# :enddoc:
LibXML::XML::Document.include(LibXML::Conversions::Document) LibXML::XML::Document.include(LibXML::Conversions::Document)
LibXML::XML::Node.include(LibXML::Conversions::Node) LibXML::XML::Node.include(LibXML::Conversions::Node)

View file

@ -8,8 +8,7 @@ module Rails
include: %w( include: %w(
README.rdoc README.rdoc
lib/active_support/**/*.rb lib/active_support/**/*.rb
), )
exclude: "lib/active_support/vendor/*"
}, },
"activerecord" => { "activerecord" => {
@ -69,7 +68,11 @@ module Rails
README.rdoc README.rdoc
lib/**/*.rb lib/**/*.rb
), ),
exclude: "lib/rails/generators/rails/**/templates/**/*.rb" exclude: %w(
lib/rails/generators/rails/**/templates/**/*.rb
lib/rails/test_unit/*
lib/rails/api/generator.rb
)
} }
} }

View file

@ -14,10 +14,12 @@ require "active_support/testing/autorun"
if defined?(ActiveRecord::Base) if defined?(ActiveRecord::Base)
ActiveRecord::Migration.maintain_test_schema! ActiveRecord::Migration.maintain_test_schema!
class ActiveSupport::TestCase module ActiveSupport
include ActiveRecord::TestFixtures class TestCase
self.fixture_path = "#{Rails.root}/test/fixtures/" include ActiveRecord::TestFixtures
self.file_fixture_path = fixture_path + "files" self.fixture_path = "#{Rails.root}/test/fixtures/"
self.file_fixture_path = fixture_path + "files"
end
end end
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
@ -27,6 +29,8 @@ if defined?(ActiveRecord::Base)
end end
end end
# :enddoc:
class ActionController::TestCase class ActionController::TestCase
def before_setup # :nodoc: def before_setup # :nodoc:
@routes = Rails.application.routes @routes = Rails.application.routes