From 18707ab17fa492eb25ad2e8f9818a320dc20b823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 29 Jul 2021 21:18:07 +0000 Subject: [PATCH] Standardize nodoc comments --- .../lib/action_cable/channel/broadcasting.rb | 2 +- .../lib/action_cable/connection/base.rb | 6 +-- .../app/models/action_mailbox/record.rb | 2 +- actionmailbox/lib/action_mailbox/base.rb | 4 +- actionmailer/lib/action_mailer/base.rb | 6 +-- .../lib/action_mailer/delivery_job.rb | 2 +- .../inline_preview_interceptor.rb | 6 +-- .../lib/action_mailer/message_delivery.rb | 6 +-- actionmailer/lib/action_mailer/preview.rb | 2 +- actionmailer/lib/action_mailer/rescuable.rb | 6 +-- .../lib/abstract_controller/asset_paths.rb | 2 +- actionpack/lib/abstract_controller/error.rb | 2 +- actionpack/lib/abstract_controller/logger.rb | 2 +- actionpack/lib/action_controller/metal.rb | 10 ++-- .../metal/content_security_policy.rb | 2 +- .../lib/action_controller/metal/cookies.rb | 2 +- .../action_controller/metal/data_streaming.rb | 6 +-- .../lib/action_controller/metal/exceptions.rb | 24 +++++----- .../lib/action_controller/metal/flash.rb | 4 +- .../metal/instrumentation.rb | 2 +- .../lib/action_controller/metal/live.rb | 4 +- .../action_controller/metal/mime_responds.rb | 4 +- .../metal/permissions_policy.rb | 2 +- .../action_controller/metal/redirecting.rb | 2 +- .../lib/action_controller/metal/rendering.rb | 4 +- .../metal/request_forgery_protection.rb | 14 +++--- .../lib/action_controller/metal/rescue.rb | 2 +- .../lib/action_controller/metal/streaming.rb | 2 +- actionpack/lib/action_controller/railtie.rb | 2 +- actionpack/lib/action_controller/test_case.rb | 4 +- .../http/content_security_policy.rb | 2 +- .../lib/action_dispatch/http/mime_type.rb | 4 +- .../lib/action_dispatch/http/parameters.rb | 2 +- .../http/permissions_policy.rb | 2 +- .../lib/action_dispatch/http/request.rb | 6 +-- .../lib/action_dispatch/http/response.rb | 2 +- .../lib/action_dispatch/middleware/cookies.rb | 2 +- .../lib/action_dispatch/middleware/flash.rb | 14 +++--- .../middleware/session/abstract_store.rb | 2 +- .../lib/action_dispatch/request/session.rb | 2 +- actionpack/lib/action_dispatch/routing.rb | 4 +- .../lib/action_dispatch/routing/mapper.rb | 10 ++-- .../action_dispatch/routing/routes_proxy.rb | 2 +- .../action_dispatch/testing/integration.rb | 4 +- .../app/helpers/action_text/content_helper.rb | 2 +- actiontext/app/models/action_text/record.rb | 2 +- actiontext/lib/action_text/rendering.rb | 2 +- actionview/lib/action_view/base.rb | 6 +-- actionview/lib/action_view/buffers.rb | 4 +- actionview/lib/action_view/flows.rb | 4 +- actionview/lib/action_view/helpers.rb | 4 +- .../helpers/active_model_helper.rb | 2 +- .../action_view/helpers/asset_tag_helper.rb | 2 +- .../action_view/helpers/asset_url_helper.rb | 2 +- .../action_view/helpers/atom_feed_helper.rb | 6 +-- .../lib/action_view/helpers/cache_helper.rb | 2 +- .../lib/action_view/helpers/capture_helper.rb | 4 +- .../action_view/helpers/controller_helper.rb | 4 +- .../lib/action_view/helpers/csp_helper.rb | 2 +- .../lib/action_view/helpers/csrf_helper.rb | 2 +- .../lib/action_view/helpers/date_helper.rb | 4 +- .../lib/action_view/helpers/debug_helper.rb | 2 +- .../lib/action_view/helpers/form_helper.rb | 4 +- .../helpers/form_options_helper.rb | 2 +- .../action_view/helpers/form_tag_helper.rb | 2 +- .../action_view/helpers/javascript_helper.rb | 4 +- .../lib/action_view/helpers/number_helper.rb | 2 +- .../helpers/output_safety_helper.rb | 4 +- .../action_view/helpers/rendering_helper.rb | 2 +- .../action_view/helpers/sanitize_helper.rb | 4 +- .../lib/action_view/helpers/tag_helper.rb | 4 +- actionview/lib/action_view/helpers/tags.rb | 4 +- .../lib/action_view/helpers/tags/check_box.rb | 2 +- .../helpers/tags/collection_select.rb | 2 +- .../lib/action_view/helpers/text_helper.rb | 4 +- .../action_view/helpers/translation_helper.rb | 2 +- .../lib/action_view/helpers/url_helper.rb | 2 +- actionview/lib/action_view/lookup_context.rb | 8 ++-- actionview/lib/action_view/model_naming.rb | 2 +- actionview/lib/action_view/path_set.rb | 4 +- .../action_view/renderer/abstract_renderer.rb | 2 +- .../lib/action_view/renderer/renderer.rb | 8 ++-- .../renderer/streaming_template_renderer.rb | 6 +-- .../action_view/renderer/template_renderer.rb | 2 +- actionview/lib/action_view/rendering.rb | 4 +- actionview/lib/action_view/routing_url_for.rb | 2 +- actionview/lib/action_view/template/error.rb | 12 ++--- .../lib/action_view/template/handlers.rb | 6 +-- actionview/lib/action_view/template/html.rb | 6 +-- actionview/lib/action_view/template/inline.rb | 6 +-- .../lib/action_view/template/raw_file.rb | 6 +-- .../lib/action_view/template/resolver.rb | 2 +- actionview/lib/action_view/template/text.rb | 6 +-- actionview/lib/action_view/template/types.rb | 2 +- .../lib/action_view/testing/resolvers.rb | 2 +- activejob/lib/active_job/arguments.rb | 2 +- activejob/lib/active_job/base.rb | 2 +- activejob/lib/active_job/configured_job.rb | 2 +- activejob/lib/active_job/execution.rb | 2 +- activejob/lib/active_job/instrumentation.rb | 2 +- activejob/lib/active_job/log_subscriber.rb | 2 +- activejob/lib/active_job/logging.rb | 2 +- activejob/lib/active_job/queue_adapter.rb | 2 +- .../queue_adapters/async_adapter.rb | 12 ++--- .../queue_adapters/backburner_adapter.rb | 6 +-- .../queue_adapters/delayed_job_adapter.rb | 6 +-- .../queue_adapters/inline_adapter.rb | 4 +- .../active_job/queue_adapters/que_adapter.rb | 6 +-- .../queue_adapters/queue_classic_adapter.rb | 6 +-- .../queue_adapters/resque_adapter.rb | 6 +-- .../queue_adapters/sidekiq_adapter.rb | 6 +-- .../queue_adapters/sneakers_adapter.rb | 6 +-- .../queue_adapters/sucker_punch_adapter.rb | 6 +-- .../active_job/queue_adapters/test_adapter.rb | 4 +- activejob/lib/active_job/queue_name.rb | 2 +- activejob/lib/active_job/timezones.rb | 2 +- activejob/lib/active_job/translation.rb | 2 +- .../lib/active_model/attribute_methods.rb | 2 +- activemodel/lib/active_model/attributes.rb | 2 +- activemodel/lib/active_model/callbacks.rb | 2 +- activemodel/lib/active_model/conversion.rb | 4 +- activemodel/lib/active_model/naming.rb | 4 +- activemodel/lib/active_model/serialization.rb | 2 +- activemodel/lib/active_model/validations.rb | 4 +- .../lib/active_model/validations/absence.rb | 2 +- .../lib/active_model/validations/clusivity.rb | 2 +- .../active_model/validations/comparability.rb | 2 +- activemodel/lib/active_model/validator.rb | 2 +- .../lib/active_record/associations.rb | 38 +++++++-------- .../active_record/associations/association.rb | 4 +- .../associations/association_scope.rb | 2 +- .../associations/belongs_to_association.rb | 2 +- .../belongs_to_polymorphic_association.rb | 2 +- .../associations/builder/association.rb | 2 +- .../associations/builder/belongs_to.rb | 2 +- .../builder/collection_association.rb | 2 +- .../associations/builder/has_many.rb | 2 +- .../associations/builder/has_one.rb | 2 +- .../builder/singular_association.rb | 2 +- .../associations/collection_association.rb | 2 +- .../associations/collection_proxy.rb | 2 +- .../associations/has_many_association.rb | 2 +- .../has_many_through_association.rb | 2 +- .../associations/has_one_association.rb | 2 +- .../has_one_through_association.rb | 2 +- .../active_record/associations/preloader.rb | 2 +- .../associations/preloader/association.rb | 2 +- .../associations/preloader/batch.rb | 2 +- .../associations/preloader/branch.rb | 2 +- .../associations/singular_association.rb | 2 +- .../associations/through_association.rb | 2 +- .../lib/active_record/attribute_methods.rb | 4 +- .../attribute_methods/primary_key.rb | 4 +- .../lib/active_record/autosave_association.rb | 2 +- activerecord/lib/active_record/base.rb | 2 +- activerecord/lib/active_record/callbacks.rb | 4 +- .../abstract/database_statements.rb | 6 +-- .../abstract/query_cache.rb | 2 +- .../abstract/schema_definitions.rb | 6 +-- .../abstract/schema_statements.rb | 4 +- .../abstract/transaction.rb | 6 +-- .../abstract_mysql_adapter.rb | 16 +++---- .../postgresql/database_statements.rb | 2 +- .../connection_adapters/postgresql/quoting.rb | 4 +- .../postgresql/schema_statements.rb | 24 +++++----- .../connection_adapters/postgresql_adapter.rb | 8 ++-- .../sqlite3/database_statements.rb | 14 +++--- .../connection_adapters/sqlite3_adapter.rb | 16 +++---- .../lib/active_record/dynamic_matchers.rb | 2 +- .../active_record/encryption/configurable.rb | 6 +-- activerecord/lib/active_record/fixtures.rb | 8 ++-- activerecord/lib/active_record/inheritance.rb | 2 +- .../lib/active_record/locking/optimistic.rb | 4 +- activerecord/lib/active_record/migration.rb | 40 ++++++++-------- .../lib/active_record/migration/join_table.rb | 2 +- .../lib/active_record/model_schema.rb | 8 ++-- .../lib/active_record/nested_attributes.rb | 2 +- activerecord/lib/active_record/no_touching.rb | 4 +- .../railties/controller_runtime.rb | 2 +- activerecord/lib/active_record/reflection.rb | 8 ++-- .../relation/batches/batch_enumerator.rb | 2 +- .../active_record/relation/calculations.rb | 4 +- .../active_record/relation/spawn_methods.rb | 2 +- .../lib/active_record/schema_dumper.rb | 2 +- .../lib/active_record/scoping/default.rb | 2 +- .../lib/active_record/serialization.rb | 2 +- .../lib/active_record/transactions.rb | 14 +++--- activerecord/lib/active_record/translation.rb | 4 +- .../active_record/validations/associated.rb | 2 +- activerecord/test/cases/test_case.rb | 2 +- .../representations/base_controller.rb | 2 +- .../concerns/active_storage/set_blob.rb | 2 +- .../app/models/active_storage/blob.rb | 20 ++++---- .../app/models/active_storage/current.rb | 2 +- .../app/models/active_storage/record.rb | 2 +- .../app/models/active_storage/variant.rb | 2 +- .../lib/active_storage/attached/changes.rb | 2 +- .../attached/changes/create_many.rb | 2 +- .../attached/changes/create_one.rb | 2 +- .../attached/changes/create_one_of_many.rb | 2 +- .../attached/changes/delete_many.rb | 2 +- .../attached/changes/delete_one.rb | 2 +- .../attached/changes/detach_many.rb | 2 +- .../attached/changes/detach_one.rb | 2 +- .../attached/changes/purge_many.rb | 2 +- .../attached/changes/purge_one.rb | 2 +- .../lib/active_storage/attached/model.rb | 8 ++-- .../lib/active_storage/downloader.rb | 2 +- .../lib/active_storage/reflection.rb | 6 +-- activestorage/lib/active_storage/service.rb | 2 +- .../active_storage/service/configurator.rb | 2 +- .../active_storage/service/disk_service.rb | 2 +- .../active_storage/service/mirror_service.rb | 2 +- .../lib/active_storage/service/registry.rb | 2 +- .../active_support/cache/redis_cache_store.rb | 6 +-- activesupport/lib/active_support/callbacks.rb | 6 +-- activesupport/lib/active_support/concern.rb | 10 ++-- .../core_ext/big_decimal/conversions.rb | 2 +- .../lib/active_support/core_ext/date/blank.rb | 2 +- .../core_ext/date/calculations.rb | 4 +- .../core_ext/date_time/blank.rb | 2 +- .../active_support/core_ext/digest/uuid.rb | 8 ++-- .../lib/active_support/core_ext/enumerable.rb | 6 +-- .../active_support/core_ext/file/atomic.rb | 2 +- .../active_support/core_ext/object/blank.rb | 4 +- .../active_support/core_ext/object/json.rb | 46 +++++++++---------- .../lib/active_support/core_ext/object/try.rb | 2 +- .../lib/active_support/core_ext/range/each.rb | 2 +- .../core_ext/range/include_time_with_zone.rb | 2 +- .../core_ext/string/output_safety.rb | 2 +- .../core_ext/time/calculations.rb | 4 +- .../lib/active_support/dependencies.rb | 12 ++--- .../active_support/dependencies/interlock.rb | 4 +- .../deprecation/proxy_wrappers.rb | 2 +- activesupport/lib/active_support/digest.rb | 2 +- activesupport/lib/active_support/duration.rb | 42 ++++++++--------- .../active_support/environment_inquirer.rb | 2 +- .../evented_file_update_checker.rb | 2 +- .../lib/active_support/json/encoding.rb | 6 +-- .../logger_thread_safe_level.rb | 2 +- .../lib/active_support/message_encryptor.rb | 6 +-- .../lib/active_support/messages/metadata.rb | 4 +- activesupport/lib/active_support/multibyte.rb | 2 +- .../lib/active_support/multibyte/chars.rb | 6 +-- .../active_support/notifications/fanout.rb | 4 +- .../number_to_delimited_converter.rb | 2 +- .../number_to_human_size_converter.rb | 2 +- .../number_to_phone_converter.rb | 2 +- .../lib/active_support/option_merger.rb | 2 +- activesupport/lib/active_support/rescuable.rb | 4 +- .../lib/active_support/testing/deprecation.rb | 2 +- .../lib/active_support/testing/isolation.rb | 2 +- .../lib/active_support/testing/stream.rb | 2 +- .../active_support/testing/tagged_logging.rb | 2 +- .../lib/active_support/time_with_zone.rb | 4 +- .../lib/active_support/values/time_zone.rb | 8 ++-- activesupport/lib/active_support/xml_mini.rb | 2 +- .../lib/active_support/xml_mini/jdom.rb | 2 +- .../lib/active_support/xml_mini/libxml.rb | 10 ++-- .../lib/active_support/xml_mini/libxmlsax.rb | 2 +- .../lib/active_support/xml_mini/nokogiri.rb | 8 ++-- .../active_support/xml_mini/nokogirisax.rb | 2 +- .../lib/active_support/xml_mini/rexml.rb | 2 +- guides/source/api_documentation_guidelines.md | 2 +- guides/source/initialization.md | 2 +- guides/source/plugins.md | 2 +- railties/lib/rails/application.rb | 34 +++++++------- .../lib/rails/application/configuration.rb | 4 +- railties/lib/rails/code_statistics.rb | 2 +- .../lib/rails/code_statistics_calculator.rb | 2 +- railties/lib/rails/command/base.rb | 2 +- railties/lib/rails/command/behavior.rb | 2 +- .../lib/rails/command/environment_argument.rb | 2 +- railties/lib/rails/configuration.rb | 4 +- railties/lib/rails/engine.rb | 6 +-- railties/lib/rails/generators.rb | 10 ++-- .../generators/actions/create_migration.rb | 2 +- railties/lib/rails/generators/base.rb | 8 ++-- railties/lib/rails/generators/erb.rb | 2 +- railties/lib/rails/generators/migration.rb | 2 +- .../lib/rails/generators/model_helpers.rb | 2 +- railties/lib/rails/generators/named_base.rb | 2 +- .../lib/rails/generators/resource_helpers.rb | 4 +- railties/lib/rails/info.rb | 2 +- railties/lib/rails/initializable.rb | 2 +- railties/lib/rails/railtie.rb | 16 +++---- railties/lib/rails/railtie/configuration.rb | 2 +- 287 files changed, 646 insertions(+), 646 deletions(-) diff --git a/actioncable/lib/action_cable/channel/broadcasting.rb b/actioncable/lib/action_cable/channel/broadcasting.rb index 9f702e425e..c0e16b4666 100644 --- a/actioncable/lib/action_cable/channel/broadcasting.rb +++ b/actioncable/lib/action_cable/channel/broadcasting.rb @@ -25,7 +25,7 @@ module ActionCable serialize_broadcasting([ channel_name, model ]) end - def serialize_broadcasting(object) #:nodoc: + def serialize_broadcasting(object) # :nodoc: case when object.is_a?(Array) object.map { |m| serialize_broadcasting(m) }.join(":") diff --git a/actioncable/lib/action_cable/connection/base.rb b/actioncable/lib/action_cable/connection/base.rb index a243a91def..dfdfa716a3 100644 --- a/actioncable/lib/action_cable/connection/base.rb +++ b/actioncable/lib/action_cable/connection/base.rb @@ -68,7 +68,7 @@ module ActionCable # Called by the server when a new WebSocket connection is established. This configures the callbacks intended for overwriting by the user. # This method should not be called directly -- instead rely upon on the #connect (and #disconnect) callbacks. - def process #:nodoc: + def process # :nodoc: logger.info started_request_message if websocket.possible? && allow_request_origin? @@ -80,11 +80,11 @@ module ActionCable # Decodes WebSocket messages and dispatches them to subscribed channels. # WebSocket message transfer encoding is always JSON. - def receive(websocket_message) #:nodoc: + def receive(websocket_message) # :nodoc: send_async :dispatch_websocket_message, websocket_message end - def dispatch_websocket_message(websocket_message) #:nodoc: + def dispatch_websocket_message(websocket_message) # :nodoc: if websocket.alive? subscriptions.execute_command decode(websocket_message) else diff --git a/actionmailbox/app/models/action_mailbox/record.rb b/actionmailbox/app/models/action_mailbox/record.rb index 533f43b046..77b3a99e89 100644 --- a/actionmailbox/app/models/action_mailbox/record.rb +++ b/actionmailbox/app/models/action_mailbox/record.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module ActionMailbox - class Record < ActiveRecord::Base #:nodoc: + class Record < ActiveRecord::Base # :nodoc: self.abstract_class = true end end diff --git a/actionmailbox/lib/action_mailbox/base.rb b/actionmailbox/lib/action_mailbox/base.rb index ff8587acd1..ce3e2a104c 100644 --- a/actionmailbox/lib/action_mailbox/base.rb +++ b/actionmailbox/lib/action_mailbox/base.rb @@ -77,7 +77,7 @@ module ActionMailbox @inbound_email = inbound_email end - def perform_processing #:nodoc: + def perform_processing # :nodoc: track_status_of_inbound_email do run_callbacks :process do process @@ -92,7 +92,7 @@ module ActionMailbox # Overwrite in subclasses end - def finished_processing? #:nodoc: + def finished_processing? # :nodoc: inbound_email.delivered? || inbound_email.bounced? end diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 40d38bfd18..846f9b0cb5 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -555,7 +555,7 @@ module ActionMailer # through a callback when you call :deliver on the Mail::Message, # calling +deliver_mail+ directly and passing a Mail::Message will do # nothing except tell the logger you sent the email. - def deliver_mail(mail) #:nodoc: + def deliver_mail(mail) # :nodoc: ActiveSupport::Notifications.instrument("deliver.action_mailer") do |payload| set_payload_for_mail(payload, mail) yield # Let Mail do the delivery actions @@ -606,7 +606,7 @@ module ActionMailer @_message = Mail.new end - def process(method_name, *args) #:nodoc: + def process(method_name, *args) # :nodoc: payload = { mailer: self.class.name, action: method_name, @@ -619,7 +619,7 @@ module ActionMailer end end - class NullMail #:nodoc: + class NullMail # :nodoc: def body; "" end def header; {} end diff --git a/actionmailer/lib/action_mailer/delivery_job.rb b/actionmailer/lib/action_mailer/delivery_job.rb index 28ce0842de..8edf34b519 100644 --- a/actionmailer/lib/action_mailer/delivery_job.rb +++ b/actionmailer/lib/action_mailer/delivery_job.rb @@ -20,7 +20,7 @@ module ActionMailer MSG end - def perform(mailer, mail_method, delivery_method, *args) #:nodoc: + def perform(mailer, mail_method, delivery_method, *args) # :nodoc: mailer.constantize.public_send(mail_method, *args).send(delivery_method) end ruby2_keywords(:perform) diff --git a/actionmailer/lib/action_mailer/inline_preview_interceptor.rb b/actionmailer/lib/action_mailer/inline_preview_interceptor.rb index 2b97ac5b94..0c43fe0572 100644 --- a/actionmailer/lib/action_mailer/inline_preview_interceptor.rb +++ b/actionmailer/lib/action_mailer/inline_preview_interceptor.rb @@ -17,15 +17,15 @@ module ActionMailer include Base64 - def self.previewing_email(message) #:nodoc: + def self.previewing_email(message) # :nodoc: new(message).transform! end - def initialize(message) #:nodoc: + def initialize(message) # :nodoc: @message = message end - def transform! #:nodoc: + def transform! # :nodoc: return message if html_part.blank? html_part.body = html_part.decoded.gsub(PATTERN) do |match| diff --git a/actionmailer/lib/action_mailer/message_delivery.rb b/actionmailer/lib/action_mailer/message_delivery.rb index 553872e234..5dd82dbea4 100644 --- a/actionmailer/lib/action_mailer/message_delivery.rb +++ b/actionmailer/lib/action_mailer/message_delivery.rb @@ -15,7 +15,7 @@ module ActionMailer # Notifier.welcome(User.first).deliver_later # enqueue email delivery as a job through Active Job # Notifier.welcome(User.first).message # a Mail::Message object class MessageDelivery < Delegator - def initialize(mailer_class, action, *args) #:nodoc: + def initialize(mailer_class, action, *args) # :nodoc: @mailer_class, @action, @args = mailer_class, action, args # The mail is only processed if we try to call any methods on it. @@ -26,12 +26,12 @@ module ActionMailer ruby2_keywords(:initialize) # Method calls are delegated to the Mail::Message that's ready to deliver. - def __getobj__ #:nodoc: + def __getobj__ # :nodoc: @mail_message ||= processed_mailer.message end # Unused except for delegator internals (dup, marshalling). - def __setobj__(mail_message) #:nodoc: + def __setobj__(mail_message) # :nodoc: @mail_message = mail_message end diff --git a/actionmailer/lib/action_mailer/preview.rb b/actionmailer/lib/action_mailer/preview.rb index cb3f42424c..67d22c0271 100644 --- a/actionmailer/lib/action_mailer/preview.rb +++ b/actionmailer/lib/action_mailer/preview.rb @@ -3,7 +3,7 @@ require "active_support/descendants_tracker" module ActionMailer - module Previews #:nodoc: + module Previews # :nodoc: extend ActiveSupport::Concern included do diff --git a/actionmailer/lib/action_mailer/rescuable.rb b/actionmailer/lib/action_mailer/rescuable.rb index 5b567eb500..5a9927ebb9 100644 --- a/actionmailer/lib/action_mailer/rescuable.rb +++ b/actionmailer/lib/action_mailer/rescuable.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module ActionMailer #:nodoc: +module ActionMailer # :nodoc: # Provides +rescue_from+ for mailers. Wraps mailer action processing, # mail job processing, and mail delivery. module Rescuable @@ -8,12 +8,12 @@ module ActionMailer #:nodoc: include ActiveSupport::Rescuable class_methods do - def handle_exception(exception) #:nodoc: + def handle_exception(exception) # :nodoc: rescue_with_handler(exception) || raise(exception) end end - def handle_exceptions #:nodoc: + def handle_exceptions # :nodoc: yield rescue => exception rescue_with_handler(exception) || raise diff --git a/actionpack/lib/abstract_controller/asset_paths.rb b/actionpack/lib/abstract_controller/asset_paths.rb index d6ee84b87b..f08912b556 100644 --- a/actionpack/lib/abstract_controller/asset_paths.rb +++ b/actionpack/lib/abstract_controller/asset_paths.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module AbstractController - module AssetPaths #:nodoc: + module AssetPaths # :nodoc: extend ActiveSupport::Concern included do diff --git a/actionpack/lib/abstract_controller/error.rb b/actionpack/lib/abstract_controller/error.rb index 89a54f072e..88d863c719 100644 --- a/actionpack/lib/abstract_controller/error.rb +++ b/actionpack/lib/abstract_controller/error.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module AbstractController - class Error < StandardError #:nodoc: + class Error < StandardError # :nodoc: end end diff --git a/actionpack/lib/abstract_controller/logger.rb b/actionpack/lib/abstract_controller/logger.rb index 8d0acc1b5c..c7ab9c7737 100644 --- a/actionpack/lib/abstract_controller/logger.rb +++ b/actionpack/lib/abstract_controller/logger.rb @@ -3,7 +3,7 @@ require "active_support/benchmarkable" module AbstractController - module Logger #:nodoc: + module Logger # :nodoc: extend ActiveSupport::Concern included do diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb index bed46b00de..f58005cdc9 100644 --- a/actionpack/lib/action_controller/metal.rb +++ b/actionpack/lib/action_controller/metal.rb @@ -11,8 +11,8 @@ module ActionController # use AuthenticationMiddleware, except: [:index, :show] # end # - class MiddlewareStack < ActionDispatch::MiddlewareStack #:nodoc: - class Middleware < ActionDispatch::MiddlewareStack::Middleware #:nodoc: + class MiddlewareStack < ActionDispatch::MiddlewareStack # :nodoc: + class Middleware < ActionDispatch::MiddlewareStack::Middleware # :nodoc: def initialize(klass, args, actions, strategy, block) @actions = actions @strategy = strategy @@ -182,7 +182,7 @@ module ActionController response_body || response.committed? end - def dispatch(name, request, response) #:nodoc: + def dispatch(name, request, response) # :nodoc: set_request!(request) set_response!(response) process(name) @@ -194,12 +194,12 @@ module ActionController @_response = response end - def set_request!(request) #:nodoc: + def set_request!(request) # :nodoc: @_request = request @_request.controller_instance = self end - def to_a #:nodoc: + def to_a # :nodoc: response.to_a end diff --git a/actionpack/lib/action_controller/metal/content_security_policy.rb b/actionpack/lib/action_controller/metal/content_security_policy.rb index 25fc110bfe..fe1afc512b 100644 --- a/actionpack/lib/action_controller/metal/content_security_policy.rb +++ b/actionpack/lib/action_controller/metal/content_security_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module ActionController #:nodoc: +module ActionController # :nodoc: module ContentSecurityPolicy # TODO: Documentation extend ActiveSupport::Concern diff --git a/actionpack/lib/action_controller/metal/cookies.rb b/actionpack/lib/action_controller/metal/cookies.rb index b9f947e525..17b51d215f 100644 --- a/actionpack/lib/action_controller/metal/cookies.rb +++ b/actionpack/lib/action_controller/metal/cookies.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module ActionController #:nodoc: +module ActionController # :nodoc: module Cookies extend ActiveSupport::Concern diff --git a/actionpack/lib/action_controller/metal/data_streaming.rb b/actionpack/lib/action_controller/metal/data_streaming.rb index 6af1febaf7..2730c5ecae 100644 --- a/actionpack/lib/action_controller/metal/data_streaming.rb +++ b/actionpack/lib/action_controller/metal/data_streaming.rb @@ -3,7 +3,7 @@ require "action_controller/metal/exceptions" require "action_dispatch/http/content_disposition" -module ActionController #:nodoc: +module ActionController # :nodoc: # Methods for sending arbitrary data and for streaming files to the browser, # instead of rendering. module DataStreaming @@ -11,8 +11,8 @@ module ActionController #:nodoc: include ActionController::Rendering - DEFAULT_SEND_FILE_TYPE = "application/octet-stream" #:nodoc: - DEFAULT_SEND_FILE_DISPOSITION = "attachment" #:nodoc: + DEFAULT_SEND_FILE_TYPE = "application/octet-stream" # :nodoc: + DEFAULT_SEND_FILE_DISPOSITION = "attachment" # :nodoc: private # Sends the file. This uses a server-appropriate method (such as X-Sendfile) diff --git a/actionpack/lib/action_controller/metal/exceptions.rb b/actionpack/lib/action_controller/metal/exceptions.rb index 22332a5ca9..8a8818d96a 100644 --- a/actionpack/lib/action_controller/metal/exceptions.rb +++ b/actionpack/lib/action_controller/metal/exceptions.rb @@ -1,20 +1,20 @@ # frozen_string_literal: true module ActionController - class ActionControllerError < StandardError #:nodoc: + class ActionControllerError < StandardError # :nodoc: end - class BadRequest < ActionControllerError #:nodoc: + class BadRequest < ActionControllerError # :nodoc: def initialize(msg = nil) super(msg) set_backtrace $!.backtrace if $! end end - class RenderError < ActionControllerError #:nodoc: + class RenderError < ActionControllerError # :nodoc: end - class RoutingError < ActionControllerError #:nodoc: + class RoutingError < ActionControllerError # :nodoc: attr_reader :failures def initialize(message, failures = []) super(message) @@ -22,7 +22,7 @@ module ActionController end end - class UrlGenerationError < ActionControllerError #:nodoc: + class UrlGenerationError < ActionControllerError # :nodoc: attr_reader :routes, :route_name, :method_name def initialize(message, routes = nil, route_name = nil, method_name = nil) @@ -47,19 +47,19 @@ module ActionController end end - class MethodNotAllowed < ActionControllerError #:nodoc: + class MethodNotAllowed < ActionControllerError # :nodoc: def initialize(*allowed_methods) super("Only #{allowed_methods.to_sentence} requests are allowed.") end end - class NotImplemented < MethodNotAllowed #:nodoc: + class NotImplemented < MethodNotAllowed # :nodoc: end - class MissingFile < ActionControllerError #:nodoc: + class MissingFile < ActionControllerError # :nodoc: end - class SessionOverflowError < ActionControllerError #:nodoc: + class SessionOverflowError < ActionControllerError # :nodoc: DEFAULT_MESSAGE = "Your session data is larger than the data column in which it is to be stored. You must increase the size of your data column if you intend to store large data." def initialize(message = nil) @@ -67,10 +67,10 @@ module ActionController end end - class UnknownHttpMethod < ActionControllerError #:nodoc: + class UnknownHttpMethod < ActionControllerError # :nodoc: end - class UnknownFormat < ActionControllerError #:nodoc: + class UnknownFormat < ActionControllerError # :nodoc: end # Raised when a nested respond_to is triggered and the content types of each @@ -91,6 +91,6 @@ module ActionController end end - class MissingExactTemplate < UnknownFormat #:nodoc: + class MissingExactTemplate < UnknownFormat # :nodoc: end end diff --git a/actionpack/lib/action_controller/metal/flash.rb b/actionpack/lib/action_controller/metal/flash.rb index fc69d75416..237197d17f 100644 --- a/actionpack/lib/action_controller/metal/flash.rb +++ b/actionpack/lib/action_controller/metal/flash.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module ActionController #:nodoc: +module ActionController # :nodoc: module Flash extend ActiveSupport::Concern @@ -42,7 +42,7 @@ module ActionController #:nodoc: end end - def action_methods #:nodoc: + def action_methods # :nodoc: @action_methods ||= super - _flash_types.map(&:to_s).to_set end end diff --git a/actionpack/lib/action_controller/metal/instrumentation.rb b/actionpack/lib/action_controller/metal/instrumentation.rb index cc70d30aa1..cbc5c4fee2 100644 --- a/actionpack/lib/action_controller/metal/instrumentation.rb +++ b/actionpack/lib/action_controller/metal/instrumentation.rb @@ -99,7 +99,7 @@ module ActionController # A hook which allows other frameworks to log what happened during # controller process action. This method should return an array # with the messages to be added. - def log_process_action(payload) #:nodoc: + def log_process_action(payload) # :nodoc: messages, view_runtime = [], payload[:view_runtime] messages << ("Views: %.1fms" % view_runtime.to_f) if view_runtime messages diff --git a/actionpack/lib/action_controller/metal/live.rb b/actionpack/lib/action_controller/metal/live.rb index ca7d3d6382..77c9d4a227 100644 --- a/actionpack/lib/action_controller/metal/live.rb +++ b/actionpack/lib/action_controller/metal/live.rb @@ -124,7 +124,7 @@ module ActionController class ClientDisconnected < RuntimeError end - class Buffer < ActionDispatch::Response::Buffer #:nodoc: + class Buffer < ActionDispatch::Response::Buffer # :nodoc: include MonitorMixin class << self @@ -230,7 +230,7 @@ module ActionController end end - class Response < ActionDispatch::Response #:nodoc: all + class Response < ActionDispatch::Response # :nodoc: all private def before_committed super diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb index fda5dbbc03..fb32257ebe 100644 --- a/actionpack/lib/action_controller/metal/mime_responds.rb +++ b/actionpack/lib/action_controller/metal/mime_responds.rb @@ -2,7 +2,7 @@ require "abstract_controller/collector" -module ActionController #:nodoc: +module ActionController # :nodoc: module MimeResponds # Without web-service support, an action which collects the data for displaying a list of people # might look something like this: @@ -289,7 +289,7 @@ module ActionController #:nodoc: @format = request.negotiate_mime(@responses.keys) end - class VariantCollector #:nodoc: + class VariantCollector # :nodoc: def initialize(variant = nil) @variant = variant @variants = {} diff --git a/actionpack/lib/action_controller/metal/permissions_policy.rb b/actionpack/lib/action_controller/metal/permissions_policy.rb index 6325219549..dff1c065f5 100644 --- a/actionpack/lib/action_controller/metal/permissions_policy.rb +++ b/actionpack/lib/action_controller/metal/permissions_policy.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module ActionController #:nodoc: +module ActionController # :nodoc: # HTTP Permissions Policy is a web standard for defining a mechanism to # allow and deny the use of browser permissions in its own context, and # in content within any