Sha256: 9403cac3335719260042301cba3bdc884a28869cccee916229f905873f5161af

Contents?: true

Size: 379 Bytes

Versions: 66

Compression:

Stored size: 379 Bytes

Contents

require 'faraday'

module Octokit

  module Response

    # Parses RSS and Atom feed responses.
    class FeedParser < Faraday::Response::Middleware

      private

      def on_complete(env)
        if env[:response_headers]["content-type"] =~ /(\batom|\brss)/
          require 'rss'
          env[:body] = RSS::Parser.parse env[:body]
        end
      end

    end
  end
end

Version data entries

66 entries across 56 versions & 3 rubygems

Version Path
tdiary-5.0.11 vendor/bundle/gems/octokit-4.13.0/lib/octokit/response/feed_parser.rb
octokit-4.13.0 lib/octokit/response/feed_parser.rb
octokit-4.12.0 lib/octokit/response/feed_parser.rb
octokit-4.11.0 lib/octokit/response/feed_parser.rb
octokit-4.10.0 lib/octokit/response/feed_parser.rb
tdiary-5.0.9 vendor/bundle/gems/octokit-4.9.0/lib/octokit/response/feed_parser.rb
octokit-4.9.0 lib/octokit/response/feed_parser.rb
tdiary-5.0.8 vendor/bundle/gems/octokit-4.8.0/lib/octokit/response/feed_parser.rb
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/octokit-4.8.0/lib/octokit/response/feed_parser.rb
tdiary-5.0.8 vendor/bundle/ruby/2.5.0/gems/octokit-4.8.0/lib/octokit/response/feed_parser.rb
tdiary-5.0.7 vendor/bundle/gems/octokit-4.8.0/lib/octokit/response/feed_parser.rb
octokit-4.8.0 lib/octokit/response/feed_parser.rb
tdiary-5.0.6 vendor/bundle/gems/octokit-4.7.0/lib/octokit/response/feed_parser.rb
tdiary-5.0.5 vendor/bundle/gems/octokit-4.6.2/lib/octokit/response/feed_parser.rb
tdiary-5.0.5 vendor/bundle/gems/octokit-4.7.0/lib/octokit/response/feed_parser.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/octokit-4.6.2/lib/octokit/response/feed_parser.rb
octokit-4.7.0 lib/octokit/response/feed_parser.rb
octodoggy-4.6.2 lib/octokit/response/feed_parser.rb
tdiary-5.0.4 vendor/bundle/gems/octokit-4.6.2/lib/octokit/response/feed_parser.rb
octokit-4.6.2 lib/octokit/response/feed_parser.rb