railties 6.1.0.rc1 → 6.1.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2595ee6688e528cbbec1fda2c452ea6f01feb32cba77637b08c0a0e9d129417f
4
- data.tar.gz: 4627bd3fcaa42fd513f624c07f28114fb2e4a40afa1a88ed374399e2bb437816
3
+ metadata.gz: ac1f674c7449e11079fc024e3ad0615358ac700713d2e274c3fd2fb1ccb891d8
4
+ data.tar.gz: 1d8841ea97183fa77784e1a7ef3ffdec7796fa281de6878f4aa3995d3e86078c
5
5
  SHA512:
6
- metadata.gz: 140d528eec6c89426b4fad98ad9aafb14918d51965cba10101ad3915e691aaa1230495043abf6d151a74a6adbd2dcfc5bb9e4fab9b30e56f09c6eef67ddf331d
7
- data.tar.gz: e26621507b14abdbcbaff311c4126b171c856a350c63f3ac69f2816dc475adb69df79299146cae0339e7802e740fede090cc3914e4f52a2b0779e192e4dccd02
6
+ metadata.gz: af92feb6af3f6b35e4974f91dd1b869736a45ab74c8b6217ee8b43bd62443efe22769b800b5adcc7810b18fb82a17a98ec888010fb984ef557989d3249ae81a7
7
+ data.tar.gz: 3bc9759bea256a05a1a8d4160ded6fcaaf2657f880634de13863c6448f20d7d9bcdbb4970e9c0424b17add8823c91c216daaf2377a7b4f77c9078a25d2d51852
@@ -1,3 +1,8 @@
1
+ ## Rails 6.1.0.rc2 (December 01, 2020) ##
2
+
3
+ * No changes.
4
+
5
+
1
6
  ## Rails 6.1.0.rc1 (November 02, 2020) ##
2
7
 
3
8
  * Added `Railtie#server` hook called when Rails starts a server.
@@ -243,7 +243,7 @@ module Rails
243
243
 
244
244
  if yaml.exist?
245
245
  require "erb"
246
- all_configs = ActiveSupport::ConfigurationFile.parse(yaml, symbolize_names: true)
246
+ all_configs = ActiveSupport::ConfigurationFile.parse(yaml).deep_symbolize_keys
247
247
  config, shared = all_configs[env.to_sym], all_configs[:shared]
248
248
 
249
249
  if config.is_a?(Hash)
@@ -286,7 +286,7 @@ module Rails
286
286
  "action_dispatch.content_security_policy_report_only" => config.content_security_policy_report_only,
287
287
  "action_dispatch.content_security_policy_nonce_generator" => config.content_security_policy_nonce_generator,
288
288
  "action_dispatch.content_security_policy_nonce_directives" => config.content_security_policy_nonce_directives,
289
- "action_dispatch.feature_policy" => config.feature_policy,
289
+ "action_dispatch.permissions_policy" => config.permissions_policy,
290
290
  )
291
291
  end
292
292
  end
@@ -73,7 +73,7 @@ module Rails
73
73
  @autoloader = :classic
74
74
  @disable_sandbox = false
75
75
  @add_autoload_paths_to_load_path = true
76
- @feature_policy = nil
76
+ @permissions_policy = nil
77
77
  @rake_eager_load = false
78
78
  end
79
79
 
@@ -181,6 +181,10 @@ module Rails
181
181
  action_controller.urlsafe_csrf_tokens = true
182
182
  end
183
183
 
184
+ if respond_to?(:action_view)
185
+ action_view.form_with_generates_remote_forms = false
186
+ end
187
+
184
188
  ActiveSupport.utc_to_local_returns_utc_offset_times = true
185
189
  else
186
190
  raise "Unknown version #{target_version.to_s.inspect}"
@@ -325,11 +329,11 @@ module Rails
325
329
  end
326
330
  end
327
331
 
328
- def feature_policy(&block)
332
+ def permissions_policy(&block)
329
333
  if block_given?
