This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

commit d687a2af127ee4d2311f79fd06ae009b24557227
Author: Sebb <[email protected]>
AuthorDate: Fri Sep 15 13:56:58 2023 +0100

    Only list active cultures
---
 lib/whimsy/asf/petri.rb | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/whimsy/asf/petri.rb b/lib/whimsy/asf/petri.rb
index a78b05b1..aa0c589e 100644
--- a/lib/whimsy/asf/petri.rb
+++ b/lib/whimsy/asf/petri.rb
@@ -29,15 +29,16 @@ module ASF
       hash.each { |name, value| instance_variable_set("@#{name}", value) }
     end
 
-    # Array of all Petri culture entries
+    # Array of all active Petri culture entries
     def self.list
       @list = []
       response = Net::HTTP.get_response(URI(PETRI_INFO))
       response.value() # Raises error if not OK
       yaml = YAML.safe_load(response.body, permitted_classes: [Symbol])
       # @mentors = yaml['mentors']
-      yaml['cultures'].each do |proj|
-        @list << new(proj)
+      # Active cultures are listed under projects
+      yaml['projects'].each do |proj|
+        @list << new(yaml['cultures'][proj])
       end
       @list
     end
@@ -49,4 +50,4 @@ if __FILE__ == $0
     p e
     p e.website
   end
-end
\ No newline at end of file
+end

Reply via email to