History

Add support for '@all' version shortcut in thor commands

Thibaut Courouble committed 8 years ago

Commit 45c70fb1 parent 0bf71551 file · +6 −2Browse files

Showing the changes to lib (1 of 1 file). Show all

Unified · Split

lib/tasks/docs.thor+6−2
@@ -175,9 +175,13 @@ class DocsCLI < Thor · 174 unmodified lines
175 private175 private
176 176
177 def find_docs(names)177 def find_docs(names)
178 names.map do |name|178 names.flat_map do |name|
179 name, version = name.split(/@|~/)179 name, version = name.split(/@|~/)
180 Docs.find(name, version)180 if version == 'all'
181 Docs.find(name, false).versions
182 else
183 Docs.find(name, version)
184 end
181 end185 end
182 end186 end
183 187