Rafael Mendonça França
e6d4ac0e50
Merge pull request #46009 from johnnyshields/bundler-use-windows-platform
...
Bundler should use platform :windows instead of :mingw, etc.
2022-09-14 22:35:59 -04:00
Rafael Mendonça França
3d1f38fa30
Merge pull request #45546 from skipkayhil/decaffeinate-ujs
...
Convert rails-ujs to ES2015 modules
2022-09-14 18:59:58 -04:00
Jonathan Hefner
6554cf67c9
Switch back to capture in AS::Deprecation tests
2022-09-14 16:50:03 -05:00
Rafael Mendonça França
514ae381a3
Merge pull request #45877 from neilvilela/nc-composed-of-hash
...
Clarify `composed_of` allows a Hash for `mapping`
2022-09-14 17:39:53 -04:00
Jonathan Hefner
a29a6ae95d
Merge pull request #46036 from jonathanhefner/deprecation-tests-prefer-capture_io
...
Prefer `capture_io` in `AS::Deprecation` tests
2022-09-14 15:46:19 -05:00
Jonathan Hefner
9fd939db9f
Merge pull request #46035 from jonathanhefner/deprecation-behavior-derive-callback-arity
...
Derive arity of `AS::Deprecation` behavior callbacks
2022-09-14 15:22:07 -05:00
Jonathan Hefner
989072a83e
Merge pull request #46033 from jonathanhefner/deprecation-test-behavior-callbacks-gamut
...
Test more `AS::Deprecation` behavior callbacks
2022-09-14 15:08:11 -05:00
Jonathan Hefner
e35df47d95
Prefer capture_io in AS::Deprecation tests
...
For these tests, `capture_io` is more performant than
`ActiveSupport::Testing::Stream#capture`, and it eliminates one testing
dependency.
2022-09-14 15:01:03 -05:00
Jonathan Hefner
7d9c81a934
Derive arity of AS::Deprecation behavior callbacks
...
This changes `arity_coerce` to always derive the arity of the callback,
even when it does not respond to `arity`. Thus, callable objects that
don't respond to `arity` can now implement either a 2-arity or 4-arity
`call` method, the same as lambda callbacks.
2022-09-14 15:00:09 -05:00
Rafael Mendonça França
83b24d3911
Merge pull request #46034 from fatkodima/flaky-enum-migration-inverting-test
...
Fix flaky PostgreSQL enum migration reversibility test
2022-09-14 15:58:32 -04:00
Jonathan Hefner
3daab50354
Test more AS::Deprecation behavior callbacks
...
This expands test coverage of `behavior` and `disallowed_behavior`
callbacks to include additional arities and proc types.
2022-09-14 14:50:12 -05:00
Rafael Mendonça França
00676252a6
Merge pull request #46031 from fatkodima/in_order_of-else
...
Remove redundant `ELSE` branch from the `ActiveRecord::Base.in_order_of` SQL query
2022-09-14 15:40:40 -04:00
Jonathan Hefner
d0bdbc1827
Merge pull request #46026 from jonathanhefner/deprecation-non-global-disallowed_warnings
...
Fix `disallowed_warnings` for non-global deprecators
2022-09-14 14:15:22 -05:00
fatkodima
34dec308a4
Fix flaky PostgreSQL enum migration reversibility test
2022-09-14 22:15:14 +03:00
fatkodima
49c2342add
Remove redundant `ELSE` branch from the `ActiveRecord::Base.in_order_of` SQL query
2022-09-14 18:37:37 +03:00
Petrik de Heus
3d019868d5
Merge pull request #46030 from alexandreruban/fix-form-with-documentation
...
[ci skip] Fix form_with documentation
2022-09-14 16:02:52 +02:00
Jean Boussier
bbb55c8c4e
Merge pull request #45738 from mansakondo/actioncable-channel-reconnected-callback
...
Add ability to handle reconnects with the `connected()` callback
2022-09-14 13:36:00 +02:00
Alexandre Ruban
3259a80a3b
[ci skip] Fix form_with documentation
...
Remote forms are no longer the default with the `form_with` helper.
2022-09-14 12:26:55 +02:00
mansakondo
27a967ef70
Add ability to handle reconnects with the `connected()` callback
2022-09-14 12:14:58 +02:00
Petrik de Heus
402cbf9527
Merge pull request #46027 from igaiga/rails_guide_fix_sql_injection_sqmple
...
Update guides on secuity page for sql injection sample code [ci-skip]
2022-09-14 11:36:42 +02:00
Jean Boussier
48d3d6e70d
Merge pull request #46004 from Shopify/error-unsubscribe
...
ErrorReporter: allow to unsubscribe
2022-09-14 11:14:31 +02:00
Jean Boussier
217df1a780
ErrorReporter: allow to unsubscribe
...
This may be useful if you'd like to replace or remove a subscriber
added by one of your dependencies.
2022-09-14 10:55:28 +02:00
Petrik de Heus
0e22ff24ec
Merge pull request #46024 from sreeram-venkitesh/fix-action-controller-link [ci-skip]
...
Fixed ActionController link in `Layouts and Rendering in Rails` docs
2022-09-14 10:33:24 +02:00
Kuniaki Igarashi
e3a35e228b
Update guides on secuity page for sql injection sample code [ci-skip]
2022-09-14 10:22:55 +09:00
Jonathan Hefner
2c5eda36c0
Merge pull request #46025 from jonathanhefner/deprecation-tests-use-explicit-deprecator-pt3
...
Use explicit deprecator in `AS::Deprecation` tests
2022-09-13 16:05:21 -05:00
Jonathan Hefner
2540f94e82
Fix disallowed_warnings for non-global deprecators
...
Prior to this commit, the globally configured
`ActiveSupport::Deprecation.disallowed_warnings` affected all
deprecators, and each deprecator's `#disallowed_warnings` had no effect.
(Though the same was not true for `ActiveSupport::Deprecation.allow`,
which would only affect warnings from `ActiveSupport::Deprecation.warn`,
not warnings from non-global deprecators.)
This commit fixes `disallowed_warnings` to only affect the deprecator
on which it is configured.
2022-09-13 15:43:41 -05:00
Sreeram Venkitesh
dd6d6229aa
Changed ActionController to AbstractController
2022-09-14 01:10:28 +05:30
Jonathan Hefner
6a9e423a04
Use explicit deprecator in AS::Deprecation tests
...
Follow-up to #46019 .
This changes more deprecation tests to use an explicit deprecator, as
part of an initiative to move away from the top-level
`ActiveSupport::Deprecation` API, based on the discussion in #44772 .
2022-09-13 14:14:49 -05:00
Gannon McGibbon
ab67599c47
Merge pull request #45999 from gmcgibbon/clarify_edge_option_doc
...
Clarify --edge points to latest stable branch of rails
2022-09-13 12:31:32 -05:00
Gannon McGibbon
5f97bd460e
Clarify --edge points to latest stable branch of rails
...
The --edge option points or the latest stable branch of a release of
rails (eg. rails _7.1_ new my_app --edge would point to 7-1-stable).
When using a prerelease of Rails, main is used instead.
2022-09-13 12:00:56 -05:00
Jean Boussier
b1c5ae3947
Merge pull request #46020 from Shopify/simpler-error-subscribe
...
Simpler Railtie subscribe in `error_reporting.md`
2022-09-13 10:56:55 +02:00
Jean Boussier
46e77b4d62
Simpler Railtie subscribe in `error_reporting.md`
...
Followup: https://github.com/rails/rails/pull/45946
2022-09-13 10:32:32 +02:00
johnnyshields
b7e809a96e
Bundler should use platform :windows instead of :mingw, :mswin, :x64_mingw, :mswin64. This is a recently added feature to bundler/rubygems in v3.3.22.
2022-09-13 16:45:59 +09:00
Jonathan Hefner
f0ba13a2b8
Merge pull request #46019 from jonathanhefner/deprecation-tests-use-explicit-deprecator-pt2
...
Use explicit deprecator in `AS::Deprecation` tests
2022-09-12 23:51:35 -05:00
Jonathan Hefner
9615851e80
Merge pull request #46016 from jonathanhefner/deprecation-test-log-behavior
...
Test `AS::Deprecation` `:log` behavior
2022-09-12 23:23:59 -05:00
Jonathan Hefner
f8c24407dd
Merge pull request #46018 from jonathanhefner/deprecation-tests-use-declarative-syntax
...
Use declarative syntax for `AS::Deprecation` tests
2022-09-12 23:01:36 -05:00
Jonathan Hefner
ed7dcb17f4
Use explicit deprecator in AS::Deprecation tests
...
Follow-up to #46000 .
This changes more deprecation tests to use an explicit deprecator, as
part of an initiative to move away from the top-level
`ActiveSupport::Deprecation` API, based on the discussion in #44772 .
2022-09-12 22:56:59 -05:00
Jonathan Hefner
63a2174c9e
Merge pull request #46017 from jonathanhefner/deprecation-redundant-tests
...
Remove redundant `AS::Deprecation` tests
2022-09-12 22:41:25 -05:00
Jonathan Hefner
392c6bf9eb
Test AS::Deprecation :log behavior
...
This adds test coverage for the `ActiveSupport::Deprecation` `:log`
behavior.
2022-09-12 22:20:38 -05:00
Jonathan Hefner
7598cba1a9
Use declarative syntax for AS::Deprecation tests
...
This changes `ActiveSupport::Deprecation` tests to use the declarative
`test` syntax, to better explain what they are testing.
2022-09-12 22:15:59 -05:00
Jonathan Hefner
018bbf4bbf
Remove redundant AS::Deprecation tests
...
These tests were made redundant when `ActiveSupport::Deprecation` was
turned into a class in 71993c6f97
.
Specifically, `test_deprecated_instance_variable_with_given_deprecator`
is redundant with `test_deprecated_instance_variable_with_instance_deprecator`,
and `test_delegate_deprecator_instance` is redundant with
`test_deprecation_in_other_object`.
2022-09-12 21:53:59 -05:00
Rafael Mendonça França
46bfabcfd4
Merge pull request #44547 from skipkayhil/fix-incorrect-assertions
...
fix remaining asserts that should be assert_equal
2022-09-12 20:32:42 -04:00
Yasuo Honda
1f7676efa5
Merge pull request #46005 from yahonda/diag45899
...
Remove QueAdapter from Active Job
2022-09-12 23:18:13 +00:00
Jonathan Hefner
180bf6dcb5
Merge pull request #46015 from jonathanhefner/deprecation-disallowed-with-default-warning
...
Fix disallowed deprecations with default warning
2022-09-12 17:07:32 -05:00
Rafael Mendonça França
b36459b6c0
Merge pull request #46014 from kardasis/plugin-guide-inconsistencies
...
Clarifications for the Plugins Rails Guide
2022-09-12 17:31:27 -04:00
Eileen M. Uchitelle
cd31ae249b
Merge pull request #46012 from eileencodes/fix-bug-in-internal-metadata
...
Fix bug in internal metadata
2022-09-12 16:43:20 -04:00
Ari Kardasis
d842f463f6
Clarifications for the Plugins Rails Guide
...
- Provides instructions to modify yaffle.gemspec
- adds missing require statements
2022-09-12 16:35:39 -04:00
eileencodes
3d50f34af0
Fix bug in internal metadata
...
Since changing internal metadata to no longer inherit from Base
in #45982 I accidentally changed the behavior when a key's value is the
same. Prior to this change the record would not be updated if the
environment key was found an the value had not changed. So instead of
just checking whether we have an entry here we also need to check if the
value should actually be updated, otherwise we should return the entry.
2022-09-12 16:02:59 -04:00
Petrik de Heus
ea7a206c1d
Merge pull request #46011 from ybakos/active_model_documentation [ci skip]
...
ActiveModel: Fix method name in Callbacks documentation.
2022-09-12 21:54:18 +02:00
Eileen M. Uchitelle
ac751f8cbe
Merge pull request #46010 from eileencodes/minor-refactor-to-sm-and-im
...
Minor refactoring to schema migration and internal metadata
2022-09-12 14:51:57 -04:00