railties 6.1.4.1 → 7.0.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +94 -361
  3. data/MIT-LICENSE +1 -1
  4. data/RDOC_MAIN.rdoc +16 -16
  5. data/README.rdoc +0 -1
  6. data/lib/rails/app_updater.rb +2 -4
  7. data/lib/rails/application/bootstrap.rb +17 -5
  8. data/lib/rails/application/configuration.rb +51 -26
  9. data/lib/rails/application/default_middleware_stack.rb +6 -3
  10. data/lib/rails/application/finisher.rb +43 -85
  11. data/lib/rails/application/routes_reloader.rb +8 -0
  12. data/lib/rails/application.rb +24 -50
  13. data/lib/rails/application_controller.rb +2 -2
  14. data/lib/rails/autoloaders/inflector.rb +21 -0
  15. data/lib/rails/autoloaders.rb +12 -16
  16. data/lib/rails/code_statistics.rb +2 -2
  17. data/lib/rails/code_statistics_calculator.rb +10 -1
  18. data/lib/rails/command/base.rb +26 -12
  19. data/lib/rails/command/behavior.rb +1 -1
  20. data/lib/rails/command/environment_argument.rb +1 -1
  21. data/lib/rails/command.rb +8 -5
  22. data/lib/rails/commands/credentials/USAGE +4 -2
  23. data/lib/rails/commands/credentials/credentials_command/diffing.rb +26 -16
  24. data/lib/rails/commands/credentials/credentials_command.rb +8 -3
  25. data/lib/rails/commands/dbconsole/dbconsole_command.rb +10 -6
  26. data/lib/rails/commands/help/USAGE +3 -2
  27. data/lib/rails/commands/runner/runner_command.rb +3 -2
  28. data/lib/rails/commands/server/server_command.rb +2 -5
  29. data/lib/rails/configuration.rb +18 -23
  30. data/lib/rails/engine/configuration.rb +2 -2
  31. data/lib/rails/engine.rb +23 -27
  32. data/lib/rails/gem_version.rb +4 -4
  33. data/lib/rails/generators/actions/create_migration.rb +2 -4
  34. data/lib/rails/generators/actions.rb +35 -13
  35. data/lib/rails/generators/app_base.rb +66 -102
  36. data/lib/rails/generators/app_name.rb +1 -1
  37. data/lib/rails/generators/base.rb +9 -13
  38. data/lib/rails/generators/erb/scaffold/scaffold_generator.rb +2 -0
  39. data/lib/rails/generators/erb/scaffold/templates/edit.html.erb.tt +8 -4
  40. data/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt +5 -27
  41. data/lib/rails/generators/erb/scaffold/templates/new.html.erb.tt +7 -3
  42. data/lib/rails/generators/erb/scaffold/templates/partial.html.erb.tt +20 -0
  43. data/lib/rails/generators/erb/scaffold/templates/show.html.erb.tt +7 -16
  44. data/lib/rails/generators/erb.rb +1 -1
  45. data/lib/rails/generators/generated_attribute.rb +40 -4
  46. data/lib/rails/generators/migration.rb +2 -6
  47. data/lib/rails/generators/model_helpers.rb +1 -1
  48. data/lib/rails/generators/named_base.rb +1 -1
  49. data/lib/rails/generators/rails/app/app_generator.rb +44 -88
  50. data/lib/rails/generators/rails/app/templates/Gemfile.tt +41 -52
  51. data/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css.tt +2 -2
  52. data/lib/rails/generators/rails/app/templates/app/mailers/application_mailer.rb.tt +2 -2
  53. data/lib/rails/generators/rails/app/templates/app/models/application_record.rb.tt +1 -1
  54. data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +3 -10
  55. data/lib/rails/generators/rails/app/templates/bin/rails.tt +1 -4
  56. data/lib/rails/generators/rails/app/templates/bin/rake.tt +0 -3
  57. data/lib/rails/generators/rails/app/templates/bin/setup.tt +9 -14
  58. data/lib/rails/generators/rails/app/templates/config/boot.rb.tt +1 -1
  59. data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt +2 -2
  60. data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml.tt +3 -3
  61. data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml.tt +3 -3
  62. data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +2 -2
  63. data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +3 -3
  64. data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml.tt +2 -2
  65. data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +3 -3
  66. data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +1 -1
  67. data/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml.tt +5 -5
  68. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +2 -11
  69. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +9 -15
  70. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +2 -7
  71. data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +1 -5
  72. data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +0 -5
  73. data/lib/rails/generators/rails/app/templates/config/initializers/cors.rb.tt +2 -2
  74. data/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt +4 -4
  75. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_0.rb.tt +85 -0
  76. data/lib/rails/generators/rails/app/templates/config/locales/en.yml +3 -3
  77. data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +1 -1
  78. data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +3 -0
  79. data/lib/rails/generators/rails/app/templates/config/storage.yml.tt +5 -5
  80. data/lib/rails/generators/rails/app/templates/db/seeds.rb.tt +2 -2
  81. data/lib/rails/generators/rails/app/templates/gitattributes.tt +0 -5
  82. data/lib/rails/generators/rails/app/templates/gitignore.tt +0 -1
  83. data/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt +1 -1
  84. data/lib/rails/generators/rails/controller/controller_generator.rb +1 -2
  85. data/lib/rails/generators/rails/controller/templates/controller.rb.tt +0 -4
  86. data/lib/rails/generators/rails/db/system/change/change_generator.rb +1 -1
  87. data/lib/rails/generators/rails/generator/templates/%file_name%_generator.rb.tt +1 -1
  88. data/lib/rails/generators/rails/plugin/plugin_generator.rb +40 -15
  89. data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +4 -2
  90. data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +9 -9
  91. data/lib/rails/generators/rails/plugin/templates/README.md.tt +1 -1
  92. data/lib/rails/generators/rails/plugin/templates/app/mailers/%namespaced_name%/application_mailer.rb.tt +2 -2
  93. data/lib/rails/generators/rails/plugin/templates/app/models/%namespaced_name%/application_record.rb.tt +1 -1
  94. data/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt +0 -3
  95. data/lib/rails/generators/rails/plugin/templates/bin/rails.tt +4 -4
  96. data/lib/rails/generators/rails/plugin/templates/gitignore.tt +0 -5
  97. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/engine.rb.tt +2 -2
  98. data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/version.rb.tt +1 -1
  99. data/lib/rails/generators/rails/plugin/templates/rails/boot.rb.tt +2 -2
  100. data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb.tt +3 -3
  101. data/lib/rails/generators/rails/scaffold/scaffold_generator.rb +0 -19
  102. data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +1 -5
  103. data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +6 -10
  104. data/lib/rails/generators/resource_helpers.rb +2 -2
  105. data/lib/rails/generators/test_unit/generator/templates/generator_test.rb.tt +1 -1
  106. data/lib/rails/generators/test_unit/model/templates/fixtures.yml.tt +2 -2
  107. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +3 -3
  108. data/lib/rails/generators/test_unit/scaffold/templates/api_functional_test.rb.tt +5 -5
  109. data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb.tt +2 -2
  110. data/lib/rails/generators/test_unit/scaffold/templates/system_test.rb.tt +3 -3
  111. data/lib/rails/generators/testing/behaviour.rb +1 -2
  112. data/lib/rails/generators.rb +9 -22
  113. data/lib/rails/info.rb +1 -1
  114. data/lib/rails/info_controller.rb +1 -3
  115. data/lib/rails/initializable.rb +1 -1
  116. data/lib/rails/mailers_controller.rb +2 -4
  117. data/lib/rails/rack/logger.rb +0 -1
  118. data/lib/rails/railtie/configuration.rb +1 -2
  119. data/lib/rails/railtie.rb +9 -9
  120. data/lib/rails/ruby_version_check.rb +3 -3
  121. data/lib/rails/secrets.rb +4 -1
  122. data/lib/rails/tasks/framework.rake +2 -8
  123. data/lib/rails/tasks/statistics.rake +3 -1
  124. data/lib/rails/tasks/tmp.rake +8 -1
  125. data/lib/rails/tasks/yarn.rake +5 -1
  126. data/lib/rails/tasks/zeitwerk.rake +2 -10
  127. data/lib/rails/templates/layouts/application.html.erb +15 -0
  128. data/lib/rails/templates/rails/mailers/email.html.erb +12 -10
  129. data/lib/rails/templates/rails/welcome/index.html.erb +3 -0
  130. data/lib/rails/test_unit/railtie.rb +0 -4
  131. data/lib/rails/test_unit/runner.rb +7 -5
  132. data/lib/rails/test_unit/testing.rake +4 -9
  133. data/lib/rails.rb +1 -0
  134. metadata +35 -36
  135. data/lib/rails/command/spellchecker.rb +0 -57
  136. data/lib/rails/generators/css/assets/assets_generator.rb +0 -15
  137. data/lib/rails/generators/css/assets/templates/stylesheet.css +0 -4
  138. data/lib/rails/generators/css/scaffold/scaffold_generator.rb +0 -18
  139. data/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js +0 -6
  140. data/lib/rails/generators/rails/app/templates/app/javascript/channels/index.js +0 -5
  141. data/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt +0 -23
  142. data/lib/rails/generators/rails/app/templates/bin/spring.tt +0 -13
  143. data/lib/rails/generators/rails/app/templates/bin/yarn.tt +0 -16
  144. data/lib/rails/generators/rails/app/templates/config/initializers/application_controller_renderer.rb.tt +0 -8
  145. data/lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb.tt +0 -5
  146. data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_1.rb.tt +0 -67
  147. data/lib/rails/generators/rails/app/templates/config/spring.rb.tt +0 -6
  148. data/lib/rails/generators/rails/app/templates/package.json.tt +0 -11
  149. data/lib/rails/generators/rails/assets/USAGE +0 -16
  150. data/lib/rails/generators/rails/assets/assets_generator.rb +0 -26
  151. data/lib/rails/generators/rails/assets/templates/stylesheet.css +0 -4
  152. data/lib/rails/generators/rails/scaffold/templates/scaffold.css +0 -80
