rails-rfc6570 3.4.0 → 3.5.0

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.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -5
  3. data/lib/rails/rfc6570/formatter.rb +9 -12
  4. data/lib/rails/rfc6570/patches.rb +1 -1
  5. data/lib/rails/rfc6570/version.rb +1 -1
  6. data/spec/rails/rfc6570_spec.rb +49 -1
  7. data/vendor/bundle/ruby/3.4.0/bundler/gems/rubocop-config-3bcd2110ca87/README.md +23 -0
  8. data/vendor/bundle/ruby/3.4.0/bundler/gems/{rubocop-config-67802c9d1826 → rubocop-config-3bcd2110ca87}/rubocop-config.gemspec +11 -11
  9. data/vendor/bundle/ruby/3.4.0/gems/{actionpack-8.0.1 → actionpack-8.0.3}/CHANGELOG.md +80 -0
  10. data/vendor/bundle/ruby/3.4.0/gems/{actionpack-8.0.1 → actionpack-8.0.3}/README.rdoc +1 -1
  11. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.3/CHANGELOG.md +129 -0
  12. data/vendor/bundle/ruby/3.4.0/gems/{actionview-8.0.1 → actionview-8.0.3}/README.rdoc +1 -1
  13. data/vendor/bundle/ruby/3.4.0/gems/{activesupport-8.0.1 → activesupport-8.0.3}/CHANGELOG.md +152 -0
  14. data/vendor/bundle/ruby/3.4.0/gems/{activesupport-8.0.1 → activesupport-8.0.3}/README.rdoc +1 -1
  15. data/vendor/bundle/ruby/3.4.0/gems/{benchmark-0.4.0 → benchmark-0.4.1}/README.md +1 -1
  16. data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.0 → connection_pool-2.5.4}/README.md +21 -0
  17. data/vendor/bundle/ruby/3.4.0/gems/diff-lcs-1.6.2/CHANGELOG.md +518 -0
  18. data/vendor/bundle/ruby/3.4.0/gems/diff-lcs-1.6.2/README.md +92 -0
  19. data/vendor/bundle/ruby/3.4.0/gems/{drb-2.2.1 → drb-2.2.3}/drb.gemspec +2 -1
  20. data/vendor/bundle/ruby/3.4.0/gems/{loofah-2.24.0 → loofah-2.24.1}/CHANGELOG.md +7 -0
  21. data/vendor/bundle/ruby/3.4.0/gems/{minitest-5.25.4 → minitest-5.25.5}/README.rdoc +16 -9
  22. data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.1 → public_suffix-6.0.2}/CHANGELOG.md +7 -0
  23. data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.1 → public_suffix-6.0.2}/LICENSE.txt +1 -1
  24. data/vendor/bundle/ruby/3.4.0/gems/{public_suffix-6.0.1 → public_suffix-6.0.2}/README.md +1 -1
  25. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.1.9 → rack-3.2.1}/CHANGELOG.md +232 -2
  26. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.1.9 → rack-3.2.1}/README.md +68 -20
  27. data/vendor/bundle/ruby/3.4.0/gems/{rails-dom-testing-2.2.0 → rails-dom-testing-2.3.0}/README.md +3 -0
  28. data/vendor/bundle/ruby/3.4.0/gems/{rake-13.2.1 → rake-13.3.0}/README.rdoc +5 -5
  29. data/vendor/bundle/ruby/3.4.0/gems/{rake-13.2.1 → rake-13.3.0}/rake.gemspec +2 -2
  30. data/vendor/bundle/ruby/3.4.0/gems/{uri-1.0.2 → uri-1.0.3}/README.md +1 -1
  31. data/vendor/bundle/ruby/3.4.0/specifications/{actionpack-8.0.1.gemspec → actionpack-8.0.3.gemspec} +9 -9
  32. data/vendor/bundle/ruby/3.4.0/specifications/{actionview-8.0.1.gemspec → actionview-8.0.3.gemspec} +9 -9
  33. data/vendor/bundle/ruby/3.4.0/specifications/{activesupport-8.0.1.gemspec → activesupport-8.0.3.gemspec} +6 -6
  34. data/vendor/bundle/ruby/3.4.0/specifications/addressable-2.8.7.gemspec +1 -1
  35. data/vendor/bundle/ruby/3.4.0/specifications/{base64-0.2.0.gemspec → base64-0.3.0.gemspec} +6 -6
  36. data/vendor/bundle/ruby/3.4.0/specifications/{benchmark-0.4.0.gemspec → benchmark-0.4.1.gemspec} +4 -4
  37. data/vendor/bundle/ruby/3.4.0/specifications/{bigdecimal-3.1.9.gemspec → bigdecimal-3.2.3.gemspec} +5 -5
  38. data/vendor/bundle/ruby/3.4.0/specifications/builder-3.3.0.gemspec +1 -1
  39. data/vendor/bundle/ruby/3.4.0/specifications/concurrent-ruby-1.3.5.gemspec +1 -1
  40. data/vendor/bundle/ruby/3.4.0/specifications/{connection_pool-2.5.0.gemspec → connection_pool-2.5.4.gemspec} +5 -5
  41. data/vendor/bundle/ruby/3.4.0/specifications/crass-1.0.6.gemspec +1 -1
  42. data/vendor/bundle/ruby/3.4.0/specifications/diff-lcs-1.6.2.gemspec +35 -0
  43. data/vendor/bundle/ruby/3.4.0/specifications/{drb-2.2.1.gemspec → drb-2.2.3.gemspec} +6 -6
  44. data/vendor/bundle/ruby/3.4.0/specifications/erubi-1.13.1.gemspec +1 -1
  45. data/vendor/bundle/ruby/3.4.0/specifications/i18n-1.14.7.gemspec +1 -1
  46. data/vendor/bundle/ruby/3.4.0/specifications/{logger-1.6.5.gemspec → logger-1.7.0.gemspec} +4 -4
  47. data/vendor/bundle/ruby/3.4.0/specifications/{loofah-2.24.0.gemspec → loofah-2.24.1.gemspec} +5 -5
  48. data/vendor/bundle/ruby/3.4.0/specifications/{minitest-5.25.4.gemspec → minitest-5.25.5.gemspec} +7 -7
  49. data/vendor/bundle/ruby/3.4.0/specifications/{nokogiri-1.18.2-x86_64-linux-gnu.gemspec → nokogiri-1.18.10-x86_64-linux-gnu.gemspec} +4 -4
  50. data/vendor/bundle/ruby/3.4.0/specifications/{public_suffix-6.0.1.gemspec → public_suffix-6.0.2.gemspec} +6 -6
  51. data/vendor/bundle/ruby/3.4.0/specifications/racc-1.8.1.gemspec +1 -1
  52. data/vendor/bundle/ruby/3.4.0/specifications/{rack-3.1.9.gemspec → rack-3.2.1.gemspec} +7 -7
  53. data/vendor/bundle/ruby/3.4.0/specifications/{rack-session-2.1.0.gemspec → rack-session-2.1.1.gemspec} +4 -4
  54. data/vendor/bundle/ruby/3.4.0/specifications/rack-test-2.2.0.gemspec +1 -1
  55. data/vendor/bundle/ruby/3.4.0/specifications/{rails-dom-testing-2.2.0.gemspec → rails-dom-testing-2.3.0.gemspec} +5 -5
  56. data/vendor/bundle/ruby/3.4.0/specifications/rails-html-sanitizer-1.6.2.gemspec +1 -1
  57. data/vendor/bundle/ruby/3.4.0/specifications/{rake-13.2.1.gemspec → rake-13.3.0.gemspec} +6 -6
  58. data/vendor/bundle/ruby/3.4.0/specifications/rake-release-1.3.0.gemspec +1 -1
  59. data/vendor/bundle/ruby/3.4.0/specifications/{rspec-3.13.0.gemspec → rspec-3.13.1.gemspec} +9 -9
  60. data/vendor/bundle/ruby/3.4.0/specifications/rspec-core-3.13.5.gemspec +31 -0
  61. data/vendor/bundle/ruby/3.4.0/specifications/rspec-expectations-3.13.5.gemspec +29 -0
  62. data/vendor/bundle/ruby/3.4.0/specifications/rspec-mocks-3.13.5.gemspec +29 -0
  63. data/vendor/bundle/ruby/3.4.0/specifications/{rspec-support-3.13.2.gemspec → rspec-support-3.13.6.gemspec} +9 -9
  64. data/vendor/bundle/ruby/3.4.0/specifications/securerandom-0.4.1.gemspec +1 -1
  65. data/vendor/bundle/ruby/3.4.0/specifications/tzinfo-2.0.6.gemspec +1 -1
  66. data/vendor/bundle/ruby/3.4.0/specifications/{uri-1.0.2.gemspec → uri-1.0.3.gemspec} +4 -4
  67. data/vendor/bundle/ruby/3.4.0/specifications/useragent-0.16.11.gemspec +1 -1
  68. metadata +81 -82
  69. data/vendor/bundle/ruby/3.4.0/bundler/gems/rubocop-config-67802c9d1826/README.md +0 -23
  70. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.1/CHANGELOG.md +0 -67
  71. data/vendor/bundle/ruby/3.4.0/gems/diff-lcs-1.5.1/README.rdoc +0 -84
  72. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.1/LICENSE.txt +0 -22
  73. data/vendor/bundle/ruby/3.4.0/gems/logger-1.6.5/logger.gemspec +0 -28
  74. data/vendor/bundle/ruby/3.4.0/specifications/diff-lcs-1.5.1.gemspec +0 -37
  75. data/vendor/bundle/ruby/3.4.0/specifications/rspec-core-3.13.2.gemspec +0 -39
  76. data/vendor/bundle/ruby/3.4.0/specifications/rspec-expectations-3.13.3.gemspec +0 -33
  77. data/vendor/bundle/ruby/3.4.0/specifications/rspec-mocks-3.13.2.gemspec +0 -33
  78. /data/vendor/bundle/ruby/3.4.0/bundler/gems/{rubocop-config-67802c9d1826 → rubocop-config-3bcd2110ca87}/LICENSE +0 -0
  79. /data/vendor/bundle/ruby/3.4.0/gems/{actionpack-8.0.1 → actionpack-8.0.3}/MIT-LICENSE +0 -0
  80. /data/vendor/bundle/ruby/3.4.0/gems/{actionview-8.0.1 → actionview-8.0.3}/MIT-LICENSE +0 -0
  81. /data/vendor/bundle/ruby/3.4.0/gems/{activesupport-8.0.1 → activesupport-8.0.3}/MIT-LICENSE +0 -0
  82. /data/vendor/bundle/ruby/3.4.0/gems/{base64-0.2.0 → base64-0.3.0}/README.md +0 -0
  83. /data/vendor/bundle/ruby/3.4.0/gems/{benchmark-0.4.0 → benchmark-0.4.1}/benchmark.gemspec +0 -0
  84. /data/vendor/bundle/ruby/3.4.0/gems/{bigdecimal-3.1.9 → bigdecimal-3.2.3}/LICENSE +0 -0
  85. /data/vendor/bundle/ruby/3.4.0/gems/{bigdecimal-3.1.9 → bigdecimal-3.2.3}/bigdecimal.gemspec +0 -0
  86. /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.0 → connection_pool-2.5.4}/LICENSE +0 -0
  87. /data/vendor/bundle/ruby/3.4.0/gems/{connection_pool-2.5.0 → connection_pool-2.5.4}/connection_pool.gemspec +0 -0
  88. /data/vendor/bundle/ruby/3.4.0/gems/{base64-0.2.0 → drb-2.2.3}/LICENSE.txt +0 -0
  89. /data/vendor/bundle/ruby/3.4.0/gems/{logger-1.6.5 → logger-1.7.0}/README.md +0 -0
  90. /data/vendor/bundle/ruby/3.4.0/gems/{loofah-2.24.0 → loofah-2.24.1}/MIT-LICENSE.txt +0 -0
  91. /data/vendor/bundle/ruby/3.4.0/gems/{loofah-2.24.0 → loofah-2.24.1}/README.md +0 -0
  92. /data/vendor/bundle/ruby/3.4.0/gems/{nokogiri-1.18.2-x86_64-linux-gnu → nokogiri-1.18.10-x86_64-linux-gnu}/LICENSE-DEPENDENCIES.md +0 -0
  93. /data/vendor/bundle/ruby/3.4.0/gems/{nokogiri-1.18.2-x86_64-linux-gnu → nokogiri-1.18.10-x86_64-linux-gnu}/LICENSE.md +0 -0
  94. /data/vendor/bundle/ruby/3.4.0/gems/{nokogiri-1.18.2-x86_64-linux-gnu → nokogiri-1.18.10-x86_64-linux-gnu}/README.md +0 -0
  95. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.1.9 → rack-3.2.1}/MIT-LICENSE +0 -0
  96. /data/vendor/bundle/ruby/3.4.0/gems/{rails-dom-testing-2.2.0 → rails-dom-testing-2.3.0}/MIT-LICENSE +0 -0
  97. /data/vendor/bundle/ruby/3.4.0/gems/{rake-13.2.1 → rake-13.3.0}/MIT-LICENSE +0 -0
  98. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-3.13.0 → rspec-3.13.1}/LICENSE.md +0 -0
  99. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-3.13.0 → rspec-3.13.1}/README.md +0 -0
  100. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-core-3.13.2 → rspec-core-3.13.5}/LICENSE.md +0 -0
  101. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-core-3.13.2 → rspec-core-3.13.5}/README.md +0 -0
  102. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-expectations-3.13.3 → rspec-expectations-3.13.5}/LICENSE.md +0 -0
  103. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-expectations-3.13.3 → rspec-expectations-3.13.5}/README.md +0 -0
  104. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-mocks-3.13.2 → rspec-mocks-3.13.5}/LICENSE.md +0 -0
  105. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-mocks-3.13.2 → rspec-mocks-3.13.5}/README.md +0 -0
  106. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-support-3.13.2 → rspec-support-3.13.6}/LICENSE.md +0 -0
  107. /data/vendor/bundle/ruby/3.4.0/gems/{rspec-support-3.13.2 → rspec-support-3.13.6}/README.md +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9da33d88750739a23961a9f48f5b26c2bb5e979a38a73f7646407ce41437a599
