Commit Graph

91463 Commits

Author SHA1 Message Date
Jean Boussier d366a99bf3
Merge pull request #51680 from bensheldon/patch-1 2024-04-28 21:13:59 +02:00
Ben Sheldon [he/him] 20ef7c3b73
Update production.rb template to provide example to exclude healthcheck from force_ssl redirect
Instructions for disabling specific endpoints from http-to-https redirects live in the SSL middleware:

fc4407eed0/actionpack/lib/action_dispatch/middleware/ssl.rb (L20)

The change follows the path-matching pattern already present for ignoring the healthcheck endpoint for config.host_authorization:

fc4407eed0/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt (L110)
2024-04-28 08:46:41 -07:00
Jean Boussier fc4407eed0
Merge pull request #51655 from fatkodima/fix-cpk-references-count
Fix count queries on `includes+references` for models with composite primary keys
2024-04-28 12:03:48 +02:00
Akhil G Krishnan 4d35717844 Upgrade the docker-login and checkout action versions 2024-04-26 23:08:53 +05:30
Rafael Mendonça França 0a9e39d14e
Merge pull request #51670 from Shopify/fix-backtrace-cleaner
Fix backtrace cleaner
2024-04-26 14:21:49 -03:00
Andrew Novoselac 9ac526a21a Unsilence BacktraceCleaner with BACKTRACE without removing silencers
rails/rails@957a3e5 allowed the BACKTRACE env to unsilence backtraces in normals runs not just tests. However, the implementation achieves this by removing the silences in an initializer. This means that the state of backtrace silencer becomes cached by spring and the developer needs to reset spring every time they want to silence or unsilence the backtrace. It also means custom silencers added in an initializer need to be added after the :configure_backtrace_cleaner initializer or else they won't be un-silenced properly.

Instead, let's teach Rails::BacktraceCleaner to unsilence the backtrace if the BACKTRACE variable is set. ActiveSupport::BacktraceCleaner#clean already allows this by passing nil as the second argument, which just filters but does not silence the backtrace. So, in Rails::BacktraceCleaner#clean we can call super with nil in the second argument if the BACKTRACE variable is present. That way we do not need to remove the silencers in an initializer, and we don't have to reset spring to silence the backtrace.
2024-04-26 11:45:59 -04:00
Jean Boussier 664470b16f
Merge pull request #51625 from fatkodima/assertionless-tests
Allow assertionless tests to be reported
2024-04-26 17:42:49 +02:00
fatkodima 76966f9cb5 Allow assertionless tests to be reported 2024-04-26 18:24:16 +03:00
Jean Boussier f04c59b9ff
Merge pull request #51664 from Earlopain/selenium-webdriver-deprecation
Resolve deprecation warning in latest `selenium-webdriver`
2024-04-26 12:38:13 +02:00
Earlopain 6233309298
Resolve deprecation warning in latest `selenium-webdriver`
```
2024-04-26 09:36:45 INFO Selenium [:logger_info] Details on how to use and modify Selenium logger:
  https://selenium.dev/documentation/webdriver/troubleshooting/logging

2024-04-26 09:36:45 WARN Selenium [DEPRECATION] DriverFinder.path(options, service_class) is deprecated. Use DriverFinder.new(options, service).driver_path instead.
```
2024-04-26 12:28:42 +02:00
Jean Boussier 49c43a4ede
Merge pull request #51663 from zzak/fix-docs-preview-rake-tarball
Fix Rake :preview_docs tarball
2024-04-26 12:16:34 +02:00
zzak 5e613284f8
Fix Rake :preview_docs tarball
The previous version created a circular reference, I believe, which caused:

