acts_as_unvlogable 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +4 -0
- data/Gemfile +15 -0
- data/MIT-LICENSE +20 -0
- data/README.markdown +130 -0
- data/Rakefile +2 -0
- data/acts_as_unvlogable.gemspec +26 -0
- data/lib/acts_as_unvlogable/flickr.rb +713 -0
- data/lib/acts_as_unvlogable/object_base.rb +15 -0
- data/lib/acts_as_unvlogable/string_base.rb +24 -0
- data/lib/acts_as_unvlogable/string_extend.rb +8 -0
- data/lib/acts_as_unvlogable/version.rb +3 -0
- data/lib/acts_as_unvlogable/vg_11870.rb +57 -0
- data/lib/acts_as_unvlogable/vg_blip.rb +48 -0
- data/lib/acts_as_unvlogable/vg_collegehumor.rb +66 -0
- data/lib/acts_as_unvlogable/vg_dailymotion.rb +66 -0
- data/lib/acts_as_unvlogable/vg_dalealplay.rb +49 -0
- data/lib/acts_as_unvlogable/vg_flickr.rb +70 -0
- data/lib/acts_as_unvlogable/vg_marca.rb +48 -0
- data/lib/acts_as_unvlogable/vg_metacafe.rb +77 -0
- data/lib/acts_as_unvlogable/vg_mtvmusic.rb +65 -0
- data/lib/acts_as_unvlogable/vg_myspace.rb +48 -0
- data/lib/acts_as_unvlogable/vg_qik.rb +66 -0
- data/lib/acts_as_unvlogable/vg_rutube.rb +80 -0
- data/lib/acts_as_unvlogable/vg_ted.rb +51 -0
- data/lib/acts_as_unvlogable/vg_vimeo.rb +78 -0
- data/lib/acts_as_unvlogable/vg_youtube.rb +57 -0
- data/lib/acts_as_unvlogable.rb +91 -0
- data/test/acts_as_unvlogable_test.rb +392 -0
- data/unvlogable_sample.yml +5 -0
- metadata +169 -0
@@ -0,0 +1,392 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
|
3
|
+
$LOAD_PATH << File.dirname(__FILE__) + '/../lib'
|
4
|
+
# Main class
|
5
|
+
require 'acts_as_unvlogable'
|
6
|
+
# Gems & other herbs
|
7
|
+
require 'shoulda'
|
8
|
+
|
9
|
+
class ActsAsUnvlogableTest < Test::Unit::TestCase
|
10
|
+
|
11
|
+
context "Instancing UnvlogIt" do
|
12
|
+
|
13
|
+
context "without any url" do
|
14
|
+
should "raise an ArgumentError exception" do
|
15
|
+
assert_raise(ArgumentError, "We need a video url") { UnvlogIt.new }
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context "with an unsupported url" do
|
20
|
+
should "raise an ArgumentError exception" do
|
21
|
+
assert_raise(ArgumentError, "Unsuported url or service") { UnvlogIt.new("http://iwannagothere.net/") }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# ----------------------------------------------------------
|
26
|
+
# Testing youtube
|
27
|
+
# ----------------------------------------------------------
|
28
|
+
context "with an existent youtube url" do
|
29
|
+
setup do
|
30
|
+
@videotron = UnvlogIt.new("http://www.youtube.com/watch?v=WZYzvcqgim0") # => The Super Fast Cat Attacks - Ninja Cat
|
31
|
+
end
|
32
|
+
should "initialize a VgYoutube instance" do
|
33
|
+
assert_equal VgYoutube, @videotron.instance_values['object'].class
|
34
|
+
assert_equal "http://www.youtube.com/watch?v=WZYzvcqgim0", @videotron.instance_values['object'].instance_values['url']
|
35
|
+
assert_equal "WZYzvcqgim0", @videotron.instance_values['object'].instance_values['video_id']
|
36
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['details']
|
37
|
+
end
|
38
|
+
|
39
|
+
should "return the video properties" do
|
40
|
+
check_video_attributes({:title => "The Super Fast Cat Attacks - Ninja Cat", :service => "Youtube"})
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
context "with an existent youtube url that can not be embedded" do
|
45
|
+
should "raise an ArgumentError" do
|
46
|
+
assert_raise(ArgumentError, "Embedding disabled by request") { UnvlogIt.new("http://www.youtube.com/watch?v=3Oec8RuwVVs") }# => The Killers - Read My Mind
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context "with an inexistent youtube url" do
|
51
|
+
should "raise an ArgumentError" do
|
52
|
+
assert_raise(ArgumentError, "Unsuported url or service") { UnvlogIt.new("http://www.youtube.com/watch?v=inexistente") }
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# ----------------------------------------------------------
|
57
|
+
# Testing metacafe
|
58
|
+
# ----------------------------------------------------------
|
59
|
+
context "with an existent metacafe url" do
|
60
|
+
setup do
|
61
|
+
@videotron = UnvlogIt.new("http://www.metacafe.com/watch/1135061/close_call_a320_caught_in_crosswinds/") # => Close Call! A320 Caught in Crosswinds
|
62
|
+
end
|
63
|
+
should "initialize a VgMetacafe instance" do
|
64
|
+
assert_equal VgMetacafe, @videotron.instance_values['object'].class
|
65
|
+
assert_equal "http://www.metacafe.com/watch/1135061/close_call_a320_caught_in_crosswinds/", @videotron.instance_values['object'].instance_values['url']
|
66
|
+
assert_equal 3, @videotron.instance_values['object'].instance_values['args'].size
|
67
|
+
assert !@videotron.instance_values['object'].instance_values['youtubed']
|
68
|
+
assert_nil @videotron.instance_values['object'].instance_values['yt']
|
69
|
+
end
|
70
|
+
|
71
|
+
should "return the video properties" do
|
72
|
+
check_video_attributes({:title => "Close call a320 caught in crosswinds", :service => "Metacafe"})
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
context "with an existent 'youtubed' metacafe url" do
|
77
|
+
setup do
|
78
|
+
@videotron = UnvlogIt.new("http://www.metacafe.com/watch/yt-r07zdVLOWBA/pop_rocks_and_coke_myth/") # => Close Call! A320 Caught in Crosswinds
|
79
|
+
end
|
80
|
+
should "initialize a VgMetacafe instance" do
|
81
|
+
assert_equal VgMetacafe, @videotron.instance_values['object'].class
|
82
|
+
assert_equal "http://www.metacafe.com/watch/yt-r07zdVLOWBA/pop_rocks_and_coke_myth/", @videotron.instance_values['object'].instance_values['url']
|
83
|
+
assert_equal 3, @videotron.instance_values['object'].instance_values['args'].size
|
84
|
+
assert @videotron.instance_values['object'].instance_values['youtubed']
|
85
|
+
assert VgYoutube, @videotron.instance_values['object'].instance_values['yt'].class
|
86
|
+
end
|
87
|
+
|
88
|
+
should "return the video properties" do
|
89
|
+
check_video_attributes({:title => "Pop Rocks and Coke Myth", :service => "Metacafe"})
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
|
94
|
+
end
|
95
|
+
|
96
|
+
|
97
|
+
# ----------------------------------------------------------
|
98
|
+
# Testing dailymotion
|
99
|
+
# ----------------------------------------------------------
|
100
|
+
context "with a dailymotion video url" do
|
101
|
+
setup do
|
102
|
+
@videotron = UnvlogIt.new("http://www.dailymotion.com/video/x7u5kn_parkour-dayyy_sport") # => parkour dayyy
|
103
|
+
end
|
104
|
+
should "initialize a VgDailymotion instance" do
|
105
|
+
assert_equal VgDailymotion, @videotron.instance_values['object'].class
|
106
|
+
assert_equal "http://www.dailymotion.com/video/x7u5kn_parkour-dayyy_sport", @videotron.instance_values['object'].instance_values['url']
|
107
|
+
assert_equal "x7u5kn_parkour-dayyy_sport", @videotron.instance_values['object'].instance_values['video_id']
|
108
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['feed']
|
109
|
+
end
|
110
|
+
|
111
|
+
should "return the video properties" do
|
112
|
+
check_video_attributes({:title => "parkour dayyy", :service => "Dailymotion"})
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
# ----------------------------------------------------------
|
119
|
+
# Testing collegehumor
|
120
|
+
# ----------------------------------------------------------
|
121
|
+
context "with a collegehumor video url" do
|
122
|
+
setup do
|
123
|
+
@videotron = UnvlogIt.new("http://www.collegehumor.com/video:1781938") # => Brohemian Rhapsody
|
124
|
+
end
|
125
|
+
should "initialize a VgCollegehumor instance" do
|
126
|
+
assert_equal VgCollegehumor, @videotron.instance_values['object'].class
|
127
|
+
assert_equal "http://www.collegehumor.com/video:1781938", @videotron.instance_values['object'].instance_values['url']
|
128
|
+
assert_equal "1781938", @videotron.instance_values['object'].instance_values['video_id']
|
129
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['feed']
|
130
|
+
end
|
131
|
+
|
132
|
+
should "return the video properties" do
|
133
|
+
check_video_attributes({:title => "Brohemian Rhapsody", :service => "CollegeHumor"})
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
|
138
|
+
# ----------------------------------------------------------
|
139
|
+
# Testing blip.tv
|
140
|
+
# ----------------------------------------------------------
|
141
|
+
context "with a blip.tv video url" do
|
142
|
+
setup do
|
143
|
+
@videotron = UnvlogIt.new("http://blip.tv/file/678407/") # => Toy Break 26 : Adult Toys
|
144
|
+
end
|
145
|
+
should "initialize a VgBlip instance" do
|
146
|
+
assert_equal VgBlip, @videotron.instance_values['object'].class
|
147
|
+
assert_equal "http://blip.tv/file/678407/", @videotron.instance_values['object'].instance_values['url']
|
148
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['feed']
|
149
|
+
end
|
150
|
+
|
151
|
+
should "return the video properties" do
|
152
|
+
check_video_attributes({:title => "Toy Break 26 : Adult Toys", :service => "Blip.tv"})
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
|
157
|
+
# ----------------------------------------------------------
|
158
|
+
# Testing mtvmusic.com
|
159
|
+
# ----------------------------------------------------------
|
160
|
+
context "with a mtvmusic.com video url" do
|
161
|
+
setup do
|
162
|
+
@videotron = UnvlogIt.new("http://www.mtvhive.com/artist/twin_shadow/videos/640381/slow_live") # => Twin Shadow » Slow (Live)
|
163
|
+
end
|
164
|
+
should "initialize a VgMtvmusic instance" do
|
165
|
+
assert_equal VgMtvmusic, @videotron.instance_values['object'].class
|
166
|
+
assert_equal "http://www.mtvhive.com/artist/twin_shadow/videos/640381/slow_live", @videotron.instance_values['object'].instance_values['url']
|
167
|
+
assert_equal "640381", @videotron.instance_values['object'].instance_values['video_id']
|
168
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['feed']
|
169
|
+
end
|
170
|
+
|
171
|
+
should "return the video properties" do
|
172
|
+
check_video_attributes({:title => "Twin Shadow » Slow (Live)", :service => "MTV Music"})
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
# ----------------------------------------------------------
|
179
|
+
# Testing vids.myspace.com
|
180
|
+
# ----------------------------------------------------------
|
181
|
+
context "with a vids.myspace.com video url" do
|
182
|
+
setup do
|
183
|
+
@videotron = UnvlogIt.new("http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID=27111431") # => rocabilis
|
184
|
+
end
|
185
|
+
should "initialize a VgMyspace instance" do
|
186
|
+
assert_equal VgMyspace, @videotron.instance_values['object'].class
|
187
|
+
assert_equal "http://vids.myspace.com/index.cfm?fuseaction=vids.individual&VideoID=27111431", @videotron.instance_values['object'].instance_values['url']
|
188
|
+
assert_equal "27111431", @videotron.instance_values['object'].instance_values['video_id']
|
189
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['feed']
|
190
|
+
end
|
191
|
+
|
192
|
+
should "return the video properties" do
|
193
|
+
check_video_attributes({:title => "rocabilis", :service => "Myspace"})
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
|
198
|
+
# ----------------------------------------------------------
|
199
|
+
# Testing 11870.com
|
200
|
+
# ----------------------------------------------------------
|
201
|
+
context "with an 11870.com video url" do
|
202
|
+
setup do
|
203
|
+
@videotron = UnvlogIt.new("http://11870.com/pro/chic-basic-born/media/b606abfe") # => Chic & Basic Born
|
204
|
+
end
|
205
|
+
should "initialize a Vg11870 instance" do
|
206
|
+
assert_equal Vg11870, @videotron.instance_values['object'].class
|
207
|
+
assert_equal "http://11870.com/pro/chic-basic-born/media/b606abfe", @videotron.instance_values['object'].instance_values['url']
|
208
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['page']
|
209
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['flashvars']
|
210
|
+
end
|
211
|
+
|
212
|
+
should "return the video properties" do
|
213
|
+
check_video_attributes({:title => "Chic & Basic Born", :service => "11870.com"})
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
|
218
|
+
# ----------------------------------------------------------
|
219
|
+
# Testing dalealplay.com
|
220
|
+
# ----------------------------------------------------------
|
221
|
+
context "with a dalealplay.com video url" do
|
222
|
+
setup do
|
223
|
+
@videotron = UnvlogIt.new("http://www.dalealplay.com/informaciondecontenido.php?con=80280") # => Camelos Semos Jonathan Tú si que vales
|
224
|
+
end
|
225
|
+
should "initialize a VgDalealplay instance" do
|
226
|
+
assert_equal VgDalealplay, @videotron.instance_values['object'].class
|
227
|
+
assert_equal "http://www.dalealplay.com/informaciondecontenido.php?con=80280", @videotron.instance_values['object'].instance_values['url']
|
228
|
+
assert_equal "80280", @videotron.instance_values['object'].instance_values['video_id']
|
229
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['page']
|
230
|
+
end
|
231
|
+
|
232
|
+
should "return the video properties" do
|
233
|
+
check_video_attributes({:title => "Camelos.Semos. Jonathan. Tú si que vales.", :service => "dalealplay"})
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
# ----------------------------------------------------------
|
240
|
+
# Testing flickr.com
|
241
|
+
# ----------------------------------------------------------
|
242
|
+
context "with a flickr.com video url" do
|
243
|
+
setup do
|
244
|
+
@videotron = UnvlogIt.new("http://www.flickr.com/photos/jerovital/4152225414/", {:key => "065b2eff5e604e2a408c01af1f27a982" }) # => la primera vela
|
245
|
+
end
|
246
|
+
should "initialize a VgFlickr instance" do
|
247
|
+
assert_equal VgFlickr, @videotron.instance_values['object'].class
|
248
|
+
assert_equal "http://www.flickr.com/photos/jerovital/4152225414/", @videotron.instance_values['object'].instance_values['url']
|
249
|
+
assert_equal "4152225414", @videotron.instance_values['object'].instance_values['video_id']
|
250
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['details']
|
251
|
+
end
|
252
|
+
|
253
|
+
should "return the video properties" do
|
254
|
+
check_video_attributes({:title => "flipando en los columpios", :service => "Flickr"})
|
255
|
+
end
|
256
|
+
end
|
257
|
+
|
258
|
+
|
259
|
+
# ----------------------------------------------------------
|
260
|
+
# Testing qik.com
|
261
|
+
# ----------------------------------------------------------
|
262
|
+
context "with a qik.com video url" do
|
263
|
+
setup do
|
264
|
+
@videotron = UnvlogIt.new("http://qik.com/video/340982") # => Honolulu Day 8: USS Arizona at Pearl Harbor
|
265
|
+
end
|
266
|
+
should "initialize a VgQik instance" do
|
267
|
+
assert_equal VgQik, @videotron.instance_values['object'].class
|
268
|
+
assert_equal "http://qik.com/video/340982", @videotron.instance_values['object'].instance_values['url']
|
269
|
+
assert_equal "340982", @videotron.instance_values['object'].instance_values['video_id']
|
270
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['page']
|
271
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['feed_url']
|
272
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['feed']
|
273
|
+
end
|
274
|
+
|
275
|
+
should "return the video properties" do
|
276
|
+
check_video_attributes({:title => "Honolulu Day 8: USS Arizona at Pearl Harbor", :service => "Qik"})
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
# ----------------------------------------------------------
|
283
|
+
# Testing www.marca.tv
|
284
|
+
# ----------------------------------------------------------
|
285
|
+
context "with a www.marca.tv video url" do
|
286
|
+
setup do
|
287
|
+
@videotron = UnvlogIt.new("http://www.marca.com/tv/?v=DN23wG8c1Rj") # => Pau entra por la puerta grande en el club de los 10.000
|
288
|
+
end
|
289
|
+
should "initialize a VgMarca instance" do
|
290
|
+
assert_equal VgMarca, @videotron.instance_values['object'].class
|
291
|
+
assert_equal "http://www.marca.com/tv/?v=DN23wG8c1Rj", @videotron.instance_values['object'].instance_values['url']
|
292
|
+
assert_equal "DN23wG8c1Rj", @videotron.instance_values['object'].instance_values['video_id']
|
293
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['feed']
|
294
|
+
end
|
295
|
+
|
296
|
+
should "return the video properties" do
|
297
|
+
check_video_attributes({:title => "Pau entra por la puerta grande en el club de los 10.000", :service => "Marca.tv"})
|
298
|
+
end
|
299
|
+
end
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
# ----------------------------------------------------------
|
304
|
+
# Testing ted talks
|
305
|
+
# ----------------------------------------------------------
|
306
|
+
context "with a ted talks video url" do
|
307
|
+
setup do
|
308
|
+
@videotron = UnvlogIt.new("http://www.ted.com/index.php/talks/benjamin_wallace_on_the_price_of_happiness.html") # => Benjamin Wallace: Does happiness have a price tag?
|
309
|
+
end
|
310
|
+
should "initialize a VgTed instance" do
|
311
|
+
assert_equal VgTed, @videotron.instance_values['object'].class
|
312
|
+
assert_equal "http://www.ted.com/index.php/talks/benjamin_wallace_on_the_price_of_happiness.html", @videotron.instance_values['object'].instance_values['url']
|
313
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['page']
|
314
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['flashvars']
|
315
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['args']
|
316
|
+
end
|
317
|
+
|
318
|
+
should "return the video properties" do
|
319
|
+
check_video_attributes({:title => "Benjamin Wallace on the price of happiness", :service => "Ted Talks"})
|
320
|
+
end
|
321
|
+
end
|
322
|
+
|
323
|
+
context "with an invalid ted talks video url" do
|
324
|
+
should "raise an ArgumentError exception" do
|
325
|
+
assert_raise(ArgumentError, "Unsuported url or service") { UnvlogIt.new("http://www.ted.com/index.php/wadus.html") }
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
|
330
|
+
# ----------------------------------------------------------
|
331
|
+
# Testing vimeo
|
332
|
+
# ----------------------------------------------------------
|
333
|
+
context "with a vimeo video url" do
|
334
|
+
setup do
|
335
|
+
@videotron = UnvlogIt.new("http://vimeo.com/2354261") # => People are strange
|
336
|
+
end
|
337
|
+
should "initialize a VgVimeo instance" do
|
338
|
+
assert_equal VgVimeo, @videotron.instance_values['object'].class
|
339
|
+
assert_equal "http://vimeo.com/2354261", @videotron.instance_values['object'].instance_values['url']
|
340
|
+
assert_equal "2354261", @videotron.instance_values['object'].instance_values['video_id']
|
341
|
+
assert_not_nil @videotron.instance_values['object'].instance_values['feed']
|
342
|
+
end
|
343
|
+
|
344
|
+
should "return the video properties" do
|
345
|
+
check_video_attributes({:title => "People are strange", :service => "Vimeo"})
|
346
|
+
end
|
347
|
+
end
|
348
|
+
|
349
|
+
# ----------------------------------------------------------
|
350
|
+
# Testing RuTube
|
351
|
+
# ----------------------------------------------------------
|
352
|
+
context "with a rutube video url" do
|
353
|
+
setup do
|
354
|
+
@videotron = UnvlogIt.new("http://rutube.ru/tracks/1958807.html?v=56cd2f1b50a4d2b69ff455e72f2fae29") # => chipmunks!!
|
355
|
+
end
|
356
|
+
should "initialize a VgRutube instance" do
|
357
|
+
assert_equal VgRutube, @videotron.instance_values['object'].class
|
358
|
+
assert_equal "http://rutube.ru/tracks/1958807.html?v=56cd2f1b50a4d2b69ff455e72f2fae29", @videotron.instance_values['object'].instance_values['url']
|
359
|
+
assert_equal "1958807", @videotron.instance_values['object'].instance_values['movie_id']
|
360
|
+
assert_equal "56cd2f1b50a4d2b69ff455e72f2fae29", @videotron.instance_values['object'].send(:movie_hash)
|
361
|
+
end
|
362
|
+
|
363
|
+
should "return the video properties" do
|
364
|
+
check_video_attributes({:title => "Запасливые бурундуки"})
|
365
|
+
end
|
366
|
+
end
|
367
|
+
|
368
|
+
context "with an invalid rutube video url" do
|
369
|
+
should "raise an ArgumentError exception" do
|
370
|
+
assert_raise(ArgumentError, "Unsuported url or service") { UnvlogIt.new("http://rutube.ru/tracks/abdcd.html?v=523423") }
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
protected
|
375
|
+
|
376
|
+
def check_video_attributes(options={})
|
377
|
+
assert_equal "#{options[:title]}", @videotron.title unless (options.blank? || options[:title].blank?)
|
378
|
+
assert_equal "#{options[:service]}", @videotron.service unless (options.blank? || options[:service].blank?)
|
379
|
+
assert_not_nil @videotron.thumbnail
|
380
|
+
if options.blank? || options[:noembed].blank?
|
381
|
+
assert_not_nil @videotron.embed_url
|
382
|
+
assert_not_nil @videotron.embed_html
|
383
|
+
elsif options[:noembed]
|
384
|
+
assert_nil @videotron.embed_url
|
385
|
+
assert_nil @videotron.embed_html
|
386
|
+
assert_nil @videotron.video_details[:embed_url]
|
387
|
+
assert_nil @videotron.video_details[:embed_html]
|
388
|
+
end
|
389
|
+
assert_not_nil @videotron.flv
|
390
|
+
assert_equal Hash, @videotron.video_details.class
|
391
|
+
end
|
392
|
+
end
|
metadata
ADDED
@@ -0,0 +1,169 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: acts_as_unvlogable
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 1.0.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- "Manuel Mu\xC3\xB1oz"
|
14
|
+
- Fernando Blat
|
15
|
+
- Alberto Romero
|
16
|
+
autorequire:
|
17
|
+
bindir: bin
|
18
|
+
cert_chain: []
|
19
|
+
|
20
|
+
date: 2011-05-08 00:00:00 +02:00
|
21
|
+
default_executable:
|
22
|
+
dependencies:
|
23
|
+
- !ruby/object:Gem::Dependency
|
24
|
+
name: shoulda
|
25
|
+
prerelease: false
|
26
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
28
|
+
requirements:
|
29
|
+
- - ">="
|
30
|
+
- !ruby/object:Gem::Version
|
31
|
+
hash: 3
|
32
|
+
segments:
|
33
|
+
- 0
|
34
|
+
version: "0"
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: ruby-debug
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
version: "0"
|
49
|
+
type: :development
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: xml-simple
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
63
|
+
type: :runtime
|
64
|
+
version_requirements: *id003
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: youtube_it
|
67
|
+
prerelease: false
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
77
|
+
type: :runtime
|
78
|
+
version_requirements: *id004
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: hpricot
|
81
|
+
prerelease: false
|
82
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
hash: 3
|
88
|
+
segments:
|
89
|
+
- 0
|
90
|
+
version: "0"
|
91
|
+
type: :runtime
|
92
|
+
version_requirements: *id005
|
93
|
+
description: An easy way to include external video services in a rails app. This gem provides you wrappers for the most common video services, such as Youtube, Vimeo, Flickr, and so on...
|
94
|
+
email:
|
95
|
+
- mamusino@gmail.com
|
96
|
+
- ferblape@gmail.com
|
97
|
+
- denegro@gmail.com
|
98
|
+
executables: []
|
99
|
+
|
100
|
+
extensions: []
|
101
|
+
|
102
|
+
extra_rdoc_files: []
|
103
|
+
|
104
|
+
files:
|
105
|
+
- .gitignore
|
106
|
+
- Gemfile
|
107
|
+
- MIT-LICENSE
|
108
|
+
- README.markdown
|
109
|
+
- Rakefile
|
110
|
+
- acts_as_unvlogable.gemspec
|
111
|
+
- lib/acts_as_unvlogable.rb
|
112
|
+
- lib/acts_as_unvlogable/flickr.rb
|
113
|
+
- lib/acts_as_unvlogable/object_base.rb
|
114
|
+
- lib/acts_as_unvlogable/string_base.rb
|
115
|
+
- lib/acts_as_unvlogable/string_extend.rb
|
116
|
+
- lib/acts_as_unvlogable/version.rb
|
117
|
+
- lib/acts_as_unvlogable/vg_11870.rb
|
118
|
+
- lib/acts_as_unvlogable/vg_blip.rb
|
119
|
+
- lib/acts_as_unvlogable/vg_collegehumor.rb
|
120
|
+
- lib/acts_as_unvlogable/vg_dailymotion.rb
|
121
|
+
- lib/acts_as_unvlogable/vg_dalealplay.rb
|
122
|
+
- lib/acts_as_unvlogable/vg_flickr.rb
|
123
|
+
- lib/acts_as_unvlogable/vg_marca.rb
|
124
|
+
- lib/acts_as_unvlogable/vg_metacafe.rb
|
125
|
+
- lib/acts_as_unvlogable/vg_mtvmusic.rb
|
126
|
+
- lib/acts_as_unvlogable/vg_myspace.rb
|
127
|
+
- lib/acts_as_unvlogable/vg_qik.rb
|
128
|
+
- lib/acts_as_unvlogable/vg_rutube.rb
|
129
|
+
- lib/acts_as_unvlogable/vg_ted.rb
|
130
|
+
- lib/acts_as_unvlogable/vg_vimeo.rb
|
131
|
+
- lib/acts_as_unvlogable/vg_youtube.rb
|
132
|
+
- test/acts_as_unvlogable_test.rb
|
133
|
+
- unvlogable_sample.yml
|
134
|
+
has_rdoc: true
|
135
|
+
homepage: ""
|
136
|
+
licenses: []
|
137
|
+
|
138
|
+
post_install_message:
|
139
|
+
rdoc_options: []
|
140
|
+
|
141
|
+
require_paths:
|
142
|
+
- lib
|
143
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
144
|
+
none: false
|
145
|
+
requirements:
|
146
|
+
- - ">="
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
hash: 3
|
149
|
+
segments:
|
150
|
+
- 0
|
151
|
+
version: "0"
|
152
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
hash: 3
|
158
|
+
segments:
|
159
|
+
- 0
|
160
|
+
version: "0"
|
161
|
+
requirements: []
|
162
|
+
|
163
|
+
rubyforge_project: acts_as_unvlogable
|
164
|
+
rubygems_version: 1.6.0
|
165
|
+
signing_key:
|
166
|
+
specification_version: 3
|
167
|
+
summary: An easy way to include external video services in a rails app
|
168
|
+
test_files: []
|
169
|
+
|