4
- data.tar.gz: f8083a5cbcda1e9fe0b8bea8417161a9ae9940d784098f1507e7cbcf52a73f32
3
+ metadata.gz: 591b65ab2b36b6be29b602386b19553c4a7718390ebc01eaaf328e8efa0059ee
4
+ data.tar.gz: 015d4b67acce29b894225cfba3d4964630e7f2c407d1dfc552cb08ce33b43748
5
5
  SHA512:
6
- metadata.gz: 4342753841b8c3e94054412f1a275fc67be3ac6d2cde95fe16731e5d920a4e7b5e833c6dd4cb3a9b54f3f33be1ffda3a17a7f4be21e91fac8c5f3e192093da71
7
- data.tar.gz: 5891d48dd9cbb1fe6a7b9a98b0cee339794d5f1da49cd7fa2e14e4314b22ed9729d1b8e3bd6c50fdfa136a777f8c3f21e3f484391b40d046cbba0059b2dad699
6
+ metadata.gz: 825329ae62f18baebc5475d3a213404efb6fa00827c933f21698996bbff457908d590926b75987cddbcb8f466fb5408bdd9447d32b19c27dac153473affdc7bd
7
+ data.tar.gz: 314f22c74f95539e4e6d1c933d31276069c0fe84852b58a6976aa7d40edfee50291de23e5c2b90c9fb37cb5f5f594c32a3703653f5493c20bdfce74796bad4ef
data/CHANGELOG.md CHANGED
@@ -11,15 +11,18 @@ This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a Ch
11
11
 
12
12
  ### Changes
13
13
 
14
- - Optimize named `*_rfc6570` helpers by removing unnecessary indirection
15
- - Optimize `#rfc6570_routes` and `#rfc6570_route` helpers
16
-
17
14
  ### Fixes
18
15
 
19
- - Fix up `RouteSet#to_rfc6570` and `NamedRouteCollection#to_rfc6570`
20
-
21
16
  ### Breaks
22
17
 
18
+ ## 3.5.0 - (2025-09-26)
19
+
20
+ ---
21
+
22
+ ### New
23
+
24
+ - Support `*_path_rfc6570` to include Rails Engines mount point.
25
+
23
26
  ## 3.4.0 - (2025-01-31)
24
27
 
25
28
  ---
@@ -21,23 +21,20 @@ module Rails
21
21
 
22
22
  if controller.present? && action.present?
23
23
  params = ::Rails::RFC6570.params_for(controller, action)
24
- parts << ("{?#{params.join(',')}}") if params&.any?
24
+ parts << "{?#{params.join(',')}}" if params&.any?
25
25
  end
26
26
  end
27
27
 
28
- if kwargs.fetch(:path_only, false)
29
- ::Addressable::Template.new parts.join
30
- else
31
- options = ctx.url_options.merge(kwargs)
32
- options[:path] = parts.join
28
+ options = ctx.url_options.merge(kwargs)
29
+ options[:path] = parts.join
30
+ options[:only_path] = kwargs.fetch(:path_only, false)
33
31
 
