viddlereo 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,307 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.viddler.com:80/api/v2/viddler.users.auth.xml?get_record_token=0&key=<%= key %>&password=<%= password %>&user=<%= user %>
6
+ body:
7
+ headers:
8
+ accept:
9
+ - "*/*; q=0.5, application/xml"
10
+ accept-encoding:
11
+ - gzip, deflate
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-viddler-node:
18
+ - viddler_i
19
+ connection:
20
+ - keep-alive
21
+ content-type:
22
+ - text/xml;charset=UTF-8
23
+ server:
24
+ - nginx/0.6.32
25
+ date:
26
+ - Sat, 20 Nov 2010 22:19:18 GMT
27
+ content-encoding:
28
+ - gzip
29
+ set-cookie:
30
+ - JSESSIONID=A26B450D36B9B127ECCCFA2B3639C36F.viddler_i; Domain=.viddler.com; Path=/
31
+ vary:
32
+ - Accept-Encoding
33
+ transfer-encoding:
34
+ - chunked
35
+ body: !binary |
36
+ H4sIAAAAAAAAA7Kxr8jNUShLLSrOzM+zVTLUM1BSSM1Lzk/JzEu3VQoNcdO1
37
+ ULK347JJLC3JsLMpTi0GqctMsTM2MDM2TLQ0NEo2SzJNTTJLNTUxMUkySTYx
38
+ NbE0STExNEk1TEuz0UdosNEHGwEAAAD//wMAPmmyWXAAAAA=
39
+
40
+ http_version: "1.1"
41
+ - !ruby/struct:VCR::HTTPInteraction
42
+ request: !ruby/struct:VCR::Request
43
+ method: :post
44
+ uri: http://api.viddler.com:80/api/v2/viddler.playlists.create.xml
45
+ body: type=smart&visibility=private&sessionid=30631a912c6b5eb6e5444b4c45494d414e1ff&name=Some%20Playlist&key=<%= key %>
46
+ headers:
47
+ accept:
48
+ - "*/*; q=0.5, application/xml"
49
+ content-type:
50
+ - application/x-www-form-urlencoded
51
+ accept-encoding:
52
+ - gzip, deflate
53
+ content-length:
54
+ - "123"
55
+ response: !ruby/struct:VCR::Response
56
+ status: !ruby/struct:VCR::ResponseStatus
57
+ code: 200
58
+ message: OK
59
+ headers:
60
+ x-viddler-node:
61
+ - viddler_k
62
+ connection:
63
+ - keep-alive
64
+ content-type:
65
+ - text/xml;charset=UTF-8
66
+ server:
67
+ - nginx/0.6.32
68
+ date:
69
+ - Sat, 20 Nov 2010 22:19:18 GMT
70
+ content-encoding:
71
+ - gzip
72
+ set-cookie:
73
+ - JSESSIONID=194D2A5E17BC3C1A531A4952EF621B11.viddler_k; Domain=.viddler.com; Path=/
74
+ vary:
75
+ - Accept-Encoding
76
+ transfer-encoding:
77
+ - chunked
78
+ body: !binary |
79
+ H4sIAAAAAAAAA+ycWW/jNhCA3/srjLwn4n0UjIICRdEWKLDYbNFHQxbpmF1Z
80
+ EiTZSfrrSx2+YntrWFpFjvtikUOKImfI+Tw0ZfXwMo9GS5PlNonvb+AduBmZ
81
+ OEy0jZ/ub/788sutuHnwf1CRzYtxZvJFVPgqDZ6MD5VXXVVqsnEtAU60yqg0
82
+ Cl7Lu3xltc+hgICyKSeQGGak8pxQxcHc+I/J3Iw+NZWVV8lU8ZoaP58HmZNU
83
+ abW0uZ3YyBavfprZZVAY5W3J1CI3ma+/RsbOg1h5VVZli8jkdVn+pjD/7ya9
84
+ 5nZvM5Sl1SYZb6Wr0UlJtYbToB5VXgTFIvczE+hX5TU5FSyKWbLdw0agCltE
85
+ xv88+jQLcjP6K3Ntj4JYj351H27wVamKTPxUzHxEqfKatNImDzObFs5wro87
86
+ OWcA18m5db30ttKLLPJnRZH+6HnPz893bgA6MtldmMw985JGSWa8Vf+8anS5
87
+ R5jn9OXuU8VsMZ/EgY3GW82EOr6tCvKd1jZ10XilnPES3v2dPilvt6Fy+syD
88
+ yMZfz+ra5m41K+YRHdcWypNFFjq9eYeES2uex2GyiAsflBZf55Sdp26Ol0th
89
+ U74nUwvXn0CPC+tmK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MnEGJK
106
+ mGi1X3zMAh/j2EnINKTTkLdA3ONqu3L0WJh072glwj0jDsu2iFsppXPEVV0b
107
+ BOKEpBSdhDghORoc4pwitxAHGaFY0GvfrCTOK/V93MRNESglpy08LJYHPOx6
108
+ LBfFOIJY7+dNoFuiiMo228VHLMA+yIETTqcYcdjmNYIV4x5ddRuOfipmkSkT
109
+ n8tWSmkc7p2zJFj0TT7RlnwrVXVPPjEc8pETD1oOk3xih3ycM0gBvnryod6D
110
+ O0QkZlTyNn5XHPS76AKju7LXfUd3mHIBIWhz1PKoBT5IdDfRAZ5w2AX50iQr
111
+ cncxRo9+a4Q/ZzaK9nY1Eer7DQPMW4d8jaa6Bx8fDviwBCeCj5LhgY/v/HJH
112
+ OcZSXvsbBgSBLt3uaSEfhtihD7dxu/yg2wUt3O77gQ90GXSfFvJJRlzFVkH3
113
+ MQucH3QPCXwSQ0JY2EXI9zkpY74kDqLD+5ug72MquP2r4412uofdYF4dd7DD
114
+ 8ETYkeEdU8E7r44TxjFn7Np/wqOI9Q87SCWEqFWUd+jF5fVYLgp2Za97hx1z
115
+ s1/i72KBS4ZdfW3+M8Xb/h+ZfwEAAP//AwCXzE21fEYAAA==
116
+
117
+ http_version: "1.1"
118
+ - !ruby/struct:VCR::HTTPInteraction
119
+ request: !ruby/struct:VCR::Request
120
+ method: :get
121
+ uri: http://api.viddler.com:80/api/v2/viddler.playlists.getDetails.xml?key=<%= key %>&page=1&per_page=100&playlist_id=7181056f7414e6e9&sessionid=30631a912c6b5eb6e5444b4c45494d414e1ff
122
+ body:
123
+ headers:
124
+ accept:
125
+ - "*/*; q=0.5, application/xml"
126
+ accept-encoding:
127
+ - gzip, deflate
128
+ response: !ruby/struct:VCR::Response
129
+ status: !ruby/struct:VCR::ResponseStatus
130
+ code: 200
131
+ message: OK
132
+ headers:
133
+ x-viddler-node:
134
+ - viddler_i
135
+ connection:
136
+ - keep-alive
137
+ content-type:
138
+ - text/xml;charset=UTF-8
139
+ server:
140
+ - nginx/0.6.32
141
+ date:
142
+ - Sat, 20 Nov 2010 22:19:18 GMT
143
+ content-encoding:
144
+ - gzip
145
+ set-cookie:
146
+ - JSESSIONID=DC45B160DBA4BCDAE50E2C71F33139D3.viddler_i; Domain=.viddler.com; Path=/
147
+ vary:
148
+ - Accept-Encoding
149
+ transfer-encoding:
150
+ - chunked
151
+ body: !binary |
152
+ H4sIAAAAAAAAA+ydWZPbOJLH3/dTKPq9LWTi3lCrwzO9vZ4e967D5dl5rKB4
153
+ uLjWFTrK7f30C6pElWiSPYwCDIGko4+SKJWKyCTxUwKZ/5z9/MdqOXlMd/t8
154
+ s/7pB3hFfpik63iT5OuPP/3wjw+//qh++Hn+b7Nlvj/c79L9cXmYz7bRx3QO
155
+ s+np52yb7u6fjhBijpXPZttl9KX4tfksT+YSFBAuMsmApSLVs6k5OFtHq3R+
156
+ t1mlk3fnN8+mp2Ozw5dtOt+vop05cno8e8z3+SJf5ocv8+0uf4wO6Wx6dWx2
157
+ 3Ke7efJpmearaD2bnp7Odsdlun96bf/Vi/t//ZHT869Pn4fymCfp5v7q8Wl0
158
+ WvMkgSx6GtX+EB2O+/kujZIvs+n52Sw6Hh4212d4PjA75IdlOn8/efcQ7dPJ
159
+ P3fmsyfROpm8Mf8zgz+9Olum64+HhzlyPpueH8+SdB/v8u3BeM6cY+WZcYA5
160
+ yVVuznJ69fi4W84fDoftv0+nnz9/fmUGkCzT3at4s5qmf2yXm106Lc9vehrd
161
+ fsrE1NjL/N7s8HBcLdZRvry/+pg4Wf94emFf+bTn9+J9aZz7R3j1v9uPs2n1
162
+ g4rrZxUt8/WnF53a82/PHg6rJb9/8tB+c9zFxm7TpoOPefr5Pt4c14c5KTx+
163
+ eTbLV1tzkRf3wvPrtWOzozmfKLk/5OZKBVRKa0KFccz18dkqStL77XGxzOPK
164
+ O7kwd07txVkWPW52+SEt/uLl8cwMf5WuD88nUz1wsl1+Ojdzhe3TeJceXubj
165
+ ny+//BPnILjg0ly6lw88may4Ch/T5fO98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c5u9121VkkogVoIadT2Nq5H0jGxOm7J3W5UEBk81Mm7tb9OSPSSy
249
+ cUapprELsr09rosb/f7dZp8XwKoFcKfKe6+csxY3Kc3jnHMBaZucpLL7GsFV
250
+ pE3MfVkIGH3ffUPvy5OSoQBpszxZF9a4GknPOIf+lyeJlqiJTcV3mwMGsjyZ
251
+ gsrSQpzJGnRNwl3ad7sBa0GT0iDO0RaQngmoroklNLxmA1U5E6JBK8rGrWdS
252
+ TEhO09K71QUoqhTaxBB1LY2rkfSMbdT76qRC0BRsMnva7D+M1UmWopCnC9Qa
253
+ bW/y7an6rVG0y/f+m72iydkwzhEXkKAJFAVLHREXXO4kra5SFoWu8J1w4DJ3
254
+ r6Nil6QmgLPZgGuS07gMpWeIA/8d4xTnwIjNOnGbA4bRMC4hmVQUbHrplIwr
255
+ OuicIHdqqlMvgvO9SGktZ1Laxn3373AwR3TXCm8aXiedipiJ4owojWPHnHDb
256
+ ebpbCRxogk9t11/cebphlhVWjadvhTmBwvtuHEVKBLESTmt2gBjIdtwijs0X
257
+ JidSJo2ylNx3pom1fklpEfcV3gHBjXSN4UiA3QW+aonKGRVjV+oSyP3nUCIA
258
+ 2LUoa5xaeQ9XKYuz9p5DyQgiWEkut9i/z6uUTz8NQPYFS4of92Y+PC4P8/8H
259
+ AAD//wMAqAG0oRo4AQA=
260
+
261
+ http_version: "1.1"
262
+ - !ruby/struct:VCR::HTTPInteraction
263
+ request: !ruby/struct:VCR::Request
264
+ method: :post
265
+ uri: http://api.viddler.com:80/api/v2/viddler.playlists.delete.xml
266
+ body: sessionid=30631a912c6b5eb6e5444b4c45494d414e1ff&playlist_id=7181056f7414e6e9&key=<%= key %>
267
+ headers:
268
+ accept:
269
+ - "*/*; q=0.5, application/xml"
270
+ content-type:
271
+ - application/x-www-form-urlencoded
272
+ accept-encoding:
273
+ - gzip, deflate
274
+ content-length:
275
+ - "101"
276
+ response: !ruby/struct:VCR::Response
277
+ status: !ruby/struct:VCR::ResponseStatus
278
+ code: 200
279
+ message: OK
280
+ headers:
281
+ x-viddler-node:
282
+ - viddler_j
283
+ connection:
284
+ - keep-alive
285
+ content-type:
286
+ - text/xml;charset=UTF-8
287
+ server:
288
+ - nginx/0.6.32
289
+ date:
290
+ - Sat, 20 Nov 2010 22:19:19 GMT
291
+ content-encoding:
292
+ - gzip
293
+ set-cookie:
294
+ - JSESSIONID=5DFB3A1A685979398C853B20A292D582.viddler_j; Domain=.viddler.com; Path=/
295
+ vary:
296
+ - Accept-Encoding
297
+ transfer-encoding:
298
+ - chunked
299
+ body: !binary |
300
+ H4sIAAAAAAAAA9ySMU/DQAyFd35FlB2cE6UpkutuzEiFuboSU1ncXU7nS0T+
301
+ fUNa1KgMzDDZ77OfpScZN5/eFT0nlTasS3NXlQWHt7aRcFiXry9Pt6tyQzfo
302
+ RPMusXYuE0Z7YDIIU8XIaXci1Yi+BUZnhy+XXlpCaag2q/vqYfleL8yCl/yI
303
+ MEIM1jNtW8/F83kZYWKYh8ik3qaRTD32orIXJ3mgmKS3mRFmDDvlRM2HY/E2
304
+ IEwSU+dYTzO9GurvJ+Fsh0uUn6Hq/xjK/P1QMHtFmD/yEQAA//8DAJa2ZPP9
305
+ AgAA
306
+
307
+ http_version: "1.1"
@@ -0,0 +1,40 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.viddler.com:80/api/v2/viddler.api.echo.xml?key=<%= key %>&message=HELLO
6
+ body:
7
+ headers:
8
+ accept:
9
+ - "*/*; q=0.5, application/xml"
10
+ accept-encoding:
11
+ - gzip, deflate
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-viddler-node:
18
+ - viddler_j
19
+ connection:
20
+ - keep-alive
21
+ content-type:
22
+ - text/xml;charset=UTF-8
23
+ server:
24
+ - nginx/0.6.32
25
+ date:
26
+ - Sat, 20 Nov 2010 22:19:17 GMT
27
+ content-encoding:
28
+ - gzip
29
+ set-cookie:
30
+ - JSESSIONID=8777C178F8D1A5C837B24093A5265BC3.viddler_j; Domain=.viddler.com; Path=/
31
+ vary:
32
+ - Accept-Encoding
33
+ transfer-encoding:
34
+ - chunked
35
+ body: !binary |
36
+ H4sIAAAAAAAAA7Kxr8jNUShLLSrOzM+zVTLUM1BSSM1Lzk/JzEu3VQoNcdO1
37
+ ULK347JJTc7Ijy9KLS7IzytOtbPJTS0uTkxPtfNw9fHxt9GHcW30UdUBAAAA
38
+ //8DAF7v1BdeAAAA
39
+
40
+ http_version: "1.1"
@@ -0,0 +1,40 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: http://api.viddler.com:80/api/v2/viddler.users.auth.xml?get_record_token=0&key=<%= key %>&password=<%= password %>&user=<%= user %>
6
+ body:
7
+ headers:
8
+ accept:
9
+ - "*/*; q=0.5, application/xml"
10
+ accept-encoding:
11
+ - gzip, deflate
12
+ response: !ruby/struct:VCR::Response
13
+ status: !ruby/struct:VCR::ResponseStatus
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ x-viddler-node:
18
+ - viddler_i
19
+ connection:
20
+ - keep-alive
21
+ content-type:
22
+ - text/xml;charset=UTF-8
23
+ server:
24
+ - nginx/0.6.32
25
+ date:
26
+ - Sat, 20 Nov 2010 22:19:19 GMT
27
+ content-encoding:
28
+ - gzip
29
+ set-cookie:
30
+ - JSESSIONID=84BDB15FC9D545BBF96EABDE530A3FF8.viddler_i; Domain=.viddler.com; Path=/
31
+ vary:
32
+ - Accept-Encoding
33
+ transfer-encoding:
34
+ - chunked
35
+ body: !binary |
36
+ H4sIAAAAAAAAA7Kxr8jNUShLLSrOzM+zVTLUM1BSSM1Lzk/JzEu3VQoNcdO1
37
+ ULK347JJLC3JsLMpTi0GqctMsTM2NjYyNTc0SjZLMk1NSjY2MDExSTJJNjE1
38
+ sTRJMTE0STU2T7LRR6i30QebAAAAAP//AwCuGoc4bwAAAA==
39
+
40
+ http_version: "1.1"
@@ -0,0 +1,32 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
+ require 'rspec'
4
+ require 'viddlereo'
5
+ require 'vcr'
6
+
7
+ # Requires supporting files with custom matchers and macros, etc,
8
+ # in ./support/ and its subdirectories.
9
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
10
+
11
+
12
+ Viddlereo.configuration.configure_from_yaml(File.dirname(__FILE__) + "/viddlereo.yml")
13
+
14
+ VCR.config do |c|
15
+ c.cassette_library_dir = 'spec/cassettes'
16
+ c.stub_with :webmock
17
+ c.default_cassette_options = { :record => :new_episodes, :erb => {
18
+ :key => Viddlereo.key,
19
+ :password => Viddlereo.password,
20
+ :user => Viddlereo.user
21
+ } }
22
+ end
23
+
24
+
25
+ RSpec.configure do |config|
26
+ config.extend VCR::RSpec::Macros
27
+
28
+ #forget the session so each test is independent
29
+ config.before(:each) do
30
+ Viddlereo.forget_session
31
+ end
32
+ end
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ describe Viddlereo::Echo do
4
+ context "sending an echo with a message" do
5
+ let(:message) { "HELLO" }
6
+
7
+ it "should respond with the message I sent" do
8
+ VCR.use_cassette('echo/message', :record => :new_episodes) do
9
+ @echo = Viddlereo::Echo.retrieve(message)
10
+ @echo.message.should eql(message)
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,73 @@
1
+ require 'spec_helper'
2
+
3
+ describe Viddlereo::Playlist do
4
+ context "parameters" do
5
+ subject { Viddlereo::Playlist.new }
6
+ it "has a users parameter" do
7
+ subject.users.should be_kind_of(Array)
8
+ subject.users.should be_empty
9
+ end
10
+
11
+ it "has a max_age parameter" do
12
+ subject.should respond_to(:max_age)
13
+ lambda { subject.max_age = 1 }.should_not raise_error
14
+ end
15
+ end
16
+
17
+
18
+ let(:name) {"Some Playlist"}
19
+ let(:playlist) do
20
+ playlist = Viddlereo::Playlist.new
21
+ playlist.name = name
22
+ playlist.type = "smart"
23
+ playlist.visibility = "private"
24
+ playlist
25
+ end
26
+
27
+ context "creating" do
28
+ use_vcr_cassette :record => :new_episodes
29
+
30
+ subject { playlist }
31
+
32
+ context "successfully" do
33
+ before(:each) do
34
+ subject.save.should be_true
35
+ end
36
+
37
+ after(:each) do
38
+ subject.destroy.should be_true
39
+ end
40
+
41
+ it "results in having an id" do
42
+ subject.id.should_not be_nil
43
+ end
44
+ end
45
+
46
+ context "without a requied field" do
47
+
48
+ end
49
+ end
50
+
51
+ context "fetching" do
52
+ use_vcr_cassette :record => :new_episodes
53
+ subject { playlist }
54
+
55
+ before do
56
+ subject.save.should be_true
57
+ end
58
+
59
+ after do
60
+ subject.destroy.should be_true
61
+ end
62
+
63
+ it "should return a list of videos" do
64
+ list = Viddlereo::Playlist.find_by_id(subject.id)
65
+ list.videos.should be_kind_of(Array)
66
+ end
67
+
68
+ it "should return the intended video" do
69
+ list = Viddlereo::Playlist.find_by_id(subject.id)
70
+ list.name.should eql(subject.name)
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,22 @@
1
+ require 'spec_helper'
2
+
3
+ describe "a viddlereo resource" do
4
+ #because it's a basic child of Viddlereo::Resource
5
+ subject { Viddlereo::Echo }
6
+
7
+ context "the url" do
8
+ it "points to viddler.com" do
9
+ subject.uri.should =~ /viddler\.com/
10
+ end
11
+
12
+ it "contains the resource name" do
13
+ subject.uri.should =~ /api/
14
+ end
15
+
16
+ it "optionally contains a method" do
17
+ subject.uri("a_method").should =~ /a_method\.xml/
18
+ end
19
+
20
+ end
21
+
22
+ end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe Viddlereo::Session do
4
+ subject { Viddlereo::Session }
5
+ context "authorization" do
6
+ it "should return a session key" do
7
+ VCR.use_cassette('session/get_key', :record => :new_episodes) do
8
+ session = subject.auth
9
+ session.session_id.should_not be_nil
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe Viddlereo::Video do
4
+
5
+ end
@@ -0,0 +1,3 @@
1
+ key: <your key here>
2
+ user: <your user here>
3
+ password: <your password here>
@@ -0,0 +1,39 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "Viddlereo" do
4
+ before do
5
+ @old_key_value = Viddlereo.key
6
+ @old_password_value = Viddlereo.password
7
+ Viddlereo.key = "somekey"
8
+ Viddlereo.password = "somepassword"
9
+ end
10
+
11
+ after do
12
+ Viddlereo.key = @old_key_value
13
+ Viddlereo.password = @old_password_value
14
+ end
15
+
16
+ subject { Viddlereo }
17
+ it "has a key" do
18
+ Viddlereo.key.should_not be_nil
19
+ end
20
+
21
+ it "has a password" do
22
+ Viddlereo.password.should_not be_nil
23
+ end
24
+
25
+ context "before retrieving a session" do
26
+ before do
27
+ @old_session_id = subject.configuration.session_id
28
+ subject.configuration.session_id = nil
29
+ end
30
+
31
+ after do
32
+ subject.configuration.session_id = @old_session_id
33
+ end
34
+
35
+ it "does not have a session" do
36
+ subject.has_session?.should be_false
37
+ end
38
+ end
39
+ end