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 2020/10/04 12:02:41 UTC

[whimsy] branch master updated: Trailing comma not needed in %w expression

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 d764a69  Trailing comma not needed in %w expression
d764a69 is described below

commit d764a69833a82e3c9cd7a0e5b5ebbca3096fdb86
Author: Sebb <se...@apache.org>
AuthorDate: Sun Oct 4 13:02:33 2020 +0100

    Trailing comma not needed in %w expression
---
 www/secretary/workbench/models/attachment.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/www/secretary/workbench/models/attachment.rb b/www/secretary/workbench/models/attachment.rb
index fc0382d..8ed35af 100644
--- a/www/secretary/workbench/models/attachment.rb
+++ b/www/secretary/workbench/models/attachment.rb
@@ -2,7 +2,7 @@ require 'open3'
 require_relative 'safetemp'
 
 class Attachment
-  IMAGE_TYPES = %w(.gif, .jpg, .jpeg, .png)
+  IMAGE_TYPES = %w(.gif .jpg .jpeg .png)
   attr_reader :headers
 
   def initialize(message, headers, part)
@@ -74,7 +74,7 @@ class Attachment
     if IMAGE_TYPES.include? ext or content_type.start_with? 'image/'
       pdf = SafeTempFile.new([safe_name, '.pdf'])
       img2pdf = File.expand_path('../img2pdf', __dir__)
-      stdout, stderr, status = Open3.capture3 img2pdf, '--output', pdf.path,
+      _stdout, stderr, status = Open3.capture3 img2pdf, '--output', pdf.path,
         file.path
 
       # img2pdf will refuse if there is an alpha channel.  If that happens
@@ -86,7 +86,7 @@ class Attachment
             'remove', '-alpha', 'off', tmppng.path
 
           if File.size? tmppng.path
-            stdout, stderr, status = Open3.capture3 img2pdf, '--output',
+            _stdout, stderr, _status = Open3.capture3 img2pdf, '--output',
               pdf.path, tmppng.path
           end