You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cu...@apache.org on 2017/04/13 21:34:30 UTC

[whimsy] branch master updated: Simplify .each loop

This is an automated email from the ASF dual-hosted git repository.

curcuru 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  15885f2   Simplify .each loop
15885f2 is described below

commit 15885f203fe1912c331553ec0fedead7952c5bd9
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Thu Apr 13 17:34:26 2017 -0400

    Simplify .each loop
---
 www/test/test.cgi | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/www/test/test.cgi b/www/test/test.cgi
index 7052e22..529ca51 100755
--- a/www/test/test.cgi
+++ b/www/test/test.cgi
@@ -15,14 +15,10 @@ brand_dir = ASF::SVN['private/foundation/Brand']
 _json do
   docket = CSV.read("#{brand_dir}/docket.csv", headers:true)
   docketcols = %w[ TrademarkName TrademarkStatus CountryName Class RegNumber ]
-  # Map Mark names to PMC identifiers (only openoffice.org so far)
-  docket.each do |r|
-    r << ['pmc', r['TrademarkName'].downcase.sub('.org','').sub(' & design','')]
-  end
   dockethash = {}
-
   # Create hash based on pmc with aggregated data
   docket.each do |r|
+    r << ['pmc', r['TrademarkName'].downcase.sub('.org','').sub(' & design','')]
     key = r['pmc'].to_sym
     if dockethash.key?(key)
       # Aggregate specific values

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].