```
tar: .: file changed as we read it
```
2024-04-26 16:13:01 +09:00
Yasuo Honda 5e0c7388a3
Merge pull request #51662 from yahonda/pin_selenium_webdriver_4_19_0
Skip `selenium-webdriver` version 4.20.0
2024-04-26 10:24:30 +09:00
Yasuo Honda 055377da43 Skip `selenium-webdriver` version 4.20.0
This commit will not install the selenium-webdriver` version 4.20.0
because `Selenium::WebDriver::DriverFinder.path` was dropped in `selenium-webdriver` 4.20.0 that was not intentional.
It will be restored once the newer version of `selenium-webdriver` that includes https://github.com/SeleniumHQ/selenium/pull/13877 .

Fix #51658
2024-04-26 09:12:52 +09:00
Carlos Antonio da Silva da21c2e981
Merge pull request #51660 from westoque/add-more-gem-docs-in-app-templates-guide
[ci skip] Add more gem docs in Rails Application Templates guide

Added doc on how to add a gem with a specific version.
Added doc on how to add a comment.
2024-04-25 09:52:37 -03:00
William Estoque 2fea8e723b Add more gem docs in Rails Application Templates guide
Added doc on how to add a gem with a specific version. Added doc on how to add a comment.
2024-04-25 17:43:49 +08:00
Rafael Mendonça França 9fd8b33ebb
Merge pull request #51653 from Earlopain/fixup-51619
Fix Ruby 3.4 internal frame cleaner test
2024-04-24 12:19:54 -03:00
Rafael Mendonça França c810651737
Merge pull request #51650 from zzak/guides-process_scss-dir
Fix building guides outside ./guides directory
2024-04-24 11:52:12 -03:00
fatkodima 0fbf30d328 Fix count queries on `includes+references` for models with composite primary keys 2024-04-24 14:14:37 +03:00
Vipul A M 2c3568415d
Merge pull request #51652 from heka1024/remove-false-comment 2024-04-24 04:30:56 -04:00
Earlopain 13dc2e7a1c
Fix Ruby 3.4 internal frame cleaner test
Fixup for c85eca47f0
2024-04-24 08:59:03 +02:00
Ryuta Kamizono 107fd51a22
Merge pull request #51446 from koic/fix_error_when_rails_g_rubocop_with_pretend
Fix an error for `apply_rubocop_autocorrect_after_generate!` with `--pretend`
2024-04-24 15:28:41 +09:00
heka1024 03c28c7595 Remove outdated comment 2024-04-24 14:49:24 +09:00
Yasuo Honda 3e156142bf
Merge pull request #51633 from taketo1113/fix-changed-cidr
Fix PostgreSQL `Cidr#change?` to compare with address prefix
2024-04-24 11:47:14 +09:00
zzak 6be0b7f7f3
Create preview tarball from directory
Move the artifacts instead of copying to reduce waste
2024-04-24 10:02:56 +09:00
zzak 7c7e4c5476
Fix building guides outside ./guides directory
As is the case with the `rake preview_docs` task.

```
Error reading assets/stylesrc/style.scss: Cannot open file.

Error reading assets/stylesrc/highlight.scss: Cannot open file.

Error reading assets/stylesrc/print.scss: Cannot open file.
```
2024-04-24 09:54:30 +09:00
Rafael Mendonça França 4dbf7e3354
Merge pull request #51649 from andresakata/main
[ci skip] Use Ruby's official documentation urls
2024-04-23 18:40:11 -03:00
Rafael Mendonça França 775cf110fe
Upgrade devcontainer to use 3.3.1 2024-04-23 21:02:00 +00:00
André Guimarães Sakata f6cace4f83 Use Ruby's official documentation 2024-04-23 17:57:56 -03:00
Rafael Mendonça França fa23f0fdd0
Merge pull request #51619 from Earlopain/ruby-3.4-backtraces
Filter internal frames in deprecation warnings for Ruby 3.4
2024-04-23 17:52:58 -03:00
Rafael Mendonça França 2bb67823fa
Merge pull request #51616 from notchairmk/notchairmk/accept-params
Fix `Mime::Type.parse` for HTTP Accept with parameters
2024-04-23 17:51:07 -03:00
Rafael Mendonça França c10eb93124
Merge pull request #51648 from ksylvest/ksylvest/document-nopush-for-javascript-include-tag-and-stylesheet-include-tag
Document the use of `nopush` for asset tags
2024-04-23 16:39:19 -03:00
Kevin Sylvestre f72f691b6a
Document the use of nopush for asset tags
This mirrors the documentation on `preload_link_tag` for the following:

 - `javascript_include_tag`
 - `stylesheet_link_tag`

