videoclip 0.2.8 → 0.2.9
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/vimeo.rb +18 -0
- data/videoclip.gemspec +2 -1
- metadata +2 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.9
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module LaserLemon
|
2
|
+
module Videoclip
|
3
|
+
class Video::Vimeo < Video
|
4
|
+
def self.match?(uri)
|
5
|
+
(uri.host =~ /^(?:www\.)?vimeo\.com$/i) && (uri.path =~ /^\/\d+/)
|
6
|
+
end
|
7
|
+
|
8
|
+
def assign(uri)
|
9
|
+
@key = uri.path.match(/^\/(\d+)/)[1]
|
10
|
+
@url = "http://vimeo.com/#{@key}"
|
11
|
+
end
|
12
|
+
|
13
|
+
def embed(style = nil)
|
14
|
+
%(<object width="#{width(style)}" height="#{height(style)}"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=#{@key}&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=#{@key}&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="#{width(style)}" height="#{height(style)}"></embed></object>)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/videoclip.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
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.9"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["laserlemon"]
|
@@ -33,6 +33,7 @@ Gem::Specification.new do |s|
|
|
33
33
|
"lib/videoclip/videos/metacafe.rb",
|
34
34
|
"lib/videoclip/videos/twit_vid.rb",
|
35
35
|
"lib/videoclip/videos/vidly.rb",
|
36
|
+
"lib/videoclip/videos/vimeo.rb",
|
36
37
|
"lib/videoclip/videos/youtube.rb",
|
37
38
|
"test/test_helper.rb",
|
38
39
|
"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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- laserlemon
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- lib/videoclip/videos/metacafe.rb
|
40
40
|
- lib/videoclip/videos/twit_vid.rb
|
41
41
|
- lib/videoclip/videos/vidly.rb
|
42
|
+
- lib/videoclip/videos/vimeo.rb
|
42
43
|
- lib/videoclip/videos/youtube.rb
|
43
44
|
- test/test_helper.rb
|
44
45
|
- test/videoclip_test.rb
|