vimeo 1.2.2 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +29 -16
- data/Rakefile +35 -4
- data/VERSION.yml +3 -3
- data/lib/vimeo.rb +2 -0
- data/lib/vimeo/advanced/base.rb +4 -2
- data/lib/vimeo/advanced/upload.rb +122 -38
- data/test/vimeo/advanced/upload_test.rb +3 -28
- data/vimeo.gemspec +8 -8
- metadata +23 -10
- data/test/fixtures/advanced/upload/confirm.json +0 -9
- data/test/fixtures/advanced/upload/manifest_to_upload.json +0 -6
- data/test/fixtures/advanced/upload/verify_manifest.json +0 -11
data/README.markdown
CHANGED
@@ -2,10 +2,7 @@
|
|
2
2
|
|
3
3
|
This gem implements a full-featured Ruby interface for the Vimeo API v2.
|
4
4
|
|
5
|
-
For a more in depth look at the API check out [Vimeo's Simple API Documentation](http://www.vimeo.com/api/docs/simple-api) or [Vimeo's Advanced API Documentation](http://www.vimeo.com/api/docs/advanced-api). I would also recommend checking out the [API Forums](http://www.vimeo.com/forum:api) if
|
6
|
-
things aren't working as they should.
|
7
|
-
|
8
|
-
__I have been experiencing trouble with intermittent 303 errors (Invalid Signature). As far as I can tell, this is a server-side issue.__
|
5
|
+
For a more in depth look at the API check out [Vimeo's Simple API Documentation](http://www.vimeo.com/api/docs/simple-api) or [Vimeo's Advanced API Documentation](http://www.vimeo.com/api/docs/advanced-api). I would also recommend checking out the [API Forums](http://www.vimeo.com/forum:api) if things aren't working as they should.
|
9
6
|
|
10
7
|
## Install
|
11
8
|
|
@@ -17,6 +14,10 @@ If you're using Rails, add the following to your environment.rb file:
|
|
17
14
|
|
18
15
|
config.gem "vimeo"
|
19
16
|
|
17
|
+
Or for bundler:
|
18
|
+
|
19
|
+
gem 'vimeo'
|
20
|
+
|
20
21
|
## How to Use
|
21
22
|
|
22
23
|
There are two modules:
|
@@ -43,7 +44,7 @@ The wrapper for the Simple API consists of several classes. To use the Simple AP
|
|
43
44
|
# "bio":"",
|
44
45
|
# "profile_url":"http:\/\/vimeo.com\/matthooks",
|
45
46
|
# "videos_url":"http:\/\/vimeo.com\/matthooks\/videos",
|
46
|
-
# "
|
47
|
+
# "total_videos_appears_ined":2,
|
47
48
|
# "total_videos_appears_in":0,
|
48
49
|
# "total_videos_liked":2,
|
49
50
|
# "total_contacts":3,
|
@@ -74,7 +75,7 @@ Thanks to HTTParty, the data is parsed and ready to use.
|
|
74
75
|
|
75
76
|
Vimeo::Simple::Album.videos("album_id")
|
76
77
|
Vimeo::Simple::Album.info("album_id")
|
77
|
-
|
78
|
+
|
78
79
|
### Vimeo::Simple::Channel
|
79
80
|
|
80
81
|
Vimeo::Simple::Channel.videos("channelname")
|
@@ -116,8 +117,8 @@ First, instantiate the Base class:
|
|
116
117
|
|
117
118
|
Get a request token, and save the token secret in the session hash.
|
118
119
|
|
119
|
-
|
120
|
-
|
120
|
+
request_token = base.get_request_token
|
121
|
+
session[:oauth_secret] = request_token.secret
|
121
122
|
|
122
123
|
Then, send your user to the authorization URL:
|
123
124
|
|
@@ -131,7 +132,7 @@ Once the user has allowed your application to access their account, they will be
|
|
131
132
|
user.token = access_token.token
|
132
133
|
user.secret = access_token.secret
|
133
134
|
user.save
|
134
|
-
|
135
|
+
|
135
136
|
Now you've got everything you need to use the Advanced API. Let's get a user's videos:
|
136
137
|
|
137
138
|
video = Vimeo::Advanced::Video.new("consumer_key", "consumer_secret", :token => user.token, :secret => user.secret)
|
@@ -160,13 +161,13 @@ Some methods have optional variables. Pass these as a hash at the end of a call.
|
|
160
161
|
album.set_description("album_id", "description")
|
161
162
|
album.get_password("album_id", "password")
|
162
163
|
album.get_title("album_id", "title")
|
163
|
-
|
164
|
+
|
164
165
|
### Vimeo::Advanced::Base
|
165
166
|
|
166
167
|
base = Vimeo::Advanced::Base.new("consumer_key", "consumer_secret", :token => user.token, :secret => user.secret)
|
167
168
|
|
168
169
|
base.check_access_token
|
169
|
-
|
170
|
+
|
170
171
|
### Vimeo::Advanced::Channel
|
171
172
|
|
172
173
|
channel = Vimeo::Advanced::Channel.new("consumer_key", "consumer_secret", :token => user.token, :secret => user.secret)
|
@@ -245,11 +246,15 @@ Some methods have optional variables. Pass these as a hash at the end of a call.
|
|
245
246
|
|
246
247
|
upload = Vimeo::Advanced::Upload.new("consumer_key", "consumer_secret", :token => user.token, :secret => user.secret)
|
247
248
|
|
248
|
-
upload.
|
249
|
-
upload.
|
249
|
+
# Other than get_quota, none of these methods should be called directly. The 'upload' method uses these internally.
|
250
|
+
upload.check_ticket("ticket_id")
|
251
|
+
upload.complete("ticket_id", "filename")
|
250
252
|
upload.get_ticket
|
251
|
-
upload.
|
252
|
-
upload.
|
253
|
+
upload.get_quota
|
254
|
+
upload.verify_chunks("ticket_id")
|
255
|
+
|
256
|
+
# supports File, String (a file path), #read
|
257
|
+
upload.upload("movie.mp4")
|
253
258
|
|
254
259
|
### Vimeo::Advanced::Video
|
255
260
|
|
@@ -294,7 +299,15 @@ Some methods have optional variables. Pass these as a hash at the end of a call.
|
|
294
299
|
|
295
300
|
## Uploads
|
296
301
|
|
297
|
-
|
302
|
+
Uploads are working! In order to upload a file, create your upload object, like so:
|
303
|
+
|
304
|
+
upload = Vimeo::Advanced::Upload.new("consumer_key", "consumer_secret", :token => user.token, :secret => user.secret)
|
305
|
+
|
306
|
+
Then call the upload method:
|
307
|
+
|
308
|
+
upload.upload("/path/to/file") # You can also pass a File object or any IO.
|
309
|
+
|
310
|
+
The upload method will automatically get an upload ticket, perform the multipart POST, verify the file chunks and then complete the upload.
|
298
311
|
|
299
312
|
## Todo
|
300
313
|
|
data/Rakefile
CHANGED
@@ -15,16 +15,17 @@ begin
|
|
15
15
|
gem.add_development_dependency "fakeweb", ">= 1.2.6"
|
16
16
|
gem.add_development_dependency "crack", ">= 0.1.4"
|
17
17
|
gem.add_development_dependency "ruby-prof", ">= 0.9.2"
|
18
|
-
|
18
|
+
|
19
19
|
gem.has_rdoc = true
|
20
|
-
|
20
|
+
|
21
21
|
gem.rdoc_options = ['--main', 'README.rdoc', '--inline-source', '--charset=UTF-8']
|
22
22
|
gem.extra_rdoc_files = ['README.rdoc', 'LICENSE', 'CHANGELOG.rdoc']
|
23
|
-
|
23
|
+
|
24
24
|
gem.add_dependency "httparty", ">= 0.4.5"
|
25
25
|
gem.add_dependency "json", ">= 1.1.9"
|
26
|
-
gem.add_dependency "oauth", ">= 0.3
|
26
|
+
gem.add_dependency "oauth", ">= 0.4.3"
|
27
27
|
gem.add_dependency "httpclient", ">= 2.1.5.2"
|
28
|
+
gem.add_dependency "multipart-post", ">= 1.0.1"
|
28
29
|
end
|
29
30
|
Jeweler::GemcutterTasks.new
|
30
31
|
rescue LoadError
|
@@ -55,6 +56,36 @@ task :test => :check_dependencies
|
|
55
56
|
|
56
57
|
task :default => :test
|
57
58
|
|
59
|
+
namespace :vimeo do
|
60
|
+
desc "Multi-step wizard to acquire an access_token. CONSUMER_KEY and CONSUMER_SECRET required."
|
61
|
+
task :auth do
|
62
|
+
require 'vimeo'
|
63
|
+
|
64
|
+
def ask(message)
|
65
|
+
print message
|
66
|
+
STDOUT.flush
|
67
|
+
STDIN.gets.chomp
|
68
|
+
end
|
69
|
+
|
70
|
+
consumer_key = ENV['CONSUMER_KEY']
|
71
|
+
consumer_secret = ENV['CONSUMER_SECRET']
|
72
|
+
base = Vimeo::Advanced::Base.new(consumer_key, consumer_secret)
|
73
|
+
|
74
|
+
request_token = base.get_request_token
|
75
|
+
oauth_secret = request_token.secret
|
76
|
+
|
77
|
+
puts "Please visit: #{base.authorize_url}"
|
78
|
+
|
79
|
+
oauth_token = ask("oauth_token=")
|
80
|
+
oauth_verifier = ask("oauth_verifier=")
|
81
|
+
|
82
|
+
access_token = base.get_access_token(oauth_token, oauth_secret, oauth_verifier)
|
83
|
+
|
84
|
+
puts "token: #{access_token.token}"
|
85
|
+
puts "secret: #{access_token.secret}"
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
58
89
|
require 'rake/rdoctask'
|
59
90
|
Rake::RDocTask.new do |rdoc|
|
60
91
|
if File.exist?('VERSION')
|
data/VERSION.yml
CHANGED
data/lib/vimeo.rb
CHANGED
data/lib/vimeo/advanced/base.rb
CHANGED
@@ -66,6 +66,8 @@ module Vimeo
|
|
66
66
|
|
67
67
|
class Base
|
68
68
|
extend CreateApiMethod
|
69
|
+
|
70
|
+
ENDPOINT = "http://vimeo.com/api/rest/v2"
|
69
71
|
|
70
72
|
def initialize(consumer_key, consumer_secret, options = {})
|
71
73
|
@oauth_consumer = OAuth::Consumer.new(consumer_key, consumer_secret, :site => 'http://vimeo.com', :http_method => :get, :scheme => :header)
|
@@ -94,9 +96,9 @@ private
|
|
94
96
|
|
95
97
|
def make_request(options, authorized)
|
96
98
|
if authorized
|
97
|
-
raw_response = @oauth_consumer.request(:post,
|
99
|
+
raw_response = @oauth_consumer.request(:post, Vimeo::Advanced::Base::ENDPOINT, get_access_token, {}, options).body
|
98
100
|
else
|
99
|
-
raw_response = @oauth_consumer.request(:post,
|
101
|
+
raw_response = @oauth_consumer.request(:post, Vimeo::Advanced::Base::ENDPOINT, nil, {}, options).body
|
100
102
|
end
|
101
103
|
|
102
104
|
response = Crack::JSON.parse(raw_response)
|
@@ -1,57 +1,141 @@
|
|
1
|
-
require 'httpclient'
|
2
1
|
require 'json'
|
3
2
|
|
4
3
|
module Vimeo
|
5
4
|
module Advanced
|
6
5
|
|
7
6
|
class Upload < Vimeo::Advanced::Base
|
7
|
+
class UploadError < RuntimeError; end
|
8
8
|
|
9
|
-
#
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
# 2 megabytes
|
10
|
+
CHUNK_SIZE = 2 * 1024 * 1024
|
11
|
+
|
12
|
+
# multipart boundary
|
13
|
+
BOUNDARY = "-----------RubyMultipartPost"
|
14
|
+
|
15
|
+
# Check to make sure an upload ticket is still valid.
|
16
|
+
create_api_method :check_ticket,
|
17
|
+
"vimeo.videos.upload.checkTicket",
|
13
18
|
:required => [:ticket_id]
|
14
|
-
|
15
|
-
#
|
19
|
+
|
20
|
+
# Complete the upload process.
|
21
|
+
create_api_method :complete,
|
22
|
+
"vimeo.videos.upload.complete",
|
23
|
+
:required => [:ticket_id, :filename]
|
24
|
+
|
25
|
+
# Returns an upload ticket.
|
26
|
+
create_api_method :get_ticket,
|
27
|
+
"vimeo.videos.upload.getTicket",
|
28
|
+
:optional => [:video_id]
|
16
29
|
|
17
30
|
# Returns the space and HD uploads left for a user.
|
18
31
|
create_api_method :get_quota,
|
19
32
|
"vimeo.videos.upload.getQuota"
|
20
|
-
|
21
|
-
# Returns an upload ticket.
|
22
|
-
create_api_method :get_ticket,
|
23
|
-
"vimeo.videos.upload.getTicket"
|
24
|
-
|
25
|
-
# Upload +file+ to vimeo with +ticket_id+ and +auth_token+
|
26
|
-
# Returns the json manifest necessary to confirm the upload.
|
27
|
-
def upload(auth_token, file_path, ticket_id, end_point)
|
28
|
-
params = {
|
29
|
-
:auth_token => auth_token,
|
30
|
-
:ticket_id => ticket_id
|
31
|
-
}
|
32
|
-
params[:api_sig] = generate_api_sig params
|
33
|
-
|
34
|
-
params.merge!({ :file_data => File.open(file_path) })
|
35
|
-
|
36
|
-
client = HTTPClient.new
|
37
|
-
response = client.post(end_point, params)
|
38
|
-
md5 = response.content
|
39
|
-
|
40
|
-
self.class.create_json_manifest(md5)
|
41
|
-
end
|
42
33
|
|
43
|
-
#
|
44
|
-
|
45
|
-
|
46
|
-
create_api_method :verify_manifest,
|
47
|
-
"vimeo.videos.upload.verifyManifest",
|
34
|
+
# Verify that the chunks were uploaded properly.
|
35
|
+
create_api_method :verify_chunks,
|
36
|
+
"vimeo.videos.upload.verifyChunks",
|
48
37
|
:required => [:ticket_id]
|
49
38
|
|
50
|
-
|
51
|
-
|
52
|
-
|
39
|
+
|
40
|
+
# Uploads data (IO streams or files) to Vimeo.
|
41
|
+
def upload(uploadable)
|
42
|
+
case uploadable
|
43
|
+
when File
|
44
|
+
upload_file(uploadable)
|
45
|
+
when String
|
46
|
+
upload_file(File.new(uploadable))
|
47
|
+
else
|
48
|
+
upload_io(uploadable)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
protected
|
53
|
+
|
54
|
+
def upload_chunk(chunk_id, data, endpoint, filename)
|
55
|
+
endpoint += "&chunk_id=#{chunk_id}"
|
56
|
+
|
57
|
+
response = @oauth_consumer.request(:post, endpoint, get_access_token, {}, {}) do |req|
|
58
|
+
req.set_content_type("multipart/form-data", { "boundary" => BOUNDARY })
|
59
|
+
|
60
|
+
io = StringIO.new(data)
|
61
|
+
io.instance_variable_set :"@original_filename", filename
|
62
|
+
def io.original_filename; @original_filename; end
|
63
|
+
def io.content_type; "application/octet-stream"; end
|
64
|
+
|
65
|
+
parts = []
|
66
|
+
parts << Parts::FilePart.new(BOUNDARY, "file_data", io)
|
67
|
+
parts << Parts::EpiloguePart.new(BOUNDARY)
|
68
|
+
|
69
|
+
ios = parts.map{|p| p.to_io }
|
70
|
+
req.content_length = parts.inject(0) {|sum,i| sum + i.length }
|
71
|
+
req.body_stream = CompositeReadIO.new(*ios)
|
72
|
+
|
73
|
+
:continue
|
74
|
+
end
|
75
|
+
|
76
|
+
response.body
|
53
77
|
end
|
54
78
|
|
79
|
+
def upload_io(io, size, filename = 'io.data')
|
80
|
+
raise "#{io.inspect} must respond to #read" unless io.respond_to?(:read)
|
81
|
+
|
82
|
+
quota_response = get_quota
|
83
|
+
user = quota_response["user"]
|
84
|
+
upload_space = user["upload_space"]
|
85
|
+
free = upload_space["free"].to_i
|
86
|
+
|
87
|
+
raise UploadError.new, "file size exceeds quota. required: #{size}, free: #{free}" if size > free
|
88
|
+
|
89
|
+
ticket_response = get_ticket
|
90
|
+
ticket = ticket_response["ticket"]
|
91
|
+
max_file_size = ticket["max_file_size"].to_i
|
92
|
+
ticket_id = ticket["id"]
|
93
|
+
endpoint = ticket["endpoint"]
|
94
|
+
|
95
|
+
raise UploadError.new, "file was too big: #{size}, maximum: #{max_file_size}" if size > max_file_size
|
96
|
+
|
97
|
+
chunk_sizes = {}
|
98
|
+
chunk_index = 0
|
99
|
+
|
100
|
+
while (chunk = io.read(CHUNK_SIZE)) do
|
101
|
+
|
102
|
+
chunk_id = upload_chunk(chunk_index, chunk, endpoint, filename)
|
103
|
+
chunk_sizes[chunk_id] = chunk.length
|
104
|
+
chunk_index += 1
|
105
|
+
end
|
106
|
+
|
107
|
+
validate_chunks_after_upload(ticket_id, chunk_sizes)
|
108
|
+
|
109
|
+
complete(ticket_id, filename)
|
110
|
+
end
|
111
|
+
|
112
|
+
def upload_file(file)
|
113
|
+
file_path = file.path
|
114
|
+
|
115
|
+
size = File.size(file_path)
|
116
|
+
basename = File.basename(file_path)
|
117
|
+
io = File.open(file_path)
|
118
|
+
io.binmode
|
119
|
+
|
120
|
+
upload_io(io, size, basename).tap do
|
121
|
+
io.close
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
def validate_chunks_after_upload(ticket_id, chunk_sizes)
|
126
|
+
verification = verify_chunks(ticket_id)
|
127
|
+
ticket = verification["ticket"]
|
128
|
+
chunk_list = Array(ticket["chunks"]["chunk"])
|
129
|
+
received_chunks = Hash[chunk_list.map { |chunk| [chunk["id"], chunk["size"].to_i] }]
|
130
|
+
|
131
|
+
chunk_sizes.each do |id, size|
|
132
|
+
vimeo_size = received_chunks[id]
|
133
|
+
|
134
|
+
if vimeo_size != size
|
135
|
+
raise UploadError.new, "Chunk (id: #{id}) was invalid - was: #{vimeo_size}, should be: #{size}."
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
55
139
|
end # Upload
|
56
140
|
end # Advanced
|
57
|
-
end # Vimeo
|
141
|
+
end # Vimeo
|
@@ -3,48 +3,23 @@ require 'test_helper'
|
|
3
3
|
class UploadTest < Test::Unit::TestCase
|
4
4
|
|
5
5
|
context "vimeo advanced upload" do
|
6
|
-
|
6
|
+
|
7
7
|
setup do
|
8
8
|
@upload = Vimeo::Advanced::Upload.new("12345", "secret", :token => "token", :secret => "secret")
|
9
9
|
end
|
10
10
|
|
11
|
-
should "be able confirm an upload" do
|
12
|
-
stub_post("?api_key=12345&ticket_id=ticket_id&format=json&auth_token=token&api_sig=576b41966709651aead8754b3c5d370d&method=vimeo.videos.upload.confirm", "advanced/upload/confirm.json")
|
13
|
-
response = @upload.confirm("ticket_id")
|
14
|
-
|
15
|
-
assert_equal "ticket_id", response["ticket"]["id"]
|
16
|
-
end
|
17
|
-
|
18
11
|
should "be able to get a user's quota" do
|
19
12
|
stub_post("?api_key=12345&auth_token=token&format=json&api_sig=4eb2da55156fca5ab81bfe1a67a016ec&method=vimeo.videos.upload.getQuota", "advanced/upload/get_quota.json")
|
20
13
|
response = @upload.get_quota
|
21
|
-
|
14
|
+
|
22
15
|
assert_equal "888046", response["user"]["id"]
|
23
16
|
end
|
24
|
-
|
17
|
+
|
25
18
|
should "be able to get an upload ticket" do
|
26
19
|
stub_post("?api_key=12345&auth_token=token&format=json&api_sig=0eabe7404e1c1fd22a269190c36e4093&method=vimeo.videos.upload.getTicket", "advanced/upload/get_ticket.json")
|
27
20
|
response = @upload.get_ticket
|
28
|
-
|
29
|
-
assert_equal "ticket_id", response["ticket"]["id"]
|
30
|
-
end
|
31
21
|
|
32
|
-
# TODO: Stub out the HTTPClient calls correctly since FakeWeb doesn't work here.
|
33
|
-
# should "be able to upload a file to vimeo" do
|
34
|
-
# HTTPClient.any_instance.stubs(:post)
|
35
|
-
# file_path = File.expand_path(File.dirname(__FILE__) + "../../../fixtures/advanced/upload/sample_iTunes.mov")
|
36
|
-
# response = @upload.upload(file_path, "ticket_id", "http:\/\/67.202.6.15\/upload_multi?ticket_id=ticket_id")
|
37
|
-
#
|
38
|
-
# assert_equal "MD5", response
|
39
|
-
# end
|
40
|
-
|
41
|
-
# TODO: Make sure this manifest fixture file is right.
|
42
|
-
should "be able to verify a file manifest" do
|
43
|
-
stub_post("?api_key=12345&ticket_id=ticket_id&format=json&auth_token=token&api_sig=3b1c022ba0be09e5901bd91fb5a4426c&method=vimeo.videos.upload.verifyManifest", "advanced/upload/verify_manifest.json")
|
44
|
-
response = @upload.verify_manifest("ticket_id")
|
45
|
-
|
46
22
|
assert_equal "ticket_id", response["ticket"]["id"]
|
47
23
|
end
|
48
|
-
|
49
24
|
end
|
50
25
|
end
|
data/vimeo.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{vimeo}
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Matt Hooks"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-11-12}
|
13
13
|
s.description = %q{A full featured Ruby implementation of the Vimeo API.}
|
14
14
|
s.email = %q{matthooks@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -100,12 +100,9 @@ Gem::Specification.new do |s|
|
|
100
100
|
"test/fixtures/advanced/test/echo.json",
|
101
101
|
"test/fixtures/advanced/test/login.json",
|
102
102
|
"test/fixtures/advanced/test/null.json",
|
103
|
-
"test/fixtures/advanced/upload/confirm.json",
|
104
103
|
"test/fixtures/advanced/upload/get_quota.json",
|
105
104
|
"test/fixtures/advanced/upload/get_ticket.json",
|
106
|
-
"test/fixtures/advanced/upload/manifest_to_upload.json",
|
107
105
|
"test/fixtures/advanced/upload/sample_iTunes.mov",
|
108
|
-
"test/fixtures/advanced/upload/verify_manifest.json",
|
109
106
|
"test/fixtures/advanced/video/add_cast.json",
|
110
107
|
"test/fixtures/advanced/video/add_comment.json",
|
111
108
|
"test/fixtures/advanced/video/add_photos.json",
|
@@ -227,8 +224,9 @@ Gem::Specification.new do |s|
|
|
227
224
|
s.add_development_dependency(%q<ruby-prof>, [">= 0.9.2"])
|
228
225
|
s.add_runtime_dependency(%q<httparty>, [">= 0.4.5"])
|
229
226
|
s.add_runtime_dependency(%q<json>, [">= 1.1.9"])
|
230
|
-
s.add_runtime_dependency(%q<oauth>, [">= 0.3
|
227
|
+
s.add_runtime_dependency(%q<oauth>, [">= 0.4.3"])
|
231
228
|
s.add_runtime_dependency(%q<httpclient>, [">= 2.1.5.2"])
|
229
|
+
s.add_runtime_dependency(%q<multipart-post>, [">= 1.0.1"])
|
232
230
|
else
|
233
231
|
s.add_dependency(%q<shoulda>, [">= 2.11.3"])
|
234
232
|
s.add_dependency(%q<fakeweb>, [">= 1.2.6"])
|
@@ -236,8 +234,9 @@ Gem::Specification.new do |s|
|
|
236
234
|
s.add_dependency(%q<ruby-prof>, [">= 0.9.2"])
|
237
235
|
s.add_dependency(%q<httparty>, [">= 0.4.5"])
|
238
236
|
s.add_dependency(%q<json>, [">= 1.1.9"])
|
239
|
-
s.add_dependency(%q<oauth>, [">= 0.3
|
237
|
+
s.add_dependency(%q<oauth>, [">= 0.4.3"])
|
240
238
|
s.add_dependency(%q<httpclient>, [">= 2.1.5.2"])
|
239
|
+
s.add_dependency(%q<multipart-post>, [">= 1.0.1"])
|
241
240
|
end
|
242
241
|
else
|
243
242
|
s.add_dependency(%q<shoulda>, [">= 2.11.3"])
|
@@ -246,8 +245,9 @@ Gem::Specification.new do |s|
|
|
246
245
|
s.add_dependency(%q<ruby-prof>, [">= 0.9.2"])
|
247
246
|
s.add_dependency(%q<httparty>, [">= 0.4.5"])
|
248
247
|
s.add_dependency(%q<json>, [">= 1.1.9"])
|
249
|
-
s.add_dependency(%q<oauth>, [">= 0.3
|
248
|
+
s.add_dependency(%q<oauth>, [">= 0.4.3"])
|
250
249
|
s.add_dependency(%q<httpclient>, [">= 2.1.5.2"])
|
250
|
+
s.add_dependency(%q<multipart-post>, [">= 1.0.1"])
|
251
251
|
end
|
252
252
|
end
|
253
253
|
|
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 1.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Matt Hooks
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-11-12 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -122,12 +122,12 @@ dependencies:
|
|
122
122
|
requirements:
|
123
123
|
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
hash:
|
125
|
+
hash: 9
|
126
126
|
segments:
|
127
127
|
- 0
|
128
|
+
- 4
|
128
129
|
- 3
|
129
|
-
|
130
|
-
version: 0.3.6
|
130
|
+
version: 0.4.3
|
131
131
|
type: :runtime
|
132
132
|
version_requirements: *id007
|
133
133
|
- !ruby/object:Gem::Dependency
|
@@ -147,6 +147,22 @@ dependencies:
|
|
147
147
|
version: 2.1.5.2
|
148
148
|
type: :runtime
|
149
149
|
version_requirements: *id008
|
150
|
+
- !ruby/object:Gem::Dependency
|
151
|
+
name: multipart-post
|
152
|
+
prerelease: false
|
153
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
154
|
+
none: false
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
hash: 21
|
159
|
+
segments:
|
160
|
+
- 1
|
161
|
+
- 0
|
162
|
+
- 1
|
163
|
+
version: 1.0.1
|
164
|
+
type: :runtime
|
165
|
+
version_requirements: *id009
|
150
166
|
description: A full featured Ruby implementation of the Vimeo API.
|
151
167
|
email: matthooks@gmail.com
|
152
168
|
executables: []
|
@@ -240,12 +256,9 @@ files:
|
|
240
256
|
- test/fixtures/advanced/test/echo.json
|
241
257
|
- test/fixtures/advanced/test/login.json
|
242
258
|
- test/fixtures/advanced/test/null.json
|
243
|
-
- test/fixtures/advanced/upload/confirm.json
|
244
259
|
- test/fixtures/advanced/upload/get_quota.json
|
245
260
|
- test/fixtures/advanced/upload/get_ticket.json
|
246
|
-
- test/fixtures/advanced/upload/manifest_to_upload.json
|
247
261
|
- test/fixtures/advanced/upload/sample_iTunes.mov
|
248
|
-
- test/fixtures/advanced/upload/verify_manifest.json
|
249
262
|
- test/fixtures/advanced/video/add_cast.json
|
250
263
|
- test/fixtures/advanced/video/add_comment.json
|
251
264
|
- test/fixtures/advanced/video/add_photos.json
|