huyha85 / opengraph_parser

Simple Ruby Parser library for parsing OpenGraph protocol (http://ogp.me)
MIT License
59 stars 28 forks source link

Allow redirect_limit override in OpenGraph.new #12

Closed anthonylewis closed 2 years ago

anthonylewis commented 9 years ago

We needed to increase the redirect_limit in RedirectFollower when resolving open graph requests. Unfortunately, there was no way to pass a different limit through OpenGraph.new.

This PR checks for the existence of options[:redirect_limit] when initializing RedirectFollower. If present, it uses the value in the options hash instead of REDIRECT_DEFAULT_LIMIT.