You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sebastian Bazley <se...@apache.org> on 2016/02/18 01:14:28 UTC
[whimsy.git] [1/1] Commit 3e2f9b8: Create separate file for non-committers if second name provided
Commit 3e2f9b8a69fe35f1ead6fd766fd04be46f2bb320:
Create separate file for non-committers if second name provided
Branch: refs/heads/master
Author: Sebb <se...@apache.org>
Committer: Sebb <se...@apache.org>
Pusher: sebb <se...@apache.org>
------------------------------------------------------------
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