Refactor docs.thor

pull/10/head
Thibaut 11 years ago
parent d38a5bc3d4
commit 0d7c174d75

@ -66,7 +66,7 @@ class DocsCLI < Thor
end end
if Docs.generate(name) if Docs.generate(name)
Docs.generate_manifest generate_manifest
puts 'Done' puts 'Done'
else else
puts "Failed!#{' (try running with --debug for more information)' unless options[:debug]}" puts "Failed!#{' (try running with --debug for more information)' unless options[:debug]}"
@ -77,7 +77,7 @@ class DocsCLI < Thor
desc 'manifest', 'Create the manifest' desc 'manifest', 'Create the manifest'
def manifest def manifest
Docs.generate_manifest generate_manifest
puts 'Done' puts 'Done'
end end
@ -88,7 +88,7 @@ class DocsCLI < Thor
docs = options[:all] ? Docs.all : find_docs(names) docs = options[:all] ? Docs.all : find_docs(names)
assert_docs(docs) assert_docs(docs)
download_docs(docs) download_docs(docs)
Docs.generate_manifest generate_manifest
puts 'Done' puts 'Done'
rescue Docs::DocNotFound => error rescue Docs::DocNotFound => error
invalid_doc(error.name) invalid_doc(error.name)
@ -179,4 +179,8 @@ class DocsCLI < Thor
puts %(ERROR: can't find "#{doc.name}" documentation files.) puts %(ERROR: can't find "#{doc.name}" documentation files.)
end end
end end
def generate_manifest
Docs.generate_manifest
end
end end

Loading…
Cancel
Save