railties 7.0.1 → 7.0.2
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/rails/application/configuration.rb +4 -1
- data/lib/rails/gem_version.rb +1 -1
- data/lib/rails/generators/generated_attribute.rb +2 -2
- data/lib/rails/generators/rails/app/app_generator.rb +13 -0
- data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +3 -1
- data/lib/rails/tasks/framework.rake +5 -1
- data/lib/rails/templates/rails/welcome/index.html.erb +2 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91236829ff0618a329d5e19ed00f9dd85fd6f68d44622dab451f126763faec2e
|
4
|
+
data.tar.gz: 9e7cac33fc86a0b6baf555fb4a002a31657b2d37455d9ef40efc425c042ce45e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc0ec824e43c9f015cd5e86d6f4754c8724ca4e61a8856b8421b9b7dbf943398dff56095bf9b646f282a423b41c71fa42f30a5d587d945b6b382c1fdd49aae31
|
7
|
+
data.tar.gz: 5725c5241ec2efd5c4a3d826df6b5548c373f6225dd144472167c08421b7350b34fca209661a174a580fb812ee85c365cdeb66b00b5747d7828a9bb85de0d584
|
data/CHANGELOG.md
CHANGED
@@ -81,7 +81,10 @@ module Rails
|
|
81
81
|
@server_timing = false
|
82
82
|
end
|
83
83
|
|
84
|
-
# Loads default
|
84
|
+
# Loads default configuration values for a target version. This includes
|
85
|
+
# defaults for versions prior to the target version. See the
|
86
|
+
# {configuration guide}[https://guides.rubyonrails.org/configuring.html]
|
87
|
+
# for the default values associated with a particular version.
|
85
88
|
def load_defaults(target_version)
|
86
89
|
case target_version.to_s
|
87
90
|
when "5.0"
|
data/lib/rails/gem_version.rb
CHANGED
@@ -123,8 +123,8 @@ module Rails
|
|
123
123
|
when :integer then 1
|
124
124
|
when :float then 1.5
|
125
125
|
when :decimal then "9.99"
|
126
|
-
when :datetime, :timestamp, :time then Time.now.
|
127
|
-
when :date then Date.today.
|
126
|
+
when :datetime, :timestamp, :time then Time.now.to_fs(:db)
|
127
|
+
when :date then Date.today.to_fs(:db)
|
128
128
|
when :string then name == "type" ? "" : "MyString"
|
129
129
|
when :text then "MyText"
|
130
130
|
when :boolean then false
|
@@ -193,6 +193,14 @@ module Rails
|
|
193
193
|
directory "db"
|
194
194
|
end
|
195
195
|
|
196
|
+
def db_when_updating
|
197
|
+
path = File.expand_path("db/schema.rb", destination_root)
|
198
|
+
|
199
|
+
if File.exist?(path)
|
200
|
+
gsub_file("db/schema.rb", /ActiveRecord::Schema\.define/, "ActiveRecord::Schema[6.1].define")
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
196
204
|
def lib
|
197
205
|
empty_directory "lib"
|
198
206
|
empty_directory_with_keep_file "lib/tasks"
|
@@ -333,6 +341,11 @@ module Rails
|
|
333
341
|
end
|
334
342
|
remove_task :update_bin_files
|
335
343
|
|
344
|
+
def update_db_schema
|
345
|
+
build(:db_when_updating)
|
346
|
+
end
|
347
|
+
remove_task :update_db_schema
|
348
|
+
|
336
349
|
def update_active_storage
|
337
350
|
unless skip_active_storage?
|
338
351
|
rails_command "active_storage:update", inline: true
|
data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
# Configure
|
3
|
+
# Configure parameters to be filtered from the log file. Use this to limit dissemination of
|
4
|
+
# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
|
5
|
+
# notations and behaviors.
|
4
6
|
Rails.application.config.filter_parameters += [
|
5
7
|
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
6
8
|
]
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
namespace :app do
|
4
4
|
desc "Update configs and some other initially generated files (or use just update:configs or update:bin)"
|
5
|
-
task update: [ "update:configs", "update:bin", "update:active_storage", "update:upgrade_guide_info" ]
|
5
|
+
task update: [ "update:configs", "update:bin", "update:db", "update:active_storage", "update:upgrade_guide_info" ]
|
6
6
|
|
7
7
|
desc "Applies the template supplied by LOCATION=(/path/to/template) or URL"
|
8
8
|
task template: :environment do
|
@@ -51,6 +51,10 @@ namespace :app do
|
|
51
51
|
Rails::AppUpdater.invoke_from_app_generator :update_bin_files
|
52
52
|
end
|
53
53
|
|
54
|
+
task :db do
|
55
|
+
Rails::AppUpdater.invoke_from_app_generator :update_db_schema
|
56
|
+
end
|
57
|
+
|
54
58
|
task :active_storage do
|
55
59
|
Rails::AppUpdater.invoke_from_app_generator :update_active_storage
|
56
60
|
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<!DOCTYPE html>
|
3
3
|
<html>
|
4
4
|
<head>
|
5
|
-
<title>Ruby on Rails
|
5
|
+
<title>Ruby on Rails <%= Rails.version %></title>
|
6
6
|
<meta charset="utf-8">
|
7
7
|
<meta name="viewport" content="width=device-width">
|
8
8
|
<link rel="icon" href="<%= ruby_on_rails_logo_favicon_data_uri %>" />
|
@@ -60,6 +60,7 @@
|
|
60
60
|
height: auto;
|
61
61
|
max-width: 100%;
|
62
62
|
width: 100%;
|
63
|
+
cursor: pointer;
|
63
64
|
}
|
64
65
|
|
65
66
|
ul {
|
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.
|
4
|
+
version: 7.0.2
|
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-
|
11
|
+
date: 2022-02-08 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.
|
19
|
+
version: 7.0.2
|
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.
|
26
|
+
version: 7.0.2
|
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.
|
33
|
+
version: 7.0.2
|
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.
|
40
|
+
version: 7.0.2
|
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.
|
103
|
+
version: 7.0.2
|
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.
|
110
|
+
version: 7.0.2
|
111
111
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
112
112
|
email: david@loudthinking.com
|
113
113
|
executables:
|
@@ -422,10 +422,10 @@ licenses:
|
|
422
422
|
- MIT
|
423
423
|
metadata:
|
424
424
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
425
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.0.
|
426
|
-
documentation_uri: https://api.rubyonrails.org/v7.0.
|
425
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.2/railties/CHANGELOG.md
|
426
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.2/
|
427
427
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
428
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.0.
|
428
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.2/railties
|
429
429
|
rubygems_mfa_required: 'true'
|
430
430
|
post_install_message:
|
431
431
|
rdoc_options:
|