@@ -1,78 +1,67 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
3
 
4
- ruby <%= "'#{RUBY_VERSION}'" -%>
5
-
6
- <% unless gemfile_entries.first&.comment -%>
7
-
8
- <% end -%>
4
+ ruby <%= "\"#{RUBY_VERSION}\"" -%>
9
5
  <% gemfile_entries.each do |gem| -%>
10
- <% if gem.comment -%>
6
+ <% if gem.comment %>
11
7
 
12
8
  # <%= gem.comment %>
13
9
  <% end -%>
14
- <%= gem.commented_out ? '# ' : '' %>gem '<%= gem.name %>'<%= %(, '#{gem.version}') if gem.version -%>
15
- <% if gem.options.any? -%>
16
- , <%= gem.options.map { |k,v|
17
- "#{k}: #{v.inspect.gsub('"', '\'')}" }.join(', ') %>
18
- <% end -%>
19
- <% end -%>
20
-
21
- # Use Active Model has_secure_password
22
- # gem 'bcrypt', '~> 3.1.7'
23
- <% unless skip_active_storage? -%>
10
+ <%= gem.commented_out ? "# " : "" %>gem "<%= gem.name %>"<%= %(, "#{gem.version}") if gem.version -%>
11
+ <% if gem.options.any? -%>, <%= gem.options.map { |k,v| "#{k}: #{v.inspect}" }.join(", ") %><% end -%>
12
+ <% end %>
24
13
 
25
- # Use Active Storage variant
26
- # gem 'image_processing', '~> 1.2'
27
- <% end -%>
14
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
15
+ gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
28
16
 
29
17
  <% if depend_on_bootsnap? -%>
30
18
  # Reduces boot times through caching; required in config/boot.rb
31
- gem 'bootsnap', '>= 1.4.4', require: false
19
+ gem "bootsnap", ">= 1.4.4", require: false
32
20
 
33
21
  <%- end -%>
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? -%>
25
+
26
+ # Use Sass to process CSS
27
+ # gem "sassc-rails", "~> 2.1"
28
+ <% end -%>
29
+ <% unless skip_active_storage? -%>
30
+
31
+ # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
32
+ # gem "image_processing", "~> 1.2"
33
+ <% end -%>
34
34
  <%- if options.api? -%>
35
- # Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
36
- # gem 'rack-cors'
37
35
 
36
+ # Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
37
+ # gem "rack-cors"
38
38
  <%- end -%>
39
- <% if RUBY_ENGINE == 'ruby' -%>
39
+ <% if RUBY_ENGINE == "ruby" -%>
40
+
40
41
  group :development, :test do
41
- # Call 'byebug' anywhere in the code to stop execution and get a debugger console
42
- gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
42
+ # Start debugger with binding.b [https://github.com/ruby/debug]
43
+ gem "debug", ">= 1.0.0", platforms: %i[ mri mingw x64_mingw ]
43
44
  end
