This commit resolves an integration bug between ActionCable and Redis >= 5.0 when using sentinels configuration.
The issue arises from the fact that the sentinels configuration is a nested array of hashes, while the Redis client expects keys to be symbols.
This fix modifies the preparation of the Redis configuration to ensure that all keys are represented as symbols.
Action Cable can be mounted standalone, but it loses the health check
route provided by the railties.
This change adds configuration for a health check rack app and a
health check route to "mount" the rack app.
Fixes#48185
This PR is similar to https://github.com/rails/rails/pull/47025, it makes Action Cable's `assert_broadcasts` return the messages that were broadast. This way you can do more analysis on them:
```ruby
messages = assert_broadcasts("test", 2) do
ActionCable.server.broadcast "test", { message: "one" }
ActionCable.server.broadcast "test", { message: "two" }
end
assert_equal 2, messages.length
assert_equal({ "message" => "one" }, messages.first)
assert_equal({ "message" => "two" }, messages.last)
```
This is helpful if you expect lots of messages to be broadcast or if you want to only match on some element of the data; `assert_broadcast_on` doesn't work well in either of those scenarios.
Currently when opening the main framework pages there is no introduction
to the framework. Instead we only see a whole lot of modules and the
`gem_version` and `version` methods.
By including the READMEs using the `:include:` directive each frameworks
has a nice introduction.
For markdown READMEs we need to add the :markup: directive.
[ci-skip]
Co-authored-by: zzak <zzakscott@gmail.com>
* Remove Copyright years
* Basecamp is now 37signals... again
Co-authored-by: David Heinemeier Hansson <dhh@hey.com>
---------
Co-authored-by: David Heinemeier Hansson <dhh@hey.com>
Since engine initializers run later in the process, we need to run this
initializer earlier than the default.
This ensures they're all registered before the environments are loaded.
This fixes the following warning when running Action Cable tests:
```
DEPRECATION WARNING: Calling `ActiveRecord::Base.clear_reloadable_connections! is deprecated. Please call the method directly on the connection handler; for example: `ActiveRecord::Base.connection_handler.clear_reloadable_connections!`.
```
This fixes the following error when running Action Cable tests:
```
NoMethodError: undefined method `clear_all_connections!' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
actioncable/test/subscription_adapter/postgresql_test.rb:38:in `teardown'
```
This commit adds `ActionCable.deprecator`, and adds it to
`Rails.application.deprecators` so that it can be configured via
settings such as `config.active_support.report_deprecations`.
This fixes the following warning when running Action Cable tests:
```
DEPRECATION WARNING: Calling `ActiveRecord::Base.clear_all_connections! is deprecated. Please call the method directly on the connection handler; for example: `ActiveRecord::Base.connection_handler.clear_all_connections!`.
```
We recently let a few very easy to avoid warnings get merged.
The root cause is that locally the test suite doesn't run in
verbose mode unless you explictly pass `-w`.
On CI warnings are enabled, but there is no reason to look at the
build output unless something is failing. And even if one wanted
to do that, that would be particularly work intensive since warnings
may be specific to a Ruby version etc.
Because of this I believe we should:
- Always run the test suite with warnings enabled.
- Raise an error if a warning is unexpected.
We've been using this pattern for a long time at Shopify both in private
and public repositories.