lib/onebox/preview.rb in onebox-2.2.14 vs lib/onebox/preview.rb in onebox-2.2.15

- old
+ new

@@ -4,11 +4,11 @@ class Preview # see https://bugs.ruby-lang.org/issues/14688 client_exception = defined?(Net::HTTPClientException) ? Net::HTTPClientException : Net::HTTPServerException WEB_EXCEPTIONS ||= [client_exception, OpenURI::HTTPError, Timeout::Error, Net::HTTPError, Errno::ECONNREFUSED] - def initialize(link, options = Onebox.options) - @url = link + def initialize(url, options = Onebox.options) + @url = url @options = options.dup allowed_origins = @options[:allowed_iframe_origins] || Onebox::Engine.all_iframe_origins @options[:allowed_iframe_regexes] = Engine.origins_to_regexes(allowed_origins)