railties 7.0.2.2 → 7.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b404b6ddf82ab811262c885d71c088c6e150688039b36deef74e5a2cf3a2d2d
4
- data.tar.gz: 585488b7d32ec75180b0f7da9cf164f8687b934361cdbbab9a97b486b92bfa4d
3
+ metadata.gz: a367587e6f40665f7927e18ac1a41e3eff65cdcfc137d8f9223417806aa73a61
4
+ data.tar.gz: 12a3a3d1dc66aabffab11f606fa46f3a939dc5c4d740e29c9ea7fd093a140f32
5
5
  SHA512:
6
- metadata.gz: aa73bd1c301d365a1ad7ed7ce7fe3435f04c5c68390dc5ce88a713de7d4771506326573af95b8a04c8a38daeff6b4e5cf05b781c49d877d53b7f06eb5d566f1f
7
- data.tar.gz: 576e80f6e59392e2c70ef11ac2c966d5d2fdc2280ae63eee3c9aa7974efe98c3120eca1508448c6c1b242558ea85580fe8956a5383288fd1d7770e1f6f3e2cab
6
+ metadata.gz: c456684d3f54fb5ed260f613bd22ee36cafa3d1e288786e388c38d589a165f1b44d6f226fcd8b8ee7b80138d0ede923d29ef4a2e4390c662546190bec6cba313
7
+ data.tar.gz: 3416579a8cb8a10704bd67ffda623f6b06025350147782449f3bd1d8a8dd74b3cfe23c90bfb84323275387cd1c78ae652ce5fee7e895cd674cb44bddd1548d38
data/CHANGELOG.md CHANGED
@@ -1,3 +1,52 @@
1
+ ## Rails 7.0.3 (May 09, 2022) ##
2
+
3
+ * If reloading and eager loading are both enabled, after a reload Rails eager loads again the application code.
4
+
5
+ *Xavier Noria*
6
+
7
+ * Use `controller_class_path` in `Rails::Generators::NamedBase#route_url`
8
+
9
+ The `route_url` method now returns the correct path when generating
10
+ a namespaced controller with a top-level model using `--model-name`.
11
+
12
+ Previously, when running this command:
13
+
14
+ ``` sh
15
+ bin/rails generate scaffold_controller Admin/Post --model-name Post
16
+ ```
17
+
18
+ the comments above the controller action would look like:
19
+
20
+ ``` ruby
21
+ # GET /posts
22
+ def index
23
+ @posts = Post.all
24
+ end
25
+ ```
26
+
27
+ afterwards, they now look like this:
28
+
29
+ ``` ruby
30
+ # GET /admin/posts
31
+ def index
32
+ @posts = Post.all
33
+ end
34
+ ```
35
+
36
+ Fixes #44662.
37
+
38
+ *Andrew White*
39
+
40
+ ## Rails 7.0.2.4 (April 26, 2022) ##
41
+
42
+ * No changes.
43
+
44
+
45
+ ## Rails 7.0.2.3 (March 08, 2022) ##
46
+
47
+ * No changes.
48
+
49
+
1
50
  ## Rails 7.0.2.2 (February 11, 2022) ##
2
51
 
3
52
  * No changes.
@@ -49,7 +49,7 @@ module Minitest
49
49
  end
50
50
 
51
51
  # Owes great inspiration to test runner trailblazers like RSpec,
52
- # minitest-reporters, maxitest and others.
52
+ # minitest-reporters, maxitest, and others.
53
53
  def self.plugin_rails_init(options)
54
54
  unless options[:full_backtrace] || ENV["BACKTRACE"]
55
55
  # Plugin can run without Rails loaded, check before filtering.
Binary file
@@ -361,6 +361,20 @@ module Rails
361
361
  generators.colorize_logging = val
362
362
  end
363
363
 
364
+ # Specifies what class to use to store the session. Possible values
365
+ # are +:cookie_store+, +:mem_cache_store+, a custom store, or
366
+ # +:disabled+. +:disabled+ tells Rails not to deal with sessions.
367
+ #
368
+ # Additional options will be set as +session_options+:
369
+ #
370
+ # config.session_store :cookie_store, key: "_your_app_session"
371
+ # config.session_options # => {key: "_your_app_session"}
372
+ #
373
+ # If a custom store is specified as a symbol, it will be resolved to
374
+ # the +ActionDispatch::Session+ namespace:
375
+ #
376
+ # # use ActionDispatch::Session::MyCustomStore as the session store
377
+ # config.session_store :my_custom_store
364
378
  def session_store(new_session_store = nil, **options)
