| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Use appropriate type to `header` option
|
| |
| |
| |
| |
| | |
The `header` option checks only whether it is specified or not.
https://github.com/rails/rails/blob/e8c33349bfabca28996ac74d344d69c7aaffec50/railties/lib/rails/commands/dbconsole/dbconsole_command.rb#L52
|
|\ \
| | |
| | | |
Update backtrace cleaner to use `Regexp#match?`
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Clear active connections after initialization
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Any connections that were checked out during initialization should be
checked back in before the first request is processed, for two reasons:
- Returning the connection to the pool allows it to be health checked
before it's used again. If the connection dies before the first
request arrives, the health check will replace it with a new one.
- If the thread that initialized Rails is not the same thread that will
be performing work, checking in the connection will allow it to be
reused instead of being stuck to the initialization thread forever.
|
|\ \ \
| | | |
| | | | |
Raise when using a bad symlink
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There was a case where a dev made a symlink that worked on some machines and not on others. The issue manifested itself on a machine with `RAILS_ENV=staging` as the had their `config/environments/staging.rb` symlinked to another config file. The behavior was very hard to track down.
Current behavior: If you use a bad symlink in a file, you get no warnings or failures or anything. If you have a bad symlink it just ignores the file as if it didn't exist (`File.exist?` returns false for a bad symlink).
Patch behavior: With this patch when a file is not present we check if a symlink exists. If it does, that indicates there is a bad symlink and we should raise
```
File "config/environments/staging.rb" is a symlink that does not point to a valid file
```
|
| | | |
| | | |
| | | |
| | | | |
`Rails.groups` contains `Rails.env` that is inspected as String.
|
| | | |
| | | |
| | | |
| | | | |
Follow up to #28546
|
|\ \ \ \
| | | | |
| | | | | |
make it clear how to enable caching
|
| | | | | |
|
| | | | |
| | | | |
| | | | | |
since this is a new change, many will be coming here to toggle the true/false config and not find it. This will allow them to quickly implement the change.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The `master` changelog refer back to the `5-1-stable` changelog as a
base. No need to duplicate backported entries in the changelogs on
`master`.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
With Rack::Test the headers needs to match the `HTTP_` format. The tests
were passing before because they are not asserting the response was a
cache hit.
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
y-yagi/remove_unnecessary_files_to_api_applications_when_app_task_task_executed
Remove unnecessary files to API-only Applications when `app:task` task executed
|
| |/ / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | | |
Remove -j (--javascript) option from `rails new`
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The "-j" option was added 5 years ago (https://github.com/rails/rails/commit/d9c39c3a)
when we wanted to support prototype-rails and jquery-rails.
Prototype is not as popular and jQuery is not a requirement anymore.
Still the "-j" option can be used to install *any* gem that ends in "-rails".
This "might" open security issues and does not bring great benefits anymore.
If you know which "-rails"-ending gem you want to install, you can manually
add it to the Gemfile just like any other gem.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Since 4.2 the default log level in production is now debug. We removed
the deprecation in c2e865849beadd99866e521a93d733da7d1b5255
but we don't reflected the default value. We are not appling it.
Closes #28558
|
|\ \ \ \ \
| | | | | |
| | | | | | |
fix migrate with empty version
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Add stronger assertions to rake migration tasks to make sure the user is providing a numeric VERSION
An empty string was getting converted to version = 0. This would in turn pass the presence check.
Address linting warning
Add test for rake task and refactor code to meet expectations
In particular passing VERSION=0 should not raise an error.
Addressed Comments for PR #28485. Trimmed empty lines + change of wording for error message
Adjust test for change of wording in error message
Change condition to follow rails idioms
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
y-yagi/do_not_display_hidden_namespaces_in_destroy_command_help
Do not show hidden namespaces in destroy commnad help
|
| |/ / / / / |
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
ignore system test gems on Gemfile when execute with --skip-test option
|
| |/ / / / |
|
| | | | | |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | | |
This is a follow up to a6d065e. When using `form_with` you must supply
field ids manually. Since the scaffold generator is using labels we
need to make sure that they are linked up properly.
|
|\ \ \ \
| | | | |
| | | | | |
List options for `rails new --webpack=WEBPACK`
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When you type `rails new -h`, the `--database=DATABASE` options display
this useful message:
> Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
However, the `--webpack=WEBPACK` option only displays this:
> Preconfigure for app-like JavaScript with Webpack
so it's hard to know *which* values are valid for `WEBPACK`.
This commit improves the help message to display:
> Preconfigure for app-like JavaScript with Webpack (options: react/vue/angular)
The implication of this commit is that the list needs to be manually updated
whenever rails/webpacker adds support for a new framework.
However, I don't imagine this list to change very frequently, and I think that
the benefit of display the list to the users is greater than the hustle of
updating the list when needed.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Correctly reset ARGV for "rails runner `CODE' arg arg arg..."
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The code itself should not be in the ARGV vector.
Fixes #28515
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
CLI arg "host" has precedence over ENV var "host"
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is a regression from when the server command switched to its own
argument parser, as opposed to Rack's. Rack's argument parser, when
provided with a "host" argument, gives that value precedence over
environment variables.
|
|\ \ \ \ \ \ \
| |_|_|/ / / /
|/| | | | | | |
Don't add a dummy API key to every new Rails app
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Every new Rails app is currently generated with
`Rails.application.secrets[:api_key]` set to `123`.
This comes from a line in `config/secrets.yml` that, in my opinion,
should be left commented out to only serve as a syntax example, rather
than being actually set in every Rails app.
Additionally, we might want to give a better example than `123`, since
in the same file we are suggesting to
> Make sure the secret is at least 30 characters and all random,
> no regular words or you'll be exposed to dictionary attacks.
The result of this commit is that `config/secrets.yml` will include something like:
```yaml
# Shared secrets are available across all environments.
# shared:
# api_key: f56930851993982510d5bd9236f4108f6fe7c15448f1c6923a51872e0dbae1a24d274b318abb6518b540dfb51079c61640885f607467e5ed1053849be7587d61
```
rather than this:
```yaml
# Shared secrets are available across all environments.
shared:
api_key: 123
```
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is necessary only when updating to Rails 5.0, it is not necessary
for updating to 5.1.
Related #24243
|
|/ / / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The entry for PR #25430 is currently present both in the CHANGELOG
for Rails 5.0 and for Rails 5.1:
https://github.com/rails/rails/blame/9d3a352777c2594123583b0bc02d0dd80f1e385b/railties/CHANGELOG.md#L61-L72
Since the PR was backported to 5-0-stable in #25499, I believe it
should be removed from the CHANGELOG of 5.1, otherwise it looks like
something changed from 5.0 to 5.1
|
| | | |
| | | |
| | | |
| | | | |
More intention revealing and means `f` can go F itself 😋
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
chukitow/feature/user-form-with-instead-of-form-for-scaffold
user form with instead of form for in scaffold generator
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Occasionally we update the file generated by engine.
Therefore, I think that there is a task for updating as well as
application in the engine, it is convenient for updating.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix `warning: character class has duplicated range`
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This fixes the following warnings:
```
railties/test/generators/encrypted_secrets_generator_test.rb:15: warning: character class has duplicated range: /[\w\d]+/
railties/test/generators/encrypted_secrets_generator_test.rb:18: warning: character class has duplicated range: /production:\n# external_api_key: [\w\d]+/
railties/test/generators/encrypted_secrets_generator_test.rb:19: warning: character class has duplicated range: /production:\n# external_api_key: [\w\d]+/
```
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It can not check correctly with `defined?`
```ruby
irb(main):001:0> Rails.application.config.active_record
=> {:maintain_test_schema=>true, :belongs_to_required_by_default=>true}
irb(main):002:0> defined?(Rails.application.config.active_record)
=> nil
```
Follow up to #28469
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Instead of forcing new applications to carry an initializer that just
switches things to what their default "should" be, we can handle it
internally.
The initializer is then only used by upgraders: it shows what the new
default would be (commented out), while their upgraded application
continues to operate as it did before.
Under this model, a multiply-upgraded application could accumulate
several new_framework_defaults_*.rb files, for each release series it
has traversed. A given release series only needs to generate the latest,
though, because we don't support `rails app:upgrade` while skipping
releases.
|