lib/mako/feed_finder.rb
def request_uris
      uris.map do |uri|
        parsed_uri = URI.parse(uri)
        # Try giving the URI a scheme if one isn't passed
        parsed_uri = URI.parse('http://' + uri) if parsed_uri.scheme.nil?
        request = Mako::FeedRequester.new(feed_url: parsed_uri).fetch
        next unless request.ok?

        if MIME_TYPES.include? request.headers['content-type'].split(';').first
          { uri: parsed_uri.to_s }
        else
          { uri: parsed_uri, body: request.body }
        end
      end.compact
    end
def request_uris
      uris.map do |uri|
        parsed_uri = URI.parse(uri)
        # Try giving the URI a scheme if one isn't passed
        parsed_uri = URI.parse('http://' + uri) if parsed_uri.scheme.nil?
        request = Mako::FeedRequester.new(feed_url: parsed_uri).fetch
        next unless request.ok?

        if MIME_TYPES.include? request.headers['content-type'].split(';').first
          { uri: parsed_uri.to_s }
        else
          { uri: parsed_uri, body: request.body }
        end
      end.compact
    end
def request_uris uris . map do | uri | parsed_uri = URI . parse ( uri ) # Try giving the URI a scheme if one isn't passed parsed_uri = URI . parse ( 'http://' + uri ) if parsed_uri . scheme . nil? request = Mako :: FeedRequester . new ( feed_url : parsed_uri ) . fetch next unless request . ok? if MIME_TYPES . include? request . headers [ 'content-type' ] . split ( ';' ) . first { uri : parsed_uri . to_s } else { uri : parsed_uri , body : request . body } end end . compact end
Make requests for each URI passed in and return an array of hashes
 with either just the URI (in the case that the URI passed in was already
 a feed URI), or the URI and the response body.

 @return [Array]
Make requests for each URI passed in and return an array of hashes with either just the URI ( in the case that the URI passed in was already a feed URI ) or the URI and the response body .