railties 6.0.0 → 7.1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +699 -245
- data/MIT-LICENSE +1 -1
- data/RDOC_MAIN.md +99 -0
- data/README.rdoc +7 -8
- data/lib/minitest/rails_plugin.rb +80 -2
- data/lib/rails/all.rb +0 -1
- data/lib/rails/api/task.rb +37 -5
- data/lib/rails/app_updater.rb +9 -6
- data/lib/rails/application/bootstrap.rb +52 -14
- data/lib/rails/application/configuration.rb +327 -86
- data/lib/rails/application/default_middleware_stack.rb +33 -7
- data/lib/rails/application/dummy_config.rb +19 -0
- data/lib/rails/application/finisher.rb +94 -113
- data/lib/rails/application/routes_reloader.rb +17 -3
- data/lib/rails/application.rb +258 -201
- data/lib/rails/application_controller.rb +3 -4
- data/lib/rails/autoloaders/inflector.rb +21 -0
- data/lib/rails/autoloaders.rb +42 -42
- data/lib/rails/backtrace_cleaner.rb +13 -8
- data/lib/rails/cli.rb +5 -2
- data/lib/rails/code_statistics.rb +6 -4
- data/lib/rails/code_statistics_calculator.rb +16 -7
- data/lib/rails/command/actions.rb +10 -12
- data/lib/rails/command/base.rb +66 -46
- data/lib/rails/command/behavior.rb +3 -3
- data/lib/rails/command/environment_argument.rb +33 -17
- data/lib/rails/command/helpers/editor.rb +17 -12
- data/lib/rails/command.rb +90 -32
- data/lib/rails/commands/about/about_command.rb +14 -0
- data/lib/rails/commands/application/application_command.rb +2 -0
- data/lib/rails/commands/console/console_command.rb +17 -13
- data/lib/rails/commands/credentials/USAGE +54 -39
- data/lib/rails/commands/credentials/credentials_command/diffing.rb +53 -0
- data/lib/rails/commands/credentials/credentials_command.rb +83 -60
- data/lib/rails/commands/db/system/change/change_command.rb +8 -2
- data/lib/rails/commands/dbconsole/dbconsole_command.rb +39 -124
- data/lib/rails/commands/destroy/destroy_command.rb +3 -2
- data/lib/rails/commands/dev/dev_command.rb +1 -6
- data/lib/rails/commands/encrypted/USAGE +15 -20
- data/lib/rails/commands/encrypted/encrypted_command.rb +46 -35
- data/lib/rails/commands/gem_help/USAGE +16 -0
- data/lib/rails/commands/gem_help/gem_help_command.rb +13 -0
- data/lib/rails/commands/generate/generate_command.rb +3 -3
- data/lib/rails/commands/help/USAGE +15 -14
- data/lib/rails/commands/help/help_command.rb +21 -2
- data/lib/rails/commands/initializers/initializers_command.rb +1 -4
- data/lib/rails/commands/middleware/middleware_command.rb +17 -0
- data/lib/rails/commands/new/new_command.rb +2 -0
- data/lib/rails/commands/notes/notes_command.rb +5 -14
- data/lib/rails/commands/plugin/plugin_command.rb +2 -0
- data/lib/rails/commands/rake/rake_command.rb +27 -23
- data/lib/rails/commands/restart/restart_command.rb +14 -0
- data/lib/rails/commands/routes/routes_command.rb +13 -1
- data/lib/rails/commands/runner/USAGE +14 -12
- data/lib/rails/commands/runner/runner_command.rb +34 -21
- data/lib/rails/commands/secret/secret_command.rb +13 -0
- data/lib/rails/commands/secrets/USAGE +44 -43
- data/lib/rails/commands/secrets/secrets_command.rb +20 -38
- data/lib/rails/commands/server/server_command.rb +40 -64
- data/lib/rails/commands/test/USAGE +14 -0
- data/lib/rails/commands/test/test_command.rb +58 -16
- data/lib/rails/commands/unused_routes/unused_routes_command.rb +75 -0
- data/lib/rails/commands/version/version_command.rb +1 -0
- data/lib/rails/configuration.rb +53 -23
- data/lib/rails/console/app.rb +1 -4
- data/lib/rails/console/helpers.rb +2 -2
- data/lib/rails/deprecator.rb +7 -0
- data/lib/rails/engine/configuration.rb +54 -9
- data/lib/rails/engine/updater.rb +1 -1
- data/lib/rails/engine.rb +105 -81
- data/lib/rails/gem_version.rb +5 -5
- data/lib/rails/generators/actions/create_migration.rb +9 -5
- data/lib/rails/generators/actions.rb +275 -97
- data/lib/rails/generators/active_model.rb +28 -14
- data/lib/rails/generators/app_base.rb +487 -165
- data/lib/rails/generators/app_name.rb +3 -14
- data/lib/rails/generators/base.rb +42 -31
- data/lib/rails/generators/database.rb +41 -4
- data/lib/rails/generators/erb/mailer/mailer_generator.rb +0 -1
- data/lib/rails/generators/erb/mailer/templates/layout.html.erb.tt +1 -1
- data/lib/rails/generators/erb/scaffold/scaffold_generator.rb +2 -1
- data/lib/rails/generators/erb/scaffold/templates/_form.html.erb.tt +11 -11
- data/lib/rails/generators/erb/scaffold/templates/edit.html.erb.tt +8 -4
- data/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt +11 -28
- data/lib/rails/generators/erb/scaffold/templates/new.html.erb.tt +7 -3
- data/lib/rails/generators/erb/scaffold/templates/partial.html.erb.tt +17 -0
- data/lib/rails/generators/erb/scaffold/templates/show.html.erb.tt +8 -17
- data/lib/rails/generators/erb.rb +1 -2
- data/lib/rails/generators/generated_attribute.rb +60 -19
- data/lib/rails/generators/migration.rb +4 -8
- data/lib/rails/generators/model_helpers.rb +29 -4
- data/lib/rails/generators/named_base.rb +15 -15
- data/lib/rails/generators/rails/app/USAGE +23 -6
- data/lib/rails/generators/rails/app/app_generator.rb +151 -80
- data/lib/rails/generators/rails/app/templates/Dockerfile.tt +103 -0
- data/lib/rails/generators/rails/app/templates/Gemfile.tt +44 -54
- data/lib/rails/generators/rails/app/templates/Rakefile.tt +1 -1
- data/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css.tt +2 -2
- data/lib/rails/generators/rails/app/templates/app/mailers/application_mailer.rb.tt +2 -2
- data/lib/rails/generators/rails/app/templates/app/models/application_record.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb.tt +4 -9
- data/lib/rails/generators/rails/app/templates/app/views/layouts/mailer.html.erb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/bin/rails.tt +3 -3
- data/lib/rails/generators/rails/app/templates/bin/rake.tt +2 -2
- data/lib/rails/generators/rails/app/templates/bin/setup.tt +19 -15
- data/lib/rails/generators/rails/app/templates/config/application.rb.tt +18 -23
- data/lib/rails/generators/rails/app/templates/config/boot.rb.tt +3 -3
- data/lib/rails/generators/rails/app/templates/config/databases/jdbc.yml.tt +5 -6
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcmysql.yml.tt +12 -11
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcpostgresql.yml.tt +17 -16
- data/lib/rails/generators/rails/app/templates/config/databases/jdbcsqlite3.yml.tt +5 -5
- data/lib/rails/generators/rails/app/templates/config/databases/mysql.yml.tt +12 -11
- data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml.tt +12 -11
- data/lib/rails/generators/rails/app/templates/config/databases/postgresql.yml.tt +17 -18
- data/lib/rails/generators/rails/app/templates/config/databases/sqlite3.yml.tt +4 -4
- data/lib/rails/generators/rails/app/templates/config/databases/sqlserver.yml.tt +14 -13
- data/lib/rails/generators/rails/app/templates/config/databases/trilogy.yml.tt +59 -0
- data/lib/rails/generators/rails/app/templates/config/environment.rb.tt +1 -1
- data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +32 -14
- data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +42 -55
- data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +27 -15
- data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +3 -5
- data/lib/rails/generators/rails/app/templates/config/initializers/content_security_policy.rb.tt +21 -28
- data/lib/rails/generators/rails/app/templates/config/initializers/cors.rb.tt +3 -3
- data/lib/rails/generators/rails/app/templates/config/initializers/filter_parameter_logging.rb.tt +6 -2
- data/lib/rails/generators/rails/app/templates/config/initializers/inflections.rb.tt +4 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_7_1.rb.tt +284 -0
- data/lib/rails/generators/rails/app/templates/config/initializers/permissions_policy.rb.tt +13 -0
- data/lib/rails/generators/rails/app/templates/config/locales/en.yml +13 -15
- data/lib/rails/generators/rails/app/templates/config/puma.rb.tt +17 -20
- data/lib/rails/generators/rails/app/templates/config/routes.rb.tt +8 -1
- data/lib/rails/generators/rails/app/templates/config/storage.yml.tt +5 -5
- data/lib/rails/generators/rails/app/templates/config.ru.tt +2 -1
- data/lib/rails/generators/rails/app/templates/db/seeds.rb.tt +7 -5
- data/lib/rails/generators/rails/app/templates/docker-entrypoint.tt +10 -0
- data/lib/rails/generators/rails/app/templates/dockerignore.tt +43 -0
- data/lib/rails/generators/rails/app/templates/gitattributes.tt +9 -0
- data/lib/rails/generators/rails/app/templates/gitignore.tt +12 -9
- data/lib/rails/generators/rails/app/templates/node-version.tt +1 -0
- data/lib/rails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt +10 -8
- data/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt +13 -11
- data/lib/rails/generators/rails/application_record/application_record_generator.rb +4 -0
- data/lib/rails/generators/rails/benchmark/USAGE +19 -0
- data/lib/rails/generators/rails/benchmark/benchmark_generator.rb +30 -0
- data/lib/rails/generators/rails/benchmark/templates/benchmark.rb.tt +15 -0
- data/lib/rails/generators/rails/controller/USAGE +13 -5
- data/lib/rails/generators/rails/controller/controller_generator.rb +7 -42
- data/lib/rails/generators/rails/controller/templates/controller.rb.tt +1 -5
- data/lib/rails/generators/rails/credentials/credentials_generator.rb +30 -25
- data/lib/rails/generators/rails/credentials/templates/credentials.yml.tt +8 -0
- data/lib/rails/generators/rails/db/system/change/change_generator.rb +31 -1
- data/lib/rails/generators/rails/encrypted_file/encrypted_file_generator.rb +6 -2
- data/lib/rails/generators/rails/encryption_key_file/encryption_key_file_generator.rb +1 -2
- data/lib/rails/generators/rails/generator/USAGE +2 -2
- data/lib/rails/generators/rails/generator/generator_generator.rb +0 -1
- data/lib/rails/generators/rails/generator/templates/%file_name%_generator.rb.tt +1 -1
- data/lib/rails/generators/rails/generator/templates/USAGE.tt +1 -1
- data/lib/rails/generators/rails/helper/USAGE +2 -3
- data/lib/rails/generators/rails/integration_test/USAGE +2 -2
- data/lib/rails/generators/rails/migration/USAGE +22 -12
- data/lib/rails/generators/rails/model/model_generator.rb +4 -0
- data/lib/rails/generators/rails/plugin/USAGE +17 -6
- data/lib/rails/generators/rails/plugin/plugin_generator.rb +86 -46
- data/lib/rails/generators/rails/plugin/templates/%name%.gemspec.tt +15 -20
- data/lib/rails/generators/rails/plugin/templates/Gemfile.tt +10 -39
- data/lib/rails/generators/rails/plugin/templates/MIT-LICENSE.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/README.md.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/Rakefile.tt +4 -18
- data/lib/rails/generators/rails/plugin/templates/app/controllers/%namespaced_name%/application_controller.rb.tt +0 -1
- data/lib/rails/generators/rails/plugin/templates/app/mailers/%namespaced_name%/application_mailer.rb.tt +2 -2
- data/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt +0 -3
- data/lib/rails/generators/rails/plugin/templates/bin/rails.tt +7 -22
- data/lib/rails/generators/rails/plugin/templates/gitignore.tt +10 -14
- data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/engine.rb.tt +2 -2
- data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%/version.rb.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/lib/%namespaced_name%.rb.tt +1 -0
- data/lib/rails/generators/rails/plugin/templates/rails/boot.rb.tt +3 -3
- data/lib/rails/generators/rails/plugin/templates/test/%namespaced_name%_test.rb.tt +4 -4
- data/lib/rails/generators/rails/plugin/templates/test/integration/navigation_test.rb.tt +1 -1
- data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb.tt +6 -14
- data/lib/rails/generators/rails/resource/USAGE +4 -4
- data/lib/rails/generators/rails/resource/resource_generator.rb +6 -0
- data/lib/rails/generators/rails/resource_route/resource_route_generator.rb +2 -27
- data/lib/rails/generators/rails/scaffold/USAGE +5 -5
- data/lib/rails/generators/rails/scaffold/scaffold_generator.rb +2 -20
- data/lib/rails/generators/rails/scaffold_controller/USAGE +2 -2
- data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +7 -2
- data/lib/rails/generators/rails/scaffold_controller/templates/api_controller.rb.tt +2 -6
- data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb.tt +7 -11
- data/lib/rails/generators/rails/system_test/USAGE +2 -2
- data/lib/rails/generators/rails/task/USAGE +3 -3
- data/lib/rails/generators/resource_helpers.rb +2 -2
- data/lib/rails/generators/test_case.rb +3 -3
- data/lib/rails/generators/test_unit/controller/controller_generator.rb +2 -0
- data/lib/rails/generators/test_unit/controller/templates/functional_test.rb.tt +3 -3
- data/lib/rails/generators/test_unit/generator/generator_generator.rb +0 -1
- data/lib/rails/generators/test_unit/generator/templates/generator_test.rb.tt +3 -3
- data/lib/rails/generators/test_unit/integration/integration_generator.rb +0 -1
- data/lib/rails/generators/test_unit/integration/templates/integration_test.rb.tt +1 -1
- data/lib/rails/generators/test_unit/job/templates/unit_test.rb.tt +1 -1
- data/lib/rails/generators/test_unit/mailer/templates/functional_test.rb.tt +1 -1
- data/lib/rails/generators/test_unit/model/templates/fixtures.yml.tt +3 -3
- data/lib/rails/generators/test_unit/model/templates/unit_test.rb.tt +1 -1
- data/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt +1 -1
- data/lib/rails/generators/test_unit/plugin/templates/test_helper.rb +2 -2
- data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +4 -5
- data/lib/rails/generators/test_unit/scaffold/templates/api_functional_test.rb.tt +6 -6
- data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb.tt +8 -8
- data/lib/rails/generators/test_unit/scaffold/templates/system_test.rb.tt +9 -11
- data/lib/rails/generators/testing/assertions.rb +2 -2
- data/lib/rails/generators/testing/{behaviour.rb → behavior.rb} +8 -7
- data/lib/rails/generators.rb +43 -45
- data/lib/rails/health_controller.rb +55 -0
- data/lib/rails/info.rb +4 -4
- data/lib/rails/info_controller.rb +30 -13
- data/lib/rails/initializable.rb +1 -1
- data/lib/rails/mailers_controller.rb +18 -9
- data/lib/rails/paths.rb +28 -19
- data/lib/rails/rack/logger.rb +17 -17
- data/lib/rails/rackup/server.rb +15 -0
- data/lib/rails/railtie/configurable.rb +0 -1
- data/lib/rails/railtie/configuration.rb +15 -3
- data/lib/rails/railtie.rb +80 -37
- data/lib/rails/ruby_version_check.rb +5 -3
- data/lib/rails/secrets.rb +14 -9
- data/lib/rails/source_annotation_extractor.rb +69 -34
- data/lib/rails/tasks/engine.rake +8 -11
- data/lib/rails/tasks/framework.rake +4 -6
- data/lib/rails/tasks/log.rake +1 -1
- data/lib/rails/tasks/misc.rake +4 -15
- data/lib/rails/tasks/statistics.rake +9 -6
- data/lib/rails/tasks/tmp.rake +13 -6
- data/lib/rails/tasks/yarn.rake +17 -6
- data/lib/rails/tasks/zeitwerk.rake +16 -41
- data/lib/rails/tasks.rb +0 -6
- data/lib/rails/templates/layouts/application.html.erb +15 -0
- data/lib/rails/templates/rails/mailers/email.html.erb +46 -11
- data/lib/rails/templates/rails/mailers/index.html.erb +14 -7
- data/lib/rails/templates/rails/mailers/mailer.html.erb +11 -5
- data/lib/rails/templates/rails/welcome/index.html.erb +65 -48
- data/lib/rails/test_help.rb +13 -14
- data/lib/rails/test_unit/line_filtering.rb +1 -1
- data/lib/rails/test_unit/railtie.rb +0 -4
- data/lib/rails/test_unit/reporter.rb +8 -3
- data/lib/rails/test_unit/runner.rb +61 -19
- data/lib/rails/test_unit/test_parser.rb +88 -0
- data/lib/rails/test_unit/testing.rake +17 -36
- data/lib/rails/testing/maintain_test_schema.rb +16 -0
- data/lib/rails/version.rb +1 -1
- data/lib/rails/welcome_controller.rb +1 -0
- data/lib/rails/zeitwerk_checker.rb +15 -0
- data/lib/rails.rb +31 -23
- metadata +89 -58
- data/RDOC_MAIN.rdoc +0 -98
- data/lib/rails/application/dummy_erb_compiler.rb +0 -18
- data/lib/rails/command/spellchecker.rb +0 -58
- data/lib/rails/generators/css/assets/assets_generator.rb +0 -15
- data/lib/rails/generators/css/assets/templates/stylesheet.css +0 -4
- data/lib/rails/generators/css/scaffold/scaffold_generator.rb +0 -18
- data/lib/rails/generators/rails/app/templates/app/javascript/channels/consumer.js +0 -6
- data/lib/rails/generators/rails/app/templates/app/javascript/channels/index.js +0 -5
- data/lib/rails/generators/rails/app/templates/app/javascript/packs/application.js.tt +0 -23
- data/lib/rails/generators/rails/app/templates/bin/yarn.tt +0 -10
- data/lib/rails/generators/rails/app/templates/config/databases/frontbase.yml.tt +0 -50
- data/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml.tt +0 -86
- data/lib/rails/generators/rails/app/templates/config/initializers/application_controller_renderer.rb.tt +0 -8
- data/lib/rails/generators/rails/app/templates/config/initializers/backtrace_silencers.rb.tt +0 -7
- data/lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb.tt +0 -5
- data/lib/rails/generators/rails/app/templates/config/initializers/mime_types.rb.tt +0 -4
- data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt +0 -45
- data/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt +0 -16
- data/lib/rails/generators/rails/app/templates/config/spring.rb.tt +0 -6
- data/lib/rails/generators/rails/app/templates/package.json.tt +0 -11
- data/lib/rails/generators/rails/assets/USAGE +0 -17
- data/lib/rails/generators/rails/assets/assets_generator.rb +0 -26
- data/lib/rails/generators/rails/assets/templates/stylesheet.css +0 -4
- data/lib/rails/generators/rails/model/USAGE +0 -114
- data/lib/rails/generators/rails/plugin/templates/rails/application.rb.tt +0 -23
- data/lib/rails/generators/rails/scaffold/templates/scaffold.css +0 -80
- data/lib/rails/tasks/annotations.rake +0 -22
- data/lib/rails/tasks/dev.rake +0 -11
- data/lib/rails/tasks/initializers.rake +0 -9
- data/lib/rails/tasks/middleware.rake +0 -9
- data/lib/rails/tasks/restart.rake +0 -9
- data/lib/rails/tasks/routes.rake +0 -9
@@ -1,23 +0,0 @@
|
|
1
|
-
// This file is automatically compiled by Webpack, along with any other files
|
2
|
-
// present in this directory. You're encouraged to place your actual application logic in
|
3
|
-
// a relevant structure within app/javascript and only use these pack files to reference
|
4
|
-
// that code so it'll be compiled.
|
5
|
-
|
6
|
-
require("@rails/ujs").start()
|
7
|
-
<%- unless options[:skip_turbolinks] -%>
|
8
|
-
require("turbolinks").start()
|
9
|
-
<%- end -%>
|
10
|
-
<%- unless skip_active_storage? -%>
|
11
|
-
require("@rails/activestorage").start()
|
12
|
-
<%- end -%>
|
13
|
-
<%- unless options[:skip_action_cable] -%>
|
14
|
-
require("channels")
|
15
|
-
<%- end -%>
|
16
|
-
|
17
|
-
|
18
|
-
// Uncomment to copy all static images under ../images to the output folder and reference
|
19
|
-
// them with the image_pack_tag helper in views (e.g <%%= image_pack_tag 'rails.png' %>)
|
20
|
-
// or the `imagePath` JavaScript helper below.
|
21
|
-
//
|
22
|
-
// const images = require.context('../images', true)
|
23
|
-
// const imagePath = (name) => images(name, true)
|
@@ -1,10 +0,0 @@
|
|
1
|
-
APP_ROOT = File.expand_path('..', __dir__)
|
2
|
-
Dir.chdir(APP_ROOT) do
|
3
|
-
begin
|
4
|
-
exec "yarnpkg", *ARGV
|
5
|
-
rescue Errno::ENOENT
|
6
|
-
$stderr.puts "Yarn executable was not detected in the system."
|
7
|
-
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
8
|
-
exit 1
|
9
|
-
end
|
10
|
-
end
|
@@ -1,50 +0,0 @@
|
|
1
|
-
# FrontBase versions 4.x
|
2
|
-
#
|
3
|
-
# Get the bindings:
|
4
|
-
# gem install ruby-frontbase
|
5
|
-
#
|
6
|
-
# Configure Using Gemfile
|
7
|
-
# gem 'ruby-frontbase'
|
8
|
-
#
|
9
|
-
default: &default
|
10
|
-
adapter: frontbase
|
11
|
-
pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
12
|
-
host: localhost
|
13
|
-
username: <%= app_name %>
|
14
|
-
password: ''
|
15
|
-
|
16
|
-
development:
|
17
|
-
<<: *default
|
18
|
-
database: <%= app_name %>_development
|
19
|
-
|
20
|
-
# Warning: The database defined as "test" will be erased and
|
21
|
-
# re-generated from your development database when you run "rake".
|
22
|
-
# Do not set this db to the same as development or production.
|
23
|
-
test:
|
24
|
-
<<: *default
|
25
|
-
database: <%= app_name %>_test
|
26
|
-
|
27
|
-
# As with config/credentials.yml, you never want to store sensitive information,
|
28
|
-
# like your database password, in your source code. If your source code is
|
29
|
-
# ever seen by anyone, they now have access to your database.
|
30
|
-
#
|
31
|
-
# Instead, provide the password as a unix environment variable when you boot
|
32
|
-
# the app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
|
33
|
-
# for a full rundown on how to provide these environment variables in a
|
34
|
-
# production deployment.
|
35
|
-
#
|
36
|
-
# On Heroku and other platform providers, you may have a full connection URL
|
37
|
-
# available as an environment variable. For example:
|
38
|
-
#
|
39
|
-
# DATABASE_URL="frontbase://myuser:mypass@localhost/somedatabase"
|
40
|
-
#
|
41
|
-
# You can use this database configuration with:
|
42
|
-
#
|
43
|
-
# production:
|
44
|
-
# url: <%%= ENV['DATABASE_URL'] %>
|
45
|
-
#
|
46
|
-
production:
|
47
|
-
<<: *default
|
48
|
-
database: <%= app_name %>_production
|
49
|
-
username: <%= app_name %>
|
50
|
-
password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
|
@@ -1,86 +0,0 @@
|
|
1
|
-
# IBM Dataservers
|
2
|
-
#
|
3
|
-
# Home Page
|
4
|
-
# https://github.com/dparnell/ibm_db
|
5
|
-
#
|
6
|
-
# To install the ibm_db gem:
|
7
|
-
#
|
8
|
-
# On Linux:
|
9
|
-
# . /home/db2inst1/sqllib/db2profile
|
10
|
-
# export IBM_DB_INCLUDE=/opt/ibm/db2/V9.7/include
|
11
|
-
# export IBM_DB_LIB=/opt/ibm/db2/V9.7/lib32
|
12
|
-
# gem install ibm_db
|
13
|
-
#
|
14
|
-
# On Mac OS X 10.5:
|
15
|
-
# . /home/db2inst1/sqllib/db2profile
|
16
|
-
# export IBM_DB_INCLUDE=/opt/ibm/db2/V9.7/include
|
17
|
-
# export IBM_DB_LIB=/opt/ibm/db2/V9.7/lib32
|
18
|
-
# export ARCHFLAGS="-arch i386"
|
19
|
-
# gem install ibm_db
|
20
|
-
#
|
21
|
-
# On Mac OS X 10.6:
|
22
|
-
# . /home/db2inst1/sqllib/db2profile
|
23
|
-
# export IBM_DB_INCLUDE=/opt/ibm/db2/V9.7/include
|
24
|
-
# export IBM_DB_LIB=/opt/ibm/db2/V9.7/lib64
|
25
|
-
# export ARCHFLAGS="-arch x86_64"
|
26
|
-
# gem install ibm_db
|
27
|
-
#
|
28
|
-
# On Windows:
|
29
|
-
# Issue the command: gem install ibm_db
|
30
|
-
#
|
31
|
-
# Configure Using Gemfile
|
32
|
-
# gem 'ibm_db'
|
33
|
-
#
|
34
|
-
#
|
35
|
-
default: &default
|
36
|
-
adapter: ibm_db
|
37
|
-
pool: <%%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
38
|
-
username: db2inst1
|
39
|
-
password:
|
40
|
-
#schema: db2inst1
|
41
|
-
#host: localhost
|
42
|
-
#port: 50000
|
43
|
-
#account: my_account
|
44
|
-
#app_user: my_app_user
|
45
|
-
#application: my_application
|
46
|
-
#workstation: my_workstation
|
47
|
-
#security: SSL
|
48
|
-
#timeout: 10
|
49
|
-
#authentication: SERVER
|
50
|
-
#parameterized: false
|
51
|
-
|
52
|
-
development:
|
53
|
-
<<: *default
|
54
|
-
database: <%= app_name[0,4] %>_dev
|
55
|
-
|
56
|
-
# Warning: The database defined as "test" will be erased and
|
57
|
-
# re-generated from your development database when you run "rake".
|
58
|
-
# Do not set this db to the same as development or production.
|
59
|
-
test:
|
60
|
-
<<: *default
|
61
|
-
database: <%= app_name[0,4] %>_tst
|
62
|
-
|
63
|
-
# As with config/credentials.yml, you never want to store sensitive information,
|
64
|
-
# like your database password, in your source code. If your source code is
|
65
|
-
# ever seen by anyone, they now have access to your database.
|
66
|
-
#
|
67
|
-
# Instead, provide the password as a unix environment variable when you boot
|
68
|
-
# the app. Read https://guides.rubyonrails.org/configuring.html#configuring-a-database
|
69
|
-
# for a full rundown on how to provide these environment variables in a
|
70
|
-
# production deployment.
|
71
|
-
#
|
72
|
-
# On Heroku and other platform providers, you may have a full connection URL
|
73
|
-
# available as an environment variable. For example:
|
74
|
-
#
|
75
|
-
# DATABASE_URL="ibm-db://myuser:mypass@localhost/somedatabase"
|
76
|
-
#
|
77
|
-
# You can use this database configuration with:
|
78
|
-
#
|
79
|
-
# production:
|
80
|
-
# url: <%%= ENV['DATABASE_URL'] %>
|
81
|
-
#
|
82
|
-
production:
|
83
|
-
<<: *default
|
84
|
-
database: <%= app_name %>_production
|
85
|
-
username: <%= app_name %>
|
86
|
-
password: <%%= ENV['<%= app_name.upcase %>_DATABASE_PASSWORD'] %>
|
@@ -1,7 +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| line =~ /my_noisy_library/ }
|
5
|
-
|
6
|
-
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
-
# Rails.backtrace_cleaner.remove_silencers!
|
data/lib/rails/generators/rails/app/templates/config/initializers/new_framework_defaults_6_0.rb.tt
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
#
|
3
|
-
# This file contains migration options to ease your Rails 6.0 upgrade.
|
4
|
-
#
|
5
|
-
# Once upgraded flip defaults one by one to migrate to the new default.
|
6
|
-
#
|
7
|
-
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
8
|
-
|
9
|
-
# Don't force requests from old versions of IE to be UTF-8 encoded.
|
10
|
-
# Rails.application.config.action_view.default_enforce_utf8 = false
|
11
|
-
|
12
|
-
# Embed purpose and expiry metadata inside signed and encrypted
|
13
|
-
# cookies for increased security.
|
14
|
-
#
|
15
|
-
# This option is not backwards compatible with earlier Rails versions.
|
16
|
-
# It's best enabled when your entire app is migrated and stable on 6.0.
|
17
|
-
# Rails.application.config.action_dispatch.use_cookies_with_metadata = true
|
18
|
-
|
19
|
-
# Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification.
|
20
|
-
# Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false
|
21
|
-
|
22
|
-
# Return false instead of self when enqueuing is aborted from a callback.
|
23
|
-
# Rails.application.config.active_job.return_false_on_aborted_enqueue = true
|
24
|
-
|
25
|
-
# Send Active Storage analysis and purge jobs to dedicated queues.
|
26
|
-
# Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
|
27
|
-
# Rails.application.config.active_storage.queues.purge = :active_storage_purge
|
28
|
-
|
29
|
-
# When assigning to a collection of attachments declared via `has_many_attached`, replace existing
|
30
|
-
# attachments instead of appending. Use #attach to add new attachments without replacing existing ones.
|
31
|
-
# Rails.application.config.active_storage.replace_on_assign_to_many = true
|
32
|
-
|
33
|
-
# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
|
34
|
-
#
|
35
|
-
# The default delivery jobs (ActionMailer::Parameterized::DeliveryJob, ActionMailer::DeliveryJob),
|
36
|
-
# will be removed in Rails 6.1. This setting is not backwards compatible with earlier Rails versions.
|
37
|
-
# If you send mail in the background, job workers need to have a copy of
|
38
|
-
# MailDeliveryJob to ensure all delivery jobs are processed properly.
|
39
|
-
# Make sure your entire app is migrated and stable on 6.0 before using this setting.
|
40
|
-
# Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
|
41
|
-
|
42
|
-
# Enable the same cache key to be reused when the object being cached of type
|
43
|
-
# `ActiveRecord::Relation` changes by moving the volatile information (max updated at and count)
|
44
|
-
# of the relation's cache key into the cache version to support recycling cache key.
|
45
|
-
# Rails.application.config.active_record.collection_cache_versioning = true
|
@@ -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 -%>
|
@@ -1,11 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "<%= app_name %>",
|
3
|
-
"private": true,
|
4
|
-
"dependencies": {
|
5
|
-
"@rails/ujs": "^6.0.0-alpha"<% unless options[:skip_turbolinks] %>,
|
6
|
-
"turbolinks": "^5.2.0"<% end -%><% unless skip_active_storage? %>,
|
7
|
-
"@rails/activestorage": "^6.0.0-alpha"<% end -%><% unless options[:skip_action_cable] %>,
|
8
|
-
"@rails/actioncable": "^6.0.0-alpha"<% end %>
|
9
|
-
},
|
10
|
-
"version": "0.1.0"
|
11
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
Description:
|
2
|
-
Stubs out new asset placeholders. Pass the asset name, either CamelCased
|
3
|
-
or under_scored.
|
4
|
-
|
5
|
-
To create an asset within a folder, specify the asset's name as a
|
6
|
-
path like 'parent/name'.
|
7
|
-
|
8
|
-
This generates a stylesheet stub in app/assets/stylesheets.
|
9
|
-
|
10
|
-
If Sass 3 is available, stylesheets will be generated with the .scss extension.
|
11
|
-
|
12
|
-
Example:
|
13
|
-
`rails generate assets posts`
|
14
|
-
|
15
|
-
Posts assets.
|
16
|
-
Stylesheet: app/assets/stylesheets/posts.css
|
17
|
-
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Rails
|
4
|
-
module Generators
|
5
|
-
class AssetsGenerator < NamedBase # :nodoc:
|
6
|
-
class_option :javascripts, type: :boolean, desc: "Generate JavaScripts"
|
7
|
-
class_option :stylesheets, type: :boolean, desc: "Generate Stylesheets"
|
8
|
-
|
9
|
-
class_option :javascript_engine, desc: "Engine for JavaScripts"
|
10
|
-
class_option :stylesheet_engine, desc: "Engine for Stylesheets"
|
11
|
-
|
12
|
-
private
|
13
|
-
def asset_name
|
14
|
-
file_name
|
15
|
-
end
|
16
|
-
|
17
|
-
hook_for :javascript_engine do |javascript_engine|
|
18
|
-
invoke javascript_engine, [name] if options[:javascripts]
|
19
|
-
end
|
20
|
-
|
21
|
-
hook_for :stylesheet_engine do |stylesheet_engine|
|
22
|
-
invoke stylesheet_engine, [name] if options[:stylesheets]
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,114 +0,0 @@
|
|
1
|
-
Description:
|
2
|
-
Stubs out a new model. Pass the model name, either CamelCased or
|
3
|
-
under_scored, and an optional list of attribute pairs as arguments.
|
4
|
-
|
5
|
-
Attribute pairs are field:type arguments specifying the
|
6
|
-
model's attributes. Timestamps are added by default, so you don't have to
|
7
|
-
specify them by hand as 'created_at:datetime updated_at:datetime'.
|
8
|
-
|
9
|
-
As a special case, specifying 'password:digest' will generate a
|
10
|
-
password_digest field of string type, and configure your generated model and
|
11
|
-
tests for use with Active Model has_secure_password (assuming the default ORM
|
12
|
-
and test framework are being used).
|
13
|
-
|
14
|
-
You don't have to think up every attribute up front, but it helps to
|
15
|
-
sketch out a few so you can start working with the model immediately.
|
16
|
-
|
17
|
-
This generator invokes your configured ORM and test framework, which
|
18
|
-
defaults to Active Record and TestUnit.
|
19
|
-
|
20
|
-
Finally, if --parent option is given, it's used as superclass of the
|
21
|
-
created model. This allows you create Single Table Inheritance models.
|
22
|
-
|
23
|
-
If you pass a namespaced model name (e.g. admin/account or Admin::Account)
|
24
|
-
then the generator will create a module with a table_name_prefix method
|
25
|
-
to prefix the model's table name with the module name (e.g. admin_accounts)
|
26
|
-
|
27
|
-
Available field types:
|
28
|
-
|
29
|
-
Just after the field name you can specify a type like text or boolean.
|
30
|
-
It will generate the column with the associated SQL type. For instance:
|
31
|
-
|
32
|
-
`rails generate model post title:string body:text`
|
33
|
-
|
34
|
-
will generate a title column with a varchar type and a body column with a text
|
35
|
-
type. If no type is specified the string type will be used by default.
|
36
|
-
You can use the following types:
|
37
|
-
|
38
|
-
integer
|
39
|
-
primary_key
|
40
|
-
decimal
|
41
|
-
float
|
42
|
-
boolean
|
43
|
-
binary
|
44
|
-
string
|
45
|
-
text
|
46
|
-
date
|
47
|
-
time
|
48
|
-
datetime
|
49
|
-
|
50
|
-
You can also consider `references` as a kind of type. For instance, if you run:
|
51
|
-
|
52
|
-
`rails generate model photo title:string album:references`
|
53
|
-
|
54
|
-
It will generate an `album_id` column. You should generate these kinds of fields when
|
55
|
-
you will use a `belongs_to` association, for instance. `references` also supports
|
56
|
-
polymorphism, you can enable polymorphism like this:
|
57
|
-
|
58
|
-
`rails generate model product supplier:references{polymorphic}`
|
59
|
-
|
60
|
-
For integer, string, text and binary fields, an integer in curly braces will
|
61
|
-
be set as the limit:
|
62
|
-
|
63
|
-
`rails generate model user pseudo:string{30}`
|
64
|
-
|
65
|
-
For decimal, two integers separated by a comma in curly braces will be used
|
66
|
-
for precision and scale:
|
67
|
-
|
68
|
-
`rails generate model product 'price:decimal{10,2}'`
|
69
|
-
|
70
|
-
You can add a `:uniq` or `:index` suffix for unique or standard indexes
|
71
|
-
respectively:
|
72
|
-
|
73
|
-
`rails generate model user pseudo:string:uniq`
|
74
|
-
`rails generate model user pseudo:string:index`
|
75
|
-
|
76
|
-
You can combine any single curly brace option with the index options:
|
77
|
-
|
78
|
-
`rails generate model user username:string{30}:uniq`
|
79
|
-
`rails generate model product supplier:references{polymorphic}:index`
|
80
|
-
|
81
|
-
If you require a `password_digest` string column for use with
|
82
|
-
has_secure_password, you can specify `password:digest`:
|
83
|
-
|
84
|
-
`rails generate model user password:digest`
|
85
|
-
|
86
|
-
If you require a `token` string column for use with
|
87
|
-
has_secure_token, you can specify `auth_token:token`:
|
88
|
-
|
89
|
-
`rails generate model user auth_token:token`
|
90
|
-
|
91
|
-
Examples:
|
92
|
-
`rails generate model account`
|
93
|
-
|
94
|
-
For Active Record and TestUnit it creates:
|
95
|
-
|
96
|
-
Model: app/models/account.rb
|
97
|
-
Test: test/models/account_test.rb
|
98
|
-
Fixtures: test/fixtures/accounts.yml
|
99
|
-
Migration: db/migrate/XXX_create_accounts.rb
|
100
|
-
|
101
|
-
`rails generate model post title:string body:text published:boolean`
|
102
|
-
|
103
|
-
Creates a Post model with a string title, text body, and published flag.
|
104
|
-
|
105
|
-
`rails generate model admin/account`
|
106
|
-
|
107
|
-
For Active Record and TestUnit it creates:
|
108
|
-
|
109
|
-
Module: app/models/admin.rb
|
110
|
-
Model: app/models/admin/account.rb
|
111
|
-
Test: test/models/admin/account_test.rb
|
112
|
-
Fixtures: test/fixtures/admin/accounts.yml
|
113
|
-
Migration: db/migrate/XXX_create_admin_accounts.rb
|
114
|
-
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require_relative 'boot'
|
2
|
-
|
3
|
-
<% if include_all_railties? -%>
|
4
|
-
require 'rails/all'
|
5
|
-
<% else -%>
|
6
|
-
require "rails"
|
7
|
-
# Pick the frameworks you want:
|
8
|
-
require "active_model/railtie"
|
9
|
-
require "active_job/railtie"
|
10
|
-
<%= comment_if :skip_active_record %>require "active_record/railtie"
|
11
|
-
<%= comment_if :skip_active_storage %>require "active_storage/engine"
|
12
|
-
require "action_controller/railtie"
|
13
|
-
<%= comment_if :skip_action_mailer %>require "action_mailer/railtie"
|
14
|
-
require "action_view/railtie"
|
15
|
-
<%= comment_if :skip_action_cable %>require "action_cable/engine"
|
16
|
-
<%= comment_if :skip_sprockets %>require "sprockets/railtie"
|
17
|
-
<%= comment_if :skip_test %>require "rails/test_unit/railtie"
|
18
|
-
<% end -%>
|
19
|
-
|
20
|
-
Bundler.require(*Rails.groups)
|
21
|
-
require "<%= namespaced_name %>"
|
22
|
-
|
23
|
-
<%= application_definition %>
|
@@ -1,80 +0,0 @@
|
|
1
|
-
body {
|
2
|
-
background-color: #fff;
|
3
|
-
color: #333;
|
4
|
-
margin: 33px;
|
5
|
-
}
|
6
|
-
|
7
|
-
body, p, ol, ul, td {
|
8
|
-
font-family: verdana, arial, helvetica, sans-serif;
|
9
|
-
font-size: 13px;
|
10
|
-
line-height: 18px;
|
11
|
-
}
|
12
|
-
|
13
|
-
pre {
|
14
|
-
background-color: #eee;
|
15
|
-
padding: 10px;
|
16
|
-
font-size: 11px;
|
17
|
-
}
|
18
|
-
|
19
|
-
a {
|
20
|
-
color: #000;
|
21
|
-
}
|
22
|
-
|
23
|
-
a:visited {
|
24
|
-
color: #666;
|
25
|
-
}
|
26
|
-
|
27
|
-
a:hover {
|
28
|
-
color: #fff;
|
29
|
-
background-color: #000;
|
30
|
-
}
|
31
|
-
|
32
|
-
th {
|
33
|
-
padding-bottom: 5px;
|
34
|
-
}
|
35
|
-
|
36
|
-
td {
|
37
|
-
padding: 0 5px 7px;
|
38
|
-
}
|
39
|
-
|
40
|
-
div.field,
|
41
|
-
div.actions {
|
42
|
-
margin-bottom: 10px;
|
43
|
-
}
|
44
|
-
|
45
|
-
#notice {
|
46
|
-
color: green;
|
47
|
-
}
|
48
|
-
|
49
|
-
.field_with_errors {
|
50
|
-
padding: 2px;
|
51
|
-
background-color: red;
|
52
|
-
display: table;
|
53
|
-
}
|
54
|
-
|
55
|
-
#error_explanation {
|
56
|
-
width: 450px;
|
57
|
-
border: 2px solid red;
|
58
|
-
padding: 7px 7px 0;
|
59
|
-
margin-bottom: 20px;
|
60
|
-
background-color: #f0f0f0;
|
61
|
-
}
|
62
|
-
|
63
|
-
#error_explanation h2 {
|
64
|
-
text-align: left;
|
65
|
-
font-weight: bold;
|
66
|
-
padding: 5px 5px 5px 15px;
|
67
|
-
font-size: 12px;
|
68
|
-
margin: -7px -7px 0;
|
69
|
-
background-color: #c00;
|
70
|
-
color: #fff;
|
71
|
-
}
|
72
|
-
|
73
|
-
#error_explanation ul li {
|
74
|
-
font-size: 12px;
|
75
|
-
list-style: square;
|
76
|
-
}
|
77
|
-
|
78
|
-
label {
|
79
|
-
display: block;
|
80
|
-
}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "rails/source_annotation_extractor"
|
4
|
-
|
5
|
-
task notes: :environment do
|
6
|
-
Rails::SourceAnnotationExtractor::Annotation.notes_task_deprecation_warning
|
7
|
-
Rails::Command.invoke :notes
|
8
|
-
end
|
9
|
-
|
10
|
-
namespace :notes do
|
11
|
-
["OPTIMIZE", "FIXME", "TODO"].each do |annotation|
|
12
|
-
task annotation.downcase.intern => :environment do
|
13
|
-
Rails::SourceAnnotationExtractor::Annotation.notes_task_deprecation_warning
|
14
|
-
Rails::Command.invoke :notes, ["--annotations", annotation]
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
task custom: :environment do
|
19
|
-
Rails::SourceAnnotationExtractor::Annotation.notes_task_deprecation_warning
|
20
|
-
Rails::Command.invoke :notes, ["--annotations", ENV["ANNOTATION"]]
|
21
|
-
end
|
22
|
-
end
|
data/lib/rails/tasks/dev.rake
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "rails/command"
|
4
|
-
require "active_support/deprecation"
|
5
|
-
|
6
|
-
namespace :dev do
|
7
|
-
task cache: :environment do
|
8
|
-
ActiveSupport::Deprecation.warn("Using `bin/rake dev:cache` is deprecated and will be removed in Rails 6.1. Use `bin/rails dev:cache` instead.\n")
|
9
|
-
Rails::Command.invoke "dev:cache"
|
10
|
-
end
|
11
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "rails/command"
|
4
|
-
require "active_support/deprecation"
|
5
|
-
|
6
|
-
task initializers: :environment do
|
7
|
-
ActiveSupport::Deprecation.warn("Using `bin/rake initializers` is deprecated and will be removed in Rails 6.1. Use `bin/rails initializers` instead.\n")
|
8
|
-
Rails::Command.invoke "initializers"
|
9
|
-
end
|
@@ -1,9 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
desc "Prints out your Rack middleware stack"
|
4
|
-
task middleware: :environment do
|
5
|
-
Rails.configuration.middleware.each do |middleware|
|
6
|
-
puts "use #{middleware.inspect}"
|
7
|
-
end
|
8
|
-
puts "run #{Rails.application.class.name}.routes"
|
9
|
-
end
|
data/lib/rails/tasks/routes.rake
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "rails/command"
|
4
|
-
require "active_support/deprecation"
|
5
|
-
|
6
|
-
task routes: :environment do
|
7
|
-
ActiveSupport::Deprecation.warn("Using `bin/rake routes` is deprecated and will be removed in Rails 6.1. Use `bin/rails routes` instead.\n")
|
8
|
-
Rails::Command.invoke "routes"
|
9
|
-
end
|