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 <[email protected]>
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