34
- if (osn = options.delete(:original_script_name))
35
- options[:script_name] = osn + options[:script_name]
36
- end
37
-
38
- ::Addressable::Template.new \
39
- ActionDispatch::Http::URL.url_for(options)
32
+ if (osn = options.delete(:original_script_name))
33
+ options[:script_name] = osn + options[:script_name]
40
34
  end
35
+
36
+ ::Addressable::Template.new \
37
+ ActionDispatch::Http::URL.url_for(options)
41
38
  end
42
39
 
43
40
  def symbol(node, prefix: nil, suffix: nil)
@@ -16,7 +16,7 @@ module Addressable
16
16
  end
17
17
 
18
18
  def as_json(*)
19
- pattern
19
+ to_s
20
20
  end
21
21
  end
22
22
  end
@@ -4,7 +4,7 @@ module Rails
4
4
  module RFC6570
5
5
  module VERSION
6
6
  MAJOR = 3
7
- MINOR = 4
7
+ MINOR = 5
8
8
  PATCH = 0
9
9
  STAGE = nil
10
10
 
@@ -6,6 +6,28 @@ ActiveSupport::Inflector.inflections(:en) do |inflect|
6
6
  inflect.acronym 'API'
7
7
  end
8
8
 
9
+ module DummyEngine
10
+ class Engine < ::Rails::Engine
11
+ isolate_namespace DummyEngine
12
+
13
+ routes.draw do
14
+ get '/action' => 'engine#action', as: :action
15
+ end
16
+ end
17
+
18
+ class EngineController < ActionController::API
19
+ rfc6570_params action: %i[param3]
20
+ def action
21
+ render json: {
22
+ ref: action_path,
23
+ template: action_rfc6570,
24
+ template_url: action_url_rfc6570,
25
+ template_path: action_path_rfc6570,
26
+ }
27
+ end
28
+ end
29
+ end
30
+
9
31
  Dummy::Application.routes.draw do
10
32
  get '/' => 'api#index', as: :root
11
33
 
@@ -20,6 +42,8 @@ Dummy::Application.routes.draw do
20
42
  get '/path/*capture/:title' => 'api#index', as: :test4
21
43
  get '/path(/*capture)/:title' => 'api#index', as: :test5
22
44
  get '/path(/*capture)(/:title)' => 'api#index', as: :test6
45
+
46
+ mount DummyEngine::Engine => '/dummy_engine'
23
47
  end
24
48
 
25
49
  class APIController < ApplicationController
@@ -58,7 +82,7 @@ describe Rails::RFC6570, type: :request do
58
82
 
59
83
  it 'returns list of all parsed and named routes' do
60
84
  expect(json.keys).to match_array \
61
- %w[root action test1 test2 test3 test4 test5 test6]
85
+ %w[root action test1 test2 test3 test4 test5 test6 dummy_engine]
62
86
  end
63
87
 
64
88
  it 'includes known parameters' do
@@ -88,6 +112,10 @@ describe Rails::RFC6570, type: :request do
88
112
  it 'parses splash operator (III)' do
89
113
  expect(json['test6']).to eq "#{host}/path{/capture*}{/title}"
90
114
  end
115
+
116
+ it 'includes the engine mount point root only' do
117
+ expect(json['dummy_engine']).to eq "#{host}/dummy_engine"
118
+ end
91
119
  end
92
120
 
93
121
  context 'action' do
@@ -134,4 +162,24 @@ describe Rails::RFC6570, type: :request do
134
162
  end
