whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit 34334c4: flag missing attachments
Date Sun, 13 Mar 2016 21:45:28 GMT
Commit 34334c41663addc1b820b571cb5ccb836361c4f6:
    flag missing attachments


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
lib/whimsy/asf/agenda.rb                                     | +++++++++ 
------------------------------------------------------------
9 changes: 9 additions, 0 deletions.
------------------------------------------------------------


diff --git a/lib/whimsy/asf/agenda.rb b/lib/whimsy/asf/agenda.rb
index 41f6439..0687841 100644
--- a/lib/whimsy/asf/agenda.rb
+++ b/lib/whimsy/asf/agenda.rb
@@ -124,6 +124,15 @@ def parse(file, quick=false)
       hash[:attach] = section
     end
 
+    # look for missing titles
+    @sections.each do |section, hash|
+      hash['title'] ||= "UNKNOWN"
+
+      if hash['title'] == "UNKNOWN"
+        hash['warnings'] = ['unable to find attachment']
+      end
+    end
+
     @sections.values
   end
 

Mime
View raw message