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/26 11:55:29 UTC
[whimsy.git] [1/1] Commit 39d5cfd: Use existing podlings.xml parser
Commit 39d5cfdd8c4ad632a4e4ab293be89bf2c3ad20e4:
Use existing podlings.xml parser
Branch: refs/heads/master
Author: Sebb <se...@apache.org>
Committer: Sebb <se...@apache.org>
Pusher: sebb <se...@apache.org>
------------------------------------------------------------
www/roster/public_nonldap_groups.rb | ++++ ----------
------------------------------------------------------------
14 changes: 4 additions, 10 deletions.
------------------------------------------------------------
diff --git a/www/roster/public_nonldap_groups.rb b/www/roster/public_nonldap_groups.rb
index f9dbd3f..10506f8 100644
--- a/www/roster/public_nonldap_groups.rb
+++ b/www/roster/public_nonldap_groups.rb
@@ -14,23 +14,17 @@
# "roster": [
# "uid",
# ...
-# ]
+# ],
+# "podling": "current" // optional status if same as a podling name
# }
# },
# }
require_relative 'public_json_common'
+require 'whimsy/asf/podlings'
require 'net/http'
-require 'open-uri'
-require 'nokogiri'
-
-PODLINGS = 'http://incubator.apache.org/podlings.xml'
-pods = {}
-podlings = Nokogiri::XML(open(PODLINGS))
-podlings.search('podling').each do |podling|
- pods[podling['resource']] = podling['status']
-end
+pods = Hash[ASF::Podlings.new.map {|podling, definition| [podling, definition[:status]]}]
file = '/apache/infrastructure-puppet/deployment/modules/subversion_server/files/authorization/asf-authorization-template'
http = Net::HTTP.new('raw.githubusercontent.com', 443)