135
163
  end
136
164
  end
165
+
166
+ context 'mounted Rails engine' do
167
+ before { get '/dummy_engine/action', headers: headers }
168
+
169
+ it 'includes URL helpers' do
170
+ expect(response).to have_http_status :ok
171
+ end
172
+
173
+ it 'allows to return and render templates' do
174
+ expect(json['template']).to eq "#{host}/dummy_engine/action{?param3}"
175
+ end
176
+
177
+ it 'allows to return and render url templates' do
178
+ expect(json['template_url']).to eq "#{host}/dummy_engine/action{?param3}"
179
+ end
180
+
181
+ it 'allows to return and render path templates' do
182
+ expect(json['template_path']).to eq '/dummy_engine/action{?param3}'
183
+ end
184
+ end
137
185
  end
@@ -0,0 +1,23 @@
1
+ # Shared RuboCop Configuration
2
+
3
+ Shared RuboCop configuration and defaults for my libraries and projects.
4
+
5
+ ## Usage
6
+
7
+ ```ruby
8
+ # Gemfile
9
+
10
+ gem 'rubocop-config', github: 'jgraichen/rubocop-config', tag: 'v13', require: false
11
+ ```
12
+
13
+ ```yaml
14
+ # .rubocop.yml
15
+
16
+ inherit_gem:
17
+ rubocop-config: default.yml
18
+
19
+ AllCops:
20
+ TargetRubyVersion: 3.1
21
+ SuggestExtensions: False
22
+ NewCops: enable
23
+ ```
@@ -1,31 +1,31 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: rubocop-config 13.0.0 ruby lib
2
+ # stub: rubocop-config 14.0.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "rubocop-config".freeze
6
- s.version = "13.0.0".freeze
6
+ s.version = "14.0.0".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.metadata = { "allowed_push_host" => ".", "rubygems_mfa_required" => "true" } if s.respond_to? :metadata=
10
10
  s.require_paths = ["lib".freeze]
11
11
  s.authors = ["Jan Graichen".freeze]
12
- s.date = "2025-01-31"
12
+ s.date = "1980-01-02"
13
13
  s.email = ["jgraichen@altimos.de".freeze]
14
14
  s.files = ["LICENSE".freeze, "README.md".freeze, "default.yml".freeze]
15
15
  s.homepage = "https://github.com/jgraichen/rubocop-config".freeze
16
16
  s.licenses = ["MIT".freeze]
17
17
  s.required_ruby_version = Gem::Requirement.new(">= 2.7.0".freeze)
18
- s.rubygems_version = "3.6.2".freeze
18
+ s.rubygems_version = "3.6.9".freeze
19
19
  s.summary = "Shared rubocop config".freeze
20
20
 
21
- s.installed_by_version = "3.6.2".freeze
21
+ s.installed_by_version = "3.6.9".freeze
22
22
 
23
23
  s.specification_version = 4
24
24
 
25
- s.add_runtime_dependency(%q<rubocop>.freeze, ["~> 1.70.0".freeze])
26
- s.add_runtime_dependency(%q<rubocop-capybara>.freeze, ["~> 2.21.0".freeze])
27
- s.add_runtime_dependency(%q<rubocop-factory_bot>.freeze, ["~> 2.26.1".freeze])
28
- s.add_runtime_dependency(%q<rubocop-performance>.freeze, ["~> 1.23.0".freeze])
29
- s.add_runtime_dependency(%q<rubocop-rspec>.freeze, ["~> 3.3.0".freeze])
30
- s.add_runtime_dependency(%q<rubocop-rspec_rails>.freeze, ["~> 2.30.0".freeze])
25
+ s.add_runtime_dependency(%q<rubocop>.freeze, ["~> 1.75.2".freeze])
26
+ s.add_runtime_dependency(%q<rubocop-capybara>.freeze, ["~> 2.22.1".freeze])
27
+ s.add_runtime_dependency(%q<rubocop-factory_bot>.freeze, ["~> 2.27.1".freeze])
28
+ s.add_runtime_dependency(%q<rubocop-performance>.freeze, ["~> 1.25.0".freeze])
29
+ s.add_runtime_dependency(%q<rubocop-rspec>.freeze, ["~> 3.5.0".freeze])
30
+ s.add_runtime_dependency(%q<rubocop-rspec_rails>.freeze, ["~> 2.31.0".freeze])
31
31
  end
