From 5f639d03ae8a37d14434fcff80ae4d0ff2ddf4bd Mon Sep 17 00:00:00 2001 From: Oleg Andreev Date: Fri, 29 Mar 2013 12:00:48 +0100 Subject: [PATCH] Added :timeout option to Advanced API to allow long video uploads (otherwise, OAuth gem uses 30 sec by default which is not always enough) --- lib/vimeo/advanced/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vimeo/advanced/base.rb b/lib/vimeo/advanced/base.rb index 024905e..4d10a13 100644 --- a/lib/vimeo/advanced/base.rb +++ b/lib/vimeo/advanced/base.rb @@ -70,7 +70,7 @@ class Base ENDPOINT = "http://vimeo.com/api/rest/v2" def initialize(consumer_key, consumer_secret, options = {}) - @oauth_consumer = OAuth::Consumer.new(consumer_key, consumer_secret, :site => 'http://vimeo.com', :http_method => :get, :scheme => :header) + @oauth_consumer = OAuth::Consumer.new(consumer_key, consumer_secret, :site => 'http://vimeo.com', :http_method => :get, :scheme => :header, :timeout => options[:timeout]) unless options[:token].nil? && options[:secret].nil? @access_token = OAuth::AccessToken.new(@oauth_consumer, options[:token], options[:secret]) end