Skip to content

Commit

Permalink
Fix cop
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-mailosaur committed Jun 14, 2022
1 parent 6b37bb9 commit 2e01c8f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Metrics/ClassLength:
# Offense count: 7
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/MethodLength:
Max: 18
Max: 30

# Offense count: 21
# Cop supports --auto-correct.
Expand Down Expand Up @@ -144,11 +144,7 @@ Style/FormatString:
# Configuration parameters: EnforcedStyle.
# SupportedStyles: annotated, template, unannotated
Style/FormatStringToken:
Exclude:
- 'lib/Mailosaur/servers.rb'
- 'test/emails_test.rb'
- 'test/files_test.rb'
- 'test/mailer.rb'
Enabled: false

# Offense count: 1
# Configuration parameters: MinBodyLength.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mailosaur/messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def delete_all(server)
#
# @return [MessageListResult] operation results.
#
def search(server, criteria, page: nil, items_per_page: nil, timeout: nil, received_after: nil, error_on_timeout: true) # rubocop:disable all
def search(server, criteria, page: nil, items_per_page: nil, timeout: nil, received_after: nil, error_on_timeout: true)
url = "api/messages/search?server=#{server}"
url += page ? "&page=#{page}" : ''
url += items_per_page ? "&itemsPerPage=#{items_per_page}" : ''
Expand Down
2 changes: 1 addition & 1 deletion lib/mailosaur.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def handle_http_error(response)
begin
json = JSON.parse(response.body)
json['errors'].each do |err|
message += format('(%<field>s) %<detail>s\r\n', err['field'], err['detail'][0]['description'])
message += format('(%s) %s\r\n', err['field'], err['detail'][0]['description'])
end
rescue StandardError
message = 'Request had one or more invalid parameters.'
Expand Down

0 comments on commit 2e01c8f

Please sign in to comment.