You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whimsical.apache.org by sebb <se...@gmail.com> on 2017/03/13 13:06:54 UTC

Re: [whimsy] branch master updated: handle gstein's dashes; sort bettter

On 12 March 2017 at 17:28,  <ru...@apache.org> wrote:
> 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  da2d836   handle gstein's dashes; sort bettter
> da2d836 is described below
>
> commit da2d83695bee1de2ca92fb2963faf442d95dcae4
> Author: Sam Ruby <ru...@intertwingly.net>
> AuthorDate: Sun Mar 12 13:27:55 2017 -0400
>
>     handle gstein's dashes; sort bettter
> ---
>  lib/whimsy/asf/nominees.rb  | 2 +-
>  www/members/nominations.cgi | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/whimsy/asf/nominees.rb b/lib/whimsy/asf/nominees.rb
> index 99d8b0a..9b100a1 100644
> --- a/lib/whimsy/asf/nominees.rb
> +++ b/lib/whimsy/asf/nominees.rb
> @@ -13,7 +13,7 @@ module ASF
>        meetings = ASF::SVN['private/foundation/Meetings']
>        nominations = Dir["#{meetings}/*/nominated-members.txt"].sort.last.untaint
>
> -      nominations = File.read(nominations).split(/^\s*---+\s*/)
> +      nominations = File.read(nominations).split(/^\s*---+--\s*/)

Probably more efficient to use:

nominations = File.read(nominations).split(/^\s*---+--\s*/)

>        nominations.shift(2)
>
>        nominees = {}
> diff --git a/www/members/nominations.cgi b/www/members/nominations.cgi
> index 43f7db1..3f98d22 100755
> --- a/www/members/nominations.cgi
> +++ b/www/members/nominations.cgi
> @@ -33,7 +33,7 @@ end
>  MEETINGS = ASF::SVN['private/foundation/Meetings']
>  meeting = Dir["#{MEETINGS}/2*"].sort.last
>  nominations = IO.read("#{meeting}/nominated-members.txt").
> -  scan(/^-+--\s+(.*?)\n/).flatten
> +  scan(/^---+--\s+(.*?)\n/).flatten
>
>  nominations.shift if nominations.first == '<empty line>'
>  nominations.pop if nominations.last.empty?
> @@ -109,9 +109,9 @@ _html do
>
>        _p.count "Count: #{emails.count}"
>
> -      # attempt to sort reports by PMC name
> +      # attempt to sort reports by nominee name
>        emails.sort_by! do |mail|
> -        mail.subject.downcase.gsub('- ', '')
> +        mail.subject.downcase.gsub('- ', '').sub(/\[.*?\]\s*/, '')
>        end
>
>        # output an unordered list of subjects linked to the message archive
>
> --
> To stop receiving notification emails like this one, please contact
> ['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].