videoclip 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/videoclip/videos/yahoo.rb +27 -0
- data/videoclip.gemspec +3 -2
- metadata +3 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.10
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module LaserLemon
|
2
|
+
module Videoclip
|
3
|
+
class Video::Yahoo < Video
|
4
|
+
def self.match?(uri)
|
5
|
+
(uri.host =~ /^video\.yahoo\.com$/i) && (uri.path =~ /^\/watch\/\d+\/\d+/)
|
6
|
+
end
|
7
|
+
|
8
|
+
def assign(uri)
|
9
|
+
@key = uri.path.match(/^\/watch\/(\d+\/\d+)/)[1]
|
10
|
+
@url = "http://video.yahoo.com/videos/#{@key}"
|
11
|
+
end
|
12
|
+
|
13
|
+
def embed(style = nil)
|
14
|
+
%(<object width="#{width(style)}" height="#{height(style)}"><param name="movie" value="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" /><param name="allowFullScreen" value="true" /><param name="AllowScriptAccess" VALUE="always" /><param name="bgcolor" value="#000000" /><param name="flashVars" value="id=#{ids.last}&vid=#{ids.first}&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/3013/91396661.jpeg&embed=1" /><embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.46" type="application/x-shockwave-flash" width="#{width(style)}" height="#{height(style)}" allowFullScreen="true" AllowScriptAccess="always" bgcolor="#000000" flashVars="id=#{ids.last}&vid=#{ids.first}&lang=en-us&intl=us&thumbUrl=http%3A//l.yimg.com/a/p/i/bcst/videosearch/3013/91396661.jpeg&embed=1"></embed></object>)
|
15
|
+
end
|
16
|
+
|
17
|
+
protected
|
18
|
+
def chrome_height
|
19
|
+
34
|
20
|
+
end
|
21
|
+
|
22
|
+
def ids
|
23
|
+
@key.split('/')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/videoclip.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{videoclip}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.10"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["laserlemon"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-13}
|
13
13
|
s.description = %q{Save videos from popular sites alongside your ActiveRecord models}
|
14
14
|
s.email = %q{steve@laserlemon.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
"lib/videoclip/videos/twit_vid.rb",
|
35
35
|
"lib/videoclip/videos/vidly.rb",
|
36
36
|
"lib/videoclip/videos/vimeo.rb",
|
37
|
+
"lib/videoclip/videos/yahoo.rb",
|
37
38
|
"lib/videoclip/videos/youtube.rb",
|
38
39
|
"test/test_helper.rb",
|
39
40
|
"test/videoclip_test.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: videoclip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- laserlemon
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-13 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -40,6 +40,7 @@ files:
|
|
40
40
|
- lib/videoclip/videos/twit_vid.rb
|
41
41
|
- lib/videoclip/videos/vidly.rb
|
42
42
|
- lib/videoclip/videos/vimeo.rb
|
43
|
+
- lib/videoclip/videos/yahoo.rb
|
43
44
|
- lib/videoclip/videos/youtube.rb
|
44
45
|
- test/test_helper.rb
|
45
46
|
- test/videoclip_test.rb
|