365
379
  if new_session_store
366
380
  if new_session_store == :active_record_store
@@ -396,6 +410,7 @@ module Rails
396
410
  Rails::SourceAnnotationExtractor::Annotation
397
411
  end
398
412
 
413
+ # Configures the ActionDispatch::ContentSecurityPolicy.
399
414
  def content_security_policy(&block)
400
415
  if block_given?
401
416
  @content_security_policy = ActionDispatch::ContentSecurityPolicy.new(&block)
@@ -404,6 +419,7 @@ module Rails
404
419
  end
405
420
  end
406
421
 
422
+ # Configures the ActionDispatch::PermissionsPolicy.
407
423
  def permissions_policy(&block)
408
424
  if block_given?
409
425
  @permissions_policy = ActionDispatch::PermissionsPolicy.new(&block)
@@ -35,10 +35,6 @@ module Rails
35
35
  ActiveSupport::Dependencies._autoloaded_tracked_classes << value
36
36
  end
37
37
  end
38
-
39
- autoloader.on_unload do |_cpath, value, _abspath|
40
- value.before_remove_const if value.respond_to?(:before_remove_const)
41
- end
42
38
  end
43
39
 
44
40
  autoloader.setup
@@ -72,11 +68,17 @@ module Rails
72
68
  app.reloader.prepare!
73
69
  end
74
70
 
75
- initializer :eager_load! do
71
+ initializer :eager_load! do |app|
76
72
  if config.eager_load
77
73
  ActiveSupport.run_load_hooks(:before_eager_load, self)
78
74
  Zeitwerk::Loader.eager_load_all
79
75
  config.eager_load_namespaces.each(&:eager_load!)
76
+
77
+ unless config.cache_classes
78
+ app.reloader.after_class_unload do
79
+ Rails.autoloaders.main.eager_load
80
+ end
81
+ end
80
82
  end
81
83
  end
82
84
 
@@ -22,12 +22,12 @@ module Rails
22
22
  # Rails::Application::Bootstrap) and finishing initializers, after all the others
23
23
  # are executed (check Rails::Application::Finisher).
24
24
  #
25
- # == Configuration
25
+ # == \Configuration
26
26
  #
27
27
  # Besides providing the same configuration as Rails::Engine and Rails::Railtie,
28
28
  # the application object has several specific configurations, for example
29
- # "cache_classes", "consider_all_requests_local", "filter_parameters",
30
- # "logger" and so forth.
29
+ # +cache_classes+, +consider_all_requests_local+, +filter_parameters+,
30
+ # +logger+, and so forth.
31
31
  #
32
32
  # Check Rails::Application::Configuration to see them all.
33
33
  #
@@ -43,21 +43,21 @@ module Rails
43
43
  # == Booting process
44
44
  #
45
45
  # The application is also responsible for setting up and executing the booting
46
- # process. From the moment you require "config/application.rb" in your app,
46
+ # process. From the moment you require <tt>config/application.rb</tt> in your app,
47
47
  # the booting process goes like this:
48
48
  #
