bb-ruby 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -2
- data/Rakefile +5 -2
- data/lib/bb-ruby.rb +7 -1
- data/test/test_bb-ruby.rb +5 -1
- metadata +8 -7
data/README.rdoc
CHANGED
@@ -86,8 +86,9 @@ The following is the list of BBCode tags processed by BBRuby and their associate
|
|
86
86
|
* [img size=] :image
|
87
87
|
* [img=] :image
|
88
88
|
* [img] :image
|
89
|
-
* [youtube] :video
|
90
|
-
* [gvideo]
|
89
|
+
* [youtube] :video
|
90
|
+
* [gvideo] :video
|
91
|
+
* [vimeo] :video
|
91
92
|
* [email] :email
|
92
93
|
|
93
94
|
== LICENSE:
|
data/Rakefile
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
|
1
|
+
%w[rubygems rake rake/clean fileutils newgem rubigen hoe].each { |f| require f }
|
2
2
|
require File.dirname(__FILE__) + '/lib/bb-ruby'
|
3
3
|
|
4
4
|
# Generate all the Rake tasks
|
5
5
|
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
6
|
-
$hoe = Hoe.
|
6
|
+
$hoe = Hoe.spec('bb-ruby') do |p|
|
7
|
+
p.version = BBRuby::VERSION
|
7
8
|
p.developer('Craig P Jolicoeur', 'cpjolicoeur@gmail.com')
|
8
9
|
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
9
10
|
p.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
|
@@ -16,6 +17,8 @@ $hoe = Hoe.new('bb-ruby', BBRuby::VERSION) do |p|
|
|
16
17
|
path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
|
17
18
|
p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
|
18
19
|
p.rsync_args = '-av --delete --ignore-errors'
|
20
|
+
|
21
|
+
p.readme_file = "README.rdoc"
|
19
22
|
end
|
20
23
|
|
21
24
|
require 'newgem/tasks' # load /tasks/*.rake
|
data/lib/bb-ruby.rb
CHANGED
@@ -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.9.
|
5
|
+
VERSION = '0.9.4'
|
6
6
|
|
7
7
|
# allowable image formats
|
8
8
|
@@imageformats = 'png|bmp|jpg|gif|jpeg'
|
@@ -186,6 +186,12 @@ module BBRuby
|
|
186
186
|
'Display a video from YouTube.com (alternative format)',
|
187
187
|
'[youtube]http://youtube.com/watch/v/E4Fbk52Mk1w[/youtube]',
|
188
188
|
:video],
|
189
|
+
'Vimeo' => [
|
190
|
+
/\[vimeo\](.*?)\/(\d+)\[\/vimeo\]/im,
|
191
|
+
'<object type="application/x-shockwave-flash" width="500" height="350" data="http://www.vimeo.com/moogaloop.swf?clip_id=\2"><param name="quality" value="best" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=\2" /></object>',
|
192
|
+
'Display a video from Vimeo',
|
193
|
+
'[vimeo]http://www.vimeo.com/3485239[/vimeo]',
|
194
|
+
:video],
|
189
195
|
'Google Video' => [
|
190
196
|
/\[gvideo\](.*?)\?docid=([-]{0,1}\d+).*\[\/gvideo\]/mi,
|
191
197
|
'<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=\2" flashvars=""> </embed>',
|
data/test/test_bb-ruby.rb
CHANGED
@@ -133,6 +133,10 @@ class TestBBRuby < Test::Unit::TestCase
|
|
133
133
|
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
|
134
134
|
end
|
135
135
|
|
136
|
+
def test_vimeo
|
137
|
+
assert_equal '<object type="application/x-shockwave-flash" width="500" height="350" data="http://www.vimeo.com/moogaloop.swf?clip_id=3485239"><param name="quality" value="best" /><param name="allowfullscreen" value="true" /><param name="scale" value="showAll" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=3485239" /></object>', '[vimeo]http://www.vimeo.com/3485239[/vimeo]'.bbcode_to_html
|
138
|
+
end
|
139
|
+
|
136
140
|
def test_google_video
|
137
141
|
assert_equal '<embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-2200109535941088987" flashvars=""> </embed>', '[gvideo]http://video.google.com/videoplay?docid=-2200109535941088987[/gvideo]'.bbcode_to_html
|
138
142
|
end
|
@@ -177,7 +181,7 @@ class TestBBRuby < Test::Unit::TestCase
|
|
177
181
|
end
|
178
182
|
|
179
183
|
def test_self_tag_list
|
180
|
-
assert_equal
|
184
|
+
assert_equal 32, BBRuby.tag_list.size
|
181
185
|
end
|
182
186
|
|
183
187
|
def test_redefinition_of_tag_html
|
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.9.
|
4
|
+
version: 0.9.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: 2009-
|
12
|
+
date: 2009-11-20 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.2
|
23
|
+
version: 1.5.2
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: hoe
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.3.2
|
34
34
|
version:
|
35
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:
|
@@ -43,7 +43,6 @@ extra_rdoc_files:
|
|
43
43
|
- History.txt
|
44
44
|
- Manifest.txt
|
45
45
|
- PostInstall.txt
|
46
|
-
- README.rdoc
|
47
46
|
files:
|
48
47
|
- History.txt
|
49
48
|
- Manifest.txt
|
@@ -55,6 +54,8 @@ files:
|
|
55
54
|
- test/test_helper.rb
|
56
55
|
has_rdoc: true
|
57
56
|
homepage: http://bb-ruby.rubyforge.org
|
57
|
+
licenses: []
|
58
|
+
|
58
59
|
post_install_message: PostInstall.txt
|
59
60
|
rdoc_options:
|
60
61
|
- --main
|
@@ -76,9 +77,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
77
|
requirements: []
|
77
78
|
|
78
79
|
rubyforge_project: bb-ruby
|
79
|
-
rubygems_version: 1.3.
|
80
|
+
rubygems_version: 1.3.5
|
80
81
|
signing_key:
|
81
|
-
specification_version:
|
82
|
+
specification_version: 3
|
82
83
|
summary: BBRuby is a BBCode (http://www.bbcode.org) implementation for Ruby
|
83
84
|
test_files:
|
84
85
|
- test/test_bb-ruby.rb
|