| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Only config.autoload_paths is frozen, so add the preview_path
to ActiveSupport::Dependencies.autoload_paths directly in an
after_initialize block. Also protect against a blank preview_path
being added to autoload_paths which can cause a serious slowdown
as Dir[] tries to load all *_preview.rb files under /
Fixes #13372
|
|
|
| |
See https://github.com/rails/rails/pull/13463#issuecomment-31480799 for full conversation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Move check from generated helper to test_help.rb, so that all
applications can benefit
* Rather than just raising when the test schema has pending migrations,
try to load in the schema and only raise if there are pending
migrations afterwards
* Opt out of the check by setting
config.active_record.maintain_test_schema = false
* Deprecate db:test:* tasks. The test helper is now fully responsible
for maintaining the test schema, so we don't need rake tasks for this.
This is also a speed improvement since we're no longer reloading the
test database on every call to "rake test".
|
| |
|
|
|
|
| |
By using the URL sub key in the `database.yml` by default we are exposing the ability to set other attributes such as `pool` or `reap_frequency` without need of modifying the URL to contain non-connection specific information.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now `db:drop` depends on `load_config` since so when `db:drop` gets executed `load_config` gets run. `db:structure:load` depends on `[:environment, :load_config]`. So before it runs, it executes `environment` but because `load_config` has already executed it is skipped. Note `db:load_config` is "invoke"-d twice, but only "execute"-d once:
```
** Invoke db:drop (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:drop
** Invoke db:structure:load (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config
** Execute db:structure:load
```
The fix for this is making sure that the environment is run before any `load_config`:
```
** Invoke environment (first_time)
** Execute environment
** Invoke db:drop (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:drop
** Invoke db:structure:load (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:structure:load
```
|
|
|
|
|
|
|
|
| |
Prior to #13463 when `DATABASE_URL` was set, Rails automagically used that value instead of the database.yml. There are tests in dbs_test that expect this to still be true. After that PR, `RAILS_DATABASE_URL` is expected to be read into the YAML file via ERB, this PR fixes that behavior.
Note: this does not entirely fix the tests. It seems that `ActiveRecord::Tasks::DatabaseTasks.current_config` does not process the url string correctly (convert it into a hash), and ` ActiveRecord::Tasks::DatabaseTasks.structure_load(current_config, filename)` as well as other methods in `DatabaseTasks` expect a hash.
It seems like we should involve the resolver somewhere in this process to correctly convert the database url, I do not know the best place for that /cc @josevalim
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We will default this option to true from now on to ensure users properly
handle their list of available locales whenever necessary. This option
was added as a security measure and thus Rails will follow it defaulting
to secure option.
Also improve the handling of I18n config options in its railtie, taking
the new enforce_available_locales option into account, by setting it as
the last one in the process. This ensures no other configuration will
trigger a deprecation warning due to that setting.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This will avoid false positives where caching? is nil and should be
false
|
|
|
|
|
|
|
|
| |
before the application
This test is a regression test to
b068e20b35797aa6deaa377a48c990759734f515 that changed the load order of
Action View initializers.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
It is an application global verifier that can be used to generate and
verify signed messages.
See the documentation of ActiveSupport::MessageVerifier for more
information.
|
|\
| |
| | |
Move Rack::Cache after ActionDispatch::Static in the middleware stack
|
| | |
|
| |
| |
| |
| |
| |
| | |
Broken by
6701b4cf41f6f3d9cfc6a93715acbf852d1e468e
|
|\ \
| | |
| | | |
Fix for routes task
|
| | |
| | |
| | |
| | | |
This commit fixes formatting issue for `rake routes` task, when a section is shorter than a header.
|
|/ / |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
In order to simplify profiling loading of initializers,
added instument for tracking load config initializer event from
`config/initializers`
|
|\ \
| | |
| | | |
Allow Pathnames to be added to eager load paths
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We used to support the `BACKTRACE` environment variable but when
we switched to MiniTest it got removed: f9382cd7948
This commit adds back the functionality to show the unfiltered backtrace when needed.
This also works when you run your tests with `rake`:
* `BACKTRACE=1 bin/rake test`
* `BACKTRACE=1 ruby -Itest ...`
|
| |
| |
| |
| | |
Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
|
| | |
|
|\ \
| |/
|/|
| | |
tamird-fix-ip-spoof-errors
|
| | |
|
|\ \
| | |
| | | |
Fix typos: the indefinite articles(a -> an).
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
Update Rails::Railtie::Configuration and ActionDispatch::Response#respond_to? to accept include_private argument
|