videoclip 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.7
1
+ 0.2.8
@@ -0,0 +1,18 @@
1
+ module LaserLemon
2
+ module Videoclip
3
+ class Video::TwitVid < Video
4
+ def self.match?(uri)
5
+ (uri.host =~ /^(?:www\.)?twitvid\.com$/i) && (uri.path =~ /^\/[0-9A-F]{5,}/)
6
+ end
7
+
8
+ def assign(uri)
9
+ @key = uri.path.match(/^\/([0-9A-F]{5,})/)[1]
10
+ @url = "http://www.twitvid.com/#{@key}"
11
+ end
12
+
13
+ def embed(style = nil)
14
+ %(<object width="#{width(style)}" height="#{height(style)}"><param name="movie" value="http://www.twitvid.com/player/#{@key}"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.twitvid.com/player/#{@key}" quality="high" allowscriptaccess="always" allowNetworking="all" allowfullscreen="true" wmode="transparent" height="#{height(style)}" width="#{width(style)}"></object>)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ module LaserLemon
2
+ module Videoclip
3
+ class Video::Vidly < Video
4
+ def self.match?(uri)
5
+ (uri.host =~ /^(?:www\.)?vidly\.com$/i) && (uri.path =~ /^\/[a-z]{4,}/i)
6
+ end
7
+
8
+ def assign(uri)
9
+ @key = uri.path.match(/^\/([a-z]{4,})/i)[1]
10
+ @url = "http://vidly.com/#{@key}"
11
+ end
12
+
13
+ def embed(style = nil)
14
+ %(<object width="#{width(style)}" height="#{height(style)}"><param name="movie" value="http://vid.ly/embed/#{@key}"></param><param name="wmode" value="opaque"></param><param name="allowscriptaccess" value="always"></param><param name="allowfullscreen" value="yes"></param><embed src="http://vid.ly/embed/#{@key}" type="application/x-shockwave-flash" wmode="opaque" allowscriptaccess="always" allowfullscreen="yes" 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.7"
8
+ s.version = "0.2.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["laserlemon"]
@@ -31,6 +31,8 @@ Gem::Specification.new do |s|
31
31
  "lib/videoclip/videos/funny_or_die.rb",
32
32
  "lib/videoclip/videos/live_leak.rb",
33
33
  "lib/videoclip/videos/metacafe.rb",
34
+ "lib/videoclip/videos/twit_vid.rb",
35
+ "lib/videoclip/videos/vidly.rb",
34
36
  "lib/videoclip/videos/youtube.rb",
35
37
  "test/test_helper.rb",
36
38
  "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.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - laserlemon
@@ -37,6 +37,8 @@ files:
37
37
  - lib/videoclip/videos/funny_or_die.rb
38
38
  - lib/videoclip/videos/live_leak.rb
39
39
  - lib/videoclip/videos/metacafe.rb
40
+ - lib/videoclip/videos/twit_vid.rb
41
+ - lib/videoclip/videos/vidly.rb
40
42
  - lib/videoclip/videos/youtube.rb
41
43
  - test/test_helper.rb
42
44
  - test/videoclip_test.rb