From 45c70fb43bb8ced63cc7e4ce97aecee65b05b5f2 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Sun, 7 Oct 2018 11:19:59 -0400 Subject: [PATCH] Add support for '@all' version shortcut in thor commands --- lib/tasks/docs.thor | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/tasks/docs.thor b/lib/tasks/docs.thor index a312d714..f8154abe 100644 --- a/lib/tasks/docs.thor +++ b/lib/tasks/docs.thor @@ -175,9 +175,13 @@ class DocsCLI < Thor private def find_docs(names) - names.map do |name| + names.flat_map do |name| name, version = name.split(/@|~/) - Docs.find(name, version) + if version == 'all' + Docs.find(name, false).versions + else + Docs.find(name, version) + end end end