bb-ruby 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.travis.yml +4 -3
- data/CHANGELOG +4 -0
- data/Gemfile +0 -4
- data/bb-ruby.gemspec +6 -0
- data/lib/bb-ruby.rb +2 -2
- data/lib/bb-ruby/version.rb +1 -1
- data/test/bb-ruby_test.rb +3 -0
- metadata +32 -5
- data/Gemfile.lock +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4207bab9e5a5c740e63a0f43d3da16675cd258dc
|
4
|
+
data.tar.gz: fda3306ba81053247d2163b88d2f24ac9075e5d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a79c9a15abaf3fae16931af4c87977f1b9bb4b785b1ff503d46190a99bda73ec73d12041d422ff874362fd3f8db2588f991524887eab17d7b070db26dfb1d1e
|
7
|
+
data.tar.gz: 6201c71878a6a239526b03100bbdc52126e71c4c735e3ffd68b3aa80fac817ecdef1fad4bb6c1e649dc5f3797fb173c857a6b444e65149c6f8a1e495739323e2
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG
CHANGED
data/Gemfile
CHANGED
data/bb-ruby.gemspec
CHANGED
@@ -17,4 +17,10 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
18
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
19
19
|
gem.require_paths = ["lib"]
|
20
|
+
|
21
|
+
gem.add_development_dependency "rake"
|
22
|
+
|
23
|
+
if RUBY_VERSION >= "2.2.0"
|
24
|
+
gem.add_development_dependency "test-unit"
|
25
|
+
end
|
20
26
|
end
|
data/lib/bb-ruby.rb
CHANGED
@@ -145,13 +145,13 @@ module BBRuby
|
|
145
145
|
'Maybe try looking on [url]http://google.com[/url]',
|
146
146
|
:link],
|
147
147
|
'Link (Automatic)' => [
|
148
|
-
%r{(\A|\s)(https?://[^\s
|
148
|
+
%r{(\A|\s)(https?://[^\s<\[]+)},
|
149
149
|
' <a href="\2">\2</a>',
|
150
150
|
'Hyperlink (automatic)',
|
151
151
|
'Maybe try looking on http://www.google.com',
|
152
152
|
:link],
|
153
153
|
'Link (Automatic without leading http(s))' => [
|
154
|
-
/(\A|\s)(www\.[^\s
|
154
|
+
/(\A|\s)(www\.[^\s<\[]+)/,
|
155
155
|
' <a href="http://\2">\2</a>',
|
156
156
|
'Hyperlink (automatic without leading http(s))',
|
157
157
|
'Maybe try looking on www.google.com',
|
data/lib/bb-ruby/version.rb
CHANGED
data/test/bb-ruby_test.rb
CHANGED
@@ -349,4 +349,7 @@ class TestBBRuby < Test::Unit::TestCase
|
|
349
349
|
assert_equal 'One<br />Two<br />Three lines!', 'One[br]Two[br]Three lines!'.bbcode_to_html
|
350
350
|
end
|
351
351
|
|
352
|
+
def test_center_with_url
|
353
|
+
assert_equal '<div style="text-align: center;">hello <a href="http://www.test.com">www.test.com</a></div>', '[center]hello www.test.com[/center]'.bbcode_to_html
|
354
|
+
end
|
352
355
|
end
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bb-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Craig P. Jolicoeur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
12
|
-
dependencies:
|
11
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: test-unit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
13
41
|
description: BBCode for Ruby
|
14
42
|
email:
|
15
43
|
- cpjolicoeur@gmail.com
|
@@ -21,7 +49,6 @@ files:
|
|
21
49
|
- ".travis.yml"
|
22
50
|
- CHANGELOG
|
23
51
|
- Gemfile
|
24
|
-
- Gemfile.lock
|
25
52
|
- LICENSE
|
26
53
|
- README.md
|
27
54
|
- Rakefile
|
@@ -50,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
50
77
|
version: '0'
|
51
78
|
requirements: []
|
52
79
|
rubyforge_project:
|
53
|
-
rubygems_version: 2.
|
80
|
+
rubygems_version: 2.5.1
|
54
81
|
signing_key:
|
55
82
|
specification_version: 4
|
56
83
|
summary: BBRuby is a BBCode implementation for Ruby. It will convert strings with
|