Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-railties-7.0 for openSUSE:Factory checked in at 2022-05-16 18:08:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-railties-7.0 (Old) and /work/SRC/openSUSE:Factory/.rubygem-railties-7.0.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-railties-7.0" Mon May 16 18:08:32 2022 rev:4 rq:977369 version:7.0.3 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-railties-7.0/rubygem-railties-7.0.changes 2022-04-30 22:52:55.912256239 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-railties-7.0.new.1538/rubygem-railties-7.0.changes 2022-05-16 18:10:59.961396596 +0200 @@ -1,0 +2,42 @@ +Sun May 15 15:21:01 UTC 2022 - Manuel Schnitzer <mschnit...@suse.com> + +- updated to version 7.0.3 + +* If reloading and eager loading are both enabled, after a reload Rails eager loads again the application code. + + *Xavier Noria* + +* Use `controller_class_path` in `Rails::Generators::NamedBase#route_url` + + The `route_url` method now returns the correct path when generating + a namespaced controller with a top-level model using `--model-name`. + + Previously, when running this command: + + ``` sh + bin/rails generate scaffold_controller Admin/Post --model-name Post + ``` + + the comments above the controller action would look like: + + ``` ruby + # GET /posts + def index + @posts = Post.all + end + ``` + + afterwards, they now look like this: + + ``` ruby + # GET /admin/posts + def index + @posts = Post.all + end + ``` + + Fixes #44662. + + *Andrew White* + +------------------------------------------------------------------- Old: ---- railties-7.0.2.4.gem New: ---- railties-7.0.3.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-railties-7.0.spec ++++++ --- /var/tmp/diff_new_pack.oPXBR8/_old 2022-05-16 18:11:00.457396991 +0200 +++ /var/tmp/diff_new_pack.oPXBR8/_new 2022-05-16 18:11:00.465396997 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-railties-7.0 -Version: 7.0.2.4 +Version: 7.0.3 Release: 0 %define mod_name railties %define mod_full_name %{mod_name}-%{version} ++++++ railties-7.0.2.4.gem -> railties-7.0.3.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2022-04-26 21:32:50.000000000 +0200 +++ new/CHANGELOG.md 2022-05-09 15:41:42.000000000 +0200 @@ -1,3 +1,42 @@ +## Rails 7.0.3 (May 09, 2022) ## + +* If reloading and eager loading are both enabled, after a reload Rails eager loads again the application code. + + *Xavier Noria* + +* Use `controller_class_path` in `Rails::Generators::NamedBase#route_url` + + The `route_url` method now returns the correct path when generating + a namespaced controller with a top-level model using `--model-name`. + + Previously, when running this command: + + ``` sh + bin/rails generate scaffold_controller Admin/Post --model-name Post + ``` + + the comments above the controller action would look like: + + ``` ruby + # GET /posts + def index + @posts = Post.all + end + ``` + + afterwards, they now look like this: + + ``` ruby + # GET /admin/posts + def index + @posts = Post.all + end + ``` + + Fixes #44662. + + *Andrew White* + ## Rails 7.0.2.4 (April 26, 2022) ## * No changes. Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/minitest/rails_plugin.rb new/lib/minitest/rails_plugin.rb --- old/lib/minitest/rails_plugin.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/minitest/rails_plugin.rb 2022-05-09 15:41:42.000000000 +0200 @@ -49,7 +49,7 @@ end # Owes great inspiration to test runner trailblazers like RSpec, - # minitest-reporters, maxitest and others. + # minitest-reporters, maxitest, and others. def self.plugin_rails_init(options) unless options[:full_backtrace] || ENV["BACKTRACE"] # Plugin can run without Rails loaded, check before filtering. Binary files old/lib/rails/.DS_Store and new/lib/rails/.DS_Store differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/application/configuration.rb new/lib/rails/application/configuration.rb --- old/lib/rails/application/configuration.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/application/configuration.rb 2022-05-09 15:41:42.000000000 +0200 @@ -361,6 +361,20 @@ generators.colorize_logging = val end + # Specifies what class to use to store the session. Possible values + # are +:cookie_store+, +:mem_cache_store+, a custom store, or + # +:disabled+. +:disabled+ tells Rails not to deal with sessions. + # + # Additional options will be set as +session_options+: + # + # config.session_store :cookie_store, key: "_your_app_session" + # config.session_options # => {key: "_your_app_session"} + # + # If a custom store is specified as a symbol, it will be resolved to + # the +ActionDispatch::Session+ namespace: + # + # # use ActionDispatch::Session::MyCustomStore as the session store + # config.session_store :my_custom_store def session_store(new_session_store = nil, **options) if new_session_store if new_session_store == :active_record_store @@ -396,6 +410,7 @@ Rails::SourceAnnotationExtractor::Annotation end + # Configures the ActionDispatch::ContentSecurityPolicy. def content_security_policy(&block) if block_given? @content_security_policy = ActionDispatch::ContentSecurityPolicy.new(&block) @@ -404,6 +419,7 @@ end end + # Configures the ActionDispatch::PermissionsPolicy. def permissions_policy(&block) if block_given? @permissions_policy = ActionDispatch::PermissionsPolicy.new(&block) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/application/finisher.rb new/lib/rails/application/finisher.rb --- old/lib/rails/application/finisher.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/application/finisher.rb 2022-05-09 15:41:42.000000000 +0200 @@ -35,10 +35,6 @@ ActiveSupport::Dependencies._autoloaded_tracked_classes << value end end - - autoloader.on_unload do |_cpath, value, _abspath| - value.before_remove_const if value.respond_to?(:before_remove_const) - end end autoloader.setup @@ -72,11 +68,17 @@ app.reloader.prepare! end - initializer :eager_load! do + initializer :eager_load! do |app| if config.eager_load ActiveSupport.run_load_hooks(:before_eager_load, self) Zeitwerk::Loader.eager_load_all config.eager_load_namespaces.each(&:eager_load!) + + unless config.cache_classes + app.reloader.after_class_unload do + Rails.autoloaders.main.eager_load + end + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/application.rb new/lib/rails/application.rb --- old/lib/rails/application.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/application.rb 2022-05-09 15:41:42.000000000 +0200 @@ -22,12 +22,12 @@ # Rails::Application::Bootstrap) and finishing initializers, after all the others # are executed (check Rails::Application::Finisher). # - # == Configuration + # == \Configuration # # Besides providing the same configuration as Rails::Engine and Rails::Railtie, # the application object has several specific configurations, for example - # "cache_classes", "consider_all_requests_local", "filter_parameters", - # "logger" and so forth. + # +cache_classes+, +consider_all_requests_local+, +filter_parameters+, + # +logger+, and so forth. # # Check Rails::Application::Configuration to see them all. # @@ -43,21 +43,21 @@ # == Booting process # # The application is also responsible for setting up and executing the booting - # process. From the moment you require "config/application.rb" in your app, + # process. From the moment you require <tt>config/application.rb</tt> in your app, # the booting process goes like this: # - # 1) require "config/boot.rb" to set up load paths - # 2) require railties and engines - # 3) Define Rails.application as "class MyApp::Application < Rails::Application" - # 4) Run config.before_configuration callbacks - # 5) Load config/environments/ENV.rb - # 6) Run config.before_initialize callbacks - # 7) Run Railtie#initializer defined by railties, engines and application. - # One by one, each engine sets up its load paths, routes and runs its config/initializers/* files. - # 8) Custom Railtie#initializers added by railties, engines and applications are executed - # 9) Build the middleware stack and run to_prepare callbacks - # 10) Run config.before_eager_load and eager_load! if eager_load is true - # 11) Run config.after_initialize callbacks + # 1. <tt>require "config/boot.rb"</tt> to set up load paths. + # 2. +require+ railties and engines. + # 3. Define +Rails.application+ as <tt>class MyApp::Application < Rails::Application</tt>. + # 4. Run +config.before_configuration+ callbacks. + # 5. Load <tt>config/environments/ENV.rb</tt>. + # 6. Run +config.before_initialize+ callbacks. + # 7. Run <tt>Railtie#initializer</tt> defined by railties, engines, and application. + # One by one, each engine sets up its load paths and routes, and runs its <tt>config/initializers/*</tt> files. + # 8. Custom <tt>Railtie#initializers</tt> added by railties, engines, and applications are executed. + # 9. Build the middleware stack and run +to_prepare+ callbacks. + # 10. Run +config.before_eager_load+ and +eager_load!+ if +eager_load+ is +true+. + # 11. Run +config.after_initialize+ callbacks. class Application < Engine autoload :Bootstrap, "rails/application/bootstrap" autoload :Configuration, "rails/application/configuration" @@ -175,7 +175,7 @@ # Rails.application.message_verifier('sensitive_data').verify(message) # # => 'my sensible data' # - # See the +ActiveSupport::MessageVerifier+ documentation for more information. + # See the ActiveSupport::MessageVerifier documentation for more information. def message_verifier(verifier_name) @message_verifiers[verifier_name] ||= begin secret = key_generator.generate_key(verifier_name.to_s) @@ -403,13 +403,14 @@ attr_writer :secrets, :credentials # The secret_key_base is used as the input secret to the application's key generator, which in turn - # is used to create all MessageVerifiers/MessageEncryptors, including the ones that sign and encrypt cookies. + # is used to create all ActiveSupport::MessageVerifier and ActiveSupport::MessageEncryptor instances, + # including the ones that sign and encrypt cookies. # # In development and test, this is randomly generated and stored in a # temporary file in <tt>tmp/development_secret.txt</tt>. # - # In all other environments, we look for it first in ENV["SECRET_KEY_BASE"], - # then credentials.secret_key_base, and finally secrets.secret_key_base. For most applications, + # In all other environments, we look for it first in <tt>ENV["SECRET_KEY_BASE"]</tt>, + # then +credentials.secret_key_base+, and finally +secrets.secret_key_base+. For most applications, # the correct place to store it is in the encrypted credentials file. def secret_key_base if Rails.env.development? || Rails.env.test? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/command.rb new/lib/rails/command.rb --- old/lib/rails/command.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/command.rb 2022-05-09 15:41:42.000000000 +0200 @@ -26,7 +26,7 @@ ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || "development" end - # Receives a namespace, arguments and the behavior to invoke the command. + # Receives a namespace, arguments, and the behavior to invoke the command. def invoke(full_namespace, args = [], **config) namespace = full_namespace = full_namespace.to_s diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/console/helpers.rb new/lib/rails/console/helpers.rb --- old/lib/rails/console/helpers.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/console/helpers.rb 2022-05-09 15:41:42.000000000 +0200 @@ -4,14 +4,14 @@ module ConsoleMethods # Gets the helper methods available to the controller. # - # This method assumes an +ApplicationController+ exists, and it extends +ActionController::Base+ + # This method assumes an +ApplicationController+ exists, and that it extends ActionController::Base. def helper ApplicationController.helpers end # Gets a new instance of a controller object. # - # This method assumes an +ApplicationController+ exists, and it extends +ActionController::Base+ + # This method assumes an +ApplicationController+ exists, and that it extends ActionController::Base. def controller @controller ||= ApplicationController.new end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/engine.rb new/lib/rails/engine.rb --- old/lib/rails/engine.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/engine.rb 2022-05-09 15:41:42.000000000 +0200 @@ -11,10 +11,10 @@ module Rails # <tt>Rails::Engine</tt> allows you to wrap a specific Rails application or subset of # functionality and share it with other applications or within a larger packaged application. - # Every <tt>Rails::Application</tt> is just an engine, which allows for simple + # Every Rails::Application is just an engine, which allows for simple # feature and application sharing. # - # Any <tt>Rails::Engine</tt> is also a <tt>Rails::Railtie</tt>, so the same + # Any <tt>Rails::Engine</tt> is also a Rails::Railtie, so the same # methods (like <tt>rake_tasks</tt> and +generators+) and configuration # options that are available in railties can also be used in engines. # @@ -31,7 +31,7 @@ # end # # Then ensure that this file is loaded at the top of your <tt>config/application.rb</tt> - # (or in your +Gemfile+) and it will automatically load models, controllers and helpers + # (or in your +Gemfile+), and it will automatically load models, controllers, and helpers # inside +app+, load routes at <tt>config/routes.rb</tt>, load locales at # <tt>config/locales/**/*</tt>, and load tasks at <tt>lib/tasks/**/*</tt>. # @@ -192,13 +192,13 @@ # # == Isolated Engine # - # Normally when you create controllers, helpers and models inside an engine, they are treated + # Normally when you create controllers, helpers, and models inside an engine, they are treated # as if they were created inside the application itself. This means that all helpers and # named routes from the application will be available to your engine's controllers as well. # # However, sometimes you want to isolate your engine from the application, especially if your engine # has its own router. To do that, you simply need to call +isolate_namespace+. This method requires - # you to pass a module where all your controllers, helpers and models should be nested to: + # you to pass a module where all your controllers, helpers, and models should be nested to: # # module MyEngine # class Engine < Rails::Engine @@ -236,9 +236,9 @@ # +articles_path+, like you would do with your main application. # # To make this behavior consistent with other parts of the framework, - # isolated engines also have an effect on <tt>ActiveModel::Naming</tt>. In a + # isolated engines also have an effect on ActiveModel::Naming. In a # normal Rails app, when you use a namespaced model such as - # <tt>Namespace::Article</tt>, <tt>ActiveModel::Naming</tt> will generate + # <tt>Namespace::Article</tt>, ActiveModel::Naming will generate # names with the prefix "namespace". In an isolated engine, the prefix will # be omitted in URL helpers and form fields, for convenience. # @@ -442,7 +442,7 @@ end # Load console and invoke the registered hooks. - # Check <tt>Rails::Railtie.console</tt> for more info. + # Check Rails::Railtie.console for more info. def load_console(app = self) require "rails/console/app" require "rails/console/helpers" @@ -451,14 +451,14 @@ end # Load Rails runner and invoke the registered hooks. - # Check <tt>Rails::Railtie.runner</tt> for more info. + # Check Rails::Railtie.runner for more info. def load_runner(app = self) run_runner_blocks(app) self end - # Load Rake, railties tasks and invoke the registered hooks. - # Check <tt>Rails::Railtie.rake_tasks</tt> for more info. + # Load Rake and railties tasks, and invoke the registered hooks. + # Check Rails::Railtie.rake_tasks for more info. def load_tasks(app = self) require "rake" run_tasks_blocks(app) @@ -466,7 +466,7 @@ end # Load Rails generators and invoke the registered hooks. - # Check <tt>Rails::Railtie.generators</tt> for more info. + # Check Rails::Railtie.generators for more info. def load_generators(app = self) require "rails/generators" run_generators_blocks(app) @@ -475,7 +475,7 @@ end # Invoke the server registered hooks. - # Check <tt>Rails::Railtie.server</tt> for more info. + # Check Rails::Railtie.server for more info. def load_server(app = self) run_server_blocks(app) self diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/gem_version.rb new/lib/rails/gem_version.rb --- old/lib/rails/gem_version.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/gem_version.rb 2022-05-09 15:41:42.000000000 +0200 @@ -1,7 +1,7 @@ # frozen_string_literal: true module Rails - # Returns the version of the currently loaded Rails as a <tt>Gem::Version</tt> + # Returns the currently loaded version of Rails as a <tt>Gem::Version</tt>. def self.gem_version Gem::Version.new VERSION::STRING end @@ -9,8 +9,8 @@ module VERSION MAJOR = 7 MINOR = 0 - TINY = 2 - PRE = "4" + TINY = 3 + PRE = nil STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".") end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/generators/app_base.rb new/lib/rails/generators/app_base.rb --- old/lib/rails/generators/app_base.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/generators/app_base.rb 2022-05-09 15:41:42.000000000 +0200 @@ -239,6 +239,10 @@ options[:skip_asset_pipeline] || options[:asset_pipeline] != "sprockets" end + def skip_propshaft? + options[:skip_asset_pipeline] || options[:asset_pipeline] != "propshaft" + end + class GemfileEntry < Struct.new(:name, :version, :comment, :options, :commented_out) def initialize(name, version, comment, options = {}, commented_out = false) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/generators/base.rb new/lib/rails/generators/base.rb --- old/lib/rails/generators/base.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/generators/base.rb 2022-05-09 15:41:42.000000000 +0200 @@ -94,7 +94,7 @@ # # The first and last part used to find the generator to be invoked are # guessed based on class invokes hook_for, as noticed in the example above. - # This can be customized with two options: :in and :as. + # This can be customized with two options: +:in+ and +:as+. # # Let's suppose you are creating a generator that needs to invoke the # controller generator from test unit. Your first attempt is: @@ -108,7 +108,7 @@ # "test_unit:awesome", "test_unit" # # Which is not the desired lookup. You can change it by providing the - # :as option: + # +:as+ option: # # class AwesomeGenerator < Rails::Generators::Base # hook_for :test_framework, as: :controller @@ -119,7 +119,7 @@ # "test_unit:controller", "test_unit" # # Similarly, if you want it to also look up in the rails namespace, you - # just need to provide the :in value: + # just need to provide the +:in+ value: # # class AwesomeGenerator < Rails::Generators::Base # hook_for :test_framework, in: :rails, as: :controller diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/generators/named_base.rb new/lib/rails/generators/named_base.rb --- old/lib/rails/generators/named_base.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/generators/named_base.rb 2022-05-09 15:41:42.000000000 +0200 @@ -127,7 +127,7 @@ end def route_url # :doc: - @route_url ||= class_path.collect { |dname| "/" + dname }.join + "/" + plural_file_name + @route_url ||= controller_class_path.collect { |dname| "/" + dname }.join + "/" + plural_file_name end def url_helper_prefix # :doc: @@ -202,7 +202,7 @@ end # Add a class collisions name to be checked on class initialization. You - # can supply a hash with a :prefix or :suffix to be tested. + # can supply a hash with a +:prefix+ or +:suffix+ to be tested. # # ==== Examples # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/generators/rails/app/app_generator.rb new/lib/rails/generators/rails/app/app_generator.rb --- old/lib/rails/generators/rails/app/app_generator.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/generators/rails/app/app_generator.rb 2022-05-09 15:41:42.000000000 +0200 @@ -138,7 +138,7 @@ template "config/storage.yml" end - if skip_sprockets? && !assets_config_exist + if skip_sprockets? && skip_propshaft? && !assets_config_exist remove_file "config/initializers/assets.rb" end @@ -457,9 +457,12 @@ end end - def delete_assets_initializer_skipping_sprockets - if skip_sprockets? + def delete_assets_initializer_skipping_sprockets_and_propshaft + if skip_sprockets? && skip_propshaft? remove_file "config/initializers/assets.rb" + end + + if skip_sprockets? remove_file "app/assets/config/manifest.js" remove_dir "app/assets/config" remove_file "app/assets/stylesheets/application.css" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt new/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt --- old/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt 2022-05-09 15:41:42.000000000 +0200 @@ -1,8 +1,8 @@ # Be sure to restart your server when you modify this file. -# Define an application-wide content security policy -# For further information see the following documentation -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy +# Define an application-wide content security policy. +# See the Securing Rails Applications Guide for more information: +# https://guides.rubyonrails.org/security.html#content-security-policy-header # Rails.application.configure do # config.content_security_policy do |policy| @@ -20,7 +20,6 @@ # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } # config.content_security_policy_nonce_directives = %w(script-src) # -# # Report CSP violations to a specified URI. See: -# # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only +# # Report violations without enforcing the policy. # # config.content_security_policy_report_only = true # end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/generators.rb new/lib/rails/generators.rb --- old/lib/rails/generators.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/generators.rb 2022-05-09 15:41:42.000000000 +0200 @@ -253,8 +253,8 @@ invoke_fallbacks_for(name, base) || invoke_fallbacks_for(context, name) end - # Receives a namespace, arguments and the behavior to invoke the generator. - # It's used as the default entry point for generate, destroy and update + # Receives a namespace, arguments, and the behavior to invoke the generator. + # It's used as the default entry point for generate, destroy, and update # commands. def invoke(namespace, args = ARGV, config = {}) names = namespace.to_s.split(":") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/paths.rb new/lib/rails/paths.rb --- old/lib/rails/paths.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/paths.rb 2022-05-09 15:41:42.000000000 +0200 @@ -12,7 +12,7 @@ # root.add "app/controllers", eager_load: true # # The above command creates a new root object and adds "app/controllers" as a path. - # This means we can get a <tt>Rails::Paths::Path</tt> object back like below: + # This means we can get a Rails::Paths::Path object back like below: # # path = root["app/controllers"] # path.eager_load? # => true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/rack/logger.rb new/lib/rails/rack/logger.rb --- old/lib/rails/rack/logger.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/rack/logger.rb 2022-05-09 15:41:42.000000000 +0200 @@ -31,13 +31,17 @@ private def call_app(request, env) # :doc: instrumenter = ActiveSupport::Notifications.instrumenter - instrumenter.start "request.action_dispatch", request: request + instrumenter_state = instrumenter.start "request.action_dispatch", request: request + instrumenter_finish = -> () { + instrumenter.finish_with_state(instrumenter_state, "request.action_dispatch", request: request) + } + logger.info { started_request_message(request) } status, headers, body = @app.call(env) - body = ::Rack::BodyProxy.new(body) { finish(request) } + body = ::Rack::BodyProxy.new(body, &instrumenter_finish) [status, headers, body] rescue Exception - finish(request) + instrumenter_finish.call raise ensure ActiveSupport::LogSubscriber.flush_all! @@ -65,11 +69,6 @@ end end - def finish(request) - instrumenter = ActiveSupport::Notifications.instrumenter - instrumenter.finish "request.action_dispatch", request: request - end - def logger Rails.logger end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/railtie.rb new/lib/rails/railtie.rb --- old/lib/rails/railtie.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/railtie.rb 2022-05-09 15:41:42.000000000 +0200 @@ -24,7 +24,7 @@ # * creating initializers # * configuring a Rails framework for the application, like setting a generator # * adding <tt>config.*</tt> keys to the environment - # * setting up a subscriber with <tt>ActiveSupport::Notifications</tt> + # * setting up a subscriber with ActiveSupport::Notifications # * adding Rake tasks # # == Creating a Railtie @@ -129,7 +129,7 @@ # == Application and Engine # # An engine is nothing more than a railtie with some initializers already set. And since - # <tt>Rails::Application</tt> is an engine, the same configuration described here can be + # Rails::Application is an engine, the same configuration described here can be # used in both. # # Be sure to look at the documentation of those specific classes for more information. @@ -214,13 +214,15 @@ end def respond_to_missing?(name, _) + return super if abstract_railtie? + instance.respond_to?(name) || super end # If the class method does not have a method, then send the method call # to the Railtie instance. def method_missing(name, *args, &block) - if instance.respond_to?(name) + if !abstract_railtie? && instance.respond_to?(name) instance.public_send(name, *args, &block) else super diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/source_annotation_extractor.rb new/lib/rails/source_annotation_extractor.rb --- old/lib/rails/source_annotation_extractor.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/source_annotation_extractor.rb 2022-05-09 15:41:42.000000000 +0200 @@ -70,7 +70,7 @@ # # If +options+ has a <tt>:tag</tt> flag, it will be passed to each annotation's +to_s+. # - # See <tt>#find_in</tt> for a list of file extensions that will be taken into account. + # See SourceAnnotationExtractor#find_in for a list of file extensions that will be taken into account. # # This class method is the single entry point for the <tt>rails notes</tt> command. def self.enumerate(tag = nil, options = {}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/version.rb new/lib/rails/version.rb --- old/lib/rails/version.rb 2022-04-26 21:32:50.000000000 +0200 +++ new/lib/rails/version.rb 2022-05-09 15:41:42.000000000 +0200 @@ -3,7 +3,7 @@ require_relative "gem_version" module Rails - # Returns the version of the currently loaded Rails as a string. + # Returns the currently loaded version of Rails as a string. def self.version VERSION::STRING end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2022-04-26 21:32:50.000000000 +0200 +++ new/metadata 2022-05-09 15:41:42.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: railties version: !ruby/object:Gem::Version - version: 7.0.2.4 + version: 7.0.3 platform: ruby authors: - David Heinemeier Hansson autorequire: bindir: exe cert_chain: [] -date: 2022-04-26 00:00:00.000000000 Z +date: 2022-05-09 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: activesupport @@ -16,28 +16,28 @@ requirements: - - '=' - !ruby/object:Gem::Version - version: 7.0.2.4 + version: 7.0.3 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - '=' - !ruby/object:Gem::Version - version: 7.0.2.4 + version: 7.0.3 - !ruby/object:Gem::Dependency name: actionpack requirement: !ruby/object:Gem::Requirement requirements: - - '=' - !ruby/object:Gem::Version - version: 7.0.2.4 + version: 7.0.3 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - '=' - !ruby/object:Gem::Version - version: 7.0.2.4 + version: 7.0.3 - !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement @@ -100,14 +100,14 @@ requirements: - - '=' - !ruby/object:Gem::Version - version: 7.0.2.4 + version: 7.0.3 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - '=' - !ruby/object:Gem::Version - version: 7.0.2.4 + version: 7.0.3 description: 'Rails internals: application bootup, plugins, generators, and rake tasks.' email: da...@loudthinking.com executables: @@ -122,6 +122,7 @@ - exe/rails - lib/minitest/rails_plugin.rb - lib/rails.rb +- lib/rails/.DS_Store - lib/rails/all.rb - lib/rails/api/generator.rb - lib/rails/api/task.rb @@ -422,10 +423,10 @@ - MIT metadata: bug_tracker_uri: https://github.com/rails/rails/issues - changelog_uri: https://github.com/rails/rails/blob/v7.0.2.4/railties/CHANGELOG.md - documentation_uri: https://api.rubyonrails.org/v7.0.2.4/ + changelog_uri: https://github.com/rails/rails/blob/v7.0.3/railties/CHANGELOG.md + documentation_uri: https://api.rubyonrails.org/v7.0.3/ mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk - source_code_uri: https://github.com/rails/rails/tree/v7.0.2.4/railties + source_code_uri: https://github.com/rails/rails/tree/v7.0.3/railties rubygems_mfa_required: 'true' post_install_message: rdoc_options: @@ -444,7 +445,7 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubygems_version: 3.1.6 +rubygems_version: 3.3.7 signing_key: specification_version: 4 summary: Tools for creating, working with, and running Rails applications.