0
0
Fork 0

Improve code style

This commit is contained in:
Eugen Rochko 2016-09-29 21:28:21 +02:00
parent e4aebad35a
commit 927333f4f8
41 changed files with 126 additions and 122 deletions

View file

@ -17,7 +17,7 @@ class FetchAtomService < BaseService
private
def process_html(body)
Rails.logger.debug "Processing HTML"
Rails.logger.debug 'Processing HTML'
page = Nokogiri::HTML(body)
alternate_link = page.xpath('//link[@rel="alternate"]').find { |link| link['type'] == 'application/atom+xml' }
@ -27,7 +27,7 @@ class FetchAtomService < BaseService
end
def process_headers(url, response)
Rails.logger.debug "Processing link header"
Rails.logger.debug 'Processing link header'
link_header = LinkHeader.parse(response['Link'].is_a?(Array) ? response['Link'].first : response['Link'])
alternate_link = link_header.find_link(['rel', 'alternate'], ['type', 'application/atom+xml'])