44
-
45
45
  <% end -%>
46
+
46
47
  group :development do
47
48
  <%- unless options.api? || options.skip_dev_gems? -%>
48
- # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
49
- <%- if options.dev? || options.edge? || options.master? -%>
50
- gem 'web-console', github: 'rails/web-console'
51
- <%- else -%>
52
- gem 'web-console', '>= 4.1.0'
53
- <%- end -%>
54
- # Display performance information such as SQL time and flame graphs for each request in your browser.
55
- # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
56
- gem 'rack-mini-profiler', '~> 2.0'
49
+ # Use console on exceptions pages [https://github.com/rails/web-console]
50
+ gem "web-console", ">= 4.1.0"
51
+
52
+ # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
53
+ # gem "rack-mini-profiler", ">= 2.3.3"
54
+
57
55
  <%- end -%>
58
- <% if depend_on_listen? -%>
59
- gem 'listen', '~> 3.3'
60
- <% end -%>
61
- <% if spring_install? -%>
62
- # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
63
- gem 'spring'
64
- <% end -%>
56
+ # Speed up commands on slow machines / big apps [https://github.com/rails/spring]
57
+ # gem "spring"
65
58
  end
66
59
 
67
60
  <%- if depends_on_system_test? -%>
68
61
  group :test do
69
- # Adds support for Capybara system testing and selenium driver
70
- gem 'capybara', '>= 3.26'
71
- gem 'selenium-webdriver'
72
- # Easy installation and use of web drivers to run system tests with browsers
73
- gem 'webdrivers'
62
+ # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
63
+ gem "capybara", ">= 3.26"
64
+ gem "selenium-webdriver"
65
+ gem "webdrivers"
74
66
  end
75
-
76
- <%- end -%>
77
- # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
78
- gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
67
+ <%- end -%>
@@ -2,11 +2,11 @@
2
2
  * This is a manifest file that'll be compiled into application.css, which will include all the files
3
3
  * listed below.
4
4
  *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
5
+ * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
6
6
  * vendor/assets/stylesheets directory can be referenced here using a relative path.
7
7
  *
8
8
  * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS
10
10
  * files in this directory. Styles in this file should be added after the last require_* statement.
11
11
  * It is generally better to create a new file per style scope.
12
12
  *
@@ -1,4 +1,4 @@
1
1
  class ApplicationMailer < ActionMailer::Base
2
- default from: 'from@example.com'
3
- layout 'mailer'
2
+ default from: "from@example.com"
3
+ layout "mailer"
4
4
  end
@@ -1,3 +1,3 @@
1
1
  class ApplicationRecord < ActiveRecord::Base
2
- self.abstract_class = true
2
+ primary_abstract_class
3
3
  end
@@ -2,20 +2,13 @@
2
2
  <html>
3
3
  <head>
4
4
  <title><%= camelized %></title>
5
- <meta name="viewport" content="width=device-width,initial-scale=1">
6
5
  <%%= csrf_meta_tags %>
7
6
  <%%= csp_meta_tag %>
8
7
 