@@ -1,3 +1,83 @@
1
+ ## Rails 8.0.3 (September 22, 2025) ##
2
+
3
+ * URL helpers for engines mounted at the application root handle `SCRIPT_NAME` correctly.
4
+
5
+ Fixed an issue where `SCRIPT_NAME` is not applied to paths generated for routes in an engine
6
+ mounted at "/".
7
+
8
+ *Mike Dalessio*
9
+
10
+ * Fix `Rails.application.reload_routes!` from clearing almost all routes.
11
+
12
+ When calling `Rails.application.reload_routes!` inside a middleware of
13
+ a Rake task, it was possible under certain conditions that all routes would be cleared.
14
+ If ran inside a middleware, this would result in getting a 404 on most page you visit.
15
+ This issue was only happening in development.
16
+
17
+ *Edouard Chin*
18
+
19
+ * Address `rack 3.2` deprecations warnings.
20
+
21
+ ```
22
+ warning: Status code :unprocessable_entity is deprecated and will be removed in a future version of Rack.
23
+ Please use :unprocessable_content instead.
24
+ ```
25
+
26
+ Rails API will transparently convert one into the other for the foreseeable future.
27
+
28
+ *Earlopain*, *Jean Boussier*
29
+
30
+ * Support hash-source in Content Security Policy.
31
+
32
+ *madogiwa*
33
+
34
+ * Always return empty body for HEAD requests in `PublicExceptions` and
35
+ `DebugExceptions`.
36
+
37
+ This is required by `Rack::Lint` (per RFC9110).
38
+
39
+ *Hartley McGuire*
40
+
41
+
42
+ ## Rails 8.0.2.1 (August 13, 2025) ##
43
+
44
+ * No changes.
45
+
46
+ ## Rails 8.0.2 (March 12, 2025) ##
47
+
48
+ * Improve `with_routing` test helper to not rebuild the middleware stack.
49
+
50
+ Otherwise some middleware configuration could be lost.
51
+
52
+ *Édouard Chin*
53
+
54
+ * Add resource name to the `ArgumentError` that's raised when invalid `:only` or `:except` options are given to `#resource` or `#resources`
55
+
56
+ This makes it easier to locate the source of the problem, especially for routes drawn by gems.
57
+
58
+ Before:
59
+ ```
60
+ :only and :except must include only [:index, :create, :new, :show, :update, :destroy, :edit], but also included [:foo, :bar]
61
+ ```
62
+
63
+ After:
64
+ ```
65
+ Route `resources :products` - :only and :except must include only [:index, :create, :new, :show, :update, :destroy, :edit], but also included [:foo, :bar]
66
+ ```
67
+
68
+ *Jeremy Green*
69
+
70
+ * Fix `url_for` to handle `:path_params` gracefully when it's not a `Hash`.
71
+
72
+ Prevents various security scanners from causing exceptions.
73
+
74
+ *Martin Emde*
75
+
76
+ * Fix `ActionDispatch::Executor` to unwrap exceptions like other error reporting middlewares.
77
+
78
+ *Jean Boussier*
79
+
80
+
1
81
  ## Rails 8.0.1 (December 13, 2024) ##
2
82
 
3
83
  * Add `ActionDispatch::Request::Session#store` method to conform Rack spec.
@@ -52,6 +52,6 @@ Bug reports for the Ruby on \Rails project can be filed here:
52
52
 
53
53
  * https://github.com/rails/rails/issues
54
54
 
55
- Feature requests should be discussed on the rails-core mailing list here:
55
+ Feature requests should be discussed on the rubyonrails-core forum here:
56
56
 
57
57
  * https://discuss.rubyonrails.org/c/rubyonrails-core
