videawesome 0.0.10 → 0.0.11

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.
Files changed (2) hide show
  1. data/lib/videawesome.rb +5 -5
  2. metadata +2 -2
data/lib/videawesome.rb CHANGED
@@ -5,14 +5,14 @@ module Videawesome
5
5
  IDENT = /\/[a-zA-Z0-9\D]{3,15}$/
6
6
 
7
7
  def self.youtube_video(url, text, height, width)
8
- url_ident =url.scan(IDENT).to_s
8
+ url_ident =url.match(IDENT).to_s
9
9
  altered_text = text.gsub(url,"<iframe width=\"#{width}\" height=\"#{height}\" src=\"http://www.youtube.com/embed/#{url_ident}\" frameborder=\"0\" allowfullscreen></iframe>")
10
10
  return altered_text
11
11
  end
12
12
 
13
13
  def self.vimeo_video(url, text, height, width)
14
- url_ident = url.scan(IDENT).to_s
15
- altered_text = text.gsub(url,"<iframe title='Vimeo Video Player' src='http://player.vimeo.com/video#{url_ident}' width='#{width}' height='#{height}' frameborder='0'></iframe>")
14
+ url_ident = url.match(IDENT).to_s
15
+ altered_text = text.gsub(url,"<iframe title='Vimeo Video Player' src='http://player.vimeo.com/video#{url_ident}' width='#{width}' height='#{height}' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>")
16
16
  return altered_text
17
17
  end
18
18
 
@@ -20,9 +20,9 @@ module Videawesome
20
20
  url = text.split.grep(URL).to_s
21
21
 
22
22
  if url != "" && url.match("youtube.com") || url.match("youtu.be")
23
- text = youtube_video(url, text, height, width)
23
+ text = self.youtube_video(url, text, height, width)
24
24
  elsif url != "" && url.match("vimeo.com")
25
- text = vimeo_video(url, text, height, width)
25
+ text = self.vimeo_video(url, text, height, width)
26
26
  end
27
27
  if show_message
28
28
  text << "<br /> <small>dont have flash player installed? <a href=\"#{url}\" target=\"_blank\">click here</a></small>"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: videawesome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-18 00:00:00.000000000Z
12
+ date: 2011-12-19 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: lee@stealthygecko.com