Sha256: f63b11ded419091aacd19684b9bba0d0bcfc575851eec6ea55ddf8bbe1b24ac6

Contents?: true

Size: 673 Bytes

Versions: 68

Compression:

Stored size: 673 Bytes

Contents

require 'nokogiri'
require_relative '../asf'

module ASF
  class Podlings
    include Enumerable

    def each
      incubator_content = ASF::SVN['asf/incubator/public/trunk/content']
      podlings = Nokogiri::XML(File.read("#{incubator_content}/podlings.xml"))
      podlings.search('podling').map do |node|
        data = {
          name: node['name'],
          status: node['status'],
          description: node.at('description').text,
          mentors: node.search('mentor').map {|mentor| mentor['username']}
        }
        data[:champion] = node.at('champion')['availid'] if node.at('champion')
        yield node['resource'], data
      end
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
whimsy-asf-0.0.8 lib/whimsy/asf/podlings.rb
whimsy-asf-0.0.7 lib/whimsy/asf/podlings.rb
whimsy-asf-0.0.6 lib/whimsy/asf/podlings.rb
whimsy-asf-0.0.5 lib/whimsy/asf/podlings.rb
whimsy-asf-0.0.4 lib/whimsy/asf/podlings.rb
whimsy-asf-0.0.3 lib/whimsy/asf/podlings.rb
whimsy-asf-0.0.2 lib/whimsy/asf/podlings.rb
whimsy-asf-0.0.1 lib/whimsy/asf/podlings.rb