Skip to content

Commit 38f487e

Browse files
committed
Officially recommend :Rails over :Rake
1 parent 68ec71a commit 38f487e

File tree

2 files changed

+26
-32
lines changed

2 files changed

+26
-32
lines changed

README.markdown

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ applications.
1717
* Enhanced syntax highlighting. From `has_and_belongs_to_many` to
1818
`distance_of_time_in_words`, it's here.
1919

20-
* Interface to rake. Use `:Rake` to run the current test, spec, or
21-
feature. Use `:.Rake` to do a focused run of just the method,
22-
example, or scenario on the current line. `:Rake` can also run
23-
arbitrary migrations, load individual fixtures, and more.
24-
`:help rails-rake`
25-
2620
* Interface to the `rails` command. Generally, use `:Rails console` to
2721
call `rails console`. Many commands have wrappers with additional features:
2822
`:Generate controller Blog` generates a blog controller and loads the
2923
generated files into the quickfix list, and `:Runner` wraps `rails runner`
3024
and doubles as a direct test runner. `:help rails-exec`
3125

26+
* Default task runner. Use `:Rails` (with no arguments) to run the current
27+
test, spec, or feature. Use `:.Rails` to do a focused run of just the
28+
method, example, or scenario on the current line. `:Rails` can also run
29+
arbitrary migrations, load individual fixtures, and more.
30+
`:help rails-default-task`
31+
3232
* Partial and concern extraction. In a view, `:Extract {file}`
3333
replaces the desired range (typically selected in visual line mode)
3434
with `render '{file}'`, which is automatically created with your

doc/rails.txt

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -295,16 +295,20 @@ Additionally, `rake` can be invoked directly with |:make| (or dispatch.vim's
295295

296296
*rails-:Rails*
297297
:Rails {command} [options]
298-
Depending on the Rails version, invoke one of
299-
"bin/rails {command}", "script/rails {command}", or
300-
"script/{command}". Unless the command is "console",
301-
"dbconsole", or "server", the results are loaded into
302-
the quickfix list using the "rails" |:compiler|
303-
included with the plugin. With no command, runs a
304-
default task based on the current file (see
305-
|rails-default-task|). Unlike other commands, :Rails
306-
is available globally, for use with the "new"
307-
subcommand.
298+
Invoke "rails {command}". On older versions of Rails,
299+
it will conditionally invoke "rake {command}" and
300+
"script/{command}" when appropriate. Uses |:!| or
301+
dispatch.vim's :Start if the command is "console",
302+
"dbconsole", or "server". Otherwise, the "rails"
303+
|:compiler| plugin included with the plugin is
304+
temporarily enabled, and |:make| or dispatch.vim's
305+
:Make is used to load the output into the quickfix
306+
list.
307+
Unlike other commands, :Rails is available globally,
308+
for use with the "new" subcommand.
309+
310+
:Rails With no command, runs a default task based on the
311+
current file. See |rails-default-task|.
308312

309313
*rails-:Rscript*
310314
:Rscript {command} [options]
@@ -352,22 +356,13 @@ Additionally, `rake` can be invoked directly with |:make| (or dispatch.vim's
352356
:[range]Rpp {code} Like :Rp, but with pp (pretty print).
353357

354358
*rails-:Rake*
355-
:[range]Rake {targets} Calls |:make!| {targets} (with 'makeprg' being rake)
356-
and opens the quickfix window if there were any
357-
errors. If dispatch.vim's |:Make| is available that
358-
is used instead. An argument of "-" reruns the last
359-
task. If {targets} are omitted, :Rake defaults to
360-
something sensible as described below.
361-
362-
*rails-:Rake!*
363-
:[range]Rake! {targets} Called with a bang, :Rake will forgo opening the
364-
quickfix window.
359+
:[range]Rake {task} Invoke `rake`. Generally, you are encouraged to use
360+
|:Rails| or directly invoke |:make| instead.
365361

366362
*rails-default-task*
367363

368-
Invoking |rails-:Rails| or |rails-:Rake| with no arguments runs a default
369-
task. This is typically the associated test task, but can also be a closely
370-
related utility task.
364+
Invoking |:Rails| with no arguments runs a default task. This is typically
365+
the associated test task, but can also be a closely related utility task.
371366

372367
File Task ~
373368
test/*_test.rb test TEST=test/*_test.rb
@@ -721,9 +716,8 @@ The full list of available options is as follows:
721716
current 'define' match (typically a method).
722717
*rails-projection-test*
723718
"test" ~
724-
Determines the default test file to run with |rails-:Runner|,
725-
|rails-:Rails|, and |rails-:Rake|. Also serves as a default for
726-
"alternate".
719+
Determines the default test file to run with |:Rails| and
720+
|rails-:Runner|. Also serves as a default for "alternate".
727721
*rails-projection-task*
728722
"task" ~
729723
Determines the default rake task to run. Provide {lnum} or {define}

0 commit comments

Comments
 (0)