@@ -0,0 +1,129 @@
1
+ ## Rails 8.0.3 (September 22, 2025) ##
2
+
3
+ * Fix label with `for` option not getting prefixed by form `namespace` value
4
+
5
+ *Abeid Ahmed*, *Hartley McGuire*
6
+
7
+ * Fix `javascript_include_tag` `type` option to accept either strings and symbols.
8
+
9
+ ```ruby
10
+ javascript_include_tag "application", type: :module
11
+ javascript_include_tag "application", type: "module"
12
+ ```
13
+
14
+ Previously, only the string value was recognized.
15
+
16
+ *Jean Boussier*
17
+
18
+ * Fix `excerpt` helper with non-whitespace separator.
19
+
20
+ *Jonathan Hefner*
21
+
22
+
23
+ ## Rails 8.0.2.1 (August 13, 2025) ##
24
+
25
+ * No changes.
26
+
27
+
28
+ ## Rails 8.0.2 (March 12, 2025) ##
29
+
30
+ * Respect `html_options[:form]` when `collection_checkboxes` generates the
31
+ hidden `<input>`.
32
+
33
+ *Riccardo Odone*
34
+
35
+ * Layouts have access to local variables passed to `render`.
36
+
37
+ This fixes #31680 which was a regression in Rails 5.1.
38
+
39
+ *Mike Dalessio*
40
+
41
+ * Argument errors related to strict locals in templates now raise an
42
+ `ActionView::StrictLocalsError`, and all other argument errors are reraised as-is.
43
+
44
+ Previously, any `ArgumentError` raised during template rendering was swallowed during strict
45
+ local error handling, so that an `ArgumentError` unrelated to strict locals (e.g., a helper
46
+ method invoked with incorrect arguments) would be replaced by a similar `ArgumentError` with an
47
+ unrelated backtrace, making it difficult to debug templates.
48
+
49
+ Now, any `ArgumentError` unrelated to strict locals is reraised, preserving the original
50
+ backtrace for developers.
51
+
52
+ Also note that `ActionView::StrictLocalsError` is a subclass of `ArgumentError`, so any existing
53
+ code that rescues `ArgumentError` will continue to work.
54
+
55
+ Fixes #52227.
56
+
57
+ *Mike Dalessio*
58
+
59
+ * Fix stack overflow error in dependency tracker when dealing with circular dependencies
60
+
61
+ *Jean Boussier*
62
+
63
+ ## Rails 8.0.1 (December 13, 2024) ##
64
+
65
+ * Fix a crash in ERB template error highlighting when the error occurs on a
66
+ line in the compiled template that is past the end of the source template.
67
+
68
+ *Martin Emde*
69
+
70
+ * Improve reliability of ERB template error highlighting.
71
+ Fix infinite loops and crashes in highlighting and
72
+ improve tolerance for alternate ERB handlers.
73
+
74
+ *Martin Emde*
75
+
76
+
77
+ ## Rails 8.0.0.1 (December 10, 2024) ##
78
+
79
+ * No changes.
80
+
81
+
82
+ ## Rails 8.0.0 (November 07, 2024) ##
83
+
84
+ * No changes.
85
+
86
+
87
+ ## Rails 8.0.0.rc2 (October 30, 2024) ##
88
+
89
+ * No changes.
90
+
91
+
92
+ ## Rails 8.0.0.rc1 (October 19, 2024) ##
93
+
94
+ * Remove deprecated support to passing a content to void tag elements on the `tag` builder.
95
+
96
+ *Rafael Mendonça França*
97
+
98
+ * Remove deprecated support to passing `nil` to the `model:` argument of `form_with`.
99
+
100
+ *Rafael Mendonça França*
101
+
102
+
103
+ ## Rails 8.0.0.beta1 (September 26, 2024) ##
104
+
105
+ * Enable DependencyTracker to evaluate renders with trailing interpolation.
106
+
107
+ ```erb
108
+ <%= render "maintenance_tasks/runs/info/#{run.status}" %>
109
+ ```
110
+
111
+ Previously, the DependencyTracker would ignore this render, but now it will
112
+ mark all partials in the "maintenance_tasks/runs/info" folder as
113
+ dependencies.
114
+
115
+ *Hartley McGuire*
116
+
117
+ * Rename `text_area` methods into `textarea`
118
+
119
+ Old names are still available as aliases.
120
+
121
+ *Sean Doyle*
122
+
123
+ * Rename `check_box*` methods into `checkbox*`.
124
+
125
+ Old names are still available as aliases.
126
+
127
+ *Jean Boussier*
128
+
129
+ Please check [7-2-stable](https://github.com/rails/rails/blob/7-2-stable/actionview/CHANGELOG.md) for previous changes.
@@ -35,6 +35,6 @@ Bug reports for the Ruby on \Rails project can be filed here:
35
35
 
36
36
  * https://github.com/rails/rails/issues
37
37
 
38
- Feature requests should be discussed on the rails-core mailing list here:
38
+ Feature requests should be discussed on the rubyonrails-core forum here:
39
39
 
40
40
  * https://discuss.rubyonrails.org/c/rubyonrails-core
@@ -1,3 +1,155 @@
1
+ ## Rails 8.0.3 (September 22, 2025) ##
2
+
3
+ * `ActiveSupport::FileUpdateChecker` does not depend on `Time.now` to prevent unnecessary reloads with time travel test helpers
4
+
5
+ *Jan Grodowski*
6
+
7
+ * Fix `ActiveSupport::BroadcastLogger` from executing a block argument for each logger (tagged, info, etc.).
8
+
9
+ *Jared Armstrong*
10
+
11
+ * Make `ActiveSupport::Logger` `#freeze`-friendly.
12
+
13
+ *Joshua Young*
14
+
15
+ * Fix `ActiveSupport::HashWithIndifferentAccess#transform_keys!` removing defaults.
16
+
17
+ *Hartley McGuire*
18
+
19
+ * Fix `ActiveSupport::HashWithIndifferentAccess#tranform_keys!` to handle collisions.
20
+
21
+ If the transformation would result in a key equal to another not yet transformed one,
22
+ it would result in keys being lost.
23
+
24
+ Before:
25
+
26
+ ```ruby
27
+ >> {a: 1, b: 2}.with_indifferent_access.transform_keys!(&:succ)
28
+ => {"c" => 1}
29
+ ```
30
+
31
+ After:
32
+
33
+ ```ruby
34
+ >> {a: 1, b: 2}.with_indifferent_access.transform_keys!(&:succ)
35
+ => {"c" => 1, "d" => 2}
36
+ ```
37
+
38
+ *Jason T Johnson*, *Jean Boussier*
39
+
40
+ * Fix `ActiveSupport::Cache::MemCacheStore#read_multi` to handle network errors.
41
+
42
+ This method specifically wasn't handling network errors like other codepaths.
43
+
44
+ *Alessandro Dal Grande*
45
+
46
+ * Fix configuring `RedisCacheStore` with `raw: true`.
47
+
48
+ *fatkodima*
49
+
50
+ * Fix `Enumerable#sole` for infinite collections.
51
+
52
+ *fatkodima*
53
+
54
+
55
+ ## Rails 8.0.2.1 (August 13, 2025) ##
56
+
57
+ * No changes.
58
+
59
+
60
+ ## Rails 8.0.2 (March 12, 2025) ##
61
+
62
+ * Fix setting `to_time_preserves_timezone` from `new_framework_defaults_8_0.rb`.
63
+
64
+ *fatkodima*
65
+
66
+ * Fix Active Support Cache `fetch_multi` when local store is active.
67
+
68
+ `fetch_multi` now properly yield to the provided block for missing entries
69
+ that have been recorded as such in the local store.
70
+
71
+ *Jean Boussier*
72
+
73
+ * Fix execution wrapping to report all exceptions, including `Exception`.
74
+
75
+ If a more serious error like `SystemStackError` or `NoMemoryError` happens,
76
+ the error reporter should be able to report these kinds of exceptions.
77
+
78
+ *Gannon McGibbon*
79
+
80
+ * Fix `RedisCacheStore` and `MemCacheStore` to also handle connection pool related errors.
81
+
82
+ These errors are rescued and reported to `Rails.error`.
83
+
84
+ *Jean Boussier*
85
+
86
+ * Fix `ActiveSupport::Cache#read_multi` to respect version expiry when using local cache.
87
+
88
+ *zzak*
89
+
90
+ * Fix `ActiveSupport::MessageVerifier` and `ActiveSupport::MessageEncryptor` configuration of `on_rotation` callback.
91
+
92
+ ```ruby
93
+ verifier.rotate(old_secret).on_rotation { ... }
94
+ ```
95
+
96
+ Now both work as documented.
97
+
98
+ *Jean Boussier*
99
+
100
+ * Fix `ActiveSupport::MessageVerifier` to always be able to verify both URL-safe and URL-unsafe payloads.
101
+
102
+ This is to allow transitioning seemlessly from either configuration without immediately invalidating
103
+ all previously generated signed messages.
104
+
105
+ *Jean Boussier*, *Florent Beaurain*, *Ali Sepehri*
106
+
107
+ * Fix `cache.fetch` to honor the provided expiry when `:race_condition_ttl` is used.
108
+
109
+ ```ruby
110
+ cache.fetch("key", expires_in: 1.hour, race_condition_ttl: 5.second) do
111
+ "something"
112
+ end
113
+ ```
114
+
115
+ In the above example, the final cache entry would have a 10 seconds TTL instead
116
+ of the requested 1 hour.
117
+
118
+ *Dhia*
119
+
120
+ * Better handle procs with splat arguments in `set_callback`.
121
+
122
+ *Radamés Roriz*
123
+
124
+ * Fix `String#mb_chars` to not mutate the receiver.
125
+
126
+ Previously it would call `force_encoding` on the receiver,
127
+ now it dups the receiver first.
128
+
129
+ *Jean Boussier*
130
+
131
+ * Improve `ErrorSubscriber` to also mark error causes as reported.
132
+
133
+ This avoid some cases of errors being reported twice, notably in views because of how
134
+ errors are wrapped in `ActionView::Template::Error`.
135
+
136
+ *Jean Boussier*
137
+
138
+ * Fix `Module#module_parent_name` to return the correct name after the module has been named.
139
+
140
+ When called on an anonymous module, the return value wouldn't change after the module was given a name
141
+ later by being assigned to a constant.
142
+
143
+ ```ruby
144
+ mod = Module.new
145
+ mod.module_parent_name # => "Object"
146
+ MyModule::Something = mod
147
+ mod.module_parent_name # => "MyModule"
148
+ ```
149
+
150
+ *Jean Boussier*
151
+
152
+
1
153
  ## Rails 8.0.1 (December 13, 2024) ##
2
154
 
3
155
  * Fix a bug in `ERB::Util.tokenize` that causes incorrect tokenization when ERB tags are preceeded by multibyte characters.
@@ -35,6 +35,6 @@ Bug reports for the Ruby on \Rails project can be filed here:
35
35
 
36
36
  * https://github.com/rails/rails/issues
37
37
 
38
- Feature requests should be discussed on the rails-core mailing list here:
38
+ Feature requests should be discussed on the rubyonrails-core forum here:
39
39
 
40
40
  * https://discuss.rubyonrails.org/c/rubyonrails-core
@@ -35,7 +35,7 @@ On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates:
35
35
  0.350000 0.400000 0.750000 ( 0.835234)
36
36
  ```
37
37
 
38
- This report shows the user CPU time, system CPU time, the sum of the user and system CPU times, and the elapsed real time. The unit of time is seconds.
38
+ This report shows the user CPU time, system CPU time, the total time (sum of user CPU time, system CPU time, children's user CPU time, and children's system CPU time), and the elapsed real time. The unit of time is seconds.
39
39
 
40
40
  Do some experiments sequentially using the #bm method:
41
41
 
@@ -129,6 +129,27 @@ Thread.new do
129
129
  end
130
130
  ```
131
131
 
132
+ ## Discarding Connections
133
+
134
+ You can discard connections in the ConnectionPool instance to remove connections that are broken and can't be restarted.
135
+
136
+ NOTE: the connection is not closed. It will just be removed from the pool so it won't be selected again.
137
+
138
+ It can only be done inside the block passed to `with` or `with_timeout`.
139
+
140
+ Takes an optional block that will be executed with the connection.
141
+
142
+ ```ruby
143
+ pool.with do |conn|
144
+ begin
145
+ conn.execute("SELECT 1")
146
+ rescue SomeConnectionError
147
+ pool.discard_current_connection # remove the connection from the pool
148
+ raise
149
+ end
150
+ end
151
+ ```
152
+
132
153
  ## Current State
133
154
 
134
155
  There are several methods that return information about a pool.