railties 7.0.0.alpha1 → 7.0.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +43 -1
- data/lib/rails/all.rb +0 -1
- data/lib/rails/app_updater.rb +1 -1
- data/lib/rails/application/bootstrap.rb +7 -3
- data/lib/rails/application/configuration.rb +18 -7
- data/lib/rails/application/default_middleware_stack.rb +3 -2
- data/lib/rails/application/finisher.rb +2 -3
- data/lib/rails/commands/dbconsole/dbconsole_command.rb +0 -5
- data/lib/rails/engine/configuration.rb +1 -1
- data/lib/rails/engine.rb +3 -5
- data/lib/rails/gem_version.rb +1 -1
- data/lib/rails/generators/app_base.rb +44 -14
- data/lib/rails/generators/erb/scaffold/scaffold_generator.rb +1 -1
- data/lib/rails/generators/erb/scaffold/templates/_form.html.erb.tt +8 -8
- data/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt +2 -2
- data/lib/rails/generators/erb/scaffold/templates/partial.html.erb.tt +5 -5
- data/lib/rails/generators/erb/scaffold/templates/show.html.erb.tt +1 -1
- data/lib/rails/generators/generated_attribute.rb +5 -5
- data/lib/rails/generators/rails/app/app_generator.rb +12 -6
- data/lib/rails/generators/rails/app/templates/Gemfile.tt +14 -9
- data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +1 -0
- data/lib/rails/generators/rails/app/templates/config/application.rb.tt +0 -1
- data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +4 -1
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +12 -2
- data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +4 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +19 -20
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_0.rb.tt +36 -0
- data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +2 -2
- data/lib/rails/generators/rails/app/templates/gitignore.tt +3 -0
- data/lib/rails/generators/rails/plugin/plugin_generator.rb +1 -1
- data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +3 -1
- data/lib/rails/generators/rails/plugin/templates/app/models/%namespaced_name%/application_record.rb.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/bin/rails.tt +0 -1
- data/lib/rails/generators/test_unit/scaffold/templates/system_test.rb.tt +7 -9
- data/lib/rails/railtie.rb +18 -1
- data/lib/rails/tasks/yarn.rake +4 -9
- data/lib/rails/templates/rails/mailers/email.html.erb +1 -1
- data/lib/rails/test_unit/runner.rb +9 -4
- data/lib/rails/welcome_controller.rb +1 -0
- data/lib/rails.rb +4 -0
- metadata +20 -22
- data/lib/rails/generators/rails/app/templates/config/initializers/backtrace_silencers.rb.tt +0 -8
- data/lib/rails/generators/rails/app/templates/config/initializers/mime_types.rb.tt +0 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt +0 -16
@@ -10,18 +10,23 @@ ruby <%= "\"#{RUBY_VERSION}\"" -%>
|
|
10
10
|
<%= gem.commented_out ? "# " : "" %>gem "<%= gem.name %>"<%= %(, "#{gem.version}") if gem.version -%>
|
11
11
|
<% if gem.options.any? -%>, <%= gem.options.map { |k,v| "#{k}: #{v.inspect}" }.join(", ") %><% end -%>
|
12
12
|
<% end %>
|
13
|
+
<% unless options.minimal? -%>
|
14
|
+
|
15
|
+
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
|
16
|
+
# gem "kredis"
|
17
|
+
|
18
|
+
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
|
19
|
+
# gem "bcrypt", "~> 3.1.7"
|
20
|
+
<% end -%>
|
13
21
|
|
14
22
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
15
23
|
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
|
16
|
-
|
17
24
|
<% if depend_on_bootsnap? -%>
|
25
|
+
|
18
26
|
# Reduces boot times through caching; required in config/boot.rb
|
19
27
|
gem "bootsnap", ">= 1.4.4", require: false
|
20
|
-
|
21
|
-
|
22
|
-
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
|
23
|
-
# gem "bcrypt", "~> 3.1.7"
|
24
|
-
<% unless options.skip_sprockets? || options.minimal? -%>
|
28
|
+
<% end -%>
|
29
|
+
<% unless skip_sprockets? || options.minimal? -%>
|
25
30
|
|
26
31
|
# Use Sass to process CSS
|
27
32
|
# gem "sassc-rails", "~> 2.1"
|
@@ -39,7 +44,7 @@ gem "bootsnap", ">= 1.4.4", require: false
|
|
39
44
|
<% if RUBY_ENGINE == "ruby" -%>
|
40
45
|
|
41
46
|
group :development, :test do
|
42
|
-
#
|
47
|
+
# See https://edgeguides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
43
48
|
gem "debug", ">= 1.0.0", platforms: %i[ mri mingw x64_mingw ]
|
44
49
|
end
|
45
50
|
<% end -%>
|
@@ -61,7 +66,7 @@ end
|
|
61
66
|
group :test do
|
62
67
|
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
|
63
68
|
gem "capybara", ">= 3.26"
|
64
|
-
gem "selenium-webdriver"
|
69
|
+
gem "selenium-webdriver", ">= 4.0.0"
|
65
70
|
gem "webdrivers"
|
66
71
|
end
|
67
|
-
<%- end -%>
|
72
|
+
<%- end -%>
|
@@ -15,7 +15,6 @@ require "action_controller/railtie"
|
|
15
15
|
<%= comment_if :skip_action_text %>require "action_text/engine"
|
16
16
|
require "action_view/railtie"
|
17
17
|
<%= comment_if :skip_action_cable %>require "action_cable/engine"
|
18
|
-
<%= comment_if :skip_sprockets %>require "sprockets/railtie"
|
19
18
|
<%= comment_if :skip_test %>require "rails/test_unit/railtie"
|
20
19
|
<% end -%>
|
21
20
|
|
@@ -14,6 +14,9 @@ Rails.application.configure do
|
|
14
14
|
# Show full error reports.
|
15
15
|
config.consider_all_requests_local = true
|
16
16
|
|
17
|
+
# Enable server timing
|
18
|
+
config.server_timing = true
|
19
|
+
|
17
20
|
# Enable/disable caching. By default caching is disabled.
|
18
21
|
# Run rails dev:cache to toggle caching.
|
19
22
|
if Rails.root.join("tmp/caching-dev.txt").exist?
|
@@ -61,7 +64,7 @@ Rails.application.configure do
|
|
61
64
|
config.active_record.verbose_query_logs = true
|
62
65
|
|
63
66
|
<%- end -%>
|
64
|
-
<%- unless
|
67
|
+
<%- unless skip_sprockets? -%>
|
65
68
|
# Suppress logger output for asset requests.
|
66
69
|
config.assets.quiet = true
|
67
70
|
<%- end -%>
|
@@ -26,7 +26,7 @@ Rails.application.configure do
|
|
26
26
|
# Apache or NGINX already handles this.
|
27
27
|
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
|
28
28
|
|
29
|
-
<%- unless
|
29
|
+
<%- unless skip_sprockets? -%>
|
30
30
|
# Compress CSS using a preprocessor.
|
31
31
|
# config.assets.css_compressor = :sass
|
32
32
|
|
@@ -70,8 +70,8 @@ Rails.application.configure do
|
|
70
70
|
# Use a real queuing backend for Active Job (and separate queues per environment).
|
71
71
|
# config.active_job.queue_adapter = :resque
|
72
72
|
# config.active_job.queue_name_prefix = "<%= app_name %>_production"
|
73
|
-
<%- end -%>
|
74
73
|
|
74
|
+
<%- end -%>
|
75
75
|
<%- unless options.skip_action_mailer? -%>
|
76
76
|
config.action_mailer.perform_caching = false
|
77
77
|
|
@@ -125,4 +125,14 @@ Rails.application.configure do
|
|
125
125
|
# config.active_record.database_selector = { delay: 2.seconds }
|
126
126
|
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
127
127
|
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
128
|
+
|
129
|
+
# Inserts middleware to perform automatic shard swapping. The `shard_selector` hash
|
130
|
+
# can be used to pass options to the `ShardSelector` middleware. The `lock` option is
|
131
|
+
# used to determine whether shard swapping should be prohibited for the request.
|
132
|
+
#
|
133
|
+
# The `shard_resolver` option is used by the middleware to determine which shard
|
134
|
+
# to switch to. The application must provide a mechanism for finding the shard name
|
135
|
+
# in a proc. See guides for an example.
|
136
|
+
# config.active_record.shard_selector = { lock: true }
|
137
|
+
# config.active_record.shard_resolver = ->(request) { Tenant.find_by!(host: request.host).shard }
|
128
138
|
end
|
@@ -11,10 +11,10 @@ Rails.application.configure do
|
|
11
11
|
# Turn false under Spring and add config.action_view.cache_template_loading = true
|
12
12
|
config.cache_classes = true
|
13
13
|
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
config.eager_load =
|
14
|
+
# Eager loading loads your whole application. When running a single test locally,
|
15
|
+
# this probably isn't necessary. It's a good idea to do in a continuous integration
|
16
|
+
# system, or in some way before deploying your code.
|
17
|
+
config.eager_load = ENV["CI"].present?
|
18
18
|
|
19
19
|
# Configure public file server for tests with Cache-Control for performance.
|
20
20
|
config.public_file_server.enabled = true
|
data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt
CHANGED
@@ -4,24 +4,23 @@
|
|
4
4
|
# For further information see the following documentation
|
5
5
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
|
6
6
|
|
7
|
-
# Rails.application.
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
7
|
+
# Rails.application.configure do
|
8
|
+
# config.content_security_policy do |policy|
|
9
|
+
# policy.default_src :self, :https
|
10
|
+
# policy.font_src :self, :https, :data
|
11
|
+
# policy.img_src :self, :https, :data
|
12
|
+
# policy.object_src :none
|
13
|
+
# policy.script_src :self, :https
|
14
|
+
# policy.style_src :self, :https
|
15
|
+
# # Specify URI for violation reports
|
16
|
+
# # policy.report_uri "/csp-violation-report-endpoint"
|
17
|
+
# end
|
18
|
+
#
|
19
|
+
# # Generate session nonces for permitted importmap and inline scripts
|
20
|
+
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
|
21
|
+
# config.content_security_policy_nonce_directives = %w(script-src)
|
22
|
+
#
|
23
|
+
# # Report CSP violations to a specified URI. See:
|
24
|
+
# # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
25
|
+
# # config.content_security_policy_report_only = true
|
16
26
|
# end
|
17
|
-
|
18
|
-
# If you are using UJS then enable automatic nonce generation
|
19
|
-
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
20
|
-
|
21
|
-
# Set the nonce only to specific directives
|
22
|
-
# Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
|
23
|
-
|
24
|
-
# Report CSP violations to a specified URI
|
25
|
-
# For further information see the following documentation:
|
26
|
-
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
27
|
-
# Rails.application.config.content_security_policy_report_only = true
|
data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_0.rb.tt
CHANGED
@@ -45,6 +45,17 @@
|
|
45
45
|
# and you have no plans to rollback.
|
46
46
|
# Rails.application.config.active_support.cache_format_version = 7.0
|
47
47
|
|
48
|
+
# Calls `Rails.application.executor.wrap` around test cases.
|
49
|
+
# This makes test cases behave closer to an actual request or job.
|
50
|
+
# Several features that are normally disabled in test, such as Active Record query cache
|
51
|
+
# and asynchronous queries will then be enabled.
|
52
|
+
# Rails.application.config.active_support.executor_around_test_case = true
|
53
|
+
|
54
|
+
# Define the isolation level of most of Rails internal state.
|
55
|
+
# If you use a fiber based server or job processor, you should set it to `:fiber`.
|
56
|
+
# Otherwise the default of `:thread` if preferable.
|
57
|
+
# Rails.application.config.active_support.isolation_level = :thread
|
58
|
+
|
48
59
|
# Set both the `:open_timeout` and `:read_timeout` values for `:smtp` delivery method.
|
49
60
|
# Rails.application.config.action_mailer.smtp_timeout = 5
|
50
61
|
|
@@ -54,6 +65,9 @@
|
|
54
65
|
# Rails.application.config.active_storage.video_preview_arguments =
|
55
66
|
# "-vf 'select=eq(n\\,0)+eq(key\\,1)+gt(scene\\,0.015),loop=loop=-1:size=2,trim=start_frame=1' -frames:v 1 -f image2"
|
56
67
|
|
68
|
+
# Automatically infer `inverse_of` for associations with a scope.
|
69
|
+
# Rails.application.config.active_record.automatic_scope_inversing = true
|
70
|
+
|
57
71
|
# Raise when running tests if fixtures contained foreign key violations
|
58
72
|
# Rails.application.config.active_record.verify_foreign_keys_for_fixtures = true
|
59
73
|
|
@@ -83,3 +97,25 @@
|
|
83
97
|
#
|
84
98
|
# See https://guides.rubyonrails.org/action_controller_overview.html#cookies for more information.
|
85
99
|
# Rails.application.config.action_dispatch.cookies_serializer = :hybrid
|
100
|
+
|
101
|
+
# Enable parameter wrapping for JSON.
|
102
|
+
# Previously this was set in an initializer. It's fine to keep using that initializer if you've customized it.
|
103
|
+
# To disable parameter wrapping entirely, set this config to `false`.
|
104
|
+
# Rails.application.config.action_controller.wrap_parameters_by_default = true
|
105
|
+
|
106
|
+
# Specifies whether generated namespaced UUIDs follow the RFC 4122 standard for namespace IDs provided as a
|
107
|
+
# `String` to `Digest::UUID.uuid_v3` or `Digest::UUID.uuid_v5` method calls.
|
108
|
+
#
|
109
|
+
# See https://guides.rubyonrails.org/configuring.html#config-active-support-use-rfc4122-namespaced-uuids for
|
110
|
+
# more information.
|
111
|
+
# Rails.application.config.active_support.use_rfc4122_namespaced_uuids = true
|
112
|
+
|
113
|
+
# Change the default headers to disable browsers' flawed legacy XSS protection.
|
114
|
+
# Rails.application.config.action_dispatch.default_headers = {
|
115
|
+
# "X-Frame-Options" => "SAMEORIGIN",
|
116
|
+
# "X-XSS-Protection" => "0",
|
117
|
+
# "X-Content-Type-Options" => "nosniff",
|
118
|
+
# "X-Download-Options" => "noopen",
|
119
|
+
# "X-Permitted-Cross-Domain-Policies" => "none",
|
120
|
+
# "Referrer-Policy" => "strict-origin-when-cross-origin"
|
121
|
+
# }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
|
-
#
|
2
|
+
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
3
3
|
|
4
|
-
#
|
4
|
+
# Defines the root path route ("/")
|
5
5
|
# root "articles#index"
|
6
6
|
end
|
@@ -316,7 +316,7 @@ module Rails
|
|
316
316
|
mute do
|
317
317
|
build(:generate_test_dummy)
|
318
318
|
build(:test_dummy_config)
|
319
|
-
build(:test_dummy_sprocket_assets) unless
|
319
|
+
build(:test_dummy_sprocket_assets) unless skip_sprockets?
|
320
320
|
build(:test_dummy_clean)
|
321
321
|
# ensure that bin/rails has proper dummy_path
|
322
322
|
build(:bin, true)
|
@@ -20,7 +20,9 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
|
21
21
|
spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
22
22
|
|
23
|
-
spec.files = Dir
|
23
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
24
|
+
Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
|
25
|
+
end
|
24
26
|
|
25
27
|
<%= "# " if options.dev? || options.edge? || options.main? -%>spec.add_dependency "rails", "<%= Array(rails_version_specifier).join('", "') %>"
|
26
28
|
end
|
@@ -24,7 +24,6 @@ require "action_controller/railtie"
|
|
24
24
|
<%= comment_if :skip_action_mailer %>require "action_mailer/railtie"
|
25
25
|
require "action_view/railtie"
|
26
26
|
<%= comment_if :skip_action_cable %>require "action_cable/engine"
|
27
|
-
<%= comment_if :skip_sprockets %>require "sprockets/railtie"
|
28
27
|
<%= comment_if :skip_test %>require "rails/test_unit/railtie"
|
29
28
|
<% end -%>
|
30
29
|
require "rails/engine/commands"
|
@@ -8,12 +8,12 @@ class <%= class_name.pluralize %>Test < ApplicationSystemTestCase
|
|
8
8
|
|
9
9
|
test "visiting the index" do
|
10
10
|
visit <%= plural_table_name %>_url
|
11
|
-
assert_selector "h1", text: "<%=
|
11
|
+
assert_selector "h1", text: "<%= human_name.pluralize %>"
|
12
12
|
end
|
13
13
|
|
14
|
-
test "should create <%= human_name %>" do
|
14
|
+
test "should create <%= human_name.downcase %>" do
|
15
15
|
visit <%= plural_table_name %>_url
|
16
|
-
click_on "New <%=
|
16
|
+
click_on "New <%= human_name.downcase %>"
|
17
17
|
|
18
18
|
<%- attributes_hash.each do |attr, value| -%>
|
19
19
|
<%- if boolean?(attr) -%>
|
@@ -29,8 +29,8 @@ class <%= class_name.pluralize %>Test < ApplicationSystemTestCase
|
|
29
29
|
end
|
30
30
|
|
31
31
|
test "should update <%= human_name %>" do
|
32
|
-
visit <%=
|
33
|
-
click_on "Edit", match: :first
|
32
|
+
visit <%= singular_table_name %>_url(@<%= singular_table_name %>)
|
33
|
+
click_on "Edit this <%= human_name.downcase %>", match: :first
|
34
34
|
|
35
35
|
<%- attributes_hash.each do |attr, value| -%>
|
36
36
|
<%- if boolean?(attr) -%>
|
@@ -46,10 +46,8 @@ class <%= class_name.pluralize %>Test < ApplicationSystemTestCase
|
|
46
46
|
end
|
47
47
|
|
48
48
|
test "should destroy <%= human_name %>" do
|
49
|
-
visit <%=
|
50
|
-
|
51
|
-
click_on "Destroy", match: :first
|
52
|
-
end
|
49
|
+
visit <%= singular_table_name %>_url(@<%= singular_table_name %>)
|
50
|
+
click_on "Destroy this <%= human_name.downcase %>", match: :first
|
53
51
|
|
54
52
|
assert_text "<%= human_name %> was successfully destroyed"
|
55
53
|
end
|
data/lib/rails/railtie.rb
CHANGED
@@ -146,7 +146,7 @@ module Rails
|
|
146
146
|
delegate :config, to: :instance
|
147
147
|
|
148
148
|
def subclasses
|
149
|
-
super.reject(&:abstract_railtie?)
|
149
|
+
super.reject(&:abstract_railtie?).sort
|
150
150
|
end
|
151
151
|
|
152
152
|
def rake_tasks(&blk)
|
@@ -191,6 +191,23 @@ module Rails
|
|
191
191
|
instance.configure(&block)
|
192
192
|
end
|
193
193
|
|
194
|
+
def <=>(other) # :nodoc:
|
195
|
+
load_index <=> other.load_index
|
196
|
+
end
|
197
|
+
|
198
|
+
def inherited(subclass)
|
199
|
+
subclass.increment_load_index
|
200
|
+
super
|
201
|
+
end
|
202
|
+
|
203
|
+
protected
|
204
|
+
attr_reader :load_index
|
205
|
+
|
206
|
+
def increment_load_index
|
207
|
+
@@load_counter ||= 0
|
208
|
+
@load_index = (@@load_counter += 1)
|
209
|
+
end
|
210
|
+
|
194
211
|
private
|
195
212
|
def generate_railtie_name(string)
|
196
213
|
ActiveSupport::Inflector.underscore(string).tr("/", "_")
|
data/lib/rails/tasks/yarn.rake
CHANGED
@@ -10,7 +10,7 @@ namespace :yarn do
|
|
10
10
|
end
|
11
11
|
|
12
12
|
yarn_flags =
|
13
|
-
if
|
13
|
+
if `yarn --version`.start_with?("1")
|
14
14
|
"--no-progress --frozen-lockfile"
|
15
15
|
else
|
16
16
|
"--immutable"
|
@@ -18,17 +18,12 @@ namespace :yarn do
|
|
18
18
|
|
19
19
|
system(
|
20
20
|
{ "NODE_ENV" => node_env },
|
21
|
-
"
|
21
|
+
"yarn install #{yarn_flags}",
|
22
22
|
exception: true
|
23
23
|
)
|
24
24
|
rescue Errno::ENOENT
|
25
|
-
$stderr.puts "
|
26
|
-
$stderr.puts "
|
25
|
+
$stderr.puts "yarn install failed to execute."
|
26
|
+
$stderr.puts "Ensure yarn is installed and `yarn --version` runs without errors."
|
27
27
|
exit 1
|
28
28
|
end
|
29
29
|
end
|
30
|
-
|
31
|
-
# Run Yarn prior to Sprockets assets precompilation, so dependencies are available for use.
|
32
|
-
if Rake::Task.task_defined?("assets:precompile") && File.exist?(Rails.root.join("bin", "yarn"))
|
33
|
-
Rake::Task["assets:precompile"].enhance [ "yarn:install" ]
|
34
|
-
end
|
@@ -124,7 +124,7 @@
|
|
124
124
|
</header>
|
125
125
|
|
126
126
|
<% if @part && @part.mime_type %>
|
127
|
-
<iframe
|
127
|
+
<iframe name="messageBody" src="?<%= part_query(@part.mime_type) %>"></iframe>
|
128
128
|
<% else %>
|
129
129
|
<p>
|
130
130
|
You are trying to preview an email that does not have any content.
|
@@ -43,10 +43,7 @@ module Rails
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def load_tests(argv)
|
46
|
-
|
47
|
-
|
48
|
-
tests = Rake::FileList[patterns.any? ? patterns : default_test_glob]
|
49
|
-
tests.exclude(default_test_exclude_glob) if patterns.empty?
|
46
|
+
tests = list_tests(argv)
|
50
47
|
tests.to_a.each { |path| require File.expand_path(path) }
|
51
48
|
end
|
52
49
|
|
@@ -94,6 +91,14 @@ module Rails
|
|
94
91
|
def path_argument?(arg)
|
95
92
|
%r"^[/\\]?\w+[/\\]".match?(arg)
|
96
93
|
end
|
94
|
+
|
95
|
+
def list_tests(argv)
|
96
|
+
patterns = extract_filters(argv)
|
97
|
+
|
98
|
+
tests = Rake::FileList[patterns.any? ? patterns : default_test_glob]
|
99
|
+
tests.exclude(default_test_exclude_glob) if patterns.empty?
|
100
|
+
tests
|
101
|
+
end
|
97
102
|
end
|
98
103
|
end
|
99
104
|
|
data/lib/rails.rb
CHANGED
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.0.
|
4
|
+
version: 7.0.0.rc3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 7.0.0.
|
19
|
+
version: 7.0.0.rc3
|
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.0.
|
26
|
+
version: 7.0.0.rc3
|
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.0.
|
33
|
+
version: 7.0.0.rc3
|
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.0.
|
40
|
+
version: 7.0.0.rc3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '12.2'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '12.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: thor
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,28 +86,28 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 2.5
|
89
|
+
version: '2.5'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 2.5
|
96
|
+
version: '2.5'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: actionview
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 7.0.0.
|
103
|
+
version: 7.0.0.rc3
|
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.0.
|
110
|
+
version: 7.0.0.rc3
|
111
111
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
112
112
|
email: david@loudthinking.com
|
113
113
|
executables:
|
@@ -250,15 +250,12 @@ files:
|
|
250
250
|
- lib/rails/generators/rails/app/templates/config/environments/production.rb.tt
|
251
251
|
- lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
|
252
252
|
- lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt
|
253
|
-
- lib/rails/generators/rails/app/templates/config/initializers/backtrace_silencers.rb.tt
|
254
253
|
- lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt
|
255
254
|
- lib/rails/generators/rails/app/templates/config/initializers/cors.rb.tt
|
256
255
|
- lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt
|
257
256
|
- lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt
|
258
|
-
- lib/rails/generators/rails/app/templates/config/initializers/mime_types.rb.tt
|
259
257
|
- lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_0.rb.tt
|
260
258
|
- lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt
|
261
|
-
- lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt
|
262
259
|
- lib/rails/generators/rails/app/templates/config/locales/en.yml
|
263
260
|
- lib/rails/generators/rails/app/templates/config/puma.rb.tt
|
264
261
|
- lib/rails/generators/rails/app/templates/config/routes.rb.tt
|
@@ -425,11 +422,12 @@ licenses:
|
|
425
422
|
- MIT
|
426
423
|
metadata:
|
427
424
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
428
|
-
changelog_uri: https://github.com/rails/rails/blob/v7.0.0.
|
429
|
-
documentation_uri: https://api.rubyonrails.org/v7.0.0.
|
425
|
+
changelog_uri: https://github.com/rails/rails/blob/v7.0.0.rc3/railties/CHANGELOG.md
|
426
|
+
documentation_uri: https://api.rubyonrails.org/v7.0.0.rc3/
|
430
427
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
431
|
-
source_code_uri: https://github.com/rails/rails/tree/v7.0.0.
|
432
|
-
|
428
|
+
source_code_uri: https://github.com/rails/rails/tree/v7.0.0.rc3/railties
|
429
|
+
rubygems_mfa_required: 'true'
|
430
|
+
post_install_message:
|
433
431
|
rdoc_options:
|
434
432
|
- "--exclude"
|
435
433
|
- "."
|
@@ -446,8 +444,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
446
444
|
- !ruby/object:Gem::Version
|
447
445
|
version: 1.3.1
|
448
446
|
requirements: []
|
449
|
-
rubygems_version: 3.
|
450
|
-
signing_key:
|
447
|
+
rubygems_version: 3.2.15
|
448
|
+
signing_key:
|
451
449
|
specification_version: 4
|
452
450
|
summary: Tools for creating, working with, and running Rails applications.
|
453
451
|
test_files: []
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
-
# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
|
7
|
-
# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
|
8
|
-
Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json]
|
9
|
-
end
|
10
|
-
<%- unless options.skip_active_record? -%>
|
11
|
-
|
12
|
-
# To enable root element in JSON for ActiveRecord objects.
|
13
|
-
# ActiveSupport.on_load(:active_record) do
|
14
|
-
# self.include_root_in_json = true
|
15
|
-
# end
|
16
|
-
<%- end -%>
|