Rails 6.2 is now Rails 7.0
We have big plans for the next version of Rails and that require big versions.
This commit is contained in:
parent
bd9d7804e0
commit
1b455e2e9d
108
Gemfile.lock
108
Gemfile.lock
|
@ -30,83 +30,83 @@ GIT
|
||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
actioncable (6.2.0.alpha)
|
actioncable (7.0.0.alpha)
|
||||||
actionpack (= 6.2.0.alpha)
|
actionpack (= 7.0.0.alpha)
|
||||||
activesupport (= 6.2.0.alpha)
|
activesupport (= 7.0.0.alpha)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailbox (6.2.0.alpha)
|
actionmailbox (7.0.0.alpha)
|
||||||
actionpack (= 6.2.0.alpha)
|
actionpack (= 7.0.0.alpha)
|
||||||
activejob (= 6.2.0.alpha)
|
activejob (= 7.0.0.alpha)
|
||||||
activerecord (= 6.2.0.alpha)
|
activerecord (= 7.0.0.alpha)
|
||||||
activestorage (= 6.2.0.alpha)
|
activestorage (= 7.0.0.alpha)
|
||||||
activesupport (= 6.2.0.alpha)
|
activesupport (= 7.0.0.alpha)
|
||||||
mail (>= 2.7.1)
|
mail (>= 2.7.1)
|
||||||
actionmailer (6.2.0.alpha)
|
actionmailer (7.0.0.alpha)
|
||||||
actionpack (= 6.2.0.alpha)
|
actionpack (= 7.0.0.alpha)
|
||||||
actionview (= 6.2.0.alpha)
|
actionview (= 7.0.0.alpha)
|
||||||
activejob (= 6.2.0.alpha)
|
activejob (= 7.0.0.alpha)
|
||||||
activesupport (= 6.2.0.alpha)
|
activesupport (= 7.0.0.alpha)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (6.2.0.alpha)
|
actionpack (7.0.0.alpha)
|
||||||
actionview (= 6.2.0.alpha)
|
actionview (= 7.0.0.alpha)
|
||||||
activesupport (= 6.2.0.alpha)
|
activesupport (= 7.0.0.alpha)
|
||||||
rack (~> 2.0, >= 2.0.9)
|
rack (~> 2.0, >= 2.0.9)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actiontext (6.2.0.alpha)
|
actiontext (7.0.0.alpha)
|
||||||
actionpack (= 6.2.0.alpha)
|
actionpack (= 7.0.0.alpha)
|
||||||
activerecord (= 6.2.0.alpha)
|
activerecord (= 7.0.0.alpha)
|
||||||
activestorage (= 6.2.0.alpha)
|
activestorage (= 7.0.0.alpha)
|
||||||
activesupport (= 6.2.0.alpha)
|
activesupport (= 7.0.0.alpha)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (6.2.0.alpha)
|
actionview (7.0.0.alpha)
|
||||||
activesupport (= 6.2.0.alpha)
|
activesupport (= 7.0.0.alpha)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||||
activejob (6.2.0.alpha)
|
activejob (7.0.0.alpha)
|
||||||
activesupport (= 6.2.0.alpha)
|
activesupport (= 7.0.0.alpha)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (6.2.0.alpha)
|
activemodel (7.0.0.alpha)
|
||||||
activesupport (= 6.2.0.alpha)
|
activesupport (= 7.0.0.alpha)
|
||||||
activerecord (6.2.0.alpha)
|
activerecord (7.0.0.alpha)
|
||||||
activemodel (= 6.2.0.alpha)
|
activemodel (= 7.0.0.alpha)
|
||||||
activesupport (= 6.2.0.alpha)
|
activesupport (= 7.0.0.alpha)
|
||||||
activestorage (6.2.0.alpha)
|
activestorage (7.0.0.alpha)
|
||||||
actionpack (= 6.2.0.alpha)
|
actionpack (= 7.0.0.alpha)
|
||||||
activejob (= 6.2.0.alpha)
|
activejob (= 7.0.0.alpha)
|
||||||
activerecord (= 6.2.0.alpha)
|
activerecord (= 7.0.0.alpha)
|
||||||
activesupport (= 6.2.0.alpha)
|
activesupport (= 7.0.0.alpha)
|
||||||
marcel (~> 0.3.1)
|
marcel (~> 0.3.1)
|
||||||
mimemagic (~> 0.3.2)
|
mimemagic (~> 0.3.2)
|
||||||
activesupport (6.2.0.alpha)
|
activesupport (7.0.0.alpha)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 1.6, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (>= 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
zeitwerk (~> 2.3)
|
zeitwerk (~> 2.3)
|
||||||
rails (6.2.0.alpha)
|
rails (7.0.0.alpha)
|
||||||
actioncable (= 6.2.0.alpha)
|
actioncable (= 7.0.0.alpha)
|
||||||
actionmailbox (= 6.2.0.alpha)
|
actionmailbox (= 7.0.0.alpha)
|
||||||
actionmailer (= 6.2.0.alpha)
|
actionmailer (= 7.0.0.alpha)
|
||||||
actionpack (= 6.2.0.alpha)
|
actionpack (= 7.0.0.alpha)
|
||||||
actiontext (= 6.2.0.alpha)
|
actiontext (= 7.0.0.alpha)
|
||||||
actionview (= 6.2.0.alpha)
|
actionview (= 7.0.0.alpha)
|
||||||
activejob (= 6.2.0.alpha)
|
activejob (= 7.0.0.alpha)
|
||||||
activemodel (= 6.2.0.alpha)
|
activemodel (= 7.0.0.alpha)
|
||||||
activerecord (= 6.2.0.alpha)
|
activerecord (= 7.0.0.alpha)
|
||||||
activestorage (= 6.2.0.alpha)
|
activestorage (= 7.0.0.alpha)
|
||||||
activesupport (= 6.2.0.alpha)
|
activesupport (= 7.0.0.alpha)
|
||||||
bundler (>= 1.15.0)
|
bundler (>= 1.15.0)
|
||||||
railties (= 6.2.0.alpha)
|
railties (= 7.0.0.alpha)
|
||||||
sprockets-rails (>= 2.0.0)
|
sprockets-rails (>= 2.0.0)
|
||||||
railties (6.2.0.alpha)
|
railties (7.0.0.alpha)
|
||||||
actionpack (= 6.2.0.alpha)
|
actionpack (= 7.0.0.alpha)
|
||||||
activesupport (= 6.2.0.alpha)
|
activesupport (= 7.0.0.alpha)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (~> 1.0)
|
thor (~> 1.0)
|
||||||
|
@ -553,8 +553,6 @@ GEM
|
||||||
websocket (1.2.9)
|
websocket (1.2.9)
|
||||||
websocket-driver (0.7.3)
|
websocket-driver (0.7.3)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-driver (0.7.3-java)
|
|
||||||
websocket-extensions (>= 0.1.0)
|
|
||||||
websocket-extensions (0.1.5)
|
websocket-extensions (0.1.5)
|
||||||
xpath (3.2.0)
|
xpath (3.2.0)
|
||||||
nokogiri (~> 1.8)
|
nokogiri (~> 1.8)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
6.2.0.alpha
|
7.0.0.alpha
|
||||||
|
|
|
@ -7,8 +7,8 @@ module ActionCable
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@rails/actioncable",
|
"name": "@rails/actioncable",
|
||||||
"version": "6.2.0-alpha",
|
"version": "7.0.0-alpha",
|
||||||
"description": "WebSocket framework for Ruby on Rails.",
|
"description": "WebSocket framework for Ruby on Rails.",
|
||||||
"main": "app/assets/javascripts/action_cable.js",
|
"main": "app/assets/javascripts/action_cable.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
@ -79,13 +79,13 @@ module ActionMailbox
|
||||||
def key
|
def key
|
||||||
if Rails.application.credentials.dig(:action_mailbox, :mailgun_api_key)
|
if Rails.application.credentials.dig(:action_mailbox, :mailgun_api_key)
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Rails.application.credentials.action_mailbox.api_key is deprecated and will be ignored in Rails 6.2.
|
Rails.application.credentials.action_mailbox.api_key is deprecated and will be ignored in Rails 7.0.
|
||||||
Use Rails.application.credentials.action_mailbox.signing_key instead.
|
Use Rails.application.credentials.action_mailbox.signing_key instead.
|
||||||
MSG
|
MSG
|
||||||
Rails.application.credentials.dig(:action_mailbox, :mailgun_api_key)
|
Rails.application.credentials.dig(:action_mailbox, :mailgun_api_key)
|
||||||
elsif ENV["MAILGUN_INGRESS_API_KEY"]
|
elsif ENV["MAILGUN_INGRESS_API_KEY"]
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
The MAILGUN_INGRESS_API_KEY environment variable is deprecated and will be ignored in Rails 6.2.
|
The MAILGUN_INGRESS_API_KEY environment variable is deprecated and will be ignored in Rails 7.0.
|
||||||
Use MAILGUN_INGRESS_SIGNING_KEY instead.
|
Use MAILGUN_INGRESS_SIGNING_KEY instead.
|
||||||
MSG
|
MSG
|
||||||
ENV["MAILGUN_INGRESS_API_KEY"]
|
ENV["MAILGUN_INGRESS_API_KEY"]
|
||||||
|
|
|
@ -7,8 +7,8 @@ module ActionMailbox
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ module ActionMailer
|
||||||
before_perform do
|
before_perform do
|
||||||
ActiveSupport::Deprecation.warn <<~MSG.squish
|
ActiveSupport::Deprecation.warn <<~MSG.squish
|
||||||
Sending mail with DeliveryJob and Parameterized::DeliveryJob
|
Sending mail with DeliveryJob and Parameterized::DeliveryJob
|
||||||
is deprecated and will be removed in Rails 6.2.
|
is deprecated and will be removed in Rails 7.0.
|
||||||
Please use MailDeliveryJob instead.
|
Please use MailDeliveryJob instead.
|
||||||
MSG
|
MSG
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,8 +7,8 @@ module ActionMailer
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ module ActionMailer
|
||||||
@mailer_class.name, @action.to_s, delivery_method.to_s, *@args)
|
@mailer_class.name, @action.to_s, delivery_method.to_s, *@args)
|
||||||
else
|
else
|
||||||
ActiveSupport::Deprecation.warn(<<~EOM)
|
ActiveSupport::Deprecation.warn(<<~EOM)
|
||||||
In Rails 6.2, Action Mailer will pass the mail arguments inside the `:args` keyword argument.
|
In Rails 7.0, Action Mailer will pass the mail arguments inside the `:args` keyword argument.
|
||||||
The `perform` method of the #{job} needs to change and forward the mail arguments
|
The `perform` method of the #{job} needs to change and forward the mail arguments
|
||||||
from the `args` keyword argument.
|
from the `args` keyword argument.
|
||||||
|
|
||||||
|
|
|
@ -88,13 +88,13 @@ module ActionDispatch # :nodoc:
|
||||||
|
|
||||||
def self.return_only_media_type_on_content_type=(*)
|
def self.return_only_media_type_on_content_type=(*)
|
||||||
ActiveSupport::Deprecation.warn(
|
ActiveSupport::Deprecation.warn(
|
||||||
".return_only_media_type_on_content_type= is dreprecated with no replacement and will be removed in 6.2."
|
".return_only_media_type_on_content_type= is dreprecated with no replacement and will be removed in 7.0."
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.return_only_media_type_on_content_type
|
def self.return_only_media_type_on_content_type
|
||||||
ActiveSupport::Deprecation.warn(
|
ActiveSupport::Deprecation.warn(
|
||||||
".return_only_media_type_on_content_type is dreprecated with no replacement and will be removed in 6.2."
|
".return_only_media_type_on_content_type is dreprecated with no replacement and will be removed in 7.0."
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ module ActionDispatch
|
||||||
|
|
||||||
unless deprecated_response_app.nil?
|
unless deprecated_response_app.nil?
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
`action_dispatch.hosts_response_app` is deprecated and will be ignored in Rails 6.2.
|
`action_dispatch.hosts_response_app` is deprecated and will be ignored in Rails 7.0.
|
||||||
Use the Host Authorization `response_app` setting instead.
|
Use the Host Authorization `response_app` setting instead.
|
||||||
MSG
|
MSG
|
||||||
|
|
||||||
|
|
|
@ -596,14 +596,14 @@ module ActionDispatch
|
||||||
if route.segment_keys.include?(:controller)
|
if route.segment_keys.include?(:controller)
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Using a dynamic :controller segment in a route is deprecated and
|
Using a dynamic :controller segment in a route is deprecated and
|
||||||
will be removed in Rails 6.2.
|
will be removed in Rails 7.0.
|
||||||
MSG
|
MSG
|
||||||
end
|
end
|
||||||
|
|
||||||
if route.segment_keys.include?(:action)
|
if route.segment_keys.include?(:action)
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Using a dynamic :action segment in a route is deprecated and
|
Using a dynamic :action segment in a route is deprecated and
|
||||||
will be removed in Rails 6.2.
|
will be removed in Rails 7.0.
|
||||||
MSG
|
MSG
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -25,14 +25,14 @@ module ActionDispatch
|
||||||
if !self.class.file_fixture_path
|
if !self.class.file_fixture_path
|
||||||
ActiveSupport::Deprecation.warn(<<~EOM)
|
ActiveSupport::Deprecation.warn(<<~EOM)
|
||||||
Passing a path to `fixture_file_upload` relative to `fixture_path` is deprecated.
|
Passing a path to `fixture_file_upload` relative to `fixture_path` is deprecated.
|
||||||
In Rails 6.2, the path needs to be relative to `file_fixture_path` which you
|
In Rails 7.0, the path needs to be relative to `file_fixture_path` which you
|
||||||
haven't set yet. Set `file_fixture_path` to discard this warning.
|
haven't set yet. Set `file_fixture_path` to discard this warning.
|
||||||
EOM
|
EOM
|
||||||
elsif path.exist?
|
elsif path.exist?
|
||||||
non_deprecated_path = Pathname(File.absolute_path(path)).relative_path_from(Pathname(File.absolute_path(self.class.file_fixture_path)))
|
non_deprecated_path = Pathname(File.absolute_path(path)).relative_path_from(Pathname(File.absolute_path(self.class.file_fixture_path)))
|
||||||
ActiveSupport::Deprecation.warn(<<~EOM)
|
ActiveSupport::Deprecation.warn(<<~EOM)
|
||||||
Passing a path to `fixture_file_upload` relative to `fixture_path` is deprecated.
|
Passing a path to `fixture_file_upload` relative to `fixture_path` is deprecated.
|
||||||
In Rails 6.2, the path needs to be relative to `file_fixture_path`.
|
In Rails 7.0, the path needs to be relative to `file_fixture_path`.
|
||||||
|
|
||||||
Please modify the call from
|
Please modify the call from
|
||||||
`fixture_file_upload("#{original_path}")` to `fixture_file_upload("#{non_deprecated_path}")`.
|
`fixture_file_upload("#{original_path}")` to `fixture_file_upload("#{non_deprecated_path}")`.
|
||||||
|
|
|
@ -7,8 +7,8 @@ module ActionPack
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
|
@ -934,7 +934,7 @@ XML
|
||||||
def test_fixture_file_upload_output_deprecation_when_file_fixture_path_is_not_set
|
def test_fixture_file_upload_output_deprecation_when_file_fixture_path_is_not_set
|
||||||
TestCaseTest.stub :fixture_path, File.expand_path("../fixtures", __dir__) do
|
TestCaseTest.stub :fixture_path, File.expand_path("../fixtures", __dir__) do
|
||||||
TestCaseTest.stub :file_fixture_path, nil do
|
TestCaseTest.stub :file_fixture_path, nil do
|
||||||
assert_deprecated(/In Rails 6.2, the path needs to be relative to `file_fixture_path`/) do
|
assert_deprecated(/In Rails 7.0, the path needs to be relative to `file_fixture_path`/) do
|
||||||
fixture_file_upload("multipart/ruby_on_rails.jpg", "image/jpg")
|
fixture_file_upload("multipart/ruby_on_rails.jpg", "image/jpg")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,8 +7,8 @@ module ActionText
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@rails/actiontext",
|
"name": "@rails/actiontext",
|
||||||
"version": "6.2.0-alpha",
|
"version": "7.0.0-alpha",
|
||||||
"description": "Edit and display rich text in Rails applications",
|
"description": "Edit and display rich text in Rails applications",
|
||||||
"main": "app/javascript/actiontext/index.js",
|
"main": "app/javascript/actiontext/index.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
@ -7,8 +7,8 @@ module ActionView
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ module ActionView
|
||||||
app.config.action_view.each do |k, v|
|
app.config.action_view.each do |k, v|
|
||||||
if k == :raise_on_missing_translations
|
if k == :raise_on_missing_translations
|
||||||
ActiveSupport::Deprecation.warn \
|
ActiveSupport::Deprecation.warn \
|
||||||
"action_view.raise_on_missing_translations is deprecated and will be removed in Rails 6.2. " \
|
"action_view.raise_on_missing_translations is deprecated and will be removed in Rails 7.0. " \
|
||||||
"Set i18n.raise_on_missing_translations instead. " \
|
"Set i18n.raise_on_missing_translations instead. " \
|
||||||
"Note that this new setting also affects how missing translations are handled in controllers."
|
"Note that this new setting also affects how missing translations are handled in controllers."
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@rails/ujs",
|
"name": "@rails/ujs",
|
||||||
"version": "6.2.0-alpha",
|
"version": "7.0.0-alpha",
|
||||||
"description": "Ruby on Rails unobtrusive scripting adapter",
|
"description": "Ruby on Rails unobtrusive scripting adapter",
|
||||||
"main": "lib/assets/compiled/rails-ujs.js",
|
"main": "lib/assets/compiled/rails-ujs.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
@ -186,7 +186,7 @@ module ActiveJob
|
||||||
|
|
||||||
if !self.class.skip_after_callbacks_if_terminated && callbacks.any? { |c| c.kind == :after }
|
if !self.class.skip_after_callbacks_if_terminated && callbacks.any? { |c| c.kind == :after }
|
||||||
ActiveSupport::Deprecation.warn(<<~EOM)
|
ActiveSupport::Deprecation.warn(<<~EOM)
|
||||||
In Rails 6.2, `after_enqueue`/`after_perform` callbacks no longer run if `before_enqueue`/`before_perform` respectively halts with `throw :abort`.
|
In Rails 7.0, `after_enqueue`/`after_perform` callbacks no longer run if `before_enqueue`/`before_perform` respectively halts with `throw :abort`.
|
||||||
To enable this behavior, uncomment the `config.active_job.skip_after_callbacks_if_terminated` config
|
To enable this behavior, uncomment the `config.active_job.skip_after_callbacks_if_terminated` config
|
||||||
in the new 6.1 framework defaults initializer.
|
in the new 6.1 framework defaults initializer.
|
||||||
EOM
|
EOM
|
||||||
|
|
|
@ -7,8 +7,8 @@ module ActiveJob
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ module ActiveModel
|
||||||
def marshal_load(values)
|
def marshal_load(values)
|
||||||
if values.is_a?(Hash)
|
if values.is_a?(Hash)
|
||||||
ActiveSupport::Deprecation.warn(<<~MSG)
|
ActiveSupport::Deprecation.warn(<<~MSG)
|
||||||
Marshalling load from legacy attributes format is deprecated and will be removed in Rails 6.2.
|
Marshalling load from legacy attributes format is deprecated and will be removed in Rails 7.0.
|
||||||
MSG
|
MSG
|
||||||
empty_hash = {}.freeze
|
empty_hash = {}.freeze
|
||||||
initialize(empty_hash, empty_hash, empty_hash, empty_hash, values)
|
initialize(empty_hash, empty_hash, empty_hash, empty_hash, values)
|
||||||
|
|
|
@ -249,7 +249,7 @@ module ActiveModel
|
||||||
|
|
||||||
You are passing a block expecting two parameters,
|
You are passing a block expecting two parameters,
|
||||||
so the old hash behavior is simulated. As this is deprecated,
|
so the old hash behavior is simulated. As this is deprecated,
|
||||||
this will result in an ArgumentError in Rails 6.2.
|
this will result in an ArgumentError in Rails 7.0.
|
||||||
MSG
|
MSG
|
||||||
@errors.
|
@errors.
|
||||||
sort { |a, b| a.attribute <=> b.attribute }.
|
sort { |a, b| a.attribute <=> b.attribute }.
|
||||||
|
@ -325,7 +325,7 @@ module ActiveModel
|
||||||
|
|
||||||
def to_h
|
def to_h
|
||||||
ActiveSupport::Deprecation.warn(<<~EOM)
|
ActiveSupport::Deprecation.warn(<<~EOM)
|
||||||
ActiveModel::Errors#to_h is deprecated and will be removed in Rails 6.2.
|
ActiveModel::Errors#to_h is deprecated and will be removed in Rails 7.0.
|
||||||
Please use `ActiveModel::Errors.to_hash` instead. The values in the hash
|
Please use `ActiveModel::Errors.to_hash` instead. The values in the hash
|
||||||
returned by `ActiveModel::Errors.to_hash` is an array of error messages.
|
returned by `ActiveModel::Errors.to_hash` is an array of error messages.
|
||||||
EOM
|
EOM
|
||||||
|
@ -591,7 +591,7 @@ module ActiveModel
|
||||||
end
|
end
|
||||||
|
|
||||||
def deprecation_removal_warning(method_name, alternative_message = nil)
|
def deprecation_removal_warning(method_name, alternative_message = nil)
|
||||||
message = +"ActiveModel::Errors##{method_name} is deprecated and will be removed in Rails 6.2."
|
message = +"ActiveModel::Errors##{method_name} is deprecated and will be removed in Rails 7.0."
|
||||||
if alternative_message
|
if alternative_message
|
||||||
message << "\n\nTo achieve the same use:\n\n "
|
message << "\n\nTo achieve the same use:\n\n "
|
||||||
message << alternative_message
|
message << alternative_message
|
||||||
|
|
|
@ -7,8 +7,8 @@ module ActiveModel
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
|
@ -1177,7 +1177,7 @@ module ActiveRecord
|
||||||
return owner_to_pool_manager[owner] if owner_to_pool_manager.key?(owner)
|
return owner_to_pool_manager[owner] if owner_to_pool_manager.key?(owner)
|
||||||
|
|
||||||
if owner == "primary"
|
if owner == "primary"
|
||||||
ActiveSupport::Deprecation.warn("Using `\"primary\"` as a `connection_specification_name` is deprecated and will be removed in Rails 6.2.0. Please use `ActiveRecord::Base`.")
|
ActiveSupport::Deprecation.warn("Using `\"primary\"` as a `connection_specification_name` is deprecated and will be removed in Rails 7.0.0. Please use `ActiveRecord::Base`.")
|
||||||
owner_to_pool_manager[Base.name]
|
owner_to_pool_manager[Base.name]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -12,7 +12,7 @@ module ActiveRecord
|
||||||
if value.is_a?(Base)
|
if value.is_a?(Base)
|
||||||
ActiveSupport::Deprecation.warn(<<~MSG)
|
ActiveSupport::Deprecation.warn(<<~MSG)
|
||||||
Passing an Active Record object to `quote` directly is deprecated
|
Passing an Active Record object to `quote` directly is deprecated
|
||||||
and will be no longer quoted as id value in Rails 6.2.
|
and will be no longer quoted as id value in Rails 7.0.
|
||||||
MSG
|
MSG
|
||||||
value = value.id_for_database
|
value = value.id_for_database
|
||||||
end
|
end
|
||||||
|
@ -27,14 +27,14 @@ module ActiveRecord
|
||||||
if value.is_a?(Base)
|
if value.is_a?(Base)
|
||||||
ActiveSupport::Deprecation.warn(<<~MSG)
|
ActiveSupport::Deprecation.warn(<<~MSG)
|
||||||
Passing an Active Record object to `type_cast` directly is deprecated
|
Passing an Active Record object to `type_cast` directly is deprecated
|
||||||
and will be no longer type casted as id value in Rails 6.2.
|
and will be no longer type casted as id value in Rails 7.0.
|
||||||
MSG
|
MSG
|
||||||
value = value.id_for_database
|
value = value.id_for_database
|
||||||
end
|
end
|
||||||
|
|
||||||
if column
|
if column
|
||||||
ActiveSupport::Deprecation.warn(<<~MSG)
|
ActiveSupport::Deprecation.warn(<<~MSG)
|
||||||
Passing a column to `type_cast` is deprecated and will be removed in Rails 6.2.
|
Passing a column to `type_cast` is deprecated and will be removed in Rails 7.0.
|
||||||
MSG
|
MSG
|
||||||
type = lookup_cast_type_from_column(column)
|
type = lookup_cast_type_from_column(column)
|
||||||
value = type.serialize(value)
|
value = type.serialize(value)
|
||||||
|
|
|
@ -291,11 +291,11 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.allow_unsafe_raw_sql # :nodoc:
|
def self.allow_unsafe_raw_sql # :nodoc:
|
||||||
ActiveSupport::Deprecation.warn("ActiveRecord::Base.allow_unsafe_raw_sql is deprecated and will be removed in Rails 6.2")
|
ActiveSupport::Deprecation.warn("ActiveRecord::Base.allow_unsafe_raw_sql is deprecated and will be removed in Rails 7.0")
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.allow_unsafe_raw_sql=(value) # :nodoc:
|
def self.allow_unsafe_raw_sql=(value) # :nodoc:
|
||||||
ActiveSupport::Deprecation.warn("ActiveRecord::Base.allow_unsafe_raw_sql= is deprecated and will be removed in Rails 6.2")
|
ActiveSupport::Deprecation.warn("ActiveRecord::Base.allow_unsafe_raw_sql= is deprecated and will be removed in Rails 7.0")
|
||||||
end
|
end
|
||||||
|
|
||||||
self.default_connection_handler = ConnectionAdapters::ConnectionHandler.new
|
self.default_connection_handler = ConnectionAdapters::ConnectionHandler.new
|
||||||
|
|
|
@ -40,7 +40,7 @@ module ActiveRecord
|
||||||
def configs_for(env_name: nil, spec_name: nil, name: nil, include_replicas: false)
|
def configs_for(env_name: nil, spec_name: nil, name: nil, include_replicas: false)
|
||||||
if spec_name
|
if spec_name
|
||||||
name = spec_name
|
name = spec_name
|
||||||
ActiveSupport::Deprecation.warn("The kwarg `spec_name` is deprecated in favor of `name`. `spec_name` will be removed in Rails 6.2")
|
ActiveSupport::Deprecation.warn("The kwarg `spec_name` is deprecated in favor of `name`. `spec_name` will be removed in Rails 7.0")
|
||||||
end
|
end
|
||||||
|
|
||||||
env_name ||= default_env if name
|
env_name ||= default_env if name
|
||||||
|
|
|
@ -32,7 +32,7 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def config
|
def config
|
||||||
ActiveSupport::Deprecation.warn("DatabaseConfig#config will be removed in 6.2.0 in favor of DatabaseConfigurations#configuration_hash which returns a hash with symbol keys")
|
ActiveSupport::Deprecation.warn("DatabaseConfig#config will be removed in 7.0.0 in favor of DatabaseConfigurations#configuration_hash which returns a hash with symbol keys")
|
||||||
configuration_hash.stringify_keys
|
configuration_hash.stringify_keys
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ module ActiveRecord
|
||||||
else
|
else
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
YAML loading from legacy format older than Rails 5.0 is deprecated
|
YAML loading from legacy format older than Rails 5.0 is deprecated
|
||||||
and will be removed in Rails 6.2.
|
and will be removed in Rails 7.0.
|
||||||
MSG
|
MSG
|
||||||
if coder["attributes"].is_a?(ActiveModel::AttributeSet)
|
if coder["attributes"].is_a?(ActiveModel::AttributeSet)
|
||||||
Rails420.convert(klass, coder)
|
Rails420.convert(klass, coder)
|
||||||
|
|
|
@ -630,7 +630,7 @@ module ActiveRecord
|
||||||
if column.sql_type.start_with?("interval")
|
if column.sql_type.start_with?("interval")
|
||||||
precision_arguments = column.precision.presence && ", precision: #{column.precision}"
|
precision_arguments = column.precision.presence && ", precision: #{column.precision}"
|
||||||
ActiveSupport::Deprecation.warn(<<~WARNING)
|
ActiveSupport::Deprecation.warn(<<~WARNING)
|
||||||
The behavior of the `:interval` type will be changing in Rails 6.2
|
The behavior of the `:interval` type will be changing in Rails 7.0
|
||||||
to return an `ActiveSupport::Duration` object. If you'd like to keep
|
to return an `ActiveSupport::Duration` object. If you'd like to keep
|
||||||
the old behavior, you can add this line to #{self.name} model:
|
the old behavior, you can add this line to #{self.name} model:
|
||||||
|
|
||||||
|
|
|
@ -434,7 +434,7 @@ db_namespace = namespace :db do
|
||||||
|
|
||||||
task load_if_ruby: ["db:create", :environment] do
|
task load_if_ruby: ["db:create", :environment] do
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Using `bin/rails db:schema:load_if_ruby` is deprecated and will be removed in Rails 6.2.
|
Using `bin/rails db:schema:load_if_ruby` is deprecated and will be removed in Rails 7.0.
|
||||||
Configure the format using `config.active_record.schema_format = :ruby` to use `schema.rb` and run `bin/rails db:schema:load` instead.
|
Configure the format using `config.active_record.schema_format = :ruby` to use `schema.rb` and run `bin/rails db:schema:load` instead.
|
||||||
MSG
|
MSG
|
||||||
db_namespace["schema:load"].invoke if ActiveRecord::Base.schema_format == :ruby
|
db_namespace["schema:load"].invoke if ActiveRecord::Base.schema_format == :ruby
|
||||||
|
@ -497,7 +497,7 @@ db_namespace = namespace :db do
|
||||||
desc "Dumps the database structure to db/structure.sql. Specify another file with SCHEMA=db/my_structure.sql"
|
desc "Dumps the database structure to db/structure.sql. Specify another file with SCHEMA=db/my_structure.sql"
|
||||||
task dump: :load_config do
|
task dump: :load_config do
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Using `bin/rails db:structure:dump` is deprecated and will be removed in Rails 6.2.
|
Using `bin/rails db:structure:dump` is deprecated and will be removed in Rails 7.0.
|
||||||
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:dump` instead.
|
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:dump` instead.
|
||||||
MSG
|
MSG
|
||||||
|
|
||||||
|
@ -508,7 +508,7 @@ db_namespace = namespace :db do
|
||||||
desc "Recreates the databases from the structure.sql file"
|
desc "Recreates the databases from the structure.sql file"
|
||||||
task load: [:load_config, :check_protected_environments] do
|
task load: [:load_config, :check_protected_environments] do
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Using `bin/rails db:structure:load` is deprecated and will be removed in Rails 6.2.
|
Using `bin/rails db:structure:load` is deprecated and will be removed in Rails 7.0.
|
||||||
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:load` instead.
|
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:load` instead.
|
||||||
MSG
|
MSG
|
||||||
db_namespace["schema:load"].invoke
|
db_namespace["schema:load"].invoke
|
||||||
|
@ -516,7 +516,7 @@ db_namespace = namespace :db do
|
||||||
|
|
||||||
task load_if_sql: ["db:create", :environment] do
|
task load_if_sql: ["db:create", :environment] do
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Using `bin/rails db:structure:load_if_sql` is deprecated and will be removed in Rails 6.2.
|
Using `bin/rails db:structure:load_if_sql` is deprecated and will be removed in Rails 7.0.
|
||||||
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:load` instead.
|
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:load` instead.
|
||||||
MSG
|
MSG
|
||||||
db_namespace["schema:load"].invoke if ActiveRecord::Base.schema_format == :sql
|
db_namespace["schema:load"].invoke if ActiveRecord::Base.schema_format == :sql
|
||||||
|
@ -527,7 +527,7 @@ db_namespace = namespace :db do
|
||||||
desc "Dumps the #{name} database structure to db/structure.sql. Specify another file with SCHEMA=db/my_structure.sql"
|
desc "Dumps the #{name} database structure to db/structure.sql. Specify another file with SCHEMA=db/my_structure.sql"
|
||||||
task name => :load_config do
|
task name => :load_config do
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Using `bin/rails db:structure:dump:#{name}` is deprecated and will be removed in Rails 6.2.
|
Using `bin/rails db:structure:dump:#{name}` is deprecated and will be removed in Rails 7.0.
|
||||||
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:dump:#{name}` instead.
|
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:dump:#{name}` instead.
|
||||||
MSG
|
MSG
|
||||||
db_namespace["schema:dump:#{name}"].invoke
|
db_namespace["schema:dump:#{name}"].invoke
|
||||||
|
@ -541,7 +541,7 @@ db_namespace = namespace :db do
|
||||||
desc "Recreates the #{name} database from the structure.sql file"
|
desc "Recreates the #{name} database from the structure.sql file"
|
||||||
task name => :load_config do
|
task name => :load_config do
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Using `bin/rails db:structure:load:#{name}` is deprecated and will be removed in Rails 6.2.
|
Using `bin/rails db:structure:load:#{name}` is deprecated and will be removed in Rails 7.0.
|
||||||
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:load:#{name}` instead.
|
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:schema:load:#{name}` instead.
|
||||||
MSG
|
MSG
|
||||||
db_namespace["schema:load:#{name}"].invoke
|
db_namespace["schema:load:#{name}"].invoke
|
||||||
|
@ -573,7 +573,7 @@ db_namespace = namespace :db do
|
||||||
# desc "Recreate the test database from an existent structure.sql file"
|
# desc "Recreate the test database from an existent structure.sql file"
|
||||||
task load_structure: %w(db:test:purge) do
|
task load_structure: %w(db:test:purge) do
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Using `bin/rails db:test:load_structure` is deprecated and will be removed in Rails 6.2.
|
Using `bin/rails db:test:load_structure` is deprecated and will be removed in Rails 7.0.
|
||||||
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:test:load_schema` instead.
|
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:test:load_schema` instead.
|
||||||
MSG
|
MSG
|
||||||
db_namespace["test:load_schema"].invoke
|
db_namespace["test:load_schema"].invoke
|
||||||
|
@ -620,7 +620,7 @@ db_namespace = namespace :db do
|
||||||
namespace :load_structure do
|
namespace :load_structure do
|
||||||
task name => "db:test:purge:#{name}" do
|
task name => "db:test:purge:#{name}" do
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Using `bin/rails db:test:load_structure:#{name}` is deprecated and will be removed in Rails 6.2.
|
Using `bin/rails db:test:load_structure:#{name}` is deprecated and will be removed in Rails 7.0.
|
||||||
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:test:load_structure:#{name}` instead.
|
Configure the format using `config.active_record.schema_format = :sql` to use `structure.sql` and run `bin/rails db:test:load_structure:#{name}` instead.
|
||||||
MSG
|
MSG
|
||||||
db_namespace["test:load_schema:#{name}"].invoke
|
db_namespace["test:load_schema:#{name}"].invoke
|
||||||
|
|
|
@ -320,8 +320,8 @@ module ActiveRecord
|
||||||
|
|
||||||
unless group_fields == group_values
|
unless group_fields == group_values
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
`#{operation}` with group by duplicated fields does no longer affect to result in Rails 6.2.
|
`#{operation}` with group by duplicated fields does no longer affect to result in Rails 7.0.
|
||||||
To migrate to Rails 6.2's behavior, use `uniq!(:group)` to deduplicate group fields
|
To migrate to Rails 7.0's behavior, use `uniq!(:group)` to deduplicate group fields
|
||||||
(`#{klass.name&.tableize || klass.table_name}.uniq!(:group).#{operation}(#{column_name.inspect})`).
|
(`#{klass.name&.tableize || klass.table_name}.uniq!(:group).#{operation}(#{column_name.inspect})`).
|
||||||
MSG
|
MSG
|
||||||
group_fields = group_values
|
group_fields = group_values
|
||||||
|
|
|
@ -395,7 +395,7 @@ module ActiveRecord
|
||||||
blank_value = order_values.first
|
blank_value = order_values.first
|
||||||
ActiveSupport::Deprecation.warn(<<~MSG.squish)
|
ActiveSupport::Deprecation.warn(<<~MSG.squish)
|
||||||
`.reorder(#{blank_value.inspect})` with `.first` / `.first!` no longer
|
`.reorder(#{blank_value.inspect})` with `.first` / `.first!` no longer
|
||||||
takes non-deterministic result in Rails 6.2.
|
takes non-deterministic result in Rails 7.0.
|
||||||
To continue taking non-deterministic result, use `.take` / `.take!` instead.
|
To continue taking non-deterministic result, use `.take` / `.take!` instead.
|
||||||
MSG
|
MSG
|
||||||
end
|
end
|
||||||
|
|
|
@ -1208,8 +1208,8 @@ module ActiveRecord
|
||||||
annotates = annotates.uniq if annotates.size > 1
|
annotates = annotates.uniq if annotates.size > 1
|
||||||
unless annotates == annotate_values
|
unless annotates == annotate_values
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Duplicated query annotations are no longer shown in queries in Rails 6.2.
|
Duplicated query annotations are no longer shown in queries in Rails 7.0.
|
||||||
To migrate to Rails 6.2's behavior, use `uniq!(:annotate)` to deduplicate query annotations
|
To migrate to Rails 7.0's behavior, use `uniq!(:annotate)` to deduplicate query annotations
|
||||||
(`#{klass.name&.tableize || klass.table_name}.uniq!(:annotate)`).
|
(`#{klass.name&.tableize || klass.table_name}.uniq!(:annotate)`).
|
||||||
MSG
|
MSG
|
||||||
annotates = annotate_values
|
annotates = annotate_values
|
||||||
|
|
|
@ -165,8 +165,8 @@ module ActiveRecord
|
||||||
else
|
else
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
Merging (#{node.to_sql}) and (#{ref.to_sql}) no longer maintain
|
Merging (#{node.to_sql}) and (#{ref.to_sql}) no longer maintain
|
||||||
both conditions, and will be replaced by the latter in Rails 6.2.
|
both conditions, and will be replaced by the latter in Rails 7.0.
|
||||||
To migrate to Rails 6.2's behavior, use `relation.merge(other, rewhere: true)`.
|
To migrate to Rails 7.0's behavior, use `relation.merge(other, rewhere: true)`.
|
||||||
MSG
|
MSG
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
|
@ -384,7 +384,7 @@ module ActiveRecord
|
||||||
db_config = resolve_configuration(configuration)
|
db_config = resolve_configuration(configuration)
|
||||||
|
|
||||||
if environment || name
|
if environment || name
|
||||||
ActiveSupport::Deprecation.warn("`environment` and `name` will be removed as parameters in 6.2.0, you may now pass an ActiveRecord::DatabaseConfigurations::DatabaseConfig as `configuration` instead.")
|
ActiveSupport::Deprecation.warn("`environment` and `name` will be removed as parameters in 7.0.0, you may now pass an ActiveRecord::DatabaseConfigurations::DatabaseConfig as `configuration` instead.")
|
||||||
end
|
end
|
||||||
|
|
||||||
name ||= db_config.name
|
name ||= db_config.name
|
||||||
|
|
|
@ -140,8 +140,8 @@ class CalculationsTest < ActiveRecord::TestCase
|
||||||
[9, 9] => 53
|
[9, 9] => 53
|
||||||
}
|
}
|
||||||
message = <<-MSG.squish
|
message = <<-MSG.squish
|
||||||
`maximum` with group by duplicated fields does no longer affect to result in Rails 6.2.
|
`maximum` with group by duplicated fields does no longer affect to result in Rails 7.0.
|
||||||
To migrate to Rails 6.2's behavior, use `uniq!(:group)` to deduplicate group fields
|
To migrate to Rails 7.0's behavior, use `uniq!(:group)` to deduplicate group fields
|
||||||
(`accounts.uniq!(:group).maximum(:credit_limit)`).
|
(`accounts.uniq!(:group).maximum(:credit_limit)`).
|
||||||
MSG
|
MSG
|
||||||
assert_deprecated(message) do
|
assert_deprecated(message) do
|
||||||
|
@ -156,8 +156,8 @@ class CalculationsTest < ActiveRecord::TestCase
|
||||||
[9, 9, 9, 9] => 53
|
[9, 9, 9, 9] => 53
|
||||||
}
|
}
|
||||||
message = <<-MSG.squish
|
message = <<-MSG.squish
|
||||||
`minimum` with group by duplicated fields does no longer affect to result in Rails 6.2.
|
`minimum` with group by duplicated fields does no longer affect to result in Rails 7.0.
|
||||||
To migrate to Rails 6.2's behavior, use `uniq!(:group)` to deduplicate group fields
|
To migrate to Rails 7.0's behavior, use `uniq!(:group)` to deduplicate group fields
|
||||||
(`accounts.uniq!(:group).minimum(:credit_limit)`).
|
(`accounts.uniq!(:group).minimum(:credit_limit)`).
|
||||||
MSG
|
MSG
|
||||||
assert_deprecated(message) do
|
assert_deprecated(message) do
|
||||||
|
|
|
@ -361,8 +361,8 @@ class RelationMergingTest < ActiveRecord::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
message = <<-MSG.squish
|
message = <<-MSG.squish
|
||||||
Duplicated query annotations are no longer shown in queries in Rails 6.2.
|
Duplicated query annotations are no longer shown in queries in Rails 7.0.
|
||||||
To migrate to Rails 6.2's behavior, use `uniq!(:annotate)` to deduplicate query annotations
|
To migrate to Rails 7.0's behavior, use `uniq!(:annotate)` to deduplicate query annotations
|
||||||
(`posts.uniq!(:annotate)`).
|
(`posts.uniq!(:annotate)`).
|
||||||
MSG
|
MSG
|
||||||
assert_deprecated(message) do
|
assert_deprecated(message) do
|
||||||
|
|
|
@ -1775,7 +1775,7 @@ class RelationTest < ActiveRecord::TestCase
|
||||||
sql_log = capture_sql do
|
sql_log = capture_sql do
|
||||||
message = <<~MSG.squish
|
message = <<~MSG.squish
|
||||||
`.reorder(nil)` with `.first` / `.first!` no longer
|
`.reorder(nil)` with `.first` / `.first!` no longer
|
||||||
takes non-deterministic result in Rails 6.2.
|
takes non-deterministic result in Rails 7.0.
|
||||||
To continue taking non-deterministic result, use `.take` / `.take!` instead.
|
To continue taking non-deterministic result, use `.take` / `.take!` instead.
|
||||||
MSG
|
MSG
|
||||||
assert_deprecated(message) do
|
assert_deprecated(message) do
|
||||||
|
|
|
@ -7,8 +7,8 @@ module ActiveStorage
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@rails/activestorage",
|
"name": "@rails/activestorage",
|
||||||
"version": "6.2.0-alpha",
|
"version": "7.0.0-alpha",
|
||||||
"description": "Attach cloud and local files in Rails applications",
|
"description": "Attach cloud and local files in Rails applications",
|
||||||
"main": "app/assets/javascripts/activestorage.js",
|
"main": "app/assets/javascripts/activestorage.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
@ -20,7 +20,7 @@ module URI
|
||||||
class << self
|
class << self
|
||||||
def parser
|
def parser
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
URI.parser is deprecated and will be removed in Rails 6.2.
|
URI.parser is deprecated and will be removed in Rails 7.0.
|
||||||
Use `URI::DEFAULT_PARSER` instead.
|
Use `URI::DEFAULT_PARSER` instead.
|
||||||
MSG
|
MSG
|
||||||
URI::DEFAULT_PARSER
|
URI::DEFAULT_PARSER
|
||||||
|
|
|
@ -38,7 +38,7 @@ module ActiveSupport
|
||||||
# and the second is a library name.
|
# and the second is a library name.
|
||||||
#
|
#
|
||||||
# ActiveSupport::Deprecation.new('2.0', 'MyLibrary')
|
# ActiveSupport::Deprecation.new('2.0', 'MyLibrary')
|
||||||
def initialize(deprecation_horizon = "7.0", gem_name = "Rails")
|
def initialize(deprecation_horizon = "7.1", gem_name = "Rails")
|
||||||
self.gem_name = gem_name
|
self.gem_name = gem_name
|
||||||
self.deprecation_horizon = deprecation_horizon
|
self.deprecation_horizon = deprecation_horizon
|
||||||
# By default, warnings are not silenced and debugging is off.
|
# By default, warnings are not silenced and debugging is off.
|
||||||
|
|
|
@ -7,8 +7,8 @@ module ActiveSupport
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
|
@ -10,13 +10,13 @@ module ActiveSupport
|
||||||
|
|
||||||
def default_normalization_form
|
def default_normalization_form
|
||||||
ActiveSupport::Deprecation.warn(
|
ActiveSupport::Deprecation.warn(
|
||||||
"ActiveSupport::Multibyte::Unicode.default_normalization_form is deprecated and will be removed in Rails 6.2."
|
"ActiveSupport::Multibyte::Unicode.default_normalization_form is deprecated and will be removed in Rails 7.0."
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_normalization_form=(_)
|
def default_normalization_form=(_)
|
||||||
ActiveSupport::Deprecation.warn(
|
ActiveSupport::Deprecation.warn(
|
||||||
"ActiveSupport::Multibyte::Unicode.default_normalization_form= is deprecated and will be removed in Rails 6.2."
|
"ActiveSupport::Multibyte::Unicode.default_normalization_form= is deprecated and will be removed in Rails 7.0."
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ module ActiveSupport
|
||||||
if app.config.active_support.use_sha1_digests
|
if app.config.active_support.use_sha1_digests
|
||||||
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
ActiveSupport::Deprecation.warn(<<-MSG.squish)
|
||||||
config.active_support.use_sha1_digests is deprecated and will
|
config.active_support.use_sha1_digests is deprecated and will
|
||||||
be removed from Rails 6.2. Use
|
be removed from Rails 7.0. Use
|
||||||
config.active_support.hash_digest_class = OpenSSL::Digest::SHA1 instead.
|
config.active_support.hash_digest_class = OpenSSL::Digest::SHA1 instead.
|
||||||
MSG
|
MSG
|
||||||
ActiveSupport::Digest.hash_digest_class = OpenSSL::Digest::SHA1
|
ActiveSupport::Digest.hash_digest_class = OpenSSL::Digest::SHA1
|
||||||
|
|
|
@ -1,19 +1,21 @@
|
||||||
**DO NOT READ THIS FILE ON GITHUB, GUIDES ARE PUBLISHED ON https://guides.rubyonrails.org.**
|
**DO NOT READ THIS FILE ON GITHUB, GUIDES ARE PUBLISHED ON https://guides.rubyonrails.org.**
|
||||||
|
|
||||||
Ruby on Rails 6.2 Release Notes
|
Ruby on Rails 7.0 Release Notes
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
Highlights in Rails 6.2:
|
Highlights in Rails 7.0:
|
||||||
|
|
||||||
|
* Ruby 2.7.0+ required, Ruby 3.0+ prefered
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Upgrading to Rails 6.2
|
Upgrading to Rails 7.0
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
If you're upgrading an existing application, it's a great idea to have good test
|
If you're upgrading an existing application, it's a great idea to have good test
|
||||||
coverage before going in. You should also first upgrade to Rails 6.1 in case you
|
coverage before going in. You should also first upgrade to Rails 6.1 in case you
|
||||||
haven't and make sure your application still runs as expected before attempting
|
haven't and make sure your application still runs as expected before attempting
|
||||||
an update to Rails 6.2. A list of things to watch out for when upgrading is
|
an update to Rails 7.0. A list of things to watch out for when upgrading is
|
||||||
available in the
|
available in the
|
||||||
[Upgrading Ruby on Rails](upgrading_ruby_on_rails.html#upgrading-from-rails-6-1-to-rails-6-2)
|
[Upgrading Ruby on Rails](upgrading_ruby_on_rails.html#upgrading-from-rails-6-1-to-rails-6-2)
|
||||||
guide.
|
guide.
|
|
@ -10,7 +10,7 @@
|
||||||
</p>
|
</p>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p>
|
<p>
|
||||||
These are the new guides for Rails 6.2 based on <a href="https://github.com/rails/rails/tree/<%= @version %>"><%= @version %></a>.
|
These are the new guides for Rails 7.0 based on <a href="https://github.com/rails/rails/tree/<%= @version %>"><%= @version %></a>.
|
||||||
These guides are designed to make you immediately productive with Rails, and to help you understand how all of the pieces fit together.
|
These guides are designed to make you immediately productive with Rails, and to help you understand how all of the pieces fit together.
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1047,7 +1047,7 @@ text/javascript image/svg+xml application/postscript application/x-shockwave-fla
|
||||||
|
|
||||||
`config.load_defaults` sets new defaults up to and including the version passed. Such that passing, say, `6.0` also gets the new defaults from every version before it.
|
`config.load_defaults` sets new defaults up to and including the version passed. Such that passing, say, `6.0` also gets the new defaults from every version before it.
|
||||||
|
|
||||||
#### For '6.2', defaults from previous versions below and:
|
#### For '7.0', defaults from previous versions below and:
|
||||||
- `config.action_view.button_to_generates_button_tag`: `true`
|
- `config.action_view.button_to_generates_button_tag`: `true`
|
||||||
- `config.action_view.apply_stylesheet_media_default` : `false`
|
- `config.action_view.apply_stylesheet_media_default` : `false`
|
||||||
- `config.active_support.key_generator_hash_digest_class`: `OpenSSL::Digest::SHA256`
|
- `config.active_support.key_generator_hash_digest_class`: `OpenSSL::Digest::SHA256`
|
||||||
|
|
|
@ -235,9 +235,9 @@
|
||||||
url: upgrading_ruby_on_rails.html
|
url: upgrading_ruby_on_rails.html
|
||||||
description: This guide helps in upgrading applications to latest Ruby on Rails versions.
|
description: This guide helps in upgrading applications to latest Ruby on Rails versions.
|
||||||
-
|
-
|
||||||
name: Version 6.2 - ?
|
name: Version 7.0 - ?
|
||||||
url: 6_2_release_notes.html
|
url: 7_0_release_notes.html
|
||||||
description: Release notes for Rails 6.2.
|
description: Release notes for Rails 7.0.
|
||||||
work_in_progress: true
|
work_in_progress: true
|
||||||
-
|
-
|
||||||
name: Version 6.1 - December 2020
|
name: Version 6.1 - December 2020
|
||||||
|
|
|
@ -44,7 +44,7 @@ from.
|
||||||
In special situations, where someone from the Core Team agrees to support more series,
|
In special situations, where someone from the Core Team agrees to support more series,
|
||||||
they are included in the list of supported series.
|
they are included in the list of supported series.
|
||||||
|
|
||||||
**Currently included series:** `6.2.Z`.
|
**Currently included series:** `7.0.Z`.
|
||||||
|
|
||||||
Security Issues
|
Security Issues
|
||||||
---------------
|
---------------
|
||||||
|
@ -59,7 +59,7 @@ be built from 1.2.2, and then added to the end of 1-2-stable. This means that
|
||||||
security releases are easy to upgrade to if you're running the latest version
|
security releases are easy to upgrade to if you're running the latest version
|
||||||
of Rails.
|
of Rails.
|
||||||
|
|
||||||
**Currently included series:** `6.2.Z`, `6.1.Z`, `5.2.Z`.
|
**Currently included series:** `7.0.Z`, `6.1.Z`, `5.2.Z`.
|
||||||
|
|
||||||
Severe Security Issues
|
Severe Security Issues
|
||||||
----------------------
|
----------------------
|
||||||
|
@ -68,7 +68,7 @@ For severe security issues all releases in the current major series, and also th
|
||||||
last release in the previous major series will receive patches and new versions. The
|
last release in the previous major series will receive patches and new versions. The
|
||||||
classification of the security issue is judged by the core team.
|
classification of the security issue is judged by the core team.
|
||||||
|
|
||||||
**Currently included series:** `6.2.Z`, `6.1.Z`, `6.0.Z`, `5.2.Z`.
|
**Currently included series:** `7.0.Z`, `6.1.Z`, `6.0.Z`, `5.2.Z`.
|
||||||
|
|
||||||
Unsupported Release Series
|
Unsupported Release Series
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
|
@ -73,7 +73,7 @@ The new Rails version might have different configuration defaults than the previ
|
||||||
|
|
||||||
To allow you to upgrade to new defaults one by one, the update task has created a file `config/initializers/new_framework_defaults.rb`. Once your application is ready to run with new defaults, you can remove this file and flip the `config.load_defaults` value.
|
To allow you to upgrade to new defaults one by one, the update task has created a file `config/initializers/new_framework_defaults.rb`. Once your application is ready to run with new defaults, you can remove this file and flip the `config.load_defaults` value.
|
||||||
|
|
||||||
Upgrading from Rails 6.1 to Rails 6.2
|
Upgrading from Rails 6.1 to Rails 7.0
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
### `ActionDispatch::Request#content_type` now returned Content-Type header as it is.
|
### `ActionDispatch::Request#content_type` now returned Content-Type header as it is.
|
||||||
|
|
|
@ -199,7 +199,7 @@ module Rails
|
||||||
end
|
end
|
||||||
|
|
||||||
ActiveSupport.utc_to_local_returns_utc_offset_times = true
|
ActiveSupport.utc_to_local_returns_utc_offset_times = true
|
||||||
when "6.2"
|
when "7.0"
|
||||||
load_defaults "6.1"
|
load_defaults "6.1"
|
||||||
|
|
||||||
if respond_to?(:action_dispatch)
|
if respond_to?(:action_dispatch)
|
||||||
|
|
|
@ -7,8 +7,8 @@ module Rails
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
#
|
#
|
||||||
# This file contains migration options to ease your Rails 6.2 upgrade.
|
# This file contains migration options to ease your Rails 7.0 upgrade.
|
||||||
#
|
#
|
||||||
# Once upgraded flip defaults one by one to migrate to the new default.
|
# Once upgraded flip defaults one by one to migrate to the new default.
|
||||||
#
|
#
|
|
@ -489,7 +489,7 @@ module ApplicationTests
|
||||||
test "db:structure:#{command} is deprecated" do
|
test "db:structure:#{command} is deprecated" do
|
||||||
add_to_config("config.active_support.deprecation = :stderr")
|
add_to_config("config.active_support.deprecation = :stderr")
|
||||||
stderr_output = capture(:stderr) { rails("db:structure:#{command}", stderr: true, allow_failure: true) }
|
stderr_output = capture(:stderr) { rails("db:structure:#{command}", stderr: true, allow_failure: true) }
|
||||||
assert_match(/DEPRECATION WARNING: Using `bin\/rails db:structure:#{command}` is deprecated and will be removed in Rails 6.2/, stderr_output)
|
assert_match(/DEPRECATION WARNING: Using `bin\/rails db:structure:#{command}` is deprecated and will be removed in Rails 7.0/, stderr_output)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -606,7 +606,7 @@ module ApplicationTests
|
||||||
test "db:test:load_structure is deprecated" do
|
test "db:test:load_structure is deprecated" do
|
||||||
add_to_config("config.active_support.deprecation = :stderr")
|
add_to_config("config.active_support.deprecation = :stderr")
|
||||||
stderr_output = capture(:stderr) { rails("db:test:load_structure", stderr: true, allow_failure: true) }
|
stderr_output = capture(:stderr) { rails("db:test:load_structure", stderr: true, allow_failure: true) }
|
||||||
assert_match(/DEPRECATION WARNING: Using `bin\/rails db:test:load_structure` is deprecated and will be removed in Rails 6.2/, stderr_output)
|
assert_match(/DEPRECATION WARNING: Using `bin\/rails db:test:load_structure` is deprecated and will be removed in Rails 7.0/, stderr_output)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "db:setup loads schema and seeds database" do
|
test "db:setup loads schema and seeds database" do
|
||||||
|
|
|
@ -476,7 +476,7 @@ module ApplicationTests
|
||||||
|
|
||||||
add_to_config("config.active_support.deprecation = :stderr")
|
add_to_config("config.active_support.deprecation = :stderr")
|
||||||
stderr_output = capture(:stderr) { rails("db:structure:#{command}:animals", stderr: true, allow_failure: true) }
|
stderr_output = capture(:stderr) { rails("db:structure:#{command}:animals", stderr: true, allow_failure: true) }
|
||||||
assert_match(/DEPRECATION WARNING: Using `bin\/rails db:structure:#{command}:animals` is deprecated and will be removed in Rails 6.2/, stderr_output)
|
assert_match(/DEPRECATION WARNING: Using `bin\/rails db:structure:#{command}:animals` is deprecated and will be removed in Rails 7.0/, stderr_output)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ module Rails
|
||||||
end
|
end
|
||||||
|
|
||||||
module VERSION
|
module VERSION
|
||||||
MAJOR = 6
|
MAJOR = 7
|
||||||
MINOR = 2
|
MINOR = 0
|
||||||
TINY = 0
|
TINY = 0
|
||||||
PRE = "alpha"
|
PRE = "alpha"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue