You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sebastian Bazley <se...@apache.org> on 2016/02/22 19:40:33 UTC
[whimsy.git] [1/1] Commit 5cba79b: Handle (nickname) name entries properly
Commit 5cba79be3d3922630241b505a0150717590d0078:
Handle (nickname) name entries properly
Branch: refs/heads/master
Author: Sebb <se...@apache.org>
Committer: Sebb <se...@apache.org>
Pusher: sebb <se...@apache.org>
------------------------------------------------------------
lib/whimsy/asf/member.rb | ++++ --
------------------------------------------------------------
6 changes: 4 additions, 2 deletions.
------------------------------------------------------------
diff --git a/lib/whimsy/asf/member.rb b/lib/whimsy/asf/member.rb
index 52c3911..1c66285 100644
--- a/lib/whimsy/asf/member.rb
+++ b/lib/whimsy/asf/member.rb
@@ -15,8 +15,10 @@ def self.each(&block)
end
def self.list
- result = Hash[self.new(true).map {|id, text|
- [id, {text: text, name: text[/(.*?)\s*(\(|\/\*|$)/, 1]}]
+ result = Hash[self.new(true).map {|id, text|
+ # extract 1st line and remove any trailing /* comment */
+ name = text[/(.*?)\n/, 1].sub(/\s+\/\*.*/,'')
+ [id, {text: text, name: name}]
}]
self.status.each do |name, value|