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 4372573d Align sort with logo app
4372573d is described below
commit 4372573d3769694b3ac0501f28946d2675f00598
Author: Sebb <[email protected]>
AuthorDate: Thu Aug 7 16:18:00 2025 +0100
Align sort with logo app
---
lib/whimsy/asf/site-img.rb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/whimsy/asf/site-img.rb b/lib/whimsy/asf/site-img.rb
index 955633d5..067fa499 100644
--- a/lib/whimsy/asf/site-img.rb
+++ b/lib/whimsy/asf/site-img.rb
@@ -8,8 +8,11 @@ module ASF
list
end
+ # See https://www.apache.org/logos/about.html
+ # Sort is done by JS using the stem only
def self.find(id)
- listnames.select{|file| file =~
/^#{id}.*\.(svg|eps|ai|pdf)$/}.first
+ listnames.select{|file| file =~ /^#{id}.*\.(svg|eps|ai|pdf|png)$/}
+ .sort_by{|x| File.basename(x, '.*')}.first
end
end
end