railties 6.0.0.beta3 → 6.0.2.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +139 -8
  3. data/RDOC_MAIN.rdoc +3 -4
  4. data/README.rdoc +1 -1
  5. data/lib/rails/api/task.rb +1 -0
  6. data/lib/rails/application.rb +6 -3
  7. data/lib/rails/application/bootstrap.rb +2 -10
  8. data/lib/rails/application/configuration.rb +45 -1
  9. data/lib/rails/application/default_middleware_stack.rb +1 -0
  10. data/lib/rails/application/dummy_erb_compiler.rb +18 -0
  11. data/lib/rails/application/finisher.rb +44 -1
  12. data/lib/rails/autoloaders.rb +14 -2
  13. data/lib/rails/command/base.rb +4 -0
  14. data/lib/rails/command/environment_argument.rb +7 -4
  15. data/lib/rails/commands/console/console_command.rb +6 -0
  16. data/lib/rails/commands/credentials/USAGE +1 -1
  17. data/lib/rails/commands/credentials/credentials_command.rb +17 -3
  18. data/lib/rails/commands/dbconsole/dbconsole_command.rb +19 -7
  19. data/lib/rails/commands/dev/dev_command.rb +4 -2
  20. data/lib/rails/commands/encrypted/USAGE +28 -0
  21. data/lib/rails/commands/encrypted/encrypted_command.rb +1 -0
  22. data/lib/rails/commands/initializers/initializers_command.rb +7 -0
  23. data/lib/rails/commands/notes/notes_command.rb +1 -1
  24. data/lib/rails/commands/runner/runner_command.rb +7 -3
  25. data/lib/rails/commands/server/server_command.rb +8 -6
  26. data/lib/rails/engine.rb +35 -36
  27. data/lib/rails/engine/configuration.rb +3 -2
  28. data/lib/rails/gem_version.rb +2 -2
  29. data/lib/rails/generators.rb +2 -0
  30. data/lib/rails/generators/app_base.rb +5 -5
  31. data/lib/rails/generators/app_name.rb +2 -2
  32. data/lib/rails/generators/base.rb +4 -0
  33. data/lib/rails/generators/database.rb +1 -1
  34. data/lib/rails/generators/erb/scaffold/templates/_form.html.erb.tt +6 -3
  35. data/lib/rails/generators/erb/scaffold/templates/show.html.erb.tt +8 -0
  36. data/lib/rails/generators/generated_attribute.rb +36 -10
  37. data/lib/rails/generators/named_base.rb +1 -1
  38. data/lib/rails/generators/rails/app/app_generator.rb +1 -0
  39. data/lib/rails/generators/rails/app/templates/Gemfile.tt +4 -4
  40. data/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt +8 -0
  41. data/lib/rails/generators/rails/app/templates/bin/setup.tt +3 -2
  42. data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +1 -1
  43. data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +1 -1
  44. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +2 -0
  45. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +2 -0
  46. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +10 -4
  47. data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +3 -0
  48. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt +12 -0
  49. data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +3 -0
  50. data/lib/rails/generators/rails/app/templates/gitignore.tt +1 -0
  51. data/lib/rails/generators/rails/app/templates/package.json.tt +3 -3
  52. data/lib/rails/generators/rails/app/templates/public/robots.txt +1 -1
  53. data/lib/rails/generators/rails/app/templates/ruby-version.tt +1 -1
  54. data/lib/rails/generators/rails/assets/assets_generator.rb +7 -0
  55. data/lib/rails/generators/rails/db/system/change/change_generator.rb +12 -2
  56. data/lib/rails/generators/rails/plugin/plugin_generator.rb +0 -15
  57. data/lib/rails/generators/rails/plugin/templates/gitignore.tt +1 -0
  58. data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +14 -0
  59. data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +1 -1
  60. data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +1 -1
  61. data/lib/rails/generators/test_unit/model/templates/fixtures.yml.tt +2 -2
  62. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +7 -2
  63. data/lib/rails/info.rb +1 -1
  64. data/lib/rails/mailers_controller.rb +6 -3
  65. data/lib/rails/source_annotation_extractor.rb +19 -6
  66. data/lib/rails/tasks.rb +1 -0
  67. data/lib/rails/tasks/zeitwerk.rake +66 -0
  68. metadata +18 -13
  69. data/lib/rails/generators/rails/app/templates/bin/update.tt +0 -33
@@ -1,33 +0,0 @@
1
- require 'fileutils'
2
-
3
- # path to your application root.
4
- APP_ROOT = File.expand_path('..', __dir__)
5
-
6
- def system!(*args)
7
- system(*args) || abort("\n== Command #{args} failed ==")
8
- end
9
-
10
- FileUtils.chdir APP_ROOT do
11
- # This script is a way to update your development environment automatically.
12
- # Add necessary update steps to this file.
13
-
14
- puts '== Installing dependencies =='
15
- system! 'gem install bundler --conservative'
16
- system('bundle check') || system!('bundle install')
17
- <% unless options.skip_javascript? -%>
18
-
19
- # Install JavaScript dependencies
20
- # system('bin/yarn')
21
- <% end -%>
22
- <% unless options.skip_active_record? -%>
23
-
24
- puts "\n== Updating database =="
25
- system! 'rails db:migrate'
26
- <% end -%>
27
-
28
- puts "\n== Removing old logs and tempfiles =="
29
- system! 'rails log:clear tmp:clear'
30
-
31
- puts "\n== Restarting application server =="
32
- system! 'rails restart'
33
- end