| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
If you run a generator such as:
```
rails generate model accounts supplier:references
```
The resulting migration will now add the corresponding foreign key
constraint unless the reference was specified to be polymorphic.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts deprecations added in #13528.
The task is brought back for two reasons:
1. Give plugins a way to hook into the test database initialization process
2. Give the user a way to force a test database synchronization
While `test:prepare` is still a dependency of every test task, `db:test:prepare`
no longer hooks into it. This means that `test:prepare` runs before the schema
is synchronized. Plugins, which insert data can now hook into `db:test:prepare`.
The automatic schema maintenance can't detect when a migration is rolled-back,
modified and reapplied. In this case the user has to fall back to `db:test:prepare`
to force the synchronization to happen.
|
|
|
|
|
|
| |
The tests to verify our testing setup used `RAILS_ENV=development`
to execute the tests. Let's keep it as close to a real-world setup
as possible.
|
|
|
|
|
|
| |
Closes #17756
[Godfrey Chan, Zachary Scott]
|
|
|
|
| |
This removes the unwanted deprecation warnings in the tests
|
|
|
|
|
|
|
|
|
| |
This is a follow-up to 116de07. That change was for two reasons: 1) speed up the
tests by reducing the amount of log lines 2) avoid a deprecation warning from
a6de6f5.
This setting need to be on the basic app too, otherwise the deprecation warning
will show up on other unrelated test cases.
|
|\
| |
| | |
Always default the log_level to :info for Railties
|
| | |
|
| | |
|
| | |
|
|/
|
|
| |
tags to reduce spam score
|
| |
|
|
|
|
| |
Just prefer secrets over config
|
|\
| |
| |
| | |
Allow fallback to LegacyKeyGenerator when secret_key_base is not set but secrets.secret_token is
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- `secrets.secret_token` is now used in all places `config.secret_token` was
- `secrets.secret_token`, when not present in `config/secrets.yml`,
now falls back to the value of `config.secret_token`
- when `secrets.secret_token` is set, it over-writes
`config.secret_token` so they are the same (for backwards-compatibility)
- Update docs to reference app.secrets in all places
- Remove references to `config.secret_token`, `config.secret_key_base`
- Warn that missing secret_key_base is deprecated
- Add tests for secret_token, key_generator, and message_verifier
- the legacy key generator is used with the message verifier when
secrets.secret_key_base is blank and secret_token is set
- app.key_generator raises when neither secrets.secret_key_base nor
secret_token are set
- app.env_config raises when neither secrets.secret_key_base nor
secret_token are set
- Add changelog
Run focused tests via
ruby -w -Itest test/application/configuration_test.rb -n '/secret_|key_/'
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
| |
db:fixtures:load"
This reverts commit 482fdad5ef8a73688b50bba3991dd4ef6f286edd.
Fixes #17237.
|
|\
| |
| | |
Fix rbx generated Gemfile regex
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
https://travis-ci.org/rails/rails/jobs/39190983#L460
1) Failure:
AppGeneratorTest#test_psych_gem
[test/generators/app_generator_test.rb:495]:
Expected /gem 'psych',\s+'~> 2.0', \s+platforms: :rbx/ to match <snip>
http://git.io/uuLVag)\ngem 'psych', '~> 2.0', platforms: :rbx\n\n
|
|\ \
| |/
|/| |
UrlGenerationError are not catched as 404 anymore
|
| | |
|
|/
|
|
|
|
|
| |
For the most part of cases --skip-gems option just remove one line in
the Gemfile. This is not worth for the complexity it adds.
Closes #17196
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Closes #17197.
Closes #17207.
`{required}` is a type modifier so it should be:
user:references{required}:index
and not:
user:references:index{required}
|
|
|
|
|
|
|
| |
It was changed to not set the cookie in get requests at
https://github.com/rails/turbolinks/commit/62cc3db457ad9745ccda047dd43ab84fb3d89707.
Related with dcb05f26.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The assertions in AS::Duration don't actually assert.
* The assertion in Railtie will pass even when `eager_load_namespaces`
doesn't include `AppTemplate::Application` if `Rails.application` is
truthy.
For more details, see here:
* https://github.com/rails/rails/pull/16998
* https://github.com/rails/rails/pull/17000
|
|\
| |
| |
| |
| |
| |
| | |
Specify dummy app's db migrate path in plugin's test_helper.rb
Conflicts:
railties/CHANGELOG.md
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If code is not eager loaded constants are loaded on demand. Constant
autoloading is not thread-safe, so if eager loading is not enabled
multi-threading should not be allowed.
This showed up in certain Capybara scenarios: Most Capybara drivers
other than Rack::Test need a web server. In particular, drivers for
JavaScript support. Capybara launches WEBrick in its own thread for
those but that per se is fine, because the spec thread and the server
thread are coordinated.
Problem comes if the page being served in the spec makes Ajax calls.
Those may hit WEBrick in parallel, and since WEBrick is multi-threaded
and allow_concurrency? returns true in the test environment before
this patch, threads are spawned to serve those parallel requests. On
the other hand, since eager_load is false by default in the test
environment, constants are not preloaded.
So the suite is autoloading constants in a multi-threaded set. That's
a receipt for paracetamol. The symptom is random obscure errors whose
messages point somehow to constant autoloading.
As a consequence of this fix for allow_concurrency? WEBrick in
Capybara scenarios no longer runs in multi-threaded mode.
Fixes #15089.
|
|\
| |
| | |
Use dynamic path for dummy app location in plugin's test_helper.rb
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This will avoid the warning in our tests. We delete all the
config/environments/ files in the test app so our default code will not
work.
|
|\
| |
| |
| | |
Default to sorting user's test cases for now
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Goals:
1. Default to :random for newly generated applications
2. Default to :sorted for existing applications with a warning
3. Only show the warning once
4. Only show the warning if the app actually uses AS::TestCase
Fixes #16769
|
|/
|
|
|
|
| |
Since cc03675d30b58e28f585720dad14e947a57ff5b the error message became like
"Could not load database configuration. No such file -"
which doesn't really tell what's actually missing.
|
|
|
|
|
| |
This is a follow-up to ded17a4 to get the build passing on Travis.
As Travis has `ENV["RACK_ENV"]` set to `test` we need to reset that as well.
|
|\
| |
| | |
Ship with rails-html-sanitizer instead.
|
| | |
|
|\ \
| | |
| | | |
Dont mess with default order engines load (4.1.6.rc1 regression)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When copying migrations some engines might depend on schema from other
engine so we can't blindly reverse all railties collection as that would
affect the order they were originally loaded. This patch helps to only
apply the order from engines specified in `railties_order`
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| | |
[Joshua Cody & Yves Senn]
Closes #16757.
Prior to this patch schema loading rake tasks had the potential to leak a
connection to a different database. This had side-effects when rake tasks
operating on the current connection (like `db:seed`) were chained.
|