acts_as_unvlogable 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/README.markdown +3 -1
- data/lib/acts_as_unvlogable/version.rb +1 -1
- data/lib/acts_as_unvlogable/vg_gfycat.rb +40 -0
- data/lib/acts_as_unvlogable/vg_giphy.rb +40 -0
- data/lib/acts_as_unvlogable/vg_pleer.rb +1 -0
- data/lib/acts_as_unvlogable/vg_rutube.rb +1 -0
- data/lib/acts_as_unvlogable/vg_vine.rb +40 -0
- data/spec/acts_as_unvlogable_spec.rb +101 -24
- metadata +25 -23
- data/lib/acts_as_unvlogable/vg_blip.rb +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fc91ed8878c2e8566db609bceee5458e5cbe4f7
|
4
|
+
data.tar.gz: 944f06f20580dd7ec57016e8c0175fc20ecef465
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 682f4b1689d25017f12fa082311e39c6044e982e1e76fce979cb06b0cd7d789f386419c5924ba9e20e1cf7ab53a128cf7da7e5dd8a0a15ea7ecd757028dbd57d
|
7
|
+
data.tar.gz: 58d0f050d0a2523329256d0a56aea3030516af6f71e3f8ddc37a5a398313d2a670451d74e324e530b9c9287fa20d59f230239da5a03a056b92856351e3dac758
|
data/.travis.yml
CHANGED
data/README.markdown
CHANGED
@@ -87,11 +87,13 @@ At this moment we support the following video services:
|
|
87
87
|
|
88
88
|
- [Youtube](http://www.youtube.com/)
|
89
89
|
- [Vimeo](http://vimeo.com/)
|
90
|
+
- [Vine](http://vine.co/)
|
91
|
+
- [Giphy](http://giphy.com/)
|
92
|
+
- [Gfycat](http://gfycat.com/)
|
90
93
|
- [Flickr (videos)](http://flickr.com/)
|
91
94
|
- [Metacafe](http://metacafe.com/)
|
92
95
|
- [Dailymotion](http://dailymotion.com/)
|
93
96
|
- [Collegehumor](http://collegehumor.com/)
|
94
|
-
- ~~[Blip.tv](http://blip.tv/)~~ Transformed into maker.tv
|
95
97
|
- [Myspace](http://vids.myspace.com/)
|
96
98
|
- [Ted Talks](http://www.ted.com/talks/)
|
97
99
|
- [11870.com](http://11870.com/)
|
@@ -0,0 +1,40 @@
|
|
1
|
+
class VgGfycat
|
2
|
+
attr_accessor :video_id
|
3
|
+
|
4
|
+
def initialize(url, options={})
|
5
|
+
@url = url
|
6
|
+
@uri = URI.parse(url)
|
7
|
+
@video_id = @uri.path.split("/")[-1]
|
8
|
+
json_endpoint = "https://gfycat.com/cajax/get/#{@video_id}"
|
9
|
+
@json = JSON.parse(Net::HTTP.get(URI.parse(json_endpoint)))
|
10
|
+
raise ArgumentError unless @video_id or @json["error"]
|
11
|
+
end
|
12
|
+
|
13
|
+
def title
|
14
|
+
@title ||= @json["gfyItem"]["title"]
|
15
|
+
end
|
16
|
+
|
17
|
+
def thumbnail
|
18
|
+
@thumbnail ||= @json["gfyItem"]["posterUrl"]
|
19
|
+
end
|
20
|
+
|
21
|
+
def embed_url
|
22
|
+
@embed_url ||= @json["gfyItem"]["mp4Url"]
|
23
|
+
end
|
24
|
+
|
25
|
+
def embed_html(width=425, height=344, options={}, params={})
|
26
|
+
"<video id='giphyplayer' width='#{width}' height='#{height}' controls autoplay><source src='#{@embed_url}' type='video/mp4'>Your browser does not support mp4.</video>"
|
27
|
+
end
|
28
|
+
|
29
|
+
def download_url
|
30
|
+
nil
|
31
|
+
end
|
32
|
+
|
33
|
+
def duration
|
34
|
+
nil
|
35
|
+
end
|
36
|
+
|
37
|
+
def service
|
38
|
+
"Gfycat"
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
class VgGiphy
|
2
|
+
attr_accessor :video_id
|
3
|
+
|
4
|
+
def initialize(url, options={})
|
5
|
+
@url = url
|
6
|
+
@uri = URI.parse(url)
|
7
|
+
@video_id = @uri.path.match(/gifs\/([\w\-\d]+)/)[1].split("-")[-1]
|
8
|
+
json_endpoint = "http://api.giphy.com/v1/gifs?api_key=dc6zaTOxFJmzC&ids=#{@video_id}"
|
9
|
+
@json = JSON.parse(Net::HTTP.get(URI.parse(json_endpoint)))
|
10
|
+
raise ArgumentError unless @video_id
|
11
|
+
end
|
12
|
+
|
13
|
+
def title
|
14
|
+
nil
|
15
|
+
end
|
16
|
+
|
17
|
+
def thumbnail
|
18
|
+
@thumbnail ||= @json["data"][0]["images"]["fixed_height_still"]["url"]
|
19
|
+
end
|
20
|
+
|
21
|
+
def embed_url
|
22
|
+
@embed_url ||= @json["data"][0]["images"]["looping"]["mp4"]
|
23
|
+
end
|
24
|
+
|
25
|
+
def embed_html(width=425, height=344, options={}, params={})
|
26
|
+
"<video id='giphyplayer' width='#{width}' height='#{height}' controls autoplay><source src='#{@embed_url}' type='video/mp4'>Your browser does not support mp4.</video>"
|
27
|
+
end
|
28
|
+
|
29
|
+
def download_url
|
30
|
+
nil
|
31
|
+
end
|
32
|
+
|
33
|
+
def duration
|
34
|
+
nil
|
35
|
+
end
|
36
|
+
|
37
|
+
def service
|
38
|
+
"Giphy"
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
class VgVine
|
2
|
+
attr_accessor :video_id
|
3
|
+
|
4
|
+
def initialize(url, options={})
|
5
|
+
@url = url
|
6
|
+
@uri = URI.parse(url)
|
7
|
+
@video_id = @uri.path.match(/v\/([\w\d]+)/)[1]
|
8
|
+
json_endpoint = "https://vine.co/oembed/#{@video_id}.json"
|
9
|
+
@json = JSON.parse(Net::HTTP.get(URI.parse(json_endpoint)))
|
10
|
+
raise ArgumentError unless @video_id
|
11
|
+
end
|
12
|
+
|
13
|
+
def title
|
14
|
+
@title ||= @json["title"]
|
15
|
+
end
|
16
|
+
|
17
|
+
def thumbnail
|
18
|
+
@thumbnail ||= @json["thumbnail_url"]
|
19
|
+
end
|
20
|
+
|
21
|
+
def embed_url
|
22
|
+
@embed_url ||= "#{@url}/embed/simple"
|
23
|
+
end
|
24
|
+
|
25
|
+
def embed_html(width=600, height=600, options={}, params={})
|
26
|
+
"<iframe id='vineplayer' type='text/html' width='#{width}' height='#{height}' src='#{@embed_url}' frameborder='0'/><script src='https://platform.vine.co/static/scripts/embed.js'></script>"
|
27
|
+
end
|
28
|
+
|
29
|
+
def download_url
|
30
|
+
nil
|
31
|
+
end
|
32
|
+
|
33
|
+
def duration
|
34
|
+
nil
|
35
|
+
end
|
36
|
+
|
37
|
+
def service
|
38
|
+
"Vine"
|
39
|
+
end
|
40
|
+
end
|
@@ -46,17 +46,17 @@ describe UnvlogIt do
|
|
46
46
|
end
|
47
47
|
|
48
48
|
context "with a shortened youtube URL" do
|
49
|
-
let(:videotron) { UnvlogIt.new("
|
49
|
+
let(:videotron) { UnvlogIt.new("https://youtu.be/U46Yo_6z_F4", {:key => "AIzaSyAN2GQvZobD6qbsM0EI-Wy44LXVqbarz3Q" }) } # => Keith Moon´s drum kit explodes
|
50
50
|
|
51
51
|
it "initialize a VgYoutube instance" do
|
52
52
|
expect(VgYoutu).to eq(videotron.instance_values['object'].class)
|
53
|
-
expect("
|
54
|
-
expect("
|
53
|
+
expect("https://www.youtube.com/watch?&v=U46Yo_6z_F4").to eq(videotron.instance_values['object'].instance_values['url'])
|
54
|
+
expect("U46Yo_6z_F4").to eq(videotron.instance_values['object'].instance_values['video_id'])
|
55
55
|
expect(videotron.instance_values['object'].instance_values['details']).to_not be_nil
|
56
56
|
end
|
57
57
|
|
58
58
|
it "returns the video properties" do
|
59
|
-
check_video_attributes({:title => "
|
59
|
+
check_video_attributes({:title => "Adam Savage's One Day Builds: LEGO Sisyphus Automata!", :service => "Youtube"})
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
@@ -134,24 +134,6 @@ describe UnvlogIt do
|
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
137
|
-
# ----------------------------------------------------------
|
138
|
-
# Testing blip.tv => transformed to maker TV
|
139
|
-
# ----------------------------------------------------------
|
140
|
-
|
141
|
-
# context "with an existent blip.tv url" do
|
142
|
-
# let(:videotron) { UnvlogIt.new("http://blip.tv/sarahrdtv/sarah-s-super-bowl-spread-healthy-recipe-classic-buffalo-wing-dip-6717535") } # => Sarah's Super Bowl Spread – Healthy Recipe - Classic Buffalo Wing Dip
|
143
|
-
|
144
|
-
# it "initialize a VgBlip instance" do
|
145
|
-
# expect(VgBlip).to eq(videotron.instance_values['object'].class)
|
146
|
-
# expect("http://blip.tv/sarahrdtv/sarah-s-super-bowl-spread-healthy-recipe-classic-buffalo-wing-dip-6717535").to eq(videotron.instance_values['object'].instance_values['url'])
|
147
|
-
# expect(videotron.instance_values['object'].instance_values['feed']).to_not be_nil
|
148
|
-
# end
|
149
|
-
|
150
|
-
# it "returns the video properties" do
|
151
|
-
# check_video_attributes({:title => "Sarah's Super Bowl Spread – Healthy Recipe - Classic Buffalo Wing Dip", :service => "Blip.tv"})
|
152
|
-
# end
|
153
|
-
# end
|
154
|
-
|
155
137
|
# ----------------------------------------------------------
|
156
138
|
# Testing myspace.com
|
157
139
|
# ----------------------------------------------------------
|
@@ -268,6 +250,88 @@ describe UnvlogIt do
|
|
268
250
|
end
|
269
251
|
end
|
270
252
|
|
253
|
+
# ----------------------------------------------------------
|
254
|
+
# Testing vine
|
255
|
+
# ----------------------------------------------------------
|
256
|
+
context "with an existent vine url" do
|
257
|
+
let(:videotron) { UnvlogIt.new("https://vine.co/v/5WvdIEvMOap") } # => Gotta catch em all #PokemonGo
|
258
|
+
|
259
|
+
it "initialize a VgVine instance" do
|
260
|
+
expect(VgVine).to eq(videotron.instance_values['object'].class)
|
261
|
+
expect("https://vine.co/v/5WvdIEvMOap").to eq(videotron.instance_values['object'].instance_values['url'])
|
262
|
+
expect("5WvdIEvMOap").to eq(videotron.instance_values['object'].instance_values['video_id'])
|
263
|
+
expect(videotron.instance_values['object'].instance_values['json']).to_not be_nil
|
264
|
+
end
|
265
|
+
|
266
|
+
it "returns the video properties" do
|
267
|
+
check_video_attributes({:title => "Gotta catch em all #PokemonGo", :service => "Vine"})
|
268
|
+
end
|
269
|
+
end
|
270
|
+
|
271
|
+
# ----------------------------------------------------------
|
272
|
+
# Testing giphy
|
273
|
+
# ----------------------------------------------------------
|
274
|
+
context "with an existent giphy url" do
|
275
|
+
let(:videotron) { UnvlogIt.new("http://giphy.com/gifs/sistersmovie-sisters-tgif-movie-3o8doKOr3E5hvVT8Sk") }
|
276
|
+
|
277
|
+
it "initialize a VgGiphy instance" do
|
278
|
+
expect(VgGiphy).to eq(videotron.instance_values['object'].class)
|
279
|
+
expect("http://giphy.com/gifs/sistersmovie-sisters-tgif-movie-3o8doKOr3E5hvVT8Sk").to eq(videotron.instance_values['object'].instance_values['url'])
|
280
|
+
expect("3o8doKOr3E5hvVT8Sk").to eq(videotron.instance_values['object'].instance_values['video_id'])
|
281
|
+
end
|
282
|
+
|
283
|
+
it "returns the video properties" do
|
284
|
+
check_video_attributes({:title => "", :service => "Giphy"})
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
# ----------------------------------------------------------
|
289
|
+
# Testing gfycat
|
290
|
+
# ----------------------------------------------------------
|
291
|
+
context "with an existent gfycat url" do
|
292
|
+
let(:videotron) { UnvlogIt.new("https://gfycat.com/WarmheartedAnyFairyfly") }
|
293
|
+
|
294
|
+
it "initialize a VgGfycat instance" do
|
295
|
+
expect(VgGfycat).to eq(videotron.instance_values['object'].class)
|
296
|
+
expect("https://gfycat.com/WarmheartedAnyFairyfly").to eq(videotron.instance_values['object'].instance_values['url'])
|
297
|
+
expect("WarmheartedAnyFairyfly").to eq(videotron.instance_values['object'].instance_values['video_id'])
|
298
|
+
expect(videotron.instance_values['object'].instance_values['json']).to_not be_nil
|
299
|
+
end
|
300
|
+
|
301
|
+
it "returns the video properties" do
|
302
|
+
check_video_attributes({:title => "", :service => "Gfycat"})
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
context "with an detail gfycat url" do
|
307
|
+
let(:videotron) { UnvlogIt.new("https://gfycat.com/detail/DelectableParchedCopperbutterfly?tagname=Trending&tvmode=1") }
|
308
|
+
|
309
|
+
it "initialize a VgGfycat instance" do
|
310
|
+
expect(VgGfycat).to eq(videotron.instance_values['object'].class)
|
311
|
+
expect("https://gfycat.com/detail/DelectableParchedCopperbutterfly?tagname=Trending&tvmode=1").to eq(videotron.instance_values['object'].instance_values['url'])
|
312
|
+
expect("DelectableParchedCopperbutterfly").to eq(videotron.instance_values['object'].instance_values['video_id'])
|
313
|
+
expect(videotron.instance_values['object'].instance_values['json']).to_not be_nil
|
314
|
+
end
|
315
|
+
|
316
|
+
it "returns the video properties" do
|
317
|
+
check_video_attributes({:title => "Ryan Williams landed a 1080 frontflip", :service => "Gfycat"})
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
321
|
+
context "with an search gfycat url" do
|
322
|
+
let(:videotron) { UnvlogIt.new("https://gfycat.com/gifs/search/cats/detail/BeneficialFavorableBunting") }
|
323
|
+
|
324
|
+
it "initialize a VgGfycat instance" do
|
325
|
+
expect(VgGfycat).to eq(videotron.instance_values['object'].class)
|
326
|
+
expect("https://gfycat.com/gifs/search/cats/detail/BeneficialFavorableBunting").to eq(videotron.instance_values['object'].instance_values['url'])
|
327
|
+
expect("BeneficialFavorableBunting").to eq(videotron.instance_values['object'].instance_values['video_id'])
|
328
|
+
expect(videotron.instance_values['object'].instance_values['json']).to_not be_nil
|
329
|
+
end
|
330
|
+
|
331
|
+
it "returns the video properties" do
|
332
|
+
check_video_attributes({:title => "High Five Cat", :service => "Gfycat"})
|
333
|
+
end
|
334
|
+
end
|
271
335
|
|
272
336
|
# ----------------------------------------------------------
|
273
337
|
# Testing RuTube
|
@@ -295,12 +359,25 @@ describe UnvlogIt do
|
|
295
359
|
# ----------------------------------------------------------
|
296
360
|
# Testing Prostopleer
|
297
361
|
# ----------------------------------------------------------
|
298
|
-
context "with an existent pleer url" do
|
362
|
+
context "with an existent pleer.net url" do
|
363
|
+
let(:videotron) { UnvlogIt.new("http://pleer.net/tracks/3370305QRJl") } # => La mala rodriguez, Nach Scratch SFDK - Dominicana
|
364
|
+
|
365
|
+
it "initialize a VgPleer instance" do
|
366
|
+
expect(VgPleer).to eq(videotron.instance_values['object'].class)
|
367
|
+
expect("http://pleer.net/tracks/3370305QRJl").to eq(videotron.instance_values['object'].instance_values['url'])
|
368
|
+
expect("3370305QRJl").to eq(videotron.instance_values['object'].instance_values['track_id'])
|
369
|
+
expect("Pleer").to eq(videotron.service)
|
370
|
+
expect(videotron.embed_html).not_to be_nil
|
371
|
+
expect("La mala rodriguez, Nach Scratch SFDK - Dominicana").to eq(videotron.title)
|
372
|
+
end
|
373
|
+
end
|
374
|
+
|
375
|
+
context "with an existent pleer.com url" do
|
299
376
|
let(:videotron) { UnvlogIt.new("http://pleer.com/tracks/3370305QRJl") } # => La mala rodriguez, Nach Scratch SFDK - Dominicana
|
300
377
|
|
301
378
|
it "initialize a VgPleer instance" do
|
302
379
|
expect(VgPleer).to eq(videotron.instance_values['object'].class)
|
303
|
-
expect("http://pleer.
|
380
|
+
expect("http://pleer.net/tracks/3370305QRJl").to eq(videotron.instance_values['object'].instance_values['url'])
|
304
381
|
expect("3370305QRJl").to eq(videotron.instance_values['object'].instance_values['track_id'])
|
305
382
|
expect("Pleer").to eq(videotron.service)
|
306
383
|
expect(videotron.embed_html).not_to be_nil
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_unvlogable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Muñoz
|
@@ -10,104 +10,104 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-07-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- - ~>
|
19
|
+
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '1.3'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- - ~>
|
26
|
+
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
28
|
version: '1.3'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: rake
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- -
|
33
|
+
- - ">="
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: '0'
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- -
|
40
|
+
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rspec
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '0'
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- -
|
54
|
+
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '0'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: activesupport
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- -
|
61
|
+
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '0'
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
|
-
- -
|
68
|
+
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: nokogiri
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ">="
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
|
-
- -
|
82
|
+
- - ">="
|
83
83
|
- !ruby/object:Gem::Version
|
84
84
|
version: '0'
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: xml-simple
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
|
-
- -
|
89
|
+
- - ">="
|
90
90
|
- !ruby/object:Gem::Version
|
91
91
|
version: '0'
|
92
92
|
type: :runtime
|
93
93
|
prerelease: false
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
95
95
|
requirements:
|
96
|
-
- -
|
96
|
+
- - ">="
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
99
|
- !ruby/object:Gem::Dependency
|
100
100
|
name: yt
|
101
101
|
requirement: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
|
-
- -
|
103
|
+
- - ">="
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
type: :runtime
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
|
-
- -
|
110
|
+
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
description: An easy way to include external video services in a rails app. This gem
|
@@ -121,9 +121,9 @@ executables: []
|
|
121
121
|
extensions: []
|
122
122
|
extra_rdoc_files: []
|
123
123
|
files:
|
124
|
-
- .coveralls.yml
|
125
|
-
- .gitignore
|
126
|
-
- .travis.yml
|
124
|
+
- ".coveralls.yml"
|
125
|
+
- ".gitignore"
|
126
|
+
- ".travis.yml"
|
127
127
|
- Gemfile
|
128
128
|
- MIT-LICENSE
|
129
129
|
- README.markdown
|
@@ -136,17 +136,19 @@ files:
|
|
136
136
|
- lib/acts_as_unvlogable/string_extend.rb
|
137
137
|
- lib/acts_as_unvlogable/version.rb
|
138
138
|
- lib/acts_as_unvlogable/vg_11870.rb
|
139
|
-
- lib/acts_as_unvlogable/vg_blip.rb
|
140
139
|
- lib/acts_as_unvlogable/vg_collegehumor.rb
|
141
140
|
- lib/acts_as_unvlogable/vg_dailymotion.rb
|
142
141
|
- lib/acts_as_unvlogable/vg_dalealplay.rb
|
143
142
|
- lib/acts_as_unvlogable/vg_flickr.rb
|
143
|
+
- lib/acts_as_unvlogable/vg_gfycat.rb
|
144
|
+
- lib/acts_as_unvlogable/vg_giphy.rb
|
144
145
|
- lib/acts_as_unvlogable/vg_metacafe.rb
|
145
146
|
- lib/acts_as_unvlogable/vg_myspace.rb
|
146
147
|
- lib/acts_as_unvlogable/vg_pleer.rb
|
147
148
|
- lib/acts_as_unvlogable/vg_rutube.rb
|
148
149
|
- lib/acts_as_unvlogable/vg_ted.rb
|
149
150
|
- lib/acts_as_unvlogable/vg_vimeo.rb
|
151
|
+
- lib/acts_as_unvlogable/vg_vine.rb
|
150
152
|
- lib/acts_as_unvlogable/vg_wistia.rb
|
151
153
|
- lib/acts_as_unvlogable/vg_youtu.rb
|
152
154
|
- lib/acts_as_unvlogable/vg_youtube.rb
|
@@ -162,17 +164,17 @@ require_paths:
|
|
162
164
|
- lib
|
163
165
|
required_ruby_version: !ruby/object:Gem::Requirement
|
164
166
|
requirements:
|
165
|
-
- -
|
167
|
+
- - ">="
|
166
168
|
- !ruby/object:Gem::Version
|
167
169
|
version: 1.9.3
|
168
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
171
|
requirements:
|
170
|
-
- -
|
172
|
+
- - ">="
|
171
173
|
- !ruby/object:Gem::Version
|
172
174
|
version: '0'
|
173
175
|
requirements: []
|
174
176
|
rubyforge_project: acts_as_unvlogable
|
175
|
-
rubygems_version: 2.5.
|
177
|
+
rubygems_version: 2.5.1
|
176
178
|
signing_key:
|
177
179
|
specification_version: 4
|
178
180
|
summary: An easy way to include external video services in a rails app
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# ----------------------------------------------
|
2
|
-
# Class for BlipTv (blip.tv)
|
3
|
-
# http://blip.tv/file/678407/
|
4
|
-
# ----------------------------------------------
|
5
|
-
|
6
|
-
|
7
|
-
# class VgBlip
|
8
|
-
|
9
|
-
# def initialize(url=nil, options={})
|
10
|
-
# @url = url.split("?").first if url
|
11
|
-
# res = Net::HTTP.get(URI.parse("#{url}?skin=rss"))
|
12
|
-
# @feed = REXML::Document.new(res)
|
13
|
-
# end
|
14
|
-
|
15
|
-
# def title
|
16
|
-
# CGI::unescape REXML::XPath.first(@feed, "//media:title")[0].to_s
|
17
|
-
# end
|
18
|
-
|
19
|
-
# def thumbnail
|
20
|
-
# REXML::XPath.first(@feed, "//media:thumbnail").attributes['url']
|
21
|
-
# end
|
22
|
-
|
23
|
-
# def duration
|
24
|
-
# nil
|
25
|
-
# end
|
26
|
-
|
27
|
-
# def embed_url
|
28
|
-
# emb = REXML::XPath.first(@feed, "//blip:embedUrl")[0].to_s
|
29
|
-
# end
|
30
|
-
|
31
|
-
# def embed_html(width=425, height=344, options={}, params={})
|
32
|
-
# "<iframe src='#{embed_url}.x?p=1' width='#{width}' height='#{height}' frameborder='0' allowfullscreen></iframe>"
|
33
|
-
# end
|
34
|
-
|
35
|
-
# def download_url
|
36
|
-
# nil
|
37
|
-
# end
|
38
|
-
|
39
|
-
# def service
|
40
|
-
# "Blip.tv"
|
41
|
-
# end
|
42
|
-
|
43
|
-
# end
|