video_info 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/lib/video_info/provider.rb +2 -0
  3. data/lib/video_info/providers/vimeo.rb +0 -3
  4. data/lib/video_info/providers/vkontakte.rb +5 -16
  5. data/lib/video_info/providers/youtube.rb +0 -3
  6. data/lib/video_info/version.rb +1 -1
  7. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/description/.yml +41 -0
  8. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/duration/.yml +41 -0
  9. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/embed_code/.yml +41 -0
  10. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/embed_url/.yml +41 -0
  11. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/height/.yml +41 -0
  12. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/keywords/.yml +41 -0
  13. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/title/.yml +41 -0
  14. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/view_count/.yml +41 -0
  15. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/width/.yml +41 -0
  16. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video-54799401_165822734/title/.yml +1777 -0
  17. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/description/.yml +1165 -0
  18. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/duration/.yml +1165 -0
  19. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_code/.yml +1165 -0
  20. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_url/.yml +1165 -0
  21. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/height/.yml +1165 -0
  22. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/keywords/.yml +1165 -0
  23. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/title/.yml +1165 -0
  24. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/view_count/.yml +1165 -0
  25. data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/width/.yml +1165 -0
  26. data/spec/lib/video_info/providers/vkontakte_spec.rb +11 -2
  27. metadata +22 -2
@@ -18,7 +18,7 @@ describe VideoInfo::Providers::Vkontakte do
18
18
  end
19
19
  end
20
20
 
21
- context "with video 39576223_108370515", :vcr do
21
+ context "with video video39576223_108370515", :vcr do
22
22
  subject { VideoInfo.new('http://vk.com/video39576223_108370515') }
23
23
 
24
24
  its(:provider) { should eq 'Vkontakte' }
@@ -27,7 +27,7 @@ describe VideoInfo::Providers::Vkontakte do
27
27
  its(:url) { should eq 'http://vk.com/video39576223_108370515' }
28
28
  its(:embed_url) { should eq 'vk.com/video_ext.php?oid=39576223&id=108370515&hash=15184dbd085c47af' }
29
29
  its(:embed_code) { should eq '<iframe src="http://vk.com/video_ext.php?oid=39576223&id=108370515&hash=15184dbd085c47af" frameborder="0" allowfullscreen="allowfullscreen"></iframe>' }
30
- its(:title) { should eq 'Я уточка))))) | VK' }
30
+ its(:title) { should eq 'Я уточка)))))' }
31
31
  its(:description) { should eq 'это ВЗРЫВ МОЗГА!!! Просто отвал башки...' }
32
32
  its(:keywords) { should eq 'это ВЗРЫВ МОЗГА!!! Просто отвал башки...' }
33
33
  its(:duration) { should eq 183 }
@@ -36,4 +36,13 @@ describe VideoInfo::Providers::Vkontakte do
36
36
  its(:view_count) { should be > 10 }
37
37
  end
38
38
 
39
+ context "with video video-54799401_165822734", :vcr do
40
+ subject { VideoInfo.new('http://vk.com/video-54799401_165822734') }
41
+
42
+ its(:provider) { should eq 'Vkontakte' }
43
+ its(:video_owner) { should eq '-54799401' }
44
+ its(:video_id) { should eq '165822734' }
45
+ its(:title) { should eq 'SpaceGlasses are the future of computing' }
46
+ end
47
+
39
48
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: video_info
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaud Guillaume-Gentil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-25 00:00:00.000000000 Z
11
+ date: 2013-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -161,6 +161,16 @@ files:
161
161
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/title/.yml
162
162
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/view_count/.yml
163
163
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/width/.yml
164
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video-54799401_165822734/title/.yml
165
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/description/.yml
166
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/duration/.yml
167
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_code/.yml
168
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_url/.yml
169
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/height/.yml
170
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/keywords/.yml
171
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/title/.yml
172
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/view_count/.yml
173
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/width/.yml
164
174
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/date/.yml
165
175
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/description/.yml
166
176
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/duration/.yml
@@ -222,6 +232,16 @@ test_files:
222
232
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/title/.yml
223
233
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/view_count/.yml
224
234
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_39576223_108370515/width/.yml
235
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video-54799401_165822734/title/.yml
236
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/description/.yml
237
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/duration/.yml
238
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_code/.yml
239
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/embed_url/.yml
240
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/height/.yml
241
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/keywords/.yml
242
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/title/.yml
243
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/view_count/.yml
244
+ - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vkontakte/with_video_video39576223_108370515/width/.yml
225
245
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/date/.yml
226
246
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/description/.yml
227
247
  - spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/duration/.yml