Commit Graph

83060 Commits

Author SHA1 Message Date
Jonathan Hefner
840ecf1e96
Merge pull request #44508 from jonathanhefner/apidocs-format-application-booting-process
Fix formatting of "Booting process" section [ci-skip]
2022-02-23 12:07:56 -06:00
Jonathan Hefner
48787410a3
Merge pull request #44507 from jonathanhefner/apidocs-improve-active_record-serialize-doc
Improve `serialize` API doc [ci-skip]
2022-02-23 12:07:26 -06:00
Jonathan Hefner
8e080d04ce
Merge pull request #44505 from jonathanhefner/apidocs-improve-http-authentication-doc
Improve HTTP authentication API docs [ci-skip]
2022-02-23 12:06:56 -06:00
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
É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
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
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
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
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
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
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
Matthew Draper
ad0f0e6980 Be explicit every time we invoke 'rails'
This almost never matters, but if the path-global 'rake' or 'rails'
points to a specific (and wrong) ruby version, (or, possible in CI,
there is no installed 'rails' executable), things get confused.

Instead, any time we mean "run a global 'rails', as for 'new'", use a
fully-qualified path to our in-tree copy. And any time we're working
inside an application, use the bin/rails script directly. It would be
equivalently valid to always use the one in exe/, because that handles
searching for bin/rails internally... but it's uglier to fully-qualify,
plus 'rake' would then be more complicated.
2022-02-22 00:54:10 +10:30
Jean Boussier
7b1f65e8f5
Merge pull request #44499 from Shopify/ac-live-thread-copy
Copy over the IsolatedExecutionState in AC::Live
2022-02-21 12:28:41 +01:00
Jean Boussier
d32767884d Copy over the IsolatedExecutionState in AC::Live
Fix: https://github.com/rails/rails/issues/44496

It's really unfortunate, but since thread locals were copied
since a decade and we moved most of them into IsolatedExecutionState
we now need to copy it too to keep backward compatibility.

However I think it's one more sign that AC::Live should be
rethought.
2022-02-21 11:40:52 +01:00
Vipul A M
c21c4139e1
Merge pull request #44494 from ghousemohamed/patch-10 2022-02-20 16:34:35 -05:00
Ghouse Mohamed
ea0685fee9 Fixed typo: HTML 5 -> HTML5 2022-02-21 02:34:46 +05:30
Jean Boussier
c9c1768a91
Fix a typo in Pathname#blank? documentation [ci-skip] 2022-02-20 17:34:28 +01:00
Guillermo Iguaran
13d75c40fd
Merge pull request #44485 from byroot/fix-pathname-blank
`Pathname.blank?` only returns true for `Pathname.new("")`
2022-02-20 00:32:48 -08:00