Mailinglist Archive: yast-commit (2080 mails)

< Previous Next >
[yast-commit] <rest-service> master : restdoc: Fixed "can't convert nil into String".
  • From: Martin Vidner <mvidner@xxxxxxx>
  • Date: Fri, 11 Sep 2009 07:38:20 +0200
  • Message-id: <E1Mm10o-0002Ke-NN@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 480044c704b5f5eb978b9947d0beee5b977574a7
Author: Martin Vidner <mvidner@xxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages