From 0d7c174d75ff3787804874a731f079c4e2e0fd11 Mon Sep 17 00:00:00 2001 From: Thibaut Date: Mon, 28 Oct 2013 13:48:34 +0100 Subject: [PATCH] Refactor docs.thor --- lib/tasks/docs.thor | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/tasks/docs.thor b/lib/tasks/docs.thor index f8b02b5d..b68df46e 100644 --- a/lib/tasks/docs.thor +++ b/lib/tasks/docs.thor @@ -66,7 +66,7 @@ class DocsCLI < Thor end if Docs.generate(name) - Docs.generate_manifest + generate_manifest puts 'Done' else puts "Failed!#{' (try running with --debug for more information)' unless options[:debug]}" @@ -77,7 +77,7 @@ class DocsCLI < Thor desc 'manifest', 'Create the manifest' def manifest - Docs.generate_manifest + generate_manifest puts 'Done' end @@ -88,7 +88,7 @@ class DocsCLI < Thor docs = options[:all] ? Docs.all : find_docs(names) assert_docs(docs) download_docs(docs) - Docs.generate_manifest + generate_manifest puts 'Done' rescue Docs::DocNotFound => error invalid_doc(error.name) @@ -179,4 +179,8 @@ class DocsCLI < Thor puts %(ERROR: can't find "#{doc.name}" documentation files.) end end + + def generate_manifest + Docs.generate_manifest + end end