whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Petri info moved to website
Date Sat, 13 Mar 2021 23:46:00 GMT
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


The following commit(s) were added to refs/heads/master by this push:
     new e80b88b  Petri info moved to website
e80b88b is described below

commit e80b88b00f1bf8c09b77bd87f31bf29d9623c6aa
Author: Sebb <sebb@apache.org>
AuthorDate: Sat Mar 13 23:45:51 2021 +0000

    Petri info moved to website
---
 lib/whimsy/asf/petri.rb | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/lib/whimsy/asf/petri.rb b/lib/whimsy/asf/petri.rb
index 4b8f3df..a4718cc 100644
--- a/lib/whimsy/asf/petri.rb
+++ b/lib/whimsy/asf/petri.rb
@@ -1,16 +1,12 @@
 require 'yaml'
-require_relative 'git'
-
+require 'net/http'
 module ASF
 
   # Represents a Petri culture
-  # currently defined only in 
-  # https://github.com/apache/petri/blob/master/info.yaml
-
-  # Initial very basic implementation.
-
-  PETRI_INFO = '/apache/petri/master/info.yaml'
+  # currently defined in 
+  # https://petri.apache.org/info.yaml
 
+  PETRI_INFO = 'https://petri.apache.org/info.yaml'
   class Petri
     include Enumerable
 
@@ -37,7 +33,9 @@ module ASF
     # Array of all Petri culture entries
     def self.list
       @list = []
-      yaml = YAML.safe_load(ASF::Git.github(PETRI_INFO), [Symbol])
+      response = Net::HTTP.get_response(URI(PETRI_INFO))
+      response.value() # Raises error if not OK
+      yaml = YAML.safe_load(response.body, [Symbol])
       # @mentors = yaml['mentors']
       yaml['cultures'].each do |proj|
         @list << new(proj)


Mime
View raw message