49
- # 1) require "config/boot.rb" to set up load paths
50
- # 2) require railties and engines
51
- # 3) Define Rails.application as "class MyApp::Application < Rails::Application"
52
- # 4) Run config.before_configuration callbacks
53
- # 5) Load config/environments/ENV.rb
54
- # 6) Run config.before_initialize callbacks
55
- # 7) Run Railtie#initializer defined by railties, engines and application.
56
- # One by one, each engine sets up its load paths, routes and runs its config/initializers/* files.
57
- # 8) Custom Railtie#initializers added by railties, engines and applications are executed
58
- # 9) Build the middleware stack and run to_prepare callbacks
59
- # 10) Run config.before_eager_load and eager_load! if eager_load is true
60
- # 11) Run config.after_initialize callbacks
49
+ # 1. <tt>require "config/boot.rb"</tt> to set up load paths.
50
+ # 2. +require+ railties and engines.
51
+ # 3. Define +Rails.application+ as <tt>class MyApp::Application < Rails::Application</tt>.
52
+ # 4. Run +config.before_configuration+ callbacks.
53
+ # 5. Load <tt>config/environments/ENV.rb</tt>.
54
+ # 6. Run +config.before_initialize+ callbacks.
55
+ # 7. Run <tt>Railtie#initializer</tt> defined by railties, engines, and application.
56
+ # One by one, each engine sets up its load paths and routes, and runs its <tt>config/initializers/*</tt> files.
57
+ # 8. Custom <tt>Railtie#initializers</tt> added by railties, engines, and applications are executed.
58
+ # 9. Build the middleware stack and run +to_prepare+ callbacks.
59
+ # 10. Run +config.before_eager_load+ and +eager_load!+ if +eager_load+ is +true+.
60
+ # 11. Run +config.after_initialize+ callbacks.
61
61
  class Application < Engine
62
62
  autoload :Bootstrap, "rails/application/bootstrap"
63
63
  autoload :Configuration, "rails/application/configuration"
@@ -175,7 +175,7 @@ module Rails
175
175
  # Rails.application.message_verifier('sensitive_data').verify(message)
176
176
  # # => 'my sensible data'
177
177
  #
178
- # See the +ActiveSupport::MessageVerifier+ documentation for more information.
178
+ # See the ActiveSupport::MessageVerifier documentation for more information.
179
179
  def message_verifier(verifier_name)
180
180
  @message_verifiers[verifier_name] ||= begin
181
181
  secret = key_generator.generate_key(verifier_name.to_s)
@@ -403,13 +403,14 @@ module Rails
403
403
  attr_writer :secrets, :credentials
404
404
 
405
405
  # The secret_key_base is used as the input secret to the application's key generator, which in turn
406
- # is used to create all MessageVerifiers/MessageEncryptors, including the ones that sign and encrypt cookies.
406
+ # is used to create all ActiveSupport::MessageVerifier and ActiveSupport::MessageEncryptor instances,
407
+ # including the ones that sign and encrypt cookies.
407
408
  #
408
409
  # In development and test, this is randomly generated and stored in a
409
410
  # temporary file in <tt>tmp/development_secret.txt</tt>.
410
411
  #
411
- # In all other environments, we look for it first in ENV["SECRET_KEY_BASE"],
412
- # then credentials.secret_key_base, and finally secrets.secret_key_base. For most applications,
412
+ # In all other environments, we look for it first in <tt>ENV["SECRET_KEY_BASE"]</tt>,
413
+ # then +credentials.secret_key_base+, and finally +secrets.secret_key_base+. For most applications,
413
414
  # the correct place to store it is in the encrypted credentials file.
414
415
  def secret_key_base
415
416
  if Rails.env.development? || Rails.env.test?
data/lib/rails/command.rb CHANGED
@@ -26,7 +26,7 @@ module Rails
26
26
  ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence || "development"
27
27
  end
28
28
 
29
- # Receives a namespace, arguments and the behavior to invoke the command.
29
+ # Receives a namespace, arguments, and the behavior to invoke the command.
30
30
  def invoke(full_namespace, args = [], **config)
31
31
  namespace = full_namespace = full_namespace.to_s
32
32
 
@@ -4,14 +4,14 @@ module Rails
4
4
  module ConsoleMethods
5
5
  # Gets the helper methods available to the controller.
6
6
  #
7
- # This method assumes an +ApplicationController+ exists, and it extends +ActionController::Base+
7
+ # This method assumes an +ApplicationController+ exists, and that it extends ActionController::Base.
8
8
  def helper
9
9
  ApplicationController.helpers
10
10
  end
11
11
 
12
12
  # Gets a new instance of a controller object.
13
13
  #
14
- # This method assumes an +ApplicationController+ exists, and it extends +ActionController::Base+
14
+ # This method assumes an +ApplicationController+ exists, and that it extends ActionController::Base.
15
15
  def controller
16
16
  @controller ||= ApplicationController.new
17
17
  end
data/lib/rails/engine.rb CHANGED
@@ -11,10 +11,10 @@ require "thread"
11
11
  module Rails
12
12
  # <tt>Rails::Engine</tt> allows you to wrap a specific Rails application or subset of
13
13
  # functionality and share it with other applications or within a larger packaged application.
14
- # Every <tt>Rails::Application</tt> is just an engine, which allows for simple
14
+ # Every Rails::Application is just an engine, which allows for simple
15
15
  # feature and application sharing.
16
16
  #
17
- # Any <tt>Rails::Engine</tt> is also a <tt>Rails::Railtie</tt>, so the same
17
+ # Any <tt>Rails::Engine</tt> is also a Rails::Railtie, so the same
18
18
  # methods (like <tt>rake_tasks</tt> and +generators+) and configuration
19
19
  # options that are available in railties can also be used in engines.
20
20
  #
@@ -31,7 +31,7 @@ module Rails
31
31
  # end
32
32
  #
33
33
  # Then ensure that this file is loaded at the top of your <tt>config/application.rb</tt>
34
- # (or in your +Gemfile+) and it will automatically load models, controllers and helpers
34
+ # (or in your +Gemfile+), and it will automatically load models, controllers, and helpers
35
35
  # inside +app+, load routes at <tt>config/routes.rb</tt>, load locales at
36
36
  # <tt>config/locales/**/*</tt>, and load tasks at <tt>lib/tasks/**/*</tt>.
37
37
  #
@@ -192,13 +192,13 @@ module Rails
192
192
  #
193
193
  # == Isolated Engine
194
194
  #
195
- # Normally when you create controllers, helpers and models inside an engine, they are treated
195
+ # Normally when you create controllers, helpers, and models inside an engine, they are treated
196
196
  # as if they were created inside the application itself. This means that all helpers and
197
197
  # named routes from the application will be available to your engine's controllers as well.
198
198
  #
199
199
  # However, sometimes you want to isolate your engine from the application, especially if your engine
200
200
  # has its own router. To do that, you simply need to call +isolate_namespace+. This method requires
201
- # you to pass a module where all your controllers, helpers and models should be nested to:
201
+ # you to pass a module where all your controllers, helpers, and models should be nested to:
202
202
  #
203
203
  # module MyEngine
204
204
  # class Engine < Rails::Engine
@@ -236,9 +236,9 @@ module Rails
236
236
  # +articles_path+, like you would do with your main application.
237
237
  #
238
238
  # To make this behavior consistent with other parts of the framework,
239
- # isolated engines also have an effect on <tt>ActiveModel::Naming</tt>. In a
239
+ # isolated engines also have an effect on ActiveModel::Naming. In a
240
240
  # normal Rails app, when you use a namespaced model such as
241
- # <tt>Namespace::Article</tt>, <tt>ActiveModel::Naming</tt> will generate
241
+ # <tt>Namespace::Article</tt>, ActiveModel::Naming will generate
242
242
  # names with the prefix "namespace". In an isolated engine, the prefix will
243
243
  # be omitted in URL helpers and form fields, for convenience.
244
244
  #
@@ -442,7 +442,7 @@ module Rails
442
442
  end
443
443
 
444
444
  # Load console and invoke the registered hooks.
445
- # Check <tt>Rails::Railtie.console</tt> for more info.
445
+ # Check Rails::Railtie.console for more info.
446
446
  def load_console(app = self)
447
447
  require "rails/console/app"
448
448
  require "rails/console/helpers"
@@ -451,14 +451,14 @@ module Rails
451
451
  end
452
452
 
453
453
  # Load Rails runner and invoke the registered hooks.
454
- # Check <tt>Rails::Railtie.runner</tt> for more info.
454
+ # Check Rails::Railtie.runner for more info.
455
455
  def load_runner(app = self)
456
456
  run_runner_blocks(app)
457
457
  self
458
458
  end
459
459
 
460
- # Load Rake, railties tasks and invoke the registered hooks.
461
- # Check <tt>Rails::Railtie.rake_tasks</tt> for more info.
460
+ # Load Rake and railties tasks, and invoke the registered hooks.
461
+ # Check Rails::Railtie.rake_tasks for more info.
462
462
  def load_tasks(app = self)
463
463
  require "rake"
464
464
  run_tasks_blocks(app)
