railties 7.2.0 → 7.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -0
- data/lib/rails/application.rb +7 -0
- data/lib/rails/commands/app/update_command.rb +9 -0
- data/lib/rails/commands/console/irb_console.rb +1 -2
- data/lib/rails/gem_version.rb +1 -1
- data/lib/rails/generators/database.rb +1 -1
- data/lib/rails/generators/rails/app/app_generator.rb +3 -0
- data/lib/rails/generators/rails/app/templates/app/views/pwa/service-worker.js +3 -3
- data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +2 -1
- data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +2 -0
- 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: 227f9df28bfd6f3e757f7cbe4e1354be115721346258085c731118e3f47a70cf
|
4
|
+
data.tar.gz: d67afc95a6a07dd10b2515f742d206f1643c4cc7d4eb785c6b9a3fad77e0ff37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44ab5d8cf1f7bb90c5ad99ccf5de371299408d9c70e7403b63e8761552d354974631d4d15b55d40ceb1640cb302fbd26e9fe507bb002b08f8767fc9117a495fd
|
7
|
+
data.tar.gz: 38d741a264aff26ed07d778715698c74e7cb4c7c518a1265d00a9753228cbe46a2b81459fdb65cf762847514ffcb76a7750ac4c6ec231975cf44bcd0a7da4815
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,36 @@
|
|
1
|
+
## Rails 7.2.1 (August 22, 2024) ##
|
2
|
+
|
3
|
+
* Fix `rails console` for application with non default application constant.
|
4
|
+
|
5
|
+
The wrongly assumed the Rails application would be named `AppNamespace::Application`,
|
6
|
+
which is the default but not an obligation.
|
7
|
+
|
8
|
+
*Jean Boussier*
|
9
|
+
|
10
|
+
* Fix the default Dockerfile to include the full sqlite3 package.
|
11
|
+
|
12
|
+
Prior to this it only included `libsqlite3`, so it wasn't enough to
|
13
|
+
run `rails dbconsole`.
|
14
|
+
|
15
|
+
*Jerome Dalbert*
|
16
|
+
|
17
|
+
* Don't update public directory during `app:update` command for API-only Applications.
|
18
|
+
|
19
|
+
*y-yagi*
|
20
|
+
|
21
|
+
* Don't add bin/brakeman if brakeman is not in bundle when upgrading an application.
|
22
|
+
|
23
|
+
*Etienne Barrié*
|
24
|
+
|
25
|
+
* Remove PWA views and routes if its an API only project.
|
26
|
+
|
27
|
+
*Jean Boussier*
|
28
|
+
|
29
|
+
* Simplify generated Puma configuration
|
30
|
+
|
31
|
+
*DHH*, *Rafael Mendonça França*
|
32
|
+
|
33
|
+
|
1
34
|
## Rails 7.2.0 (August 09, 2024) ##
|
2
35
|
|
3
36
|
* The new `bin/rails boot` command boots the application and exits. Supports the
|
data/lib/rails/application.rb
CHANGED
@@ -134,6 +134,13 @@ module Rails
|
|
134
134
|
@initialized
|
135
135
|
end
|
136
136
|
|
137
|
+
# Returns the dasherized application name.
|
138
|
+
#
|
139
|
+
# MyApp::Application.new.name => "my-app"
|
140
|
+
def name
|
141
|
+
self.class.name.underscore.dasherize.delete_suffix("/application")
|
142
|
+
end
|
143
|
+
|
137
144
|
def run_load_hooks! # :nodoc:
|
138
145
|
return self if @ran_load_hooks
|
139
146
|
@ran_load_hooks = true
|
@@ -69,6 +69,8 @@ module Rails
|
|
69
69
|
skip_action_mailbox: !defined?(ActionMailbox::Engine),
|
70
70
|
skip_action_text: !defined?(ActionText::Engine),
|
71
71
|
skip_action_cable: !defined?(ActionCable::Engine),
|
72
|
+
skip_brakeman: skip_gem?("brakeman"),
|
73
|
+
skip_rubocop: skip_gem?("rubocop"),
|
72
74
|
skip_test: !defined?(Rails::TestUnitRailtie),
|
73
75
|
skip_system_test: Rails.application.config.generators.system_tests.nil?,
|
74
76
|
asset_pipeline: asset_pipeline,
|
@@ -87,6 +89,13 @@ module Rails
|
|
87
89
|
nil
|
88
90
|
end
|
89
91
|
end
|
92
|
+
|
93
|
+
def skip_gem?(gem_name)
|
94
|
+
gem gem_name
|
95
|
+
false
|
96
|
+
rescue LoadError
|
97
|
+
true
|
98
|
+
end
|
90
99
|
end
|
91
100
|
end
|
92
101
|
end
|
@@ -89,9 +89,8 @@ module Rails
|
|
89
89
|
end
|
90
90
|
|
91
91
|
env = colorized_env
|
92
|
-
app_name = @app.class.module_parent_name.underscore.dasherize
|
93
92
|
prompt_prefix = "%N(#{env})"
|
94
|
-
IRB.conf[:IRB_NAME] =
|
93
|
+
IRB.conf[:IRB_NAME] = @app.name
|
95
94
|
|
96
95
|
IRB.conf[:PROMPT][:RAILS_PROMPT] = {
|
97
96
|
PROMPT_I: "#{prompt_prefix}> ",
|
data/lib/rails/gem_version.rb
CHANGED
@@ -229,6 +229,8 @@ module Rails
|
|
229
229
|
end
|
230
230
|
|
231
231
|
def public_directory
|
232
|
+
return if options[:update] && options[:api]
|
233
|
+
|
232
234
|
directory "public", "public", recursive: false
|
233
235
|
end
|
234
236
|
|
@@ -490,6 +492,7 @@ module Rails
|
|
490
492
|
remove_dir "app/views"
|
491
493
|
else
|
492
494
|
remove_file "app/views/layouts/application.html.erb"
|
495
|
+
remove_dir "app/views/pwa"
|
493
496
|
end
|
494
497
|
end
|
495
498
|
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// const { title, options } = await event.data.json()
|
5
5
|
// event.waitUntil(self.registration.showNotification(title, options))
|
6
6
|
// })
|
7
|
-
//
|
7
|
+
//
|
8
8
|
// self.addEventListener("notificationclick", function(event) {
|
9
9
|
// event.notification.close()
|
10
10
|
// event.waitUntil(
|
@@ -12,12 +12,12 @@
|
|
12
12
|
// for (let i = 0; i < clientList.length; i++) {
|
13
13
|
// let client = clientList[i]
|
14
14
|
// let clientPath = (new URL(client.url)).pathname
|
15
|
-
//
|
15
|
+
//
|
16
16
|
// if (clientPath == event.notification.data.path && "focus" in client) {
|
17
17
|
// return client.focus()
|
18
18
|
// }
|
19
19
|
// }
|
20
|
-
//
|
20
|
+
//
|
21
21
|
// if (clients.openWindow) {
|
22
22
|
// return clients.openWindow(event.notification.data.path)
|
23
23
|
// }
|
@@ -10,5 +10,5 @@ Rails.application.config.assets.version = "1.0"
|
|
10
10
|
# Precompile additional assets.
|
11
11
|
# application.js, application.css, and all non-JS/CSS in the app/assets
|
12
12
|
# folder are already added.
|
13
|
-
# Rails.application.config.assets.precompile += %w
|
13
|
+
# Rails.application.config.assets.precompile += %w[ admin.js admin.css ]
|
14
14
|
<% end -%>
|
@@ -29,5 +29,6 @@ port ENV.fetch("PORT", 3000)
|
|
29
29
|
# Allow puma to be restarted by `bin/rails restart` command.
|
30
30
|
plugin :tmp_restart
|
31
31
|
|
32
|
-
#
|
32
|
+
# Specify the PID file. Defaults to tmp/pids/server.pid in development.
|
33
|
+
# In other environments, only set the PID file if requested.
|
33
34
|
pidfile ENV["PIDFILE"] if ENV["PIDFILE"]
|
@@ -5,10 +5,12 @@ Rails.application.routes.draw do
|
|
5
5
|
# Can be used by load balancers and uptime monitors to verify that the app is live.
|
6
6
|
get "up" => "rails/health#show", as: :rails_health_check
|
7
7
|
|
8
|
+
<%- unless options.api? -%>
|
8
9
|
# Render dynamic PWA files from app/views/pwa/*
|
9
10
|
get "service-worker" => "rails/pwa#service_worker", as: :pwa_service_worker
|
10
11
|
get "manifest" => "rails/pwa#manifest", as: :pwa_manifest
|
11
12
|
|
13
|
+
<%- end -%>
|
12
14
|
# Defines the root path route ("/")
|
13
15
|
# root "posts#index"
|
14
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railties
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.2.
|
4
|
+
version: 7.2.1
|
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: 2024-08-
|
11
|
+
date: 2024-08-22 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.2.
|
19
|
+
version: 7.2.1
|
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.2.
|
26
|
+
version: 7.2.1
|
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.2.
|
33
|
+
version: 7.2.1
|
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.2.
|
40
|
+
version: 7.2.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rackup
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,14 +120,14 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - '='
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 7.2.
|
123
|
+
version: 7.2.1
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - '='
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 7.2.
|
130
|
+
version: 7.2.1
|
131
131
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
132
132
|
email: david@loudthinking.com
|
133
133
|
executables:
|
@@ -469,10 +469,10 @@ licenses:
|
|
469
469
|
- MIT
|
470
470
|
metadata:
|
471
471
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
472
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.2.
|
473
|
-
documentation_uri: https://api.rubyonrails.org/v7.2.
|
472
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.2.1/railties/CHANGELOG.md
|
473
|
+
documentation_uri: https://api.rubyonrails.org/v7.2.1/
|
474
474
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
475
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.2.
|
475
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.2.1/railties
|
476
476
|
rubygems_mfa_required: 'true'
|
477
477
|
post_install_message:
|
478
478
|
rdoc_options:
|