| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Ruby 2.4 the `to_time` method for both `DateTime` and `Time` will
preserve the timezone of the receiver when converting to an instance
of `Time`. Since Rails 5.0 will support Ruby 2.2, 2.3 and later we
need to introduce a compatibility layer so that apps that upgrade do
not break. New apps will have a config initializer file that defaults
to match the new Ruby 2.4 behavior going forward.
For information about the changes to Ruby see:
https://bugs.ruby-lang.org/issues/12189
https://bugs.ruby-lang.org/issues/12271
Fixes #24617.
|
|
|
|
|
|
| |
* Updated syntax
* Updated tests to match syntax
|
|
|
|
| |
[related #24243]
|
|\
| |
| | |
Remove passing `with_dispatchers` to AppGenerator
|
| |
| |
| |
| |
| |
| |
| | |
- While working on https://github.com/rails/rails/pull/22790 I found out
that we pass `with_dispatchers: true` but it's not used at all by Rails.
- We were passing `with_dispatchers: true` in few tests too but again
it's not used by Rails.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Between major versions 2 and 3, we hit a bug. It's fixed in version 3,
however, the explicit 2.x requirement of `~> '2.0'` will prevent people
from getting the fix with `bundle update` and they would have to
explicitly set the constraint to `~> '3.0'`.
For more information see: rails/web-console#178.
I propose we drop the explicit version constraints in the Gemfile. Web
Console has been relatively stable for the past couple of years, and I
don't anticipate any major alterations, like we saw between major
versions 1 and 2.
|
|\ \
| | |
| | | |
Fix description in cookies_serializer.rb being corrupted by gsub when updating
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
convert cable.coffee to cable.js
|
| |/
| |
| |
| | |
In order to eliminate the dependecy of CoffeeScript.
|
| | |
|
|/ |
|
|
|
|
| |
Rack cors initializer is only necessary to API-only applications, for when the update is unnecessary.
|
|
|
|
|
| |
Puma 3.0 and up introduced compatibility to read from `config/puma.rb` when booting from the command `$ rails server`https://github.com/puma/puma/pull/856.
|
|
|
|
|
| |
- We will remove the initializer for old apps which are migrated to
Rails 5 so that they are not affected by this breaking change.
|
|
|
|
| |
This also marks Action Cable routes as internal to Rails.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
on sprockets environment
- Remove jquery-rails if --skip-sprockets is true
Fixes #23431
|
|
|
|
|
|
|
|
| |
Redis now included in Gemfile but commented out. This change was made in
91864439c7aebb6ca710831aac6781903a433904 and is causing the test
failure.
See https://travis-ci.org/rails/rails/jobs/106994913#L1025
|
|
|
|
|
|
| |
appropriate file
Test of Rails API should be in `api_app_generator_test.rb`.
|
|\
| |
| | |
Add Default Puma Config
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the `puma` command is run without any configuration options it will detect presence of a `config/puma.rb` file and use that. Currently there is discrepancy between `puma` command and `rails server` but Evan said it would be reasonable to add in reading in config from the default location. I am working on that right now as a feature in puma/puma.
Why do we need this? By default Puma uses 16 threads, and by default ActiveRecord only has 5 threads. Due to the architecture of AR it is guaranteed that if you're running with fewer DB connections than your server has threads you will hit `ActiveRecord::ConnectionTimeoutError ` eventually if your app gets modest amounts of traffic. Since we are providing a default webserver, we should provide reasonable configuration for that webserver.
This PR does a few things, first it sets the default Puma thread count to 5 to mach ActiveRecord's default. It sets the default environment to `"development"` and the default port to 300 so that booting the server with `$ puma` will give you the same default port as `rails server`. It is worth mentioning that by reading in from `PORT` environment variable this config can work with containerized deployments, such as on Heroku.
We are not using worker processes by default, that way JRuby and windows devs can use this configuration without modification. I went ahead and included a default `on_worker_boot`. It won't be used unless a worker count is specified, that means this config will not use it. Even though it's not being used now It will make someone who wants to try modifying their config to run extra workers easier.
cc/ @pixeltrix
|
| |
| |
| |
| |
| |
| | |
This new adapter does get a little more intimate with the redis-rb gem's
implementation than I would like, but it's the least bad of the
approaches I've come up with.
|
| | |
|
|/ |
|
|\
| |
| | |
Remove action_cable_meta_tag when skip Action Cable
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
It was removed by mistake at 877a411d0c16baa4e670dae9a28f5cfcc201adc1
|
|
|
|
|
| |
`rack-cors` gem is defined in Gemfile by default only if the api,
not defined by default in rails app.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Action Cable generators creates four files which need to be removed
if `skip_action_cable` is set.
1. `app/assets/javascripts/cable.coffee`
2. `app/channels/application_cable/channel.rb`
3. `app/channels/application_cable/connection.rb`
4. `config/redis/cable.yml`
Fixes #22669.
|
|
|
|
| |
Application* parent
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's pretty common for folks to monkey patch `ActiveRecord::Base` to
work around an issue or introduce extra functionality. Instead of
shoving even more stuff in `ActiveRecord::Base`, `ApplicationRecord` can
hold all those custom work the apps may need.
Now, we don't wanna encourage all of the application models to inherit
from `ActiveRecord::Base`, but we can encourage all the models that do,
to inherit from `ApplicationRecord`.
Newly generated applications have `app/models/application_record.rb`
present by default. The model generators are smart enough to recognize
that newly generated models have to inherit from `ApplicationRecord`,
but only if it's present.
|
|/ |
|
|
|
|
|
| |
Web Console 3.0.0 is compatible with Rails 5, while the 2.x.x releases
aren't.
|
|
|
|
|
|
| |
We are using the same version constraint in the database adapters so
when a new version of the adapter that doesn't work with the version of
rails is released we don't break new applications.
|
| |
|
|\
| |
| |
| | |
assert_file understands paths with special characters
|
| |
| |
| | |
fixes #20042
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A lot of scripts assumes the existence of this folder and most would fail if it
is absent.
One example of this is `rake restart` (before the previous commit) – it tries to
`touch tmp/restart.txt`, which would fail if `tmp` does not exist, which was the
case for a freshly-cloned project as `tmp` is `.gitignored` by default.
See #20299.
[Yoong Kang Lim, Sunny Juneja]
|