textile_extension_pack 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,16 +18,18 @@ module TextileExtensionPack
18
18
  end
19
19
 
20
20
  def video(opts)
21
- file_name, text, img = opts[:text].split('|').map! { |str| str.strip }
21
+ file_name, width, height, text, img = opts[:text].split('|').map! { |str| str.strip }
22
+ width ||= 700
23
+ height ||= 395
22
24
  html = %Q{<div class="video">\n}
23
25
  html << %Q{<div class="video-wrapper #{opts[:class]}">\n}
24
26
  html << %Q{<div class="video-wrapper-inner">\n}
25
27
  html << %Q{<div class="video-wrapper-inner-inner">\n}
26
- html << %Q{ <video width="700" height="395" id="player#{file_name}" poster="#{img}" controls="controls" preload="none"> }
28
+ html << %Q{ <video width="#{width}" height="#{height}" id="player#{file_name}" poster="#{img}" controls="controls" preload="none"> }
27
29
  {:mp4 => "mp4", :webm => "webm", :ogg => "ogv"}.each do |format, extension|
28
30
  html << %Q{ <source type="video/#{format}" src="/files/videos/#{file_name}.#{extension}"/> }
29
31
  end
30
- html << %Q{ <object width="700" height="395" type="application/x-shockwave-flash" data="/mediaelements/flashmediaelement.swf">
32
+ html << %Q{ <object width="#{width}" height="#{height}" type="application/x-shockwave-flash" data="/mediaelements/flashmediaelement.swf">
31
33
  <param name="movie" value="/mediaelements/flashmediaelement.swf"/>
32
34
  <param name="flashvars" value="controls=true&amp;file=/files/videos/#{file_name}.mp4"/>
33
35
  </object> }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textile_extension_pack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: RedCloth
16
- requirement: &17469400 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,12 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *17469400
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  description: Extends textile with some custom tags.
26
31
  email: patrikjira@gmail.com
27
32
  executables: []
@@ -54,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
59
  version: '0'
55
60
  requirements: []
56
61
  rubyforge_project:
57
- rubygems_version: 1.8.5
62
+ rubygems_version: 1.8.21
58
63
  signing_key:
59
64
  specification_version: 3
60
65
  summary: Textile extension pack