Commit Graph

83223 Commits

Author SHA1 Message Date
Jonathan Hefner
19f8d03aba
Merge pull request #44525 from etiennebarrie/remove-assets.enabled-from-configuring-guide
Remove assets.enabled from Configuring guide [ci-skip]
2022-02-23 11:10:22 -06:00
Matthew Draper
2b2e789cb7
Merge pull request #44515 from SkipKayhil/git-init-b
use `git init -b` in generator when supported
2022-02-24 02:50:11 +10:30
Ghouse Mohamed
715f117ac9 Bumps rubocop version to 1.25.1 2022-02-23 21:18:33 +05:30
Matthew Draper
b95354efca Remove mark_transaction_written_if_write
This was only needed for the deprecation cycle for aborted/incomplete
transactions committing -> rolling back.
2022-02-24 02:16:48 +10:30
Clayton Smith
6e56e18523 Fix flaky Action View tests 2022-02-23 09:39:57 -05:00
Matthew Draper
4e37a4c552 The server discards prepared statements when disconnected
Most of the time this would currently be skipping deallocations because
the connection is dead at the time of the call, but instead of relying
on that call sequencing (and pointlessly sending a series of
deallocations in other circumstances), we can simply drop our cache if
the whole connection gets reset.
2022-02-23 23:55:30 +10:30
Étienne Barrié
51ab591a76 Remove assets.enabled from Configuring guide
The option was removed in https://github.com/rails/rails/pull/18636 and
didn't make the cut to the gem (since loading the gem enables the asset
pipeline).
2022-02-23 11:11:52 +01:00
Ryuta Kamizono
746d115b9a
Merge pull request #44521 from ghousemohamed/make-activerecord-tests-more-consistent
Makes some of the activerecord tests more syntactically consistent
2022-02-23 14:46:07 +09:00
Gannon McGibbon
fa8c2ddcce
Merge pull request #44487 from ghousemohamed/patch-8
Removed freenode link from support resources [ci-skip]
2022-02-22 19:25:57 -05:00
Jonathan Hefner
9b857799eb
Merge pull request #44511 from p8/docs/permission-policy
Move docs to ActionDispatch::HTTP::PermissionsPolicy [ci-skip]
2022-02-22 17:08:19 -06:00
Jonathan Hefner
5e76229a31
Merge pull request #44522 from ghousemohamed/patch-11
Typo: Changes BooksController to `BooksController` in Rails guide [ci-skip]
2022-02-22 17:06:48 -06:00
Ghouse Mohamed
a12305a2e8 Fixes controller name highlight in guide 2022-02-23 04:16:04 +05:30
Gannon McGibbon
79746be165
Merge pull request #44473 from gmcgibbon/enable_open_struct_cop
Enable open struct cop
2022-02-22 17:22:57 -05:00
Jean Boussier
ab8128e7c8
Merge pull request #44520 from sambostock/subdomain-regex
Stop capturing subdomain in `HostAuthorization` middleware
2022-02-22 21:56:23 +01:00
Ghouse Mohamed
49b4af8b3d Return blob/blobs when #attach is able to save the record and return false if it is not able to 2022-02-23 02:03:25 +05:30
Petrik
94050d7dde Move PermissionsPolicy docs to ActionDispatch::HTTP::PermissionsPolicy [ci-skip]
As most of the PermissionsPolicy is defined in
ActionDispatch::HTTP::PermissionsPolicy, it should include most of the
documentation. ActionController::Metal::PermissionsPolicy should
describe controller overrides.

This PR also makes the documentation more similar to the
ActionDispatch::HTTP::ContentSecurityPolicy documentation.

Note:
The Feature-Policy header has been renamed to Permissions-Policy
in the specification. The Permissions-Policy requires a different
implementation and isn't yet supported by all browsers. To avoid
having to rename this middleware in the future we use the new
name for the middleware but keep the old header name in the
documentation for now.

Co-authored-by: Jonathan Hefner <jonathan@hefner.pro>
2022-02-22 21:27:39 +01:00
Ghouse Mohamed
6b52db89c4 Makes some of the activerecord tests more syntactically consistent 2022-02-23 01:47:08 +05:30
Ghouse Mohamed
22fe46b40f Fixed inconsistencies in ActiveModel test cases 2022-02-23 01:30:26 +05:30
Sam Bostock
c56abcd6a9
Stop capturing subdomain in HostAuthorization
This also extracts a constant, giving a name to a "magic regex".
2022-02-22 13:00:24 -05:00
Jean Boussier
ce1517ea52 Fix CHANGELOG typos 2022-02-22 18:53:52 +01:00
Hartley McGuire
67b9347c16 use git init -b in generator when supported
This has the benefit of hiding the warning message from git when
initialBranch configuration is unset, and was a recommendation on the
original commit adding main as the default branch for generators.

Ref: eb261937ac856100b4e1c8a2dbb56aab6e5d140e
2022-02-22 11:05:46 -05:00
Matthew Draper
e4140140af Warm-up to avoid autoloads interfering with class serial 2022-02-22 21:00:16 +10:30
Matthew Draper
bdb0610c10 Skip apparently-troublesome test on CI for now
I haven't yet identified why this particular test is causing issues when
other similarly-shaped ones seem fine, but if skipping it gets CI
working again, that's an improvement for now.
2022-02-22 20:43:05 +10:30
Jean Boussier
98c540dc7e
Merge pull request #44510 from SkipKayhil/unused-cache-requires
Remove unused requires in ActiveSupport::Cache
2022-02-22 09:55:06 +01:00
Jonathan Hefner
1c976f26df
Merge pull request #44514 from p8/guides/csp-small-typo
Fix small type in CSP guide [ci-skip]
2022-02-21 15:16:15 -06:00
Petrik
d20ca972ba Fix small type in CSP guide [ci-skip] 2022-02-21 22:05:58 +01:00
Jonathan Hefner
be3be7fb04
Merge pull request #44513 from p8/actionpack/remove-todo
Remove fixed TODO ActionController::Metal::ContentSecurityPolicy [ci-skip]
2022-02-21 14:15:07 -06:00
Petrik
ba3ff2def8 Improve CSP initializer copy
The `content_security_policy_report_only` config does not enable
violation reporting.
It makes sure the policy isn't enforced, only reported.

Also link to the guide instead of external documentation.
2022-02-21 21:14:34 +01:00
Petrik
646c631869 Remove fixed TODO ActionController::Metal::ContentSecurityPolicy [ci-skip]
The ActionController::Metal::ContentSecurityPolicy has documentation so
the TODO for documentation can be removed.
2022-02-21 21:10:47 +01:00
Petrik
448b65a321 Add Permissions-Policy header guide [ci-skip]
Add Permissions-Policy header to the Security guide.
2022-02-21 21:04:48 +01:00
Jonathan Hefner
65c1063bb7
Merge pull request #44493 from ghousemohamed/patch-9
removed list of gems rails 7 specified in the Rails initialization guide [ci-skip]
2022-02-21 13:42:59 -06:00
Ghouse Mohamed
aa9a2c1b7f Removed list of gems specified in the initialization guide 2022-02-22 01:05:54 +05:30
Hartley McGuire
079a065257 remove unused requires in ActiveSupport::Cache
core_ext/array/wrap
- added in b1164adda12268b38bba9b0d81c0d26b7251b8bb
- usage removed in fa986ae0cac423bf1ebcb5caeccbecf00c990094

core_ext/numeric/time
- added in ee51b51b60f9e6cce9babed2c8a65a14d87790c8, but usage was only
  in mem_cache_store so moved require there
2022-02-21 14:13:56 -05:00
Jonathan Hefner
54a2824408
Merge pull request #44482 from la-ruby/docs/cdn-sentence-fix
Improve Asset Pipeline documentation [ci-skip]
2022-02-21 12:30:10 -06:00
Jonathan Hefner
a199aaedb8 Cross-link API docs [ci-skip]
RDoc will automatically format and link API references as long as they
are not already marked up as inline code.

This commit removes markup from various API references so that those
references will link to the relevant API docs.
2022-02-21 11:45:25 -06:00
Jonathan Hefner
fe3fc94eb0 Fix formatting of "Booting process" section [ci-skip]
Rendering the list of boot steps as a code block confused the syntax
highlighter.

This commit changes the list to use RDoc's ordered list syntax, and adds
inline code markup as appropriate.
2022-02-21 11:45:19 -06:00
Jonathan Hefner
29b2a571ad Improve serialize API doc [ci-skip]
The "Serialization formats" ASCII table confused the syntax highlighter.
Additionally, the "database storage" column headers were a bit muddled,
and the "NULL" column was difficult to decipher.

This commit relocates that information to the `class_name_or_coder`
parameter description, expressed as a list of accepted values.

This commit also fixes the custom coder code example (which called
`string.rot13` instead of `rot13(string)`), and improves the
documentation formatting in various spots.
2022-02-21 11:45:10 -06:00
Jonathan Hefner
eb7a0fcec0 Improve HTTP authentication API docs [ci-skip]
This adds docs for a few public methods, and fixes a handful of
formatting issues.
2022-02-21 11:45:01 -06:00
Jonathan Hefner
75a9e1be75 Improve Flash API docs [ci-skip]
This cross-links the `flash` method doc to the `Flash` and `FlashHash`
class docs, and fixes a code snippet formatting issue.
2022-02-21 11:11:11 -06:00
Jonathan Hefner
2a5acb00cb Remove duplicate :key_provider option doc [ci-skip] 2022-02-21 11:11:11 -06:00
Jonathan Hefner
62c88676e3 Fix config names for EnvelopeEncryptionKeyProvider [ci-skip] 2022-02-21 11:11:11 -06:00
Jonathan Hefner
0c6ea785b6 Remove EventedFileUpdateChecker#updated? caveat [ci-skip]
Since #39718, `EventedFileUpdateChecker#updated?` no longer always
returns `true` after a fork.
2022-02-21 11:11:11 -06:00
Jonathan Hefner
9dbf7a58a2 Fix formatting of parameters doc [ci-skip] 2022-02-21 11:11:11 -06:00
Jonathan Hefner
a801aa7cde Mark up inline code [ci-skip] 2022-02-21 11:11:11 -06:00
Jonathan Hefner
e37adfed4e Add Oxford commas [ci-skip] 2022-02-21 11:11:11 -06:00
Jonathan Hefner
07bee949c4 Replace backticks with RDoc markup [ci-skip]
RDoc does not support backticks the way that Markdown does.  Instead,
inline code must be wrapped with `+` or `<tt>`.
2022-02-21 11:11:11 -06:00
Jonathan Hefner
0d3effc97e Replace "overwrite" with "override" [ci-skip]
"Overwrite" means "destructively replace", and is more suitable when,
for example, talking about writing data to a location.

"Override" means "supersede", and is more suitable when, for example,
talking about redifining methods in a subclass.
2022-02-21 11:11:11 -06:00
Jonathan Hefner
5fdbd217d1 Fix typos [ci-skip] 2022-02-21 11:11:11 -06:00
Fabio Sangiovanni
6e30c183b6 Fix some typos. 2022-02-21 17:58:23 +01:00
Matthew Draper
8bbe91d2f4
Merge pull request #44502 from matthewd/run-rails-through-ruby
Be explicit every time we invoke 'rails'
2022-02-22 02:10:12 +10:30