Commit Graph

90150 Commits

Author SHA1 Message Date
Jonathan Hefner d4cae83a17 Add brakeman as development dependency
Follow-up to #50507.

Since `brakeman` is now included in generated apps by default, it must
be installed before running Rails tests that invoke `bin/rails` for
generated apps.

This fixes CI failures such as:

  ```
  Error:
  AppGeneratorTest#test_app_update_does_not_change_app_name_when_app_name_is_hyphenated_name:
  RuntimeError: Command failed with exit 1: yes | bin/rails app:update
      test/generators/app_generator_test.rb:1304:in `system'
      test/generators/app_generator_test.rb:1304:in `block (2 levels) in run_app_update'
      test/generators/app_generator_test.rb:1304:in `block in run_app_update'
      test/generators/app_generator_test.rb:1299:in `chdir'
      test/generators/app_generator_test.rb:1299:in `run_app_update'
      test/generators/app_generator_test.rb:430:in `test_app_update_does_not_change_app_name_when_app_name_is_hyphenated_name'
  ```
2024-01-01 12:00:10 -06:00
Jonathan Hefner dfc6adc2d2
Merge pull request #50384 from skipkayhil/hm-fix-alphabetical-configuring
Fix railspect not validating alphabetical order
2024-01-01 11:37:44 -06:00
Akhil G Krishnan 6069eba1c3
Fix skipped rubocop test typo (#50519) 2024-01-01 15:49:14 +01:00
fatkodima dca72dab11
Merge pull request #50510 from santib/remove-unnecessary-require
Remove unnecessary require
2024-01-01 12:18:11 +02:00
fatkodima fb8da812a6
Merge pull request #50517 from jbampton/remove-unneeded-whitespace
Remove unneeded whitespace from start of code blocks [skip ci]
2024-01-01 12:14:31 +02:00
fatkodima ef10095fd9
Merge pull request #50514 from akhilgkrishnan/add-changelog-50512
Add changelog entry for #50512 [skip ci]
2024-01-01 12:11:28 +02:00
fatkodima 8e6fac80ba
Merge pull request #50518 from akhilgkrishnan/update-puma-startup-message
Update the puma startup message [skip ci]
2024-01-01 12:08:45 +02:00
Akhil G Krishnan 04ba4fb94b Update the puma startup message 2024-01-01 11:38:05 +05:30
John Bampton e6b0d27c3a docs: remove unneeded whitespace from start of code blocks 2024-01-01 15:41:39 +10:00
Akhil G Krishnan 9bc4536d47 Add changelog entry for #50512 2024-01-01 09:35:54 +05:30
David Heinemeier Hansson a8dcfbde95 Add step to keep screenshots of failed system tests 2024-01-01 02:11:00 +01:00
David Heinemeier Hansson 57536e5379 Fix name casing 2024-01-01 02:07:17 +01:00
zzak 2016c664b8
✂️ cut trailing whitespace 2024-01-01 09:20:27 +09:00
David Heinemeier Hansson e234e8380f
Switch to headless chrome by default (#50512)
So it'll work out of the box with cloud CI.
2024-01-01 01:20:05 +01:00
David Heinemeier Hansson f50e7b66f2 Fix generator output paths 2024-01-01 01:13:38 +01:00
David Heinemeier Hansson 4fa5fd96d7 New default files 2024-01-01 01:13:38 +01:00
David Heinemeier Hansson 964ca2328e Errant debug puts 2024-01-01 01:13:38 +01:00
Vipul A M 5d56bb8777
Add changelog entry for #50505 [ci skip] (#50513) 2024-01-01 01:06:13 +01:00
David Heinemeier Hansson 08a792be84
Default to creating GitHub CI files (#50508)
* Default to creating GitHub CI files
2024-01-01 00:37:12 +01:00
Santiago Bartesaghi 78a56cc12a Remove unnecessary require 2023-12-31 17:12:31 -03:00
David Heinemeier Hansson e3da4fc53d
Add allow_browser to set minimum versions for your application (#50505)
* Add allow_browser to set minimum versions for your application
2023-12-31 19:19:16 +01:00
Vipul A M 813afbdd74
Add brakeman to new Rails applications (#50507)
It can be skipped with the `--skip-brakeman` flag.

Closes #50501
2023-12-31 19:09:47 +01:00
zzak cbd8bd735c
Add rubocop-rails-omakase as development dependency (#50495)
This gem is used in Railties tests so it must be a development dependency.
Due to the fixture rails app tmp/rails/app_template faking Bundler and using the repo's Gemfile:
0fb5f67ac4/railties/test/isolation/abstract_unit.rb (L618-L622)

See also: e4b0488851
2023-12-31 18:18:17 +01:00
Jonathan Hefner fe39741382
Merge pull request #50500 from matthieuprat/fix-typos
Fix a couple of typos [ci-skip]
2023-12-31 09:14:03 -06:00
David Heinemeier Hansson 179b979ddb
Add rate limiting to Action Controller via the Kredis limiter type (#50490)
* Add rate limiting via the Kredis limiter type
2023-12-31 13:26:01 +01:00
Matthieu Prat 070487e09e
Fix a couple of typos [ci skip] 2023-12-31 12:28:30 +01:00
Jean Boussier c2636a615e
Merge pull request #50491 from byroot/bump-required-ruby
Bump the required Ruby version to 3.1.0
2023-12-31 09:16:59 +01:00
Jean Boussier 009920814b
Merge pull request #50488 from wjessop/main
Move singleton require
2023-12-31 09:15:20 +01:00
Jean Boussier 9601c2e0f4
Merge pull request #50492 from fatkodima/fix-load_async-query_cache
Fix `load_async` to work with query cache
2023-12-31 09:12:38 +01:00
Jean Boussier f645ff9b69
Merge pull request #50493 from fatkodima/fix-calculation-of-db_runtime
Fix calculation of Active Record :db_runtime metric
2023-12-31 09:06:23 +01:00
Jean Boussier 1320ff0a3e
Merge pull request #2 from zzak/bump-ruby-version_check
Remove Ruby version check
2023-12-31 09:04:16 +01:00
Jean Boussier 6ba2fdb2fe Bump the required Ruby version to 3.1.0
Until now, Rails only droped compatibility with older
rubies on new majors, but I propose to change this policy
because it causes us to either keep compatibility with long
EOLed rubies or to bump the Rails major more often, and to
drop multiple Ruby versions at once when we bump the major.

In my opinion it's a bad alignments of incentives. And we'd
be much better to just drop support in new minors whenever they
go EOL (so 3 years).

Also Ruby being an upstream dependency, it's not even
a semver violation AFAICT.

Since Rails 7.2 isn't planned before a few months, we
can already drop Ruby 3.0 as it will be EOL in March.
2023-12-31 08:54:03 +01:00
Hartley McGuire c061e567b8
Merge pull request #50497 from akhilgkrishnan/document-rubocop-yml-in-directory-structure
Document .rubocop.yml in rails default file folder structure [skip ci]
2023-12-31 01:06:18 -05:00
Akhil G Krishnan 2fdec81990 Document .rubocop.yml in rails default file folder structure
review changes updated
2023-12-31 11:31:30 +05:30
Hartley McGuire 97736d7628
Merge pull request #50498 from skipkayhil/hm-doc-write-options
Document Cache::WriteOptions [ci-skip]
2023-12-31 00:45:26 -05:00
Hartley McGuire 2dda04284c
Merge pull request #50496 from skipkayhil/hm-doc-cache
Cache::Store doc improvements [ci-skip]
2023-12-31 00:37:58 -05:00
Hartley McGuire f721e719b7
Document Cache::WriteOptions 2023-12-31 00:36:19 -05:00
Hartley McGuire f042e025c1
Remove self referential links from Cache::Store
Also swap some method references to code blocks because they aren't
documented (so the auto-references don't work).
2023-12-30 23:57:50 -05:00
Hartley McGuire 7ce5d10398
Improve RedisCacheStore docs
- tweak opening paragraph to specifically mention that the Redis backing
  a Cache should not be the Redis backing Active Job
- add code blocks to Redis::Distributed since it uses the class syntax
- expand on ways to point Cache at a Redis in initialization
- add an rdoc link for #fetch and a code block for `-amount`
2023-12-30 23:38:38 -05:00
Hartley McGuire 8ee46636b7
Remove self referential links from MemoryStore 2023-12-30 23:05:34 -05:00
Hartley McGuire 285ad7bf36
Remove self referential links from MemCacheStore 2023-12-30 22:56:46 -05:00
zzak 110a4e6abc
Remove Ruby version check
Also includes relevant docs, inspired by 6487836af8
2023-12-31 12:38:25 +09:00
zzak e7826d864f
Merge pull request #50494 from akhilgkrishnan/document-skip-rubocop-command
Document --skip-rubocop rails command [skip ci]
2023-12-31 12:26:32 +09:00
Akhil G Krishnan a0e2c79e74 Document --skip-rubocop rails command 2023-12-31 08:20:01 +05:30
fatkodima 6d70c7e001 Fix `load_async` to work with query cache 2023-12-31 00:10:10 +02:00
fatkodima 4f039d0328 Fix calculation of Active Record :db_runtime metric 2023-12-30 23:56:24 +02:00
zzak 0fb5f67ac4
Add rubocop-rails-omakase to new Rails applications (#50486)
* Add rubocop to new rails app generator

This setups a basic rubocop config for new rails apps using the `rubocop-rails-omakase` gem:
https://github.com/rails/rubocop-rails-omakase

It can be skipped with the `--skip-rubocop` flag.
2023-12-30 21:13:13 +01:00
Jean Boussier 89c2f8530a Bump the required Ruby version to 3.1.0
Until now, Rails only droped compatibility with older
rubies on new majors, but I propose to change this policy
because it causes us to either keep compatibility with long
EOLed rubies or to bump the Rails major more often, and to
drop multiple Ruby versions at once when we bump the major.

In my opinion it's a bad alignments of incentives. And we'd
be much better to just drop support in new minors whenever they
go EOL (so 3 years).

Also Ruby being an upstream dependency, it's not even
a semver violation AFAICT.

Since Rails 7.2 isn't planned before a few months, we
can already drop Ruby 3.0 as it will be EOL in March.
2023-12-30 19:46:43 +01:00
Jean Boussier 7b9e9ee244
Merge pull request #50489 from maniSHarma7575/50481-fix-activesupport-json-encode
[FIX] Fix Activesupport json encode for hash with duplicate keys
2023-12-30 19:21:31 +01:00
Manish Sharma 94a4adb8a1 [FIX] Fix Activesupport json encode for hash 2023-12-30 20:22:11 +05:30