@@ -466,7 +466,7 @@ module Rails
466
466
  end
467
467
 
468
468
  # Load Rails generators and invoke the registered hooks.
469
- # Check <tt>Rails::Railtie.generators</tt> for more info.
469
+ # Check Rails::Railtie.generators for more info.
470
470
  def load_generators(app = self)
471
471
  require "rails/generators"
472
472
  run_generators_blocks(app)
@@ -475,7 +475,7 @@ module Rails
475
475
  end
476
476
 
477
477
  # Invoke the server registered hooks.
478
- # Check <tt>Rails::Railtie.server</tt> for more info.
478
+ # Check Rails::Railtie.server for more info.
479
479
  def load_server(app = self)
480
480
  run_server_blocks(app)
481
481
  self
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rails
4
- # Returns the version of the currently loaded Rails as a <tt>Gem::Version</tt>
4
+ # Returns the currently loaded version of Rails as a <tt>Gem::Version</tt>.
5
5
  def self.gem_version
6
6
  Gem::Version.new VERSION::STRING
7
7
  end
@@ -9,8 +9,8 @@ module Rails
9
9
  module VERSION
10
10
  MAJOR = 7
11
11
  MINOR = 0
12
- TINY = 2
13
- PRE = "2"
12
+ TINY = 3
13
+ PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -239,6 +239,10 @@ module Rails
239
239
  options[:skip_asset_pipeline] || options[:asset_pipeline] != "sprockets"
240
240
  end
241
241
 
242
+ def skip_propshaft?
243
+ options[:skip_asset_pipeline] || options[:asset_pipeline] != "propshaft"
244
+ end
245
+
242
246
 
243
247
  class GemfileEntry < Struct.new(:name, :version, :comment, :options, :commented_out)
244
248
  def initialize(name, version, comment, options = {}, commented_out = false)
@@ -94,7 +94,7 @@ module Rails
94
94
  #
95
95
  # The first and last part used to find the generator to be invoked are
96
96
  # guessed based on class invokes hook_for, as noticed in the example above.
97
- # This can be customized with two options: :in and :as.
97
+ # This can be customized with two options: +:in+ and +:as+.
98
98
  #
99
99
  # Let's suppose you are creating a generator that needs to invoke the
100
100
  # controller generator from test unit. Your first attempt is:
@@ -108,7 +108,7 @@ module Rails
108
108
  # "test_unit:awesome", "test_unit"
109
109
  #
110
110
  # Which is not the desired lookup. You can change it by providing the
111
- # :as option:
111
+ # +:as+ option:
112
112
  #
113
113
  # class AwesomeGenerator < Rails::Generators::Base
114
114
  # hook_for :test_framework, as: :controller
@@ -119,7 +119,7 @@ module Rails
119
119
  # "test_unit:controller", "test_unit"
120
120
  #
121
121
  # Similarly, if you want it to also look up in the rails namespace, you
122
- # just need to provide the :in value:
122
+ # just need to provide the +:in+ value:
123
123
  #
124
124
  # class AwesomeGenerator < Rails::Generators::Base
125
125
  # hook_for :test_framework, in: :rails, as: :controller
@@ -127,7 +127,7 @@ module Rails
127
127
  end
128
128
 
129
129
  def route_url # :doc:
130
- @route_url ||= class_path.collect { |dname| "/" + dname }.join + "/" + plural_file_name
130
+ @route_url ||= controller_class_path.collect { |dname| "/" + dname }.join + "/" + plural_file_name
131
131
  end
132
132
 
133
133
  def url_helper_prefix # :doc:
@@ -202,7 +202,7 @@ module Rails
202
202
  end
203
203
 
204
204
  # Add a class collisions name to be checked on class initialization. You
205
- # can supply a hash with a :prefix or :suffix to be tested.
205
+ # can supply a hash with a +:prefix+ or +:suffix+ to be tested.
206
206
  #
207
207
  # ==== Examples
208
208
  #
@@ -138,7 +138,7 @@ module Rails
138
138
  template "config/storage.yml"
139
139
  end
140
140
 
141
- if skip_sprockets? && !assets_config_exist
141
+ if skip_sprockets? && skip_propshaft? && !assets_config_exist
142
142
  remove_file "config/initializers/assets.rb"
