Commit 3e2f9b8a69fe35f1ead6fd766fd04be46f2bb320:
    Create separate file for non-committers if second name provided


Branch: refs/heads/master
Author: Sebb <[email protected]>
Committer: Sebb <[email protected]>
Pusher: sebb <[email protected]>

------------------------------------------------------------
www/roster/public_icla_info.rb                               | +++++++ --
------------------------------------------------------------
31 changes: 25 additions, 6 deletions.
------------------------------------------------------------


diff --git a/www/roster/public_icla_info.rb b/www/roster/public_icla_info.rb
index 1822976..03ae621 100644
--- a/www/roster/public_icla_info.rb
+++ b/www/roster/public_icla_info.rb
@@ -14,10 +14,29 @@
   end
 end
 
-info = {
-  last_updated: ASF::ICLA.svn_change,
-  committers: Hash[ids.sort],
-  non_committers: noid # do not sort because the input is already sorted by 
surname
-}
+# 2 files specified - split id/noid into separate files
+if ARGV.length == 2
 
-public_json_output(info)
+  info_id = {
+    last_updated: ASF::ICLA.svn_change,
+    committers: Hash[ids.sort]
+  }
+  public_json_output_file(info_id, ARGV.shift)
+  
+  info_noid = {
+    last_updated: ASF::ICLA.svn_change,
+    non_committers: noid
+  }
+  public_json_output_file(info_noid, ARGV.shift)
+
+else # combined (original) output file
+
+  info = {
+    last_updated: ASF::ICLA.svn_change,
+    committers: Hash[ids.sort],
+    non_committers: noid # do not sort because the input is already sorted by 
surname
+  }
+
+  public_json_output(info) # original full output
+
+end

Reply via email to