rails/railties/CHANGELOG.md
Rafael Mendonça França 707b5cb606
Revert "Merge pull request #49360 from skipkayhil/hm-gemfile-ruby-file"
This reverts commit 6985c3bedf0d85c180d8b86a2fcd6b19e7251bd3, reversing
changes made to 3163bb735189eddd7c152a1e72bed7b4d052f7d4.

Reason: While we want to apply this change, it make bundle being more
strict about the ruby version. This is particularly problematic for
the devcontainer images that don't support defining which patch
version of ruby to install.

Right now, you can only say you want Ruby 3.2, which could mean
3.2.3 or 3.2.0. If for some reason the devcontainer image doesn't
match the patch version on `.ruby-version` it will fail to install.

We are planning to solve this problem by publishing our own
ruby images that allow defining the patch level, but until that
we can't apply this change.
2024-02-14 20:53:47 +00:00

5.8 KiB

  • bin/rails test will no longer load files named *_test.rb if they are located in the fixtures folder.

    Edouard Chin

  • Ensure logger tags configured with config.log_tags are still active in request.action_dispatch handlers

    KJ Tsanaktsidis

  • Setup jemalloc in the default Dockerfile for memory optimization.

    Matt Almeida, Jean Boussier

  • Commented out lines in .railsrc file should not be treated as arguments when using rails new generator command. Update ARGVScrubber to ignore text after # symbols.

    Willian Tenfen

  • Skip CSS when generating APIs.

    Ruy Rocha

  • Rails console now indicates application name and the current Rails environment:

    my-app(dev)> # for RAILS_ENV=development
    my-app(test)> # for RAILS_ENV=test
    my-app(prod)> # for RAILS_ENV=production
    my-app(my_env)> # for RAILS_ENV=my_env
    

    The application name is derived from the application's module name from config/application.rb. For example, MyApp will displayed as my-app in the prompt.

    Additionally, the environment name will be colorized when the environment is development (blue), test (blue), or production (red), if your terminal supports it.

    Stan Lo

  • Ensure autoload_paths, autoload_once_paths, eager_load_paths, and load_paths only have directories when initialized from engine defaults. Previously, files under the app directory could end up there too.

    Takumasa Ochi

  • Prevent unnecessary application reloads in development.

    Previously, some files outside autoload paths triggered unnecessary reloads. With this fix, application reloads according to Rails.autoloaders.main.dirs, thereby preventing unnecessary reloads.

    Takumasa Ochi

  • Use oven-sh/setup-bun in GitHub CI when generating an app with Bun.

    TangRufus

  • Disable pidfile generation in the production environment.

    Hans Schnedlitz

  • Set config.action_view.annotate_rendered_view_with_filenames to true in the development environment.

    Adrian Marin

  • Support the BACKTRACE environment variable to turn off backtrace cleaning.

    Useful for debugging framework code:

    BACKTRACE=1 bin/rails server
    

    Alex Ghiculescu

  • Raise ArgumentError when reading config.x.something with arguments:

    config.x.this_works.this_raises true # raises ArgumentError
    

    Sean Doyle

  • Add default PWA files for manifest and service-worker that are served from app/views/pwa and can be dynamically rendered through ERB. Mount these files explicitly at the root with default routes in the generated routes file.

    DHH

  • Updated system tests to now use headless Chrome by default for the new applications.

    DHH

  • Add GitHub CI files for Dependabot, Brakeman, RuboCop, and running tests by default. Can be skipped with --skip-ci.

    DHH

  • Add Brakeman by default for static analysis of security vulnerabilities. Allow skipping with --skip-brakeman option.

    vipulnsward

  • Add RuboCop with rules from rubocop-rails-omakase by default. Skip with --skip-rubocop.

    DHH and zzak

  • Use bin/rails runner --skip-executor to not wrap the runner script with an Executor.

    Ben Sheldon

  • Fix isolated engines to take ActiveRecord::Base.table_name_prefix into consideration. This will allow for engine defined models, such as inside Active Storage, to respect Active Record table name prefix configuration.

    Chedli Bourguiba

  • Fix running db:system:change when the app has no Dockerfile.

    Hartley McGuire

  • In Action Mailer previews, list inline attachments separately from normal attachments. For example, attachments that were previously listed like

    Attachments: logo.png file1.pdf file2.pdf

    will now be listed like

    Attachments: file1.pdf file2.pdf (Inline: logo.png)

    Christian Schmidt and Jonathan Hefner

  • In mailer preview, only show SMTP-To if it differs from the union of To, Cc and Bcc.

    Christian Schmidt

  • Enable YJIT by default on new applications running Ruby 3.3+.

    Adds a config/initializers/enable_yjit.rb initializer that enables YJIT when running on Ruby 3.3+.

    Jean Boussier

  • In Action Mailer previews, show date from message Date header if present.

    Sampat Badhe

  • Exit with non-zero status when the migration generator fails.

    Katsuhiko YOSHIDA

  • Use numeric UID and GID in Dockerfile template

    The Dockerfile generated by rails new sets the default user and group by name instead of UID:GID. This can cause the following error in Kubernetes:

    container has runAsNonRoot and image has non-numeric user (rails), cannot verify user is non-root
    

    This change sets default user and group by their numeric values.

    Ivan Fedotov

  • Disallow invalid values for rails new options.

    The --database, --asset-pipeline, --css, and --javascript options for rails new take different arguments. This change validates them.

    Tony Drake, Akhil G Krishnan, Petrik de Heus

  • Conditionally print $stdout when invoking run_generator.

    In an effort to improve the developer experience when debugging generator tests, we add the ability to conditionally print $stdout instead of capturing it.

    This allows for calls to binding.irb and puts work as expected.

    RAILS_LOG_TO_STDOUT=true ./bin/test test/generators/actions_test.rb
    

    Steve Polito

  • Remove the option config.public_file_server.enabled from the generators for all environments, as the value is the same in all environments.

    Adrian Hirt

Please check 7-1-stable for previous changes.