143
143
  end
144
144
 
@@ -457,9 +457,12 @@ module Rails
457
457
  end
458
458
  end
459
459
 
460
- def delete_assets_initializer_skipping_sprockets
461
- if skip_sprockets?
460
+ def delete_assets_initializer_skipping_sprockets_and_propshaft
461
+ if skip_sprockets? && skip_propshaft?
462
462
  remove_file "config/initializers/assets.rb"
463
+ end
464
+
465
+ if skip_sprockets?
463
466
  remove_file "app/assets/config/manifest.js"
464
467
  remove_dir "app/assets/config"
465
468
  remove_file "app/assets/stylesheets/application.css"
@@ -1,8 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Define an application-wide content security policy
4
- # For further information see the following documentation
5
- # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
3
+ # Define an application-wide content security policy.
4
+ # See the Securing Rails Applications Guide for more information:
5
+ # https://guides.rubyonrails.org/security.html#content-security-policy-header
6
6
 
7
7
  # Rails.application.configure do
8
8
  # config.content_security_policy do |policy|
@@ -20,7 +20,6 @@
20
20
  # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21
21
  # config.content_security_policy_nonce_directives = %w(script-src)
22
22
  #
23
- # # Report CSP violations to a specified URI. See:
24
- # # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
23
+ # # Report violations without enforcing the policy.
25
24
  # # config.content_security_policy_report_only = true
26
25
  # end
@@ -253,8 +253,8 @@ module Rails
253
253
  invoke_fallbacks_for(name, base) || invoke_fallbacks_for(context, name)
254
254
  end
255
255
 
256
- # Receives a namespace, arguments and the behavior to invoke the generator.
257
- # It's used as the default entry point for generate, destroy and update
256
+ # Receives a namespace, arguments, and the behavior to invoke the generator.
257
+ # It's used as the default entry point for generate, destroy, and update
258
258
  # commands.
259
259
  def invoke(namespace, args = ARGV, config = {})
260
260
  names = namespace.to_s.split(":")
data/lib/rails/paths.rb CHANGED
@@ -12,7 +12,7 @@ module Rails
12
12
  # root.add "app/controllers", eager_load: true
13
13
  #
14
14
  # The above command creates a new root object and adds "app/controllers" as a path.
15
- # This means we can get a <tt>Rails::Paths::Path</tt> object back like below:
15
+ # This means we can get a Rails::Paths::Path object back like below:
16
16
  #
17
17
  # path = root["app/controllers"]
18
18
  # path.eager_load? # => true
@@ -31,13 +31,17 @@ module Rails
31
31
  private
32
32
  def call_app(request, env) # :doc:
33
33
  instrumenter = ActiveSupport::Notifications.instrumenter
34
- instrumenter.start "request.action_dispatch", request: request
34
+ instrumenter_state = instrumenter.start "request.action_dispatch", request: request
35
+ instrumenter_finish = -> () {
36
+ instrumenter.finish_with_state(instrumenter_state, "request.action_dispatch", request: request)
37
+ }
38
+
35
39
  logger.info { started_request_message(request) }
36
40
  status, headers, body = @app.call(env)
37
- body = ::Rack::BodyProxy.new(body) { finish(request) }
41
+ body = ::Rack::BodyProxy.new(body, &instrumenter_finish)
38
42
  [status, headers, body]
39
43
  rescue Exception
40
- finish(request)
44
+ instrumenter_finish.call
41
45
  raise
42
46
  ensure
43
47
  ActiveSupport::LogSubscriber.flush_all!
@@ -65,11 +69,6 @@ module Rails
65
69
  end
66
70
  end
67
71
 
68
- def finish(request)
69
- instrumenter = ActiveSupport::Notifications.instrumenter
70
- instrumenter.finish "request.action_dispatch", request: request
71
- end
72
-
73
72
  def logger
74
73
  Rails.logger
75
74
  end
data/lib/rails/railtie.rb CHANGED
@@ -24,7 +24,7 @@ module Rails
24
24
  # * creating initializers
25
25
  # * configuring a Rails framework for the application, like setting a generator
26
26
  # * adding <tt>config.*</tt> keys to the environment