9
- <%- if options[:skip_javascript] -%>
10
- <%%= stylesheet_link_tag 'application', media: 'all' %>
8
+ <%- if options[:skip_hotwire] || options[:skip_javascript] -%>
9
+ <%%= stylesheet_link_tag "application" %>
11
10
  <%- else -%>
12
- <%- unless options[:skip_turbolinks] -%>
13
- <%%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
14
- <%%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
15
- <%- else -%>
16
- <%%= stylesheet_link_tag 'application', media: 'all' %>
17
- <%%= javascript_pack_tag 'application' %>
18
- <%- end -%>
11
+ <%%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
19
12
  <%- end -%>
20
13
  </head>
21
14
 
@@ -1,6 +1,3 @@
1
- <% if spring_install? -%>
2
- load File.expand_path("spring", __dir__)
3
- <% end -%>
4
- APP_PATH = File.expand_path('../config/application', __dir__)
1
+ APP_PATH = File.expand_path("../config/application", __dir__)
5
2
  require_relative "../config/boot"
6
3
  require "rails/commands"
@@ -1,6 +1,3 @@
1
- <% if spring_install? -%>
2
- load File.expand_path("spring", __dir__)
3
- <% end -%>
4
1
  require_relative "../config/boot"
5
2
  require "rake"
6
3
  Rake.application.run
@@ -1,7 +1,7 @@
1
1
  require "fileutils"
2
2
 
3
3
  # path to your application root.
4
- APP_ROOT = File.expand_path('..', __dir__)
4
+ APP_ROOT = File.expand_path("..", __dir__)
5
5
 
6
6
  def system!(*args)
7
7
  system(*args) || abort("\n== Command #{args} failed ==")
@@ -12,28 +12,23 @@ FileUtils.chdir APP_ROOT do
12
12
  # This script is idempotent, so that you can run it at any time and get an expectable outcome.
13
13
  # Add necessary setup steps to this file.
14
14
 
15
- puts '== Installing dependencies =='
16
- system! 'gem install bundler --conservative'
17
- system('bundle check') || system!('bundle install')
18
- <% unless options.skip_javascript? -%>
19
-
20
- # Install JavaScript dependencies
21
- system! 'bin/yarn'
22
- <% end -%>
15
+ puts "== Installing dependencies =="
16
+ system! "gem install bundler --conservative"
17
+ system("bundle check") || system!("bundle install")
23
18
  <% unless options.skip_active_record? -%>
24
19
 
25
20
  # puts "\n== Copying sample files =="
26
- # unless File.exist?('config/database.yml')
27
- # FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
21
+ # unless File.exist?("config/database.yml")
22
+ # FileUtils.cp "config/database.yml.sample", "config/database.yml"
28
23
  # end
29
24
 
30
25
  puts "\n== Preparing database =="
31
- system! 'bin/rails db:prepare'
26
+ system! "bin/rails db:prepare"
32
27
  <% end -%>
33
28
 
34
29
  puts "\n== Removing old logs and tempfiles =="
35
- system! 'bin/rails log:clear tmp:clear'
30
+ system! "bin/rails log:clear tmp:clear"
36
31
 
37
32
  puts "\n== Restarting application server =="
38
- system! 'bin/rails restart'
33
+ system! "bin/rails restart"
39
34
  end
@@ -1,4 +1,4 @@
1
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
1
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
2
2
 
3
3
  require "bundler/setup" # Set up gems listed in the Gemfile.
4
4
  <% if depend_on_bootsnap? -%>
@@ -3,7 +3,7 @@
3
3
  # gem install activerecord-jdbcmssql-adapter
4
4
  #
5
5
  # Configure using Gemfile:
6
- # gem 'activerecord-jdbcmssql-adapter'
6
+ # gem "activerecord-jdbcmssql-adapter"
7
7
  #
8
8
  # development:
9
9
  # adapter: mssql
@@ -65,4 +65,4 @@ test:
65
65
  production:
66
66
  url: jdbc:db://localhost/<%= app_name %>_production
67
67
  username: <%= app_name %>
68
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
68
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -4,7 +4,7 @@
4
4
  # gem install activerecord-jdbcmysql-adapter
