From adadac7d3af7b06cbbd24685b7b9e722359e6df3 Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Sun, 14 Sep 2014 17:13:40 +0200 Subject: Addition error detection for projects. Better display of projects. --- sources/projects/parse.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sources') diff --git a/sources/projects/parse.rb b/sources/projects/parse.rb index 1dcbfda..7a0c270 100755 --- a/sources/projects/parse.rb +++ b/sources/projects/parse.rb @@ -52,7 +52,7 @@ projects.each do |id, json| end if data[:project] - p = data[:project] + p = data[:project].clone if ! p[:name] error_log += "ERROR: MISSING project.name\n" @@ -84,6 +84,18 @@ projects.each do |id, json| p[:contact_email], id ) + + p.delete(:name) + p.delete(:description) + p.delete(:project_url) + p.delete(:doc_url) + p.delete(:icon_url) + p.delete(:contact_name) + p.delete(:contact_email) + + p.each_key do |key| + error_log += "WARNING: project HAS UNKNOWN KEY '#{key}'\n" + end else error_log += "ERROR: MISSING project\n" end -- cgit v1.2.3