330
- @feature_policy = ActionDispatch::FeaturePolicy.new(&block)
334
+ @permissions_policy = ActionDispatch::PermissionsPolicy.new(&block)
331
335
  else
332
- @feature_policy
336
+ @permissions_policy
333
337
  end
334
338
  end
335
339
 
@@ -69,7 +69,7 @@ module Rails
69
69
 
70
70
  unless config.api_only
71
71
  middleware.use ::ActionDispatch::ContentSecurityPolicy::Middleware
72
- middleware.use ::ActionDispatch::FeaturePolicy::Middleware
72
+ middleware.use ::ActionDispatch::PermissionsPolicy::Middleware
73
73
  end
74
74
 
75
75
  middleware.use ::Rack::Head
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "active_support/core_ext/string/filters"
4
+ require "active_support/deprecation"
4
5
  require "rails/command/environment_argument"
5
6
 
6
7
  module Rails
@@ -72,17 +73,17 @@ module Rails
72
73
  when "sqlserver"
73
74
  args = []
74
75
 
75
- args += ["-D", "#{db_config.database}"] if db_config.database
76
+ args += ["-d", "#{db_config.database}"] if db_config.database
76
77
  args += ["-U", "#{config[:username]}"] if config[:username]
77
78
  args += ["-P", "#{config[:password]}"] if config[:password]
78
79
 
79
80
  if config[:host]
80
- host_arg = +"#{config[:host]}"
81
- host_arg << ":#{config[:port]}" if config[:port]
81
+ host_arg = +"tcp:#{config[:host]}"
82
+ host_arg << ",#{config[:port]}" if config[:port]
82
83
  args += ["-S", host_arg]
83
84
  end
84
85
 
85
- find_cmd_and_exec("sqsh", *args)
86
+ find_cmd_and_exec("sqlcmd", *args)
86
87
 
87
88
  else
88
89
  abort "Unknown command-line client for #{db_config.database}."
@@ -10,7 +10,7 @@ module Rails
10
10
  MAJOR = 6
11
11
  MINOR = 1
12
12
  TINY = 0
13
- PRE = "rc1"
13
+ PRE = "rc2"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
@@ -111,11 +111,11 @@ module Rails
111
111
  # file in <tt>config/environments</tt>.
112
112
  #
113
113
  # environment do
114
- # "config.action_controller.asset_host = 'cdn.provider.com'"
114
+ # "config.asset_host = 'cdn.provider.com'"
115
115
  # end
116
116
  #
117
117
  # environment(nil, env: "development") do
118
- # "config.action_controller.asset_host = 'localhost:3000'"
118
+ # "config.asset_host = 'localhost:3000'"
119
119
  # end
120
120
  def environment(data = nil, options = {})
121
121
  sentinel = "class Application < Rails::Application\n"
@@ -330,11 +330,7 @@ module Rails
330
330
  def webpacker_gemfile_entry
331
331
  return [] if options[:skip_javascript]
332
332
 
333
- if options.dev? || options.edge? || options.master?
334
- GemfileEntry.github "webpacker", "rails/webpacker", nil, "Use development version of Webpacker"
335
- else
336
- GemfileEntry.version "webpacker", "~> 5.0", "Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker"
337
- end
333
+ GemfileEntry.version "webpacker", "~> 5.0", "Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker"
338
334
  end
339
335
 
340
336
  def jbuilder_gemfile_entry
@@ -1,4 +1,4 @@
1
- <%%= form_with(model: <%= model_resource_name %>, local: true) do |form| %>
1
+ <%%= form_with(model: <%= model_resource_name %>) do |form| %>
2
2
  <%% if <%= singular_table_name %>.errors.any? %>
3
3
  <div id="error_explanation">
4
4
  <h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>
@@ -138,7 +138,7 @@ module Rails
138
138
  rack_cors_config_exist = File.exist?("config/initializers/cors.rb")
139
139
  assets_config_exist = File.exist?("config/initializers/assets.rb")
140
140
  csp_config_exist = File.exist?("config/initializers/content_security_policy.rb")
141
- feature_policy_config_exist = File.exist?("config/initializers/feature_policy.rb")
141
+ permissions_policy_config_exist = File.exist?("config/initializers/permissions_policy.rb")
142
142
 
143
143
  @config_target_version = Rails.application.config.loaded_config_version || "5.0"
144
144
 
@@ -174,8 +174,8 @@ module Rails
174
174
  remove_file "config/initializers/content_security_policy.rb"
175
175
  end
176
176
 
177
- unless feature_policy_config_exist
178
- remove_file "config/initializers/feature_policy.rb"
177
+ unless permissions_policy_config_exist
178
+ remove_file "config/initializers/permissions_policy.rb"
179
179
  end
180
180
  end
181
181
  end
@@ -527,7 +527,7 @@ module Rails
527
527
  if options[:api]
528
528
  remove_file "config/initializers/cookies_serializer.rb"
529
529
  remove_file "config/initializers/content_security_policy.rb"
530
- remove_file "config/initializers/feature_policy.rb"
530
+ remove_file "config/initializers/permissions_policy.rb"
531
531
  end
532
532
  end
533
533
 
@@ -49,14 +49,14 @@ group :development do
49
49
  <%- if options.dev? || options.edge? || options.master? -%>
50
50
  gem 'web-console', github: 'rails/web-console'
51
51
  <%- else -%>
52
- gem 'web-console', '>= 4.0.3'
52
+ gem 'web-console', '>= 4.1.0'
53
53
  <%- end -%>
54
54
  # Display performance information such as SQL time and flame graphs for each request in your browser.
55
55
  # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
56
56
  gem 'rack-mini-profiler', '~> 2.0'
57
57
  <%- end -%>
58
58
  <% if depend_on_listen? -%>
59
- gem 'listen', '~> 3.2'
59
+ gem 'listen', '~> 3.3'
60
60
  <% end -%>
61
61
  <% if spring_install? -%>
62
62
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
@@ -21,10 +21,3 @@ Turbolinks.start()
21
21
  <%- unless skip_active_storage? -%>
22
22
  ActiveStorage.start()
23
23
  <%- end -%>
24
-
25
- // Uncomment to copy all static images under ../images to the output folder and reference
26
- // them with the image_pack_tag helper in views (e.g <%%= image_pack_tag 'rails.png' %>)
27
- // or the `imagePath` JavaScript helper below.
28
- //
29
- // const images = require.context('../images', true)
30
- // const imagePath = (name) => images(name, true)
@@ -1,6 +1,14 @@
1
+ require 'pathname'
2
+
1
3
  APP_ROOT = File.expand_path('..', __dir__)
2
4
  Dir.chdir(APP_ROOT) do
3
- exec "yarn", *ARGV
5
+ executable_path = ENV["PATH"].split(File::PATH_SEPARATOR).find do |path|
6
+ normalized_path = File.expand_path(path)
7
+
8
+ normalized_path != __dir__ && File.executable?(Pathname.new(normalized_path).join('yarn'))
9
+ end
10
+
11
+ exec File.expand_path(Pathname.new(executable_path).join('yarn')), *ARGV
4
12
  rescue Errno::ENOENT
5
13
  $stderr.puts "Yarn executable was not detected in the system."
6
14
  $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
@@ -32,10 +32,13 @@ module <%= app_const_base %>
32
32
  config.load_defaults Rails::VERSION::STRING.to_f
33
33
  <%- end -%>
34
34
 
35
- # Settings in config/environments/* take precedence over those specified here.
36
- # Application configuration can go into files in config/initializers
37
- # -- all .rb files in that directory are automatically loaded after loading
38
- # the framework and any gems in your application.
35
+ # Configuration for the application, engines, and railties goes here.
36
+ #
37
+ # These settings can be overridden in specific environments using the files
38
+ # in config/environments, which are processed later.
39
+ #
40
+ # config.time_zone = "Central Time (US & Canada)"
41
+ # config.eager_load_paths << Rails.root.join("extras")
39
42
  <%- if options.api? -%>
40
43
 
41
44
  # Only loads a smaller set of middleware suitable for API only apps.
