whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: better matches on podlings
Date Mon, 01 Apr 2019 11:48:17 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys 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 48a8f58  better matches on podlings
48a8f58 is described below

commit 48a8f584fdc41a42a9cc2458b1d78527305fcb48
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Mon Apr 1 07:47:57 2019 -0400

    better matches on podlings
---
 lib/whimsy/asf/podling.rb | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lib/whimsy/asf/podling.rb b/lib/whimsy/asf/podling.rb
index 801ff28..ae81f1b 100644
--- a/lib/whimsy/asf/podling.rb
+++ b/lib/whimsy/asf/podling.rb
@@ -208,12 +208,16 @@ module ASF
     # find a podling by name
     def self.find(name)
       name = name.downcase
-      list.find do |podling| 
+
+      result = list.find do |podling| 
         podling.name == name or podling.display_name.downcase == name or
-          podling.resource == name or
-          podling.tlp_name.downcase == name or
           podling.resourceAliases.any? {|aname| aname.downcase == name}
       end
+
+      result ||= list.find do |podling| 
+        podling.resource == name or
+        podling.tlp_name.downcase == name
+      end
     end
 
     # below is for backwards compatibility


Mime
View raw message