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 00:26:50 UTC

[whimsy.git] [1/1] Commit a01897a: Add podling status if present

Commit a01897a8369e8c45fd4eedc2c04e813fe52e056c:
    Add podling status if present


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                          | +++++++++++ 
------------------------------------------------------------
11 changes: 11 additions, 0 deletions.
------------------------------------------------------------


diff --git a/www/roster/public_nonldap_groups.rb b/www/roster/public_nonldap_groups.rb
index 2460147..f9dbd3f 100644
--- a/www/roster/public_nonldap_groups.rb
+++ b/www/roster/public_nonldap_groups.rb
@@ -22,6 +22,15 @@
 require_relative 'public_json_common'
 
 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
 
 file = '/apache/infrastructure-puppet/deployment/modules/subversion_server/files/authorization/asf-authorization-template'
 http = Net::HTTP.new('raw.githubusercontent.com', 443)
@@ -39,6 +48,8 @@
       # this will allow future expansion e.g. if we can flag podlings somehow
       roster: mem.gsub(/\s/,'').split(/,/).sort.uniq
       }
+  # add podling type entry if there is one
+  groups[grp][:podling] = pods[grp] if pods[grp]
 end
 
 public_json_output(

Re: [whimsy.git] [1/1] Commit a01897a: Add podling status if present

Posted by Sam Ruby <ru...@intertwingly.net>.
On Fri, Feb 26, 2016 at 5:27 AM, sebb <se...@gmail.com> wrote:
> BTW I just noticed that
>
> https://github.com/apache/whimsy/blob/master/tools/collate_minutes.rb
>
> does its own parsing of podlings.xml; maybe that should use podlings.rb instead?

Indeed.  Probably the oldest tool that is a part of the whimsy set of
tools, and the one that has had the least amount of attention in
recent years as it just works.

- Sam Ruby

Re: [whimsy.git] [1/1] Commit a01897a: Add podling status if present

Posted by sebb <se...@gmail.com>.
BTW I just noticed that

https://github.com/apache/whimsy/blob/master/tools/collate_minutes.rb

does its own parsing of podlings.xml; maybe that should use podlings.rb instead?

On 26 February 2016 at 09:37, sebb <se...@gmail.com> wrote:
> On 26 February 2016 at 00:31, Sam Ruby <ru...@intertwingly.net> wrote:
>> On Thu, Feb 25, 2016 at 6:26 PM, Sebastian Bazley <se...@apache.org> wrote:
>>> Commit a01897a8369e8c45fd4eedc2c04e813fe52e056c:
>>>     Add podling status if present
>>>
>>>
>>> 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                          | +++++++++++
>>> ------------------------------------------------------------
>>> 11 changes: 11 additions, 0 deletions.
>>> ------------------------------------------------------------
>>>
>>>
>>> diff --git a/www/roster/public_nonldap_groups.rb b/www/roster/public_nonldap_groups.rb
>>> index 2460147..f9dbd3f 100644
>>> --- a/www/roster/public_nonldap_groups.rb
>>> +++ b/www/roster/public_nonldap_groups.rb
>>> @@ -22,6 +22,15 @@
>>>  require_relative 'public_json_common'
>>>
>>>  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
>>
>> Could this be used instead:
>>
>> https://github.com/apache/whimsy/blob/master/lib/whimsy/asf/podlings.rb
>
> Yes, I assume so. Did not know it was there.
> Will look at it later.
>
>> And, if not, wouldn't it be better/faster/more reliable to use the
>> source in subversion than to fetch it over the web?
>
> It was a bit of hack to get the info out.
>
> Using SVN requires a bit more setup for local testing.
>
>> - Sam Ruby

Re: [whimsy.git] [1/1] Commit a01897a: Add podling status if present

Posted by sebb <se...@gmail.com>.
On 26 February 2016 at 00:31, Sam Ruby <ru...@intertwingly.net> wrote:
> On Thu, Feb 25, 2016 at 6:26 PM, Sebastian Bazley <se...@apache.org> wrote:
>> Commit a01897a8369e8c45fd4eedc2c04e813fe52e056c:
>>     Add podling status if present
>>
>>
>> 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                          | +++++++++++
>> ------------------------------------------------------------
>> 11 changes: 11 additions, 0 deletions.
>> ------------------------------------------------------------
>>
>>
>> diff --git a/www/roster/public_nonldap_groups.rb b/www/roster/public_nonldap_groups.rb
>> index 2460147..f9dbd3f 100644
>> --- a/www/roster/public_nonldap_groups.rb
>> +++ b/www/roster/public_nonldap_groups.rb
>> @@ -22,6 +22,15 @@
>>  require_relative 'public_json_common'
>>
>>  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
>
> Could this be used instead:
>
> https://github.com/apache/whimsy/blob/master/lib/whimsy/asf/podlings.rb

Yes, I assume so. Did not know it was there.
Will look at it later.

> And, if not, wouldn't it be better/faster/more reliable to use the
> source in subversion than to fetch it over the web?

It was a bit of hack to get the info out.

Using SVN requires a bit more setup for local testing.

> - Sam Ruby

Re: [whimsy.git] [1/1] Commit a01897a: Add podling status if present

Posted by Sam Ruby <ru...@intertwingly.net>.
On Thu, Feb 25, 2016 at 6:26 PM, Sebastian Bazley <se...@apache.org> wrote:
> Commit a01897a8369e8c45fd4eedc2c04e813fe52e056c:
>     Add podling status if present
>
>
> 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                          | +++++++++++
> ------------------------------------------------------------
> 11 changes: 11 additions, 0 deletions.
> ------------------------------------------------------------
>
>
> diff --git a/www/roster/public_nonldap_groups.rb b/www/roster/public_nonldap_groups.rb
> index 2460147..f9dbd3f 100644
> --- a/www/roster/public_nonldap_groups.rb
> +++ b/www/roster/public_nonldap_groups.rb
> @@ -22,6 +22,15 @@
>  require_relative 'public_json_common'
>
>  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

Could this be used instead:

https://github.com/apache/whimsy/blob/master/lib/whimsy/asf/podlings.rb

And, if not, wouldn't it be better/faster/more reliable to use the
source in subversion than to fetch it over the web?

- Sam Ruby