ref: refs/heads/jr_ntp
commit 480044c704b5f5eb978b9947d0beee5b977574a7
Author: Martin Vidner
Date: Fri Sep 11 07:38:20 2009 +0200
restdoc: Fixed "can't convert nil into String".
That was if public/**/restdoc/ did not exist.
Also warn if skipping the task because of that.
---
webservice-tasks/lib/tasks/restdoc.rake | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/webservice-tasks/lib/tasks/restdoc.rake b/webservice-tasks/lib/tasks/restdoc.rake
index c8d8e3c..c0dba55 100644
--- a/webservice-tasks/lib/tasks/restdoc.rake
+++ b/webservice-tasks/lib/tasks/restdoc.rake
@@ -16,10 +16,12 @@ task :restdoc do
# output directory
doc_target = Dir.glob('public/**/restdoc').first
- if File.exists?(api_file) && File.exists?(doc_target)
+ if File.exists?(api_file) && !doc_target.nil? && File.directory?(doc_target)
puts "Generating REST API documentation in #{doc_target}..."
`rest_doc #{api_file} -I #{api_file.split('/').first} --html -o #{doc_target}`
+ else
+ puts "Skipping restdoc: restdoc/api.txt or public/**/restdoc/ not found."
end
else
puts 'Error: restility gem is not installed!'
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org