@@ -35,7 +35,7 @@ Rails.application.configure do
35
35
 
36
36
  <%- end -%>
37
37
  # Enable serving of images, stylesheets, and JavaScripts from an asset server.
38
- # config.action_controller.asset_host = 'http://assets.example.com'
38
+ # config.asset_host = 'http://assets.example.com'
39
39
 
40
40
  # Specifies the header that your server uses for sending files.
41
41
  # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
@@ -43,3 +43,6 @@
43
43
  # effect. For applications using multiple databases, this new API provides
44
44
  # support for granular connection swapping.
45
45
  # Rails.application.config.active_record.legacy_connection_handling = false
46
+
47
+ # Make `form_with` generate non-remote forms by default.
48
+ # Rails.application.config.action_view.form_with_generates_remote_forms = false
@@ -1,7 +1,7 @@
1
- # Define an application-wide HTTP feature policy. For further
1
+ # Define an application-wide HTTP permissions policy. For further
2
2
  # information see https://developers.google.com/web/updates/2018/06/feature-policy
3
3
  #
4
- # Rails.application.config.feature_policy do |f|
4
+ # Rails.application.config.permissions_policy do |f|
5
5
  # f.camera :none
6
6
  # f.gyroscope :none
7
7
  # f.microphone :none
@@ -8,6 +8,11 @@ max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
8
8
  min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
9
9
  threads min_threads_count, max_threads_count
10
10
 
11
+ # Specifies the `worker_timeout` threshold that Puma will use to wait before
12
+ # terminating a worker in development environments.
13
+ #
14
+ worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
15
+
11
16
  # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
12
17
  #
13
18
  port ENV.fetch("PORT") { 3000 }
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: 6.1.0.rc1
4
+ version: 6.1.0.rc2
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: 2020-11-02 00:00:00.000000000 Z
11
+ date: 2020-12-01 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: 6.1.0.rc1
19
+ version: 6.1.0.rc2
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: 6.1.0.rc1
26
+ version: 6.1.0.rc2
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: 6.1.0.rc1
33
+ version: 6.1.0.rc2
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: 6.1.0.rc1
40
+ version: 6.1.0.rc2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: 6.1.0.rc1
89
+ version: 6.1.0.rc2
90
90
  type: :development
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: 6.1.0.rc1
96
+ version: 6.1.0.rc2
97
97
  description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
98
98
  email: david@loudthinking.com
99
99
  executables:
@@ -248,11 +248,11 @@ files:
248
248
  - lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt
249
249
  - lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb.tt
250
250
  - lib/rails/generators/rails/app/templates/config/initializers/cors.rb.tt
251
- - lib/rails/generators/rails/app/templates/config/initializers/feature_policy.rb.tt
252
251
  - lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt
253
252
  - lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt
254
253
  - lib/rails/generators/rails/app/templates/config/initializers/mime_types.rb.tt
255
254
  - lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_1.rb.tt
255
+ - lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt
256
256
  - lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt
257
257
  - lib/rails/generators/rails/app/templates/config/locales/en.yml
258
258
  - lib/rails/generators/rails/app/templates/config/puma.rb.tt
@@ -426,10 +426,10 @@ licenses:
426
426
  - MIT
427
427
  metadata:
428
428
  bug_tracker_uri: https://github.com/rails/rails/issues
429
- changelog_uri: https://github.com/rails/rails/blob/v6.1.0.rc1/railties/CHANGELOG.md
430
- documentation_uri: https://api.rubyonrails.org/v6.1.0.rc1/
429
+ changelog_uri: https://github.com/rails/rails/blob/v6.1.0.rc2/railties/CHANGELOG.md
430
+ documentation_uri: https://api.rubyonrails.org/v6.1.0.rc2/
431
431
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
432
- source_code_uri: https://github.com/rails/rails/tree/v6.1.0.rc1/railties
432
+ source_code_uri: https://github.com/rails/rails/tree/v6.1.0.rc2/railties
433
433
  post_install_message:
434
434
  rdoc_options:
435
435
  - "--exclude"