whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Bazley <s...@apache.org>
Subject [whimsy.git] [1/1] Commit 694aacf: Change syntax to be same as for other groups
Date Wed, 27 Jan 2016 13:24:48 GMT
Commit 694aacfa0551d3c1b7ca2e70c7611abdc1851a0e:
    Change syntax to be same as for other groups


Branch: refs/heads/master
Author: Sebb <sebb@apache.org>
Committer: Sebb <sebb@apache.org>
Pusher: sebb <sebb@apache.org>

------------------------------------------------------------
www/roster/public_nonldap_groups.rb                          | +++++++ ----
------------------------------------------------------------
20 changes: 13 additions, 7 deletions.
------------------------------------------------------------


diff --git a/www/roster/public_nonldap_groups.rb b/www/roster/public_nonldap_groups.rb
index d998641..2460147 100644
--- a/www/roster/public_nonldap_groups.rb
+++ b/www/roster/public_nonldap_groups.rb
@@ -10,12 +10,14 @@
 # Output looks like:
 # {
 #   "groups": {
-#     "batchee": [
-#       "uid",
-#       ...
-#     ] 
-#    },
-# 
+#     "batchee": {
+#       "roster": [
+#         "uid",
+#          ...
+#       ]
+#     }
+#   },
+# }
 
 require_relative 'public_json_common'
 
@@ -32,7 +34,11 @@
 
 # find the locally defined groups
 body.scan(/^(\w[^=\s]*)[ \t]*=[ \t]*(\w.*)$/) do |grp, mem|
-  groups[grp] = mem.gsub(/\s/,'').split(/,/).sort.uniq
+  groups[grp] = {
+      # we use same syntax as for normal groups
+      # this will allow future expansion e.g. if we can flag podlings somehow
+      roster: mem.gsub(/\s/,'').split(/,/).sort.uniq
+      }
 end
 
 public_json_output(

Mime
View raw message