bb-ruby 0.8.3 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ == 0.8.4 2009-01-03
2
+
3
+ * Added YouTube widescreen video support as this is the new YouTube default
4
+ * If you want to use the original 4:3 ratio embed format simply uncomment lines 180 and 187. Then comment out lines 181 and 188.
5
+
1
6
  == 0.8.3 2008-12-16
2
7
 
3
8
  * RDoc documentation updates
@@ -1,10 +1,10 @@
1
- = bb-ruby
1
+ = BBRuby
2
2
 
3
3
  * http://bb-ruby.rubyforge.org
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- bb-ruby is a BBCode (http://www.bbcode.org) implementation for Ruby. It will convert strings with BBCode markup to their HTML equivalent.
7
+ BBRuby is a BBCode (http://www.bbcode.org) implementation for Ruby. It will convert strings with BBCode markup to their HTML equivalent.
8
8
 
9
9
  == INSTALL:
10
10
 
@@ -12,7 +12,7 @@ To install as a gem:
12
12
 
13
13
  sudo gem install bb-ruby
14
14
 
15
- To Install as a plugin:
15
+ To install as a plugin:
16
16
 
17
17
  ./script/plugin install git://github.com/cpjolicoeur/bb-ruby.git
18
18
 
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module BBRuby
5
- VERSION = '0.8.3'
5
+ VERSION = '0.8.4'
6
6
 
7
7
  # allowable image formats
8
8
  @@imageformats = 'png|bmp|jpg|gif|jpeg'
@@ -177,13 +177,15 @@ module BBRuby
177
177
  :image],
178
178
  'YouTube' => [
179
179
  /\[youtube\](.*?)\?v=([\w\d\-]+).*\[\/youtube\]/im,
180
- '<object width="400" height="330"><param name="movie" value="http://www.youtube.com/v/\2"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\2" type="application/x-shockwave-flash" wmode="transparent" width="400" height="330"></embed></object>',
180
+ # '<object width="400" height="330"><param name="movie" value="http://www.youtube.com/v/\2"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\2" type="application/x-shockwave-flash" wmode="transparent" width="400" height="330"></embed></object>',
181
+ '<object width="320" height="265"><param name="movie" value="http://www.youtube.com/v/\2"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/\2" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265"></embed></object>',
181
182
  'Display a video from YouTube.com',
182
183
  '[youtube]http://youtube.com/watch?v=E4Fbk52Mk1w[/youtube]',
183
184
  :video],
184
185
  'YouTube (Alternative)' => [
185
186
  /\[youtube\](.*?)\/v\/([\w\d\-]+)\[\/youtube\]/im,
186
- '<object width="400" height="330"><param name="movie" value="http://www.youtube.com/v/\2"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\2" type="application/x-shockwave-flash" wmode="transparent" width="400" height="330"></embed></object>',
187
+ # '<object width="400" height="330"><param name="movie" value="http://www.youtube.com/v/\2"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\2" type="application/x-shockwave-flash" wmode="transparent" width="400" height="330"></embed></object>',
188
+ '<object width="320" height="265"><param name="movie" value="http://www.youtube.com/v/\2"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/\2" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265"></embed></object>',
187
189
  'Display a video from YouTube.com (alternative format)',
188
190
  '[youtube]http://youtube.com/watch/v/E4Fbk52Mk1w[/youtube]',
189
191
  :video],
@@ -127,7 +127,9 @@ class TestBBRuby < Test::Unit::TestCase
127
127
  end
128
128
 
129
129
  def test_youtube
130
- assert_equal '<object width="400" height="330"><param name="movie" value="http://www.youtube.com/v/E4Fbk52Mk1w"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/E4Fbk52Mk1w" type="application/x-shockwave-flash" wmode="transparent" width="400" height="330"></embed></object>','[youtube]http://youtube.com/watch?v=E4Fbk52Mk1w[/youtube]'.bbcode_to_html
130
+ # Uncomment below if using 4:3 format youtube video embed
131
+ # assert_equal '<object width="320" height="265"><param name="movie" value="http://www.youtube.com/v/E4Fbk52Mk1w"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/E4Fbk52Mk1w" type="application/x-shockwave-flash" wmode="transparent" width="320" height="265"></embed></object>','[youtube]http://youtube.com/watch?v=E4Fbk52Mk1w[/youtube]'.bbcode_to_html
132
+ assert_equal '<object width="320" height="265"><param name="movie" value="http://www.youtube.com/v/E4Fbk52Mk1w"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/E4Fbk52Mk1w" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265"></embed></object>', '[youtube]http://youtube.com/watch?v=E4Fbk52Mk1w[/youtube]'.bbcode_to_html
131
133
  end
132
134
 
133
135
  def test_google_video
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bb-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Craig P Jolicoeur
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-16 00:00:00 -05:00
12
+ date: 2009-01-04 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -32,7 +32,7 @@ dependencies:
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.8.0
34
34
  version:
35
- description: bb-ruby is a BBCode (http://www.bbcode.org) implementation for Ruby. It will convert strings with BBCode markup to their HTML equivalent.
35
+ description: BBRuby is a BBCode (http://www.bbcode.org) implementation for Ruby. It will convert strings with BBCode markup to their HTML equivalent.
36
36
  email:
37
37
  - cpjolicoeur@gmail.com
38
38
  executables: []
@@ -79,7 +79,7 @@ rubyforge_project: bb-ruby
79
79
  rubygems_version: 1.3.1
80
80
  signing_key:
81
81
  specification_version: 2
82
- summary: bb-ruby is a BBCode (http://www.bbcode.org) implementation for Ruby
82
+ summary: BBRuby is a BBCode (http://www.bbcode.org) implementation for Ruby
83
83
  test_files:
84
84
  - test/test_bb-ruby.rb
85
85
  - test/test_helper.rb