27
- # * setting up a subscriber with <tt>ActiveSupport::Notifications</tt>
27
+ # * setting up a subscriber with ActiveSupport::Notifications
28
28
  # * adding Rake tasks
29
29
  #
30
30
  # == Creating a Railtie
@@ -129,7 +129,7 @@ module Rails
129
129
  # == Application and Engine
130
130
  #
131
131
  # An engine is nothing more than a railtie with some initializers already set. And since
132
- # <tt>Rails::Application</tt> is an engine, the same configuration described here can be
132
+ # Rails::Application is an engine, the same configuration described here can be
133
133
  # used in both.
134
134
  #
135
135
  # Be sure to look at the documentation of those specific classes for more information.
@@ -214,13 +214,15 @@ module Rails
214
214
  end
215
215
 
216
216
  def respond_to_missing?(name, _)
217
+ return super if abstract_railtie?
218
+
217
219
  instance.respond_to?(name) || super
218
220
  end
219
221
 
220
222
  # If the class method does not have a method, then send the method call
221
223
  # to the Railtie instance.
222
224
  def method_missing(name, *args, &block)
223
- if instance.respond_to?(name)
225
+ if !abstract_railtie? && instance.respond_to?(name)
224
226
  instance.public_send(name, *args, &block)
225
227
  else
226
228
  super
@@ -70,7 +70,7 @@ module Rails
70
70
  #
71
71
  # If +options+ has a <tt>:tag</tt> flag, it will be passed to each annotation's +to_s+.
72
72
  #
73
- # See <tt>#find_in</tt> for a list of file extensions that will be taken into account.
73
+ # See SourceAnnotationExtractor#find_in for a list of file extensions that will be taken into account.
74
74
  #
75
75
  # This class method is the single entry point for the <tt>rails notes</tt> command.
76
76
  def self.enumerate(tag = nil, options = {})
data/lib/rails/version.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  require_relative "gem_version"
4
4
 
5
5
  module Rails
6
- # Returns the version of the currently loaded Rails as a string.
6
+ # Returns the currently loaded version of Rails as a string.
7
7
  def self.version
8
8
  VERSION::STRING
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railties
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.2.2
4
+ version: 7.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-11 00:00:00.000000000 Z
11
+ date: 2022-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 7.0.2.2
19
+ version: 7.0.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 7.0.2.2
26
+ version: 7.0.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: actionpack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 7.0.2.2
33
+ version: 7.0.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 7.0.2.2
40
+ version: 7.0.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 7.0.2.2
103
+ version: 7.0.3
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 7.0.2.2
110
+ version: 7.0.3
111
111
  description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
112
112
  email: david@loudthinking.com
113
113
  executables:
@@ -122,6 +122,7 @@ files:
122
122
  - exe/rails
123
123
  - lib/minitest/rails_plugin.rb
124
124
  - lib/rails.rb
125
+ - lib/rails/.DS_Store
125
126
  - lib/rails/all.rb
126
127
  - lib/rails/api/generator.rb
127
128
  - lib/rails/api/task.rb
@@ -422,10 +423,10 @@ licenses:
422
423
  - MIT
423
424
  metadata:
424
425
  bug_tracker_uri: https://github.com/rails/rails/issues
425
- changelog_uri: https://github.com/rails/rails/blob/v7.0.2.2/railties/CHANGELOG.md
426
- documentation_uri: https://api.rubyonrails.org/v7.0.2.2/
426
+ changelog_uri: https://github.com/rails/rails/blob/v7.0.3/railties/CHANGELOG.md
427
+ documentation_uri: https://api.rubyonrails.org/v7.0.3/
427
428
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
428
- source_code_uri: https://github.com/rails/rails/tree/v7.0.2.2/railties
429
+ source_code_uri: https://github.com/rails/rails/tree/v7.0.3/railties
429
430
  rubygems_mfa_required: 'true'
430
431
  post_install_message:
431
432
  rdoc_options:
@@ -444,7 +445,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
444
445
  - !ruby/object:Gem::Version
445
446
  version: '0'
446
447
  requirements: []
447
- rubygems_version: 3.2.22
448
+ rubygems_version: 3.3.7
448
449
  signing_key:
449
450
  specification_version: 4
450
451
  summary: Tools for creating, working with, and running Rails applications.