These methods have a similar API with a different default behavior. The
methods for these methods default to including a `nopush` with the
corresponding link header.
2024-04-23 11:44:59 -07:00
Rafael Mendonça França ec4558ae9f
Merge pull request #50837 from fatkodima/fix-rename_table-for-indexes-7-0
Ensure pre-7.1 migrations use legacy index names when using `rename_table`
2024-04-23 14:06:31 -03:00
Taketo Takashima acc277b135 Fix PostgreSQL Cidr#change? when changed address prefix. Fix #51582
Update activerecord/lib/active_record/connection_adapters/postgresql/oid/cidr.rb

Co-authored-by: Yasuo Honda <yasuo.honda@gmail.com>

Updated to keep the argument order

Added note to remove `changed?` method when `IPAddr#==` compares `IPAddr#prefix`
2024-04-24 00:11:49 +09:00
Carlos Antonio da Silva 1d13a7c44d
Merge pull request #51645 from notapatch/pr-guides-acion-controller-action-callbacks
Update guides: Replace filter with action callback [ci skip]

Rails 4.2 onwards replaced filter with action callback. However, the term has remained in the rails guides and this PR fixes this.

Types of change:

* Filter(s) => Action callback(s)
* Generalized the word "Action callbacks" as it is longer.
* actions => "controller actions" to make "controller actions" more distinct from "action callbacks".
2024-04-23 12:09:00 -03:00
notapatch 66bc210568 Update guides: Replace filter with action callback
Rails 4.2 onwards replaced filter with action callback. However,
the term has remained in the rails guides and this PR fixes this.

Term used is "action callbacks" as this was used in the changelog:

> Deprecate all *_filter callbacks in favor of *_action callbacks.
[Original Change](489a8f2a44)

Types of change:
- Filter(s) => Action callback(s)
- Generalized the word "Action callbacks" as it is longer.
- actions => "controller actions" to make "controller actions"
  more distinct from "action callbacks".
2024-04-23 15:50:18 +01:00
Eileen M. Uchitelle 185157fe18
Merge pull request #51644 from adrianna-chang-shopify/ac-string-join-not-retryable-fix
Join association built from string join should not retry
2024-04-23 09:29:57 -04:00
Adrianna Chang 33a50ce65d
Join association built from string join should not retry 2024-04-23 09:07:29 -04:00
Carlos Antonio da Silva ab49c0a0b9
Merge pull request #51635 from silva96/patch-2
Improve migration.rb documentation consistency [ci skip]

* Reference the method name as it in the code
* Replace version for number everywhere to avoid confusion
2024-04-23 09:40:21 -03:00
Carlos Antonio da Silva 0927af90d1 Rename method to keep it consistent with others _parse_* versions
Follow-up of 46c41db8fd.
2024-04-23 09:35:24 -03:00
Carlos Antonio da Silva 46c41db8fd
Merge pull request #51631 from heka1024/support-hex-binary
Support hexBinary type in XML
2024-04-23 09:32:59 -03:00
Miller fb2e2f336f Support hexBinary format in XML 2024-04-23 21:20:53 +09:00
fatkodima 2c66b2a458 Ensure pre-7.1 migrations use legacy index names when using `rename_table` 2024-04-23 02:53:28 +03:00
John Hawthorn 734719d8af
Merge pull request #51590 from jhawthorn/backtrace_cleaner_3_4
Fix ActionView backtrace filtering on Ruby 3.4+
2024-04-22 15:33:24 -07:00
Rafael Mendonça França c05608b901
Merge pull request #50780 from zachasme/app-update-skip-sprockets
Preserve `--asset-pipeline propshaft` when running `app:update`
2024-04-22 18:42:10 -03:00
Rafael Mendonça França 8aa8de4991
Merge pull request #51271 from sato11/enable-compact-blank
Enable Hash#compact_blank inside ActiveSupport::LogSubscriber
2024-04-22 18:39:49 -03:00
John Hawthorn 3cf6122ccc Fix ActionView backtrace filtering on Ruby 3.4+ 2024-04-22 14:07:57 -07:00
Rafael Mendonça França fee72c3aa0
Merge pull request #51640 from Shopify/prepend-to-include
Use `Module#include` rather than `prepend` for faster method lookup
2024-04-22 18:01:08 -03:00
Rafael Mendonça França 2323823081
Merge pull request #51638 from Earlopain/deprecate-as-proxy-object
Deprecate `ActiveSupport::ProxyObject`
2024-04-22 17:28:22 -03:00