Repository: rails/rails
File: railties/lib/rails/application.rb (Ruby)

Code before:
    # * +verifier_name+ - the name of the message verifier.
    #
    # ==== Examples
    #
    #     message = Rails.application.message_verifier('sensitive_data').generate('my sensible data')
    #     Rails.application.message_verifier('sensitive_data').verify(message)
    #     # => 'my sensible data'
    #
    # See the ActiveSupport::MessageVerifier documentation for more information.
    def message_verifier(verifier_name)
      message_verifiers[verifier_name]
    end

    # Convenience for loading config/foo.yml for the current Rails env.
    #
    # Examples:
    #
    #     # config/exception_notification.yml:
    #     production:
    #       url: http://127.0.0.1:8080
    #       namespace: my_app_production
    #
    #     development:
    #       url: http://localhost:3001
    #       namespace: my_app_development
    #
    #     # config/environments/production.rb
    #     Rails.application.configure do
    #       config.middleware.use ExceptionNotifier, config_for(:exception_notification)
    #     end
    #
    #     # You can also store configurations in a shared section which will be
    #     # merged with the environment configuration
    #
    #     # config/example.yml
    #     shared:
    #       foo:
    #         bar:
    #           baz: 1
    #
    #     development:
    #       foo:
    #         bar:
    #           qux: 2
    #
    #     # development environment
    #     Rails.application.config_for(:example)[:foo][:bar]
    #     # => { baz: 1, qux: 2 }
    def config_for(name, env: Rails.env)
      yaml = name.is_a?(Pathname) ? name : Pathname.new("#{paths["config"].existent.first}/#{name}.yml")


Review comment (suggestion):
I don't think we need a Rails deprecator. Each gem inside the framework would have it own. Unless this is the railties deprecator. Maybe we should have an application deprecator.

Code after:
    # ==== Parameters
    #
    # * +verifier_name+ - the name of the message verifier.
    #
    # ==== Examples
    #
    #     message = Rails.application.message_verifier('sensitive_data').generate('my sensible data')
    #     Rails.application.message_verifier('sensitive_data').verify(message)
    #     # => 'my sensible data'
    #
    # See the ActiveSupport::MessageVerifier documentation for more information.
    def message_verifier(verifier_name)
      message_verifiers[verifier_name]
    end

    # A managed collection of deprecators (ActiveSupport::Deprecation::Deprecators).
    # The collection's configuration methods affect all deprecators in the
    # collection. Additionally, the collection's +silence+ method silences all
    # deprecators in the collection for the duration of a given block.
    #
    # The collection is prepopulated with a default deprecator, which can be
    # accessed via <tt>deprecators[:rails]</tt>. More deprecators can be added
    # via <tt>deprecators[name] = deprecator</tt>.
    def deprecators
      @deprecators ||= ActiveSupport::Deprecation::Deprecators.new.tap do |deprecators|
        deprecators[:rails] = ActiveSupport::Deprecation.instance
      end
    end

    # Convenience for loading config/foo.yml for the current Rails env.
    #
    # Examples:
    #
    #     # config/exception_notification.yml:
    #     production:
    #       url: http://127.0.0.1:8080
    #       namespace: my_app_production
    #
    #     development:
    #       url: http://localhost:3001
    #       namespace: my_app_development
    #
    #     # config/environments/production.rb
    #     Rails.application.configure do
    #       config.middleware.use ExceptionNotifier, config_for(:exception_notification)
    #     end
    #
    #     # You can also store configurations in a shared section which will be
    #     # merged with the environment configuration
    #
    #     # config/example.yml