You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2019/03/07 08:51:25 UTC
[whimsy] branch master updated: Simple access to current ids,
also graduated and retired lists
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 5c6d547 Simple access to current ids, also graduated and retired lists
5c6d547 is described below
commit 5c6d547546936d87567c8e780a454bd7a5899df3
Author: Sebb <se...@apache.org>
AuthorDate: Thu Mar 7 08:51:19 2019 +0000
Simple access to current ids, also graduated and retired lists
---
lib/whimsy/asf/podling.rb | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/lib/whimsy/asf/podling.rb b/lib/whimsy/asf/podling.rb
index 4e1f035..7322a20 100644
--- a/lib/whimsy/asf/podling.rb
+++ b/lib/whimsy/asf/podling.rb
@@ -164,7 +164,32 @@ module ASF
# list of current podlings
def self.current
- list.select { |podling| podling.status == 'current' }
+ self._list('current')
+ end
+
+ # list of current podling ids
+ def self.currentids
+ self._listids('current')
+ end
+
+ # list of graduated podlings
+ def self.graduated
+ self._list('graduated')
+ end
+
+ # list of graduated podling ids
+ def self.graduatedids
+ self._listids('graduated')
+ end
+
+ # list of retired podlings
+ def self.retired
+ self._list('retired')
+ end
+
+ # list of retired podling ids
+ def self.retiredids
+ self._listids('retired')
end
# last modified time of podlings.xml in the local working directory,
@@ -399,5 +424,15 @@ module ASF
def namesearch
Podling.namesearch[display_name]
end
+
+ private
+
+ def self._list(status)
+ list.select { |podling| podling.status == status }
+ end
+
+ def self._listids(status)
+ list.select { |podling| podling.status == status }.map(&:id)
+ end
end
end