aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/runner/runner_command.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use `say`/`error` instead of `puts`/`$stderr.puts`bogdanvlviv2018-08-221-6/+6
| | | | Follow up 44007c07098a3c633180881cae9285da4622e63f
* Use `TOPLEVEL_BINDING` in rails runner commandyuuji.yaginuma2017-09-221-2/+2
| | | | | | | | | Binding to capture the local scope. This means that if a constant with same name as constant specified by the user exists in local scope, constant defined in local will use. This is different from what the user expects. Therefore, fixed to use top-level binding instead of local scope. Fixes #30644
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* support `-` as an argument to `rails runner`Cody Cutrer2017-07-171-2/+4
| | | | | | | | | | | | | in Rails 4.0, you could use `/dev/stdin` on both Linux and Mac, but with the switch to Kernel.load in Rails 4.1, this broke on Linux (you get a LoadError). Instead, explicitly detect `-` as meaning stdin, then read from stdin explicitly, instead of performing file gymnastics. This should now work on any platform uniformly. Passing a script via stdin is useful when you're sshing to a server, and the script you want to run is stored locally. You could theoretically pass the entire script on the command line, but in reality you'll run into problems with the command being too long.
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Correctly reset ARGV for "rails runner `CODE' arg arg arg..."Robert Thau2017-03-221-2/+3
| | | | | | The code itself should not be in the ARGV vector. Fixes #28515
* Show correct commands in helpyuuji.yaginuma2017-03-031-3/+5
| | | | | Currently rails' help shows only namespace. However, the secrets command needs to specify command. Therefore, I fixed the command to display in help.
* Pass `rails runner` args onto file again.Kasper Timm Hansen2016-11-201-1/+2
| | | | | | | | | When making the new command insfrastructure I had missed that `bin/rails runner some_file.rb some args` would pass the extra args onto the file in `ARGV`. Now fixed by allowing the command to take extra args again, and make sure to remove the file name from `ARGV`.
* Hide commands from API site.Kasper Timm Hansen2016-10-281-1/+1
| | | | | They're just barren on the site and confure more than guide, instead rely on the built in --help to guide users.
* Initial command structure.Kasper Timm Hansen2016-09-251-0/+45