aboutsummaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2014-09-14 17:13:40 +0200
committerJochen Topf <jochen@topf.org>2014-09-14 17:13:40 +0200
commitadadac7d3af7b06cbbd24685b7b9e722359e6df3 (patch)
tree331b5ab8c534cd8fc68910090dd1b5aff92f86c3 /sources
parent43463fd1b8ce847b2fe976427d6c114581342bfa (diff)
downloadtaginfo-adadac7d3af7b06cbbd24685b7b9e722359e6df3.tar
taginfo-adadac7d3af7b06cbbd24685b7b9e722359e6df3.tar.gz
Addition error detection for projects. Better display of projects.
Diffstat (limited to 'sources')
-rwxr-xr-xsources/projects/parse.rb14
1 files changed, 13 insertions, 1 deletions
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