5
5
  #
6
6
  # Configure Using Gemfile
7
- # gem 'activerecord-jdbcmysql-adapter'
7
+ # gem "activerecord-jdbcmysql-adapter"
8
8
  #
9
9
  # And be sure to use new-style password hashing:
10
10
  # https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
@@ -42,7 +42,7 @@ test:
42
42
  # URL environment variable explicitly:
43
43
  #
44
44
  # production:
45
- # url: <%%= ENV['MY_APP_DATABASE_URL'] %>
45
+ # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
46
46
  #
47
47
  # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
48
48
  # for a full overview on how database connection configuration can be specified.
@@ -51,4 +51,4 @@ production:
51
51
  <<: *default
52
52
  database: <%= app_name %>_production
53
53
  username: <%= app_name %>
54
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
54
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -1,7 +1,7 @@
1
1
  # PostgreSQL. Versions 9.3 and up are supported.
2
2
  #
3
3
  # Configure Using Gemfile
4
- # gem 'activerecord-jdbcpostgresql-adapter'
4
+ # gem "activerecord-jdbcpostgresql-adapter"
5
5
  #
6
6
  default: &default
7
7
  adapter: postgresql
@@ -58,7 +58,7 @@ test:
58
58
  # URL environment variable explicitly:
59
59
  #
60
60
  # production:
61
- # url: <%%= ENV['MY_APP_DATABASE_URL'] %>
61
+ # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
62
62
  #
63
63
  # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
64
64
  # for a full overview on how database connection configuration can be specified.
@@ -67,4 +67,4 @@ production:
67
67
  <<: *default
68
68
  database: <%= app_name %>_production
69
69
  username: <%= app_name %>
70
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
70
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -1,8 +1,8 @@
1
1
  # SQLite. Versions 3.8.0 and up are supported.
2
- # gem 'activerecord-jdbcsqlite3-adapter'
2
+ # gem "activerecord-jdbcsqlite3-adapter"
3
3
  #
4
4
  # Configure Using Gemfile
5
- # gem 'activerecord-jdbcsqlite3-adapter'
5
+ # gem "activerecord-jdbcsqlite3-adapter"
6
6
  #
7
7
  default: &default
8
8
  adapter: sqlite3
@@ -4,7 +4,7 @@
4
4
  # gem install mysql2
5
5
  #
6
6
  # Ensure the MySQL gem is defined in your Gemfile
7
- # gem 'mysql2'
7
+ # gem "mysql2"
8
8
  #
9
9
  # And be sure to use new-style password hashing:
10
10
  # https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html
@@ -47,7 +47,7 @@ test:
47
47
  # URL environment variable explicitly:
48
48
  #
49
49
  # production:
50
- # url: <%%= ENV['MY_APP_DATABASE_URL'] %>
50
+ # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
51
51
  #
52
52
  # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
53
53
  # for a full overview on how database connection configuration can be specified.
@@ -56,4 +56,4 @@ production:
56
56
  <<: *default
57
57
  database: <%= app_name %>_production
58
58
  username: <%= app_name %>
59
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
59
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -50,7 +50,7 @@ test:
50
50
  # URL environment variable explicitly:
51
51
  #
52
52
  # production:
53
- # url: <%%= ENV['MY_APP_DATABASE_URL'] %>
53
+ # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
54
54
  #
55
55
  # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
56
56
  # for a full overview on how database connection configuration can be specified.
@@ -59,4 +59,4 @@ production:
59
59
  <<: *default
60
60
  database: <%= app_name %>_production
61
61
  username: <%= app_name %>
62
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
62
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -12,7 +12,7 @@
12
12
  # Install PostgreSQL and put its /bin directory on your path.
13
13
  #
14
14
  # Configure Using Gemfile
15
- # gem 'pg'
15
+ # gem "pg"
16
16
  #
17
17
  default: &default
18
18
  adapter: postgresql
@@ -74,7 +74,7 @@ test:
74
74
  # URL environment variable explicitly:
75
75
  #
76
76
  # production:
