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: Add extra resolution and status access methods
Date Tue, 02 Mar 2021 17:39:39 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 c0198aa  Add extra resolution and status access methods
c0198aa is described below

commit c0198aaaa0aafb5d0c1ea953661c1ded0f92ff6c
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Mar 2 17:39:28 2021 +0000

    Add extra resolution and status access methods
---
 lib/whimsy/asf/podling.rb | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/lib/whimsy/asf/podling.rb b/lib/whimsy/asf/podling.rb
index 98f32d9..8bd39db 100644
--- a/lib/whimsy/asf/podling.rb
+++ b/lib/whimsy/asf/podling.rb
@@ -48,6 +48,12 @@ module ASF
       ]
     end
 
+    # <resolution link="">, from podlings.xml
+    attr_accessor  :resolutionLink
+
+    # <resolution url="">, from podlings.xml
+    attr_accessor  :resolutionURL
+
     # create a podling from a Nokogiri node built from podlings.xml
     def initialize(node)
       @name = node['name']
@@ -69,6 +75,7 @@ module ASF
       @monthly = @reporting.text.split(/,\s*/) if @reporting&.text
 
       @resolutionLink = node.at('resolution')['link'] if node.at('resolution')
+      @resolutionURL = node.at('resolution')['url'] if node.at('resolution')
 
       # Note: the following optional elements are not currently processed:
       # - resolution (except for resolution/@link)
@@ -99,6 +106,18 @@ module ASF
       @resolutionLink || name
     end
 
+    def current?
+      @status == 'current'
+    end
+
+    def graduated?
+      @status == 'graduated'
+    end
+
+    def retired?
+      @status == 'retired'
+    end
+
     # date this podling was accepted for incubation
     def startdate
       return unless @startdate


Mime
View raw message