aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/command
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Style/RedundantBegin` cop to avoid newly adding redundant begin blockRyuta Kamizono2018-12-211-6/+4
| | | | | | | | | | 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.
* Enable Style/ParenthesesAroundCondition copRyuta Kamizono2018-08-191-2/+2
| | | | To prevent style check in review like https://github.com/rails/rails/pull/33608#discussion_r211087605.
* Show rails instead of bin/rails on USAGE instructionsAlberto Almagro2018-07-061-1/+1
| | | | | With this commit, rails commands usage instructions display now +rails+ instead of +bin/rails+ within their recommendations.
* Partly revert #32289 to provide Rails' custom fallback in caseutilum2018-05-011-2/+49
| | | | | | | | | | | `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 ...
* Use `did_you_mean` spell checker for option suggestionsGenadi Samokovarov2018-03-231-44/+2
| | | | | | | | | | | 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.
* Extract Rails::Command::SpellcheckerGenadi Samokovarov2018-03-042-40/+53
|
* Rubocop styleDixit Patel2017-11-241-0/+2
|
* Add CLI to manage encrypted files/configs.Wojciech Wnętrzak2017-11-151-0/+33
| | | | | | | | | | | | | | | | | | 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") ```
* [Railties] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts 618268b4b9382f4bcf004a945fe2d85c0bd03e32
* Use tt in doc for railties [skip ci]Yoshiyuki Hirano2017-08-272-5/+5
|
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-144-0/+8
|
* Railties updates for frozen string literals.Pat Allan2017-08-141-1/+1
|
* Properly expand the environment's nameRobin Dupret2017-07-161-1/+6
| | | | | | | | | 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.
* Deprecate environment as an argument for dbconsole and consoleRobin Dupret2017-07-161-0/+6
| | | | | | 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.
* [Railties] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* Define path with __dir__bogdanvlviv2017-05-231-1/+1
| | | | | | ".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2df003a96f0e490c43559747618d10f5f
* Show correct commands in helpyuuji.yaginuma2017-03-031-1/+7
| | | | | Currently rails' help shows only namespace. However, the secrets command needs to specify command. Therefore, I fixed the command to display in help.
* Revert "Revert "Add encrypted secrets""Kasper Timm Hansen2017-02-231-2/+8
|
* Revert "Add encrypted secrets" (#28127)David Heinemeier Hansson2017-02-231-8/+2
|
* Add encrypted secrets (#28038)Kasper Timm Hansen2017-02-231-2/+8
|
* Share the common implementation between apps and engines.Kasper Timm Hansen2017-02-181-12/+7
|
* allow to pass describe option to rakeyuuji.yaginuma2017-01-171-1/+1
| | | | | | 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.
* make all rails commands work in engineyuuji.yaginuma2017-01-091-0/+5
| | | | | | | | 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
* Match Thor's `desc` signature.Kasper Timm Hansen2016-12-311-1/+1
| | | | It can also take an options hash.
* Prevent command name being printed twice.Kasper Timm Hansen2016-12-311-0/+8
| | | | | | | | | Thor would inadvertantly duplicate the command usage because of the help method in a command class. Fixes #26664. [ Yuji Yaginuma & Kasper Timm Hansen ]
* Privatize unneededly protected methods in RailtiesAkira Matsuda2016-12-251-6/+6
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-2/+2
|
* Apply Rafaels review fixes.Kasper Timm Hansen2016-09-251-1/+1
|
* Fix console tests.Kasper Timm Hansen2016-09-251-0/+2
|
* Per Dr. Eileen's orders :)Kasper Timm Hansen2016-09-251-1/+1
| | | | Prescribed some review fixes for myself!
* Simplify auxiliary command files directory finding.Kasper Timm Hansen2016-09-251-1/+1
| | | | | Still vulnerable to different file structures. We likely want something more robust when we tackle in app commands.
* Run engine commands through command infrastructure.Kasper Timm Hansen2016-09-252-6/+35
|
* Initial command structure.Kasper Timm Hansen2016-09-254-0/+303