| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
We sometimes say "✂️ newline after `private`" in a code review (e.g.
https://github.com/rails/rails/pull/18546#discussion_r23188776,
https://github.com/rails/rails/pull/34832#discussion_r244847195).
Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style
`EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059).
That cop and enforced style will reduce the our code review cost.
|
|
|
|
| |
For avoid to show `environment_desc` in help.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since 3777701f1380f3814bd5313b225586dec64d4104, the environment's name is
automatically expanded in console and dbconsole commands.
In order to match the behavior between the commands, fixes it to have the
same behavior of all the commands.
This behavior is defined in `EnvironmentArgument`. Since
`EnvironmentArgument` also defines the environment option, it is reused.
However, since desc was not content that can be used in all comments,
fixed desc to be defined for each command.
|
| |
|
|\
| |
| | |
Don't load app environment when editing credentials
|
| |
| |
| |
| | |
This avoids missing key exceptions caused by code that tries to read the credentials before they have been added to the encrypted file, for example when editing the credentials for a new environment.
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
Currently we sometimes find a redundant begin block in code review
(e.g. https://github.com/rails/rails/pull/33604#discussion_r209784205).
I'd like to enable `Style/RedundantBegin` cop to avoid that, since
rescue/else/ensure are allowed inside do/end blocks in Ruby 2.5
(https://bugs.ruby-lang.org/issues/12906), so we'd probably meets with
that situation than before.
|
|
|
|
| |
To prevent style check in review like https://github.com/rails/rails/pull/33608#discussion_r211087605.
|
|
|
|
|
| |
With this commit, rails commands usage instructions display now +rails+
instead of +bin/rails+ within their recommendations.
|
|
|
|
|
|
|
|
|
|
|
| |
`DidYouMean::SpellChecker` is not defined.
`did_you_mean` is bundled in Ruby but can be uninstalled, and is not always
available, sometimes even on our CI:
https://travis-ci.org/rails/rails/jobs/372638523#L2405
https://travis-ci.org/rails/rails/jobs/372638523#L2416
https://travis-ci.org/rails/rails/jobs/372638523#L2427
...
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we require Ruby over `2.3`, we can replace the current
suggestion methods we have with tooling from the `did_you_mean` gem.
There is a small user visible change and this is that we now offer a
single suggestion for misspelled options. We are suggesting fixes during
generator invocation and during a mistyped rails server rack handler. In
both cases, if we don't make a proper prediction on the first match, we
won't do so in the second or third one, so in my mind, this is okay.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To edit/show encrypted file:
```
bin/rails encrypted:edit config/staging_tokens.yml.enc
bin/rails encrypted:edit config/staging_tokens.yml.enc --key config/staging.key
bin/rails encrypted:show config/staging_tokens.yml.enc
```
Also provides a backing Rails.application.encrypted API for Ruby access:
```ruby
Rails.application.encrypted("config/staging_tokens.yml.enc").read
Rails.application.encrypted("config/staging_tokens.yml.enc").config
Rails.application.encrypted("config/staging_tokens.yml.enc", key: "config/staging.key")
```
|
|
|
|
| |
This basically reverts 618268b4b9382f4bcf004a945fe2d85c0bd03e32
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Running the `console` and `dbconsole` commands with a regular argument
as the environment's name automatically expand it to match an existing
environment (e.g. dev for development).
This feature wasn't available using the `--environment` (a.k.a `-e`)
option.
|
|
|
|
|
|
| |
People should rather rely on the `-e` or `--environment` options to
specify in which environment they want to work. This will allow us
to specify the connection to pick as a regular argument in the future.
|
| |
|
|
|
|
|
|
| |
".. with __dir__ we can restore order in the Universe." - by @fxn
Related to 5b8738c2df003a96f0e490c43559747618d10f5f
|
|
|
|
|
| |
Currently rails' help shows only namespace. However, the secrets command
needs to specify command. Therefore, I fixed the command to display in help.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Since `Thor::HELP_MAPPINGS` contains `-D`, so `bin/rails -D` show
rails's help. But, in Rails 5.0.1, `bin/rails -D` show the description
of rake task. I think that it is better to have the same behavior.
|
|
|
|
|
|
|
|
| |
Currently, all rails commands can be executed in engine,
but `server`, `console`, `dbconsole` and `runner` do not work.
This make all rails commands work in engine.
Related to #22588
|
|
|
|
| |
It can also take an options hash.
|
|
|
|
|
|
|
|
|
| |
Thor would inadvertantly duplicate the command usage because
of the help method in a command class.
Fixes #26664.
[ Yuji Yaginuma & Kasper Timm Hansen ]
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Prescribed some review fixes for myself!
|
|
|
|
|
| |
Still vulnerable to different file structures. We likely want something
more robust when we tackle in app commands.
|
| |
|
|
|