History

Refactor docs.thor

Thibaut committed 13 years ago

Commit 0d7c1741 parent d38a5bc1 file · +7 −3Browse files

Unified · Split

lib/tasks/docs.thor+7−3
@@ -66,7 +66,7 @@ class DocsCLI < Thor · 65 unmodified lines
66 end66 end
67 67
68 if Docs.generate(name)68 if Docs.generate(name)
69 Docs.generate_manifest69 generate_manifest
70 puts 'Done'70 puts 'Done'
71 else71 else
72 puts "Failed!#{' (try running with --debug for more information)' unless options[:debug]}"72 puts "Failed!#{' (try running with --debug for more information)' unless options[:debug]}"
@@ -77,7 +77,7 @@ class DocsCLI < Thor · 4 unmodified lines
77 77
78 desc 'manifest', 'Create the manifest'78 desc 'manifest', 'Create the manifest'
79 def manifest79 def manifest
80 Docs.generate_manifest80 generate_manifest
81 puts 'Done'81 puts 'Done'
82 end82 end
83 83
@@ -88,7 +88,7 @@ class DocsCLI < Thor · 4 unmodified lines
88 docs = options[:all] ? Docs.all : find_docs(names)88 docs = options[:all] ? Docs.all : find_docs(names)
89 assert_docs(docs)89 assert_docs(docs)
90 download_docs(docs)90 download_docs(docs)
91 Docs.generate_manifest91 generate_manifest
92 puts 'Done'92 puts 'Done'
93 rescue Docs::DocNotFound => error93 rescue Docs::DocNotFound => error
94 invalid_doc(error.name)94 invalid_doc(error.name)
@@ -179,4 +179,8 @@ class DocsCLI < Thor · 84 unmodified lines
179 puts %(ERROR: can't find "#{doc.name}" documentation files.)179 puts %(ERROR: can't find "#{doc.name}" documentation files.)
180 end180 end
181 end181 end
182
183 def generate_manifest
184 Docs.generate_manifest
185 end
182end186end