Sha256: 1bb4e1d46ee4eceed24ecf8e23c7feb137ac50f2ee241c7a846221072fb04592

Contents?: true

Size: 401 Bytes

Versions: 24

Compression:

Stored size: 401 Bytes

Contents

# frozen_string_literal: true

require 'octokit/response/base_middleware'

module Octokit
  module Response
    # Parses RSS and Atom feed responses.
    class FeedParser < BaseMiddleware
      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

24 entries across 24 versions & 2 rubygems

Version Path
octokit-9.2.0 lib/octokit/response/feed_parser.rb
octokit-9.1.0 lib/octokit/response/feed_parser.rb
octokit-9.0.0 lib/octokit/response/feed_parser.rb
octokit-8.1.0 lib/octokit/response/feed_parser.rb
octokit-8.0.0 lib/octokit/response/feed_parser.rb
octokit-7.2.0 lib/octokit/response/feed_parser.rb
octokit-7.1.0 lib/octokit/response/feed_parser.rb
octokit-7.0.0 lib/octokit/response/feed_parser.rb
octokit-6.1.1 lib/octokit/response/feed_parser.rb
octokit-6.1.0 lib/octokit/response/feed_parser.rb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/octokit-4.25.1/lib/octokit/response/feed_parser.rb
octokit-6.0.1 lib/octokit/response/feed_parser.rb
octokit-6.0.0 lib/octokit/response/feed_parser.rb
octokit-5.6.1 lib/octokit/response/feed_parser.rb
octokit-5.6.0 lib/octokit/response/feed_parser.rb
octokit-5.5.0 lib/octokit/response/feed_parser.rb
octokit-5.4.0 lib/octokit/response/feed_parser.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/octokit-5.3.0/lib/octokit/response/feed_parser.rb
octokit-5.3.0 lib/octokit/response/feed_parser.rb
octokit-5.2.0 lib/octokit/response/feed_parser.rb