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 2021/02/27 17:07:02 UTC
[whimsy] branch master updated: Simplify
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 d17db54 Simplify
d17db54 is described below
commit d17db5454ee904834c0c44bb9887af8d3f747466
Author: Sebb <se...@apache.org>
AuthorDate: Sat Feb 27 17:06:54 2021 +0000
Simplify
---
lib/whimsy/asf/member-files.rb | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/lib/whimsy/asf/member-files.rb b/lib/whimsy/asf/member-files.rb
index e30943b..f679674 100644
--- a/lib/whimsy/asf/member-files.rb
+++ b/lib/whimsy/asf/member-files.rb
@@ -38,7 +38,7 @@ module ASF
block
.slice_before(/^ +(\S+ \S+):\s*/) # split on the header names
.each_with_index do |para, idx|
- if idx == 0 # id and name
+ if idx == 0 # id and name (or just name for board)
header = para.first.strip
else
key, value = para.shift.strip.split(': ',2)
@@ -51,15 +51,7 @@ module ASF
end
end
end
- if header
- yield header, nominee
- else
- unless block.join('') =~ /^\s*$/ # all blank or empty, e.g. trailing divider
- Wunderbar.warn "Error, could not find public name"
- Wunderbar.warn block.inspect
- nominees['notinavail'] = {'Public Name' => '-- WARNING: unable to parse section --'}
- end
- end
+ yield header, nominee if header
end
end
@@ -91,7 +83,7 @@ module ASF
end
if __FILE__ == $0
- ASF::MemberFiles.member_nominees.each {|k,v| p [k, v['Public Name'], v['Public Name'].encoding]}
+ ASF::MemberFiles.member_nominees.each {|k,v| p [k, v['Public Name'], v['Public Name']&.encoding]}
puts "--------------"
- ASF::MemberFiles.board_nominees.each {|k,v| p [k, v['Public Name'], v['Public Name'].encoding]}
+ # ASF::MemberFiles.board_nominees.each {|k,v| p [k, v['Public Name'], v['Public Name']&.encoding]}
end
\ No newline at end of file