Skip to content

Commit

Permalink
Fix codes which were reviewed on GitHub #105, #99
Browse files Browse the repository at this point in the history
  • Loading branch information
azumakuniyuki committed Jan 8, 2018
1 parent 74ac723 commit 9e79f80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/sisimai/data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Data
addresser: RFC822Head[:addresser],
recipient: RFC822Head[:recipient],
}.freeze
ActionList = ['failed', 'delayed', 'delivered', 'relayed', 'expanded']
ActionList = %w[failed delayed delivered relayed expanded]
ActionHead = {
:failure => 'failed',
:expired => 'delayed',
Expand Down Expand Up @@ -110,7 +110,7 @@ def self.make(data: nil, **argvs)
rfc822data = messageobj.rfc822
fieldorder = { :recipient => [], :addresser => [] }
objectlist = []
commandset = ['EHLO', 'HELO', 'MAIL', 'RCPT', 'DATA', 'QUIT']
commandset = %w[EHLO HELO MAIL RCPT DATA QUIT]
givenorder = argvs[:order] || {}
delivered1 = argvs[:delivered] || false

Expand Down Expand Up @@ -435,7 +435,7 @@ def self.make(data: nil, **argvs)
def damn
data = {}
@@rwaccessors.each do |e|
next if ['addresser', 'recipient', 'timestamp'].include?(e.to_s)
next if %w[addresser recipient timestamp].include?(e.to_s)
data[e.to_s] = self.send(e) || ''
end
data['addresser'] = self.addresser.address
Expand Down
2 changes: 1 addition & 1 deletion lib/sisimai/message/email.rb
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def self.parse(argvs)
mesgformat = (mailheader['content-type'] || '').downcase
ctencoding = (mailheader['content-transfer-encoding'] || '').downcase

if mesgformat.start_with?('text/plain;') || mesgformat.start_with?('text/html;')
if mesgformat.start_with?('text/plain;', 'text/html;')
# Content-Type: text/plain; charset=UTF-8
if ctencoding == 'base64' || ctencoding == 'quoted-printable'
# Content-Transfer-Encoding: base64
Expand Down

0 comments on commit 9e79f80

Please sign in to comment.