railties 7.2.0.beta3 → 7.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/rails/application/configuration.rb +8 -2
- data/lib/rails/commands/boot/boot_command.rb +14 -0
- data/lib/rails/commands/test/test_command.rb +1 -1
- data/lib/rails/gem_version.rb +1 -1
- data/lib/rails/generators/rails/app/templates/bin/setup.tt +1 -1
- data/lib/rails/test_unit/runner.rb +11 -6
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb9a6fb87cba868a449d51a15e1e5af1db4e7e24ae38785e87864fb8af02013f
|
4
|
+
data.tar.gz: 4e0738ed982464f2ee14857de6459c240ef5b2da95013edbfb72c9e46336b638
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cc681949d72b7535f4114a5473e2f4dc15bee814f8ae6f294ac99a1216ff5287ddae10de169b83be35d27b8cd318cc5773b461d3c626fb383546f51deaefed3
|
7
|
+
data.tar.gz: f8cfc51cc0232b3b2355cc54934682401d89ff16bee994976b7262e31b52d034a9caf00e088ccfcbe05ec69cce6af874c5b73dde9a837cb1d2f552e101c7db94
|
data/CHANGELOG.md
CHANGED
@@ -500,7 +500,7 @@ module Rails
|
|
500
500
|
|
501
501
|
def secret_key_base
|
502
502
|
@secret_key_base || begin
|
503
|
-
self.secret_key_base = if
|
503
|
+
self.secret_key_base = if generate_local_secret?
|
504
504
|
generate_local_secret
|
505
505
|
else
|
506
506
|
ENV["SECRET_KEY_BASE"] || Rails.application.credentials.secret_key_base
|
@@ -509,7 +509,9 @@ module Rails
|
|
509
509
|
end
|
510
510
|
|
511
511
|
def secret_key_base=(new_secret_key_base)
|
512
|
-
if new_secret_key_base.
|
512
|
+
if new_secret_key_base.nil? && generate_local_secret?
|
513
|
+
@secret_key_base = generate_local_secret
|
514
|
+
elsif new_secret_key_base.is_a?(String) && new_secret_key_base.present?
|
513
515
|
@secret_key_base = new_secret_key_base
|
514
516
|
elsif new_secret_key_base
|
515
517
|
raise ArgumentError, "`secret_key_base` for #{Rails.env} environment must be a type of String`"
|
@@ -635,6 +637,10 @@ module Rails
|
|
635
637
|
|
636
638
|
File.binread(key_file)
|
637
639
|
end
|
640
|
+
|
641
|
+
def generate_local_secret?
|
642
|
+
Rails.env.local? || ENV["SECRET_KEY_BASE_DUMMY"]
|
643
|
+
end
|
638
644
|
end
|
639
645
|
end
|
640
646
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails/command/environment_argument"
|
4
|
+
|
5
|
+
module Rails
|
6
|
+
module Command
|
7
|
+
class BootCommand < Base # :nodoc:
|
8
|
+
include EnvironmentArgument
|
9
|
+
|
10
|
+
desc "boot", "Boot the application and exit"
|
11
|
+
def perform(*) = boot_application!
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -32,7 +32,7 @@ module Rails
|
|
32
32
|
run_prepare_task if self.args.none?(EXACT_TEST_ARGUMENT_PATTERN)
|
33
33
|
Rails::TestUnit::Runner.run(args)
|
34
34
|
rescue Rails::TestUnit::InvalidTestError => error
|
35
|
-
|
35
|
+
raise ArgumentError, error.message
|
36
36
|
end
|
37
37
|
|
38
38
|
# Define Thor tasks to avoid going through Rake and booting twice when using bin/rails test:*
|
data/lib/rails/gem_version.rb
CHANGED
@@ -58,15 +58,20 @@ module Rails
|
|
58
58
|
patterns = extract_filters(argv)
|
59
59
|
tests = list_tests(patterns)
|
60
60
|
tests.to_a.each do |path|
|
61
|
-
|
61
|
+
abs_path = File.expand_path(path)
|
62
|
+
require abs_path
|
62
63
|
rescue LoadError => exception
|
63
|
-
|
64
|
-
|
64
|
+
if exception.path == abs_path
|
65
|
+
all_tests = list_tests([default_test_glob])
|
66
|
+
corrections = DidYouMean::SpellChecker.new(dictionary: all_tests).correct(path)
|
65
67
|
|
66
|
-
|
67
|
-
|
68
|
+
if corrections.empty?
|
69
|
+
raise exception
|
70
|
+
end
|
71
|
+
raise InvalidTestError.new(path, DidYouMean::Formatter.message_for(corrections))
|
72
|
+
else
|
73
|
+
raise
|
68
74
|
end
|
69
|
-
raise InvalidTestError.new(path, DidYouMean::Formatter.message_for(corrections))
|
70
75
|
end
|
71
76
|
end
|
72
77
|
|
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.0.
|
4
|
+
version: 7.2.0.rc1
|
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-
|
11
|
+
date: 2024-08-06 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.0.
|
19
|
+
version: 7.2.0.rc1
|
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.0.
|
26
|
+
version: 7.2.0.rc1
|
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.0.
|
33
|
+
version: 7.2.0.rc1
|
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.0.
|
40
|
+
version: 7.2.0.rc1
|
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.0.
|
123
|
+
version: 7.2.0.rc1
|
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.0.
|
130
|
+
version: 7.2.0.rc1
|
131
131
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
132
132
|
email: david@loudthinking.com
|
133
133
|
executables:
|
@@ -170,6 +170,7 @@ files:
|
|
170
170
|
- lib/rails/commands/about/about_command.rb
|
171
171
|
- lib/rails/commands/app/update_command.rb
|
172
172
|
- lib/rails/commands/application/application_command.rb
|
173
|
+
- lib/rails/commands/boot/boot_command.rb
|
173
174
|
- lib/rails/commands/console/console_command.rb
|
174
175
|
- lib/rails/commands/console/irb_console.rb
|
175
176
|
- lib/rails/commands/credentials/USAGE
|
@@ -468,10 +469,10 @@ licenses:
|
|
468
469
|
- MIT
|
469
470
|
metadata:
|
470
471
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
471
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.2.0.
|
472
|
-
documentation_uri: https://api.rubyonrails.org/v7.2.0.
|
472
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.2.0.rc1/railties/CHANGELOG.md
|
473
|
+
documentation_uri: https://api.rubyonrails.org/v7.2.0.rc1/
|
473
474
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
474
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.2.0.
|
475
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.2.0.rc1/railties
|
475
476
|
rubygems_mfa_required: 'true'
|
476
477
|
post_install_message:
|
477
478
|
rdoc_options:
|