77
- # url: <%%= ENV['MY_APP_DATABASE_URL'] %>
77
+ # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
78
78
  #
79
79
  # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
80
80
  # for a full overview on how database connection configuration can be specified.
@@ -83,4 +83,4 @@ production:
83
83
  <<: *default
84
84
  database: <%= app_name %>_production
85
85
  username: <%= app_name %>
86
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
86
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -2,7 +2,7 @@
2
2
  # gem install sqlite3
3
3
  #
4
4
  # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
5
+ # gem "sqlite3"
6
6
  #
7
7
  default: &default
8
8
  adapter: sqlite3
@@ -5,14 +5,14 @@
5
5
  # gem install activerecord-sqlserver-adapter
6
6
  #
7
7
  # Ensure the activerecord adapter and db driver gems are defined in your Gemfile
8
- # gem 'tiny_tds'
9
- # gem 'activerecord-sqlserver-adapter'
8
+ # gem "tiny_tds"
9
+ # gem "activerecord-sqlserver-adapter"
10
10
  #
11
11
  default: &default
12
12
  adapter: sqlserver
13
13
  encoding: utf8
14
14
  username: sa
15
- password: <%%= ENV['SA_PASSWORD'] %>
15
+ password: <%%= ENV["SA_PASSWORD"] %>
16
16
  host: localhost
17
17
 
18
18
  development:
@@ -41,7 +41,7 @@ test:
41
41
  # URL environment variable explicitly:
42
42
  #
43
43
  # production:
44
- # url: <%%= ENV['MY_APP_DATABASE_URL'] %>
44
+ # url: <%%= ENV["MY_APP_DATABASE_URL"] %>
45
45
  #
46
46
  # Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
47
47
  # for a full overview on how database connection configuration can be specified.
@@ -50,4 +50,4 @@ production:
50
50
  <<: *default
51
51
  database: <%= app_name %>_production
52
52
  username: <%= app_name %>
53
- password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
53
+ password: <%%= ENV["<%= app_name.upcase %>_DATABASE_PASSWORD"] %>
@@ -16,7 +16,7 @@ Rails.application.configure do
16
16
 
17
17
  # Enable/disable caching. By default caching is disabled.
18
18
  # Run rails dev:cache to toggle caching.
19
- if Rails.root.join('tmp', 'caching-dev.txt').exist?
19
+ if Rails.root.join("tmp/caching-dev.txt").exist?
20
20
  <%- unless options.api? -%>
21
21
  config.action_controller.perform_caching = true
22
22
  config.action_controller.enable_fragment_cache_logging = true
@@ -24,7 +24,7 @@ Rails.application.configure do
24
24
  <%- end -%>
25
25
  config.cache_store = :memory_store
26
26
  config.public_file_server.headers = {
27
- 'Cache-Control' => "public, max-age=#{2.days.to_i}"
27
+ "Cache-Control" => "public, max-age=#{2.days.to_i}"
28
28
  }
29
29
  else
30
30
  config.action_controller.perform_caching = false
@@ -62,11 +62,6 @@ Rails.application.configure do
62
62
 
63
63
  <%- end -%>
64
64
  <%- unless options.skip_sprockets? -%>
65
- # Debug mode disables concatenation and preprocessing of assets.
66
- # This option may cause significant delays in view rendering with a large
67
- # number of complex assets.
68
- config.assets.debug = true
69
-
70
65
  # Suppress logger output for asset requests.
71
66
  config.assets.quiet = true
72
67
  <%- end -%>
@@ -77,10 +72,6 @@ Rails.application.configure do
77
72
  # Annotate rendered view with file names.
78
73
  # config.action_view.annotate_rendered_view_with_filenames = true
79
74
 
80
- # Use an evented file watcher to asynchronously detect changes in source code,
81
- # routes, locales, etc. This feature depends on the listen gem.
82
- <%= '# ' unless depend_on_listen? %>config.file_watcher = ActiveSupport::EventedFileUpdateChecker
83
-
84
75
  # Uncomment if you wish to allow Action Cable access from any origin.
85
76
  # config.action_cable.disable_request_forgery_protection = true
86
77
  end