whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Simplify
Date Wed, 21 Oct 2020 16:21:05 GMT
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 47b6ce9  Simplify
47b6ce9 is described below

commit 47b6ce9d2f209306a547015dd80cfc9ef7d7295b
Author: Sebb <sebb@apache.org>
AuthorDate: Wed Oct 21 17:20:55 2020 +0100

    Simplify
    
    if not => unless
    fix spacing
---
 lib/whimsy/asf/board.rb | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/whimsy/asf/board.rb b/lib/whimsy/asf/board.rb
index b5edef1..5d1f1be 100644
--- a/lib/whimsy/asf/board.rb
+++ b/lib/whimsy/asf/board.rb
@@ -35,10 +35,10 @@ module ASF
       if withId
         ASF::Service['board'].members.
         map {|person| [person.id, {name: person.public_name}]}.
-          sort_by {|id,hash| hash[:name].split(' ').rotate(-1)}.to_h
+          sort_by {|_id, hash| hash[:name].split(' ').rotate(-1)}.to_h
       else
         ASF::Service['board'].members.
-          map {|person| person.public_name}.
+          map(&:public_name).
             sort_by {|name| name.split(' ').rotate(-1)}
       end
     end
@@ -55,9 +55,9 @@ module ASF
 
     # time of next meeting
     def self.nextMeeting
-      time = self.calendar.select {|time| time > Time.now.utc}.min
+      time = self.calendar.select {|t| t > Time.now.utc}.min
 
-      if not time
+      unless time
         require 'chronic'
         this_month = Time.now.strftime('%B')
 
@@ -76,9 +76,9 @@ module ASF
     # time of previous meeting
     def self.lastMeeting
       next_meeting = self.nextMeeting
-      time = self.calendar.select {|time| time < next_meeting}.max
+      time = self.calendar.select {|t| t < next_meeting}.max
 
-      if not time
+      unless time
         require 'chronic'
         this_month = Time.now.strftime('%B')
 
@@ -124,7 +124,7 @@ module ASF
 
       def for(pmc)
         chair = pmc.chair
-        raise "no chair found for #{pmc.name}" if not chair
+        raise "no chair found for #{pmc.name}" unless chair
 
         if @directors.include? chair
           chair.public_name


Mime
View raw message