vigetlabs-acts_as_markup 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +3 -0
- data/Manifest.txt +1 -0
- data/acts_as_markup.gemspec +6 -6
- data/lib/acts_as_markup.rb +1 -1
- data/lib/acts_as_markup/exts/maruku.rb +5 -0
- data/lib/acts_as_markup/exts/peg_markdown.rb +8 -0
- data/lib/acts_as_markup/exts/rdiscount.rb +5 -0
- data/test/acts_as_markdown_test.rb +16 -0
- data/test/acts_as_markup_test.rb +28 -0
- data/test/acts_as_rdoc_test.rb +4 -0
- data/test/acts_as_textile_test.rb +4 -0
- data/test/acts_as_wikitext_test.rb +4 -0
- metadata +4 -3
data/CHANGELOG
CHANGED
data/Manifest.txt
CHANGED
data/acts_as_markup.gemspec
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{acts_as_markup}
|
3
|
-
s.version = "1.1.
|
3
|
+
s.version = "1.1.2"
|
4
4
|
|
5
5
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
6
|
s.authors = ["Brian Landau"]
|
7
|
-
s.date = %q{2008-08-
|
7
|
+
s.date = %q{2008-08-22}
|
8
8
|
s.description = %q{Represent ActiveRecord Markdown, Textile, Wiki text, RDoc columns as Markdown, Textile Wikitext, RDoc objects using various external libraries to convert to HTML.}
|
9
9
|
s.email = %q{brian.landau@viget.com}
|
10
10
|
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.rdoc"]
|
11
|
-
s.files = ["CHANGELOG", "LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "acts_as_markup.gemspec", "lib/acts/as_markup.rb", "lib/acts_as_markup.rb", "lib/acts_as_markup/exts/maruku.rb", "lib/acts_as_markup/exts/rdiscount.rb", "lib/acts_as_markup/exts/rdoc.rb", "lib/acts_as_markup/exts/string.rb", "lib/acts_as_markup/exts/wikitext.rb", "tasks/bones.rake", "tasks/gem.rake", "tasks/git.rake", "tasks/manifest.rake", "tasks/post_load.rake", "tasks/rdoc.rake", "tasks/rubyforge.rake", "tasks/setup.rb", "tasks/test.rake", "test/acts_as_markdown_test.rb", "test/acts_as_markup_test.rb", "test/acts_as_rdoc_test.rb", "test/acts_as_textile_test.rb", "test/acts_as_wikitext_test.rb", "test/test_helper.rb"]
|
11
|
+
s.files = ["CHANGELOG", "LICENSE", "Manifest.txt", "README.rdoc", "Rakefile", "acts_as_markup.gemspec", "lib/acts/as_markup.rb", "lib/acts_as_markup.rb", "lib/acts_as_markup/exts/maruku.rb", "lib/acts_as_markup/exts/peg_markdown.rb", "lib/acts_as_markup/exts/rdiscount.rb", "lib/acts_as_markup/exts/rdoc.rb", "lib/acts_as_markup/exts/string.rb", "lib/acts_as_markup/exts/wikitext.rb", "tasks/bones.rake", "tasks/gem.rake", "tasks/git.rake", "tasks/manifest.rake", "tasks/post_load.rake", "tasks/rdoc.rake", "tasks/rubyforge.rake", "tasks/setup.rb", "tasks/test.rake", "test/acts_as_markdown_test.rb", "test/acts_as_markup_test.rb", "test/acts_as_rdoc_test.rb", "test/acts_as_textile_test.rb", "test/acts_as_wikitext_test.rb", "test/test_helper.rb"]
|
12
12
|
s.has_rdoc = true
|
13
13
|
s.homepage = %q{http://viget.rubyforge.com/acts_as_markup}
|
14
14
|
s.rdoc_options = ["--main", "README.rdoc"]
|
@@ -26,20 +26,20 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_runtime_dependency(%q<activesupport>, [">= 2.1.0"])
|
27
27
|
s.add_runtime_dependency(%q<activerecord>, [">= 2.1.0"])
|
28
28
|
s.add_runtime_dependency(%q<rdiscount>, [">= 1.2.7.1"])
|
29
|
-
s.add_runtime_dependency(%q<RedCloth>, [">= 4.0.
|
29
|
+
s.add_runtime_dependency(%q<RedCloth>, [">= 4.0.3"])
|
30
30
|
s.add_runtime_dependency(%q<wikitext>, [">= 1.1.1"])
|
31
31
|
else
|
32
32
|
s.add_dependency(%q<activesupport>, [">= 2.1.0"])
|
33
33
|
s.add_dependency(%q<activerecord>, [">= 2.1.0"])
|
34
34
|
s.add_dependency(%q<rdiscount>, [">= 1.2.7.1"])
|
35
|
-
s.add_dependency(%q<RedCloth>, [">= 4.0.
|
35
|
+
s.add_dependency(%q<RedCloth>, [">= 4.0.3"])
|
36
36
|
s.add_dependency(%q<wikitext>, [">= 1.1.1"])
|
37
37
|
end
|
38
38
|
else
|
39
39
|
s.add_dependency(%q<activesupport>, [">= 2.1.0"])
|
40
40
|
s.add_dependency(%q<activerecord>, [">= 2.1.0"])
|
41
41
|
s.add_dependency(%q<rdiscount>, [">= 1.2.7.1"])
|
42
|
-
s.add_dependency(%q<RedCloth>, [">= 4.0.
|
42
|
+
s.add_dependency(%q<RedCloth>, [">= 4.0.3"])
|
43
43
|
s.add_dependency(%q<wikitext>, [">= 1.1.1"])
|
44
44
|
end
|
45
45
|
end
|
data/lib/acts_as_markup.rb
CHANGED
@@ -22,6 +22,10 @@ class ActsAsMarkdownTest < ActsAsMarkupTestCase
|
|
22
22
|
should "return original markdown text for a `to_s` method call on the column value" do
|
23
23
|
assert_equal @markdown_text, @post.body.to_s
|
24
24
|
end
|
25
|
+
|
26
|
+
should 'return false for .blank?' do
|
27
|
+
assert !@post.body.blank?
|
28
|
+
end
|
25
29
|
|
26
30
|
should "return formated html for a `to_html` method call on the column value" do
|
27
31
|
assert_match(/<h2(\s\w+\=['"]\w*['"])*\s*>\s*Markdown Test Text\s*<\/h2>/, @post.body.to_html)
|
@@ -73,6 +77,10 @@ class ActsAsMarkdownTest < ActsAsMarkupTestCase
|
|
73
77
|
should "return original markdown text for a `to_s` method call on the column value" do
|
74
78
|
assert_equal @markdown_text, @post.body.to_s
|
75
79
|
end
|
80
|
+
|
81
|
+
should 'return false for .blank?' do
|
82
|
+
assert !@post.body.blank?
|
83
|
+
end
|
76
84
|
|
77
85
|
should "return formated html for a `to_html` method call on the column value" do
|
78
86
|
assert_match(/<h2(\s\w+\=['"]\w*['"])*\s*>\s*Markdown Test Text\s*<\/h2>/, @post.body.to_html)
|
@@ -124,6 +132,10 @@ class ActsAsMarkdownTest < ActsAsMarkupTestCase
|
|
124
132
|
should "return original markdown text for a `to_s` method call on the column value" do
|
125
133
|
assert_equal @markdown_text, @post.body.to_s
|
126
134
|
end
|
135
|
+
|
136
|
+
should 'return false for .blank?' do
|
137
|
+
assert !@post.body.blank?
|
138
|
+
end
|
127
139
|
|
128
140
|
should "return formated html for a `to_html` method call on the column value" do
|
129
141
|
assert_match(/<h2(\s\w+\=['"]\w*['"])*\s*>\s*Markdown Test Text\s*<\/h2>/, @post.body.to_html)
|
@@ -175,6 +187,10 @@ class ActsAsMarkdownTest < ActsAsMarkupTestCase
|
|
175
187
|
should "return original markdown text for a `to_s` method call on the column value" do
|
176
188
|
assert_equal @markdown_text, @post.body.to_s
|
177
189
|
end
|
190
|
+
|
191
|
+
should 'return false for .blank?' do
|
192
|
+
assert !@post.body.blank?
|
193
|
+
end
|
178
194
|
|
179
195
|
should "return formated html for a `to_html` method call on the column value" do
|
180
196
|
assert_match(/<h2(\s\w+\=['"]\w*['"])*\s*>\s*Markdown Test Text\s*<\/h2>/, @post.body.to_html)
|
data/test/acts_as_markup_test.rb
CHANGED
@@ -362,6 +362,10 @@ class ActsAsMarkupTest < ActsAsMarkupTestCase
|
|
362
362
|
assert_equal @post.body.to_s, ''
|
363
363
|
end
|
364
364
|
|
365
|
+
should 'return true for .blank?' do
|
366
|
+
assert @post.body.blank?
|
367
|
+
end
|
368
|
+
|
365
369
|
should 'return a blank string for `to_html` method' do
|
366
370
|
assert_match(/[\n\s]*/, @post.body.to_html)
|
367
371
|
end
|
@@ -388,6 +392,10 @@ class ActsAsMarkupTest < ActsAsMarkupTestCase
|
|
388
392
|
assert_equal @post.body.to_s, ''
|
389
393
|
end
|
390
394
|
|
395
|
+
should 'return true for .blank?' do
|
396
|
+
assert @post.body.blank?
|
397
|
+
end
|
398
|
+
|
391
399
|
should 'return a blank string for `to_html` method' do
|
392
400
|
assert_match(/[\n\s]*/, @post.body.to_html)
|
393
401
|
end
|
@@ -414,6 +422,10 @@ class ActsAsMarkupTest < ActsAsMarkupTestCase
|
|
414
422
|
assert_equal @post.body.to_s, ''
|
415
423
|
end
|
416
424
|
|
425
|
+
should 'return true for .blank?' do
|
426
|
+
assert @post.body.blank?
|
427
|
+
end
|
428
|
+
|
417
429
|
should 'return a blank string for `to_html` method' do
|
418
430
|
assert_match(/[\n\s]*/, @post.body.to_html)
|
419
431
|
end
|
@@ -441,6 +453,10 @@ class ActsAsMarkupTest < ActsAsMarkupTestCase
|
|
441
453
|
assert_equal @post.body.to_s, ''
|
442
454
|
end
|
443
455
|
|
456
|
+
should 'return true for .blank?' do
|
457
|
+
assert @post.body.blank?
|
458
|
+
end
|
459
|
+
|
444
460
|
should 'return a blank string for `to_html` method' do
|
445
461
|
assert_match(/[\n\s]*/, @post.body.to_html)
|
446
462
|
end
|
@@ -468,6 +484,10 @@ class ActsAsMarkupTest < ActsAsMarkupTestCase
|
|
468
484
|
assert_equal @post.body.to_s, ''
|
469
485
|
end
|
470
486
|
|
487
|
+
should 'return true for .blank?' do
|
488
|
+
assert @post.body.blank?
|
489
|
+
end
|
490
|
+
|
471
491
|
should 'return a blank string for `to_html` method' do
|
472
492
|
assert_match(/[\n\s]*/, @post.body.to_html)
|
473
493
|
end
|
@@ -495,6 +515,10 @@ class ActsAsMarkupTest < ActsAsMarkupTestCase
|
|
495
515
|
assert_equal @post.body.to_s, ''
|
496
516
|
end
|
497
517
|
|
518
|
+
should 'return true for .blank?' do
|
519
|
+
assert @post.body.blank?
|
520
|
+
end
|
521
|
+
|
498
522
|
should 'return a blank string for `to_html` method' do
|
499
523
|
assert_match(/[\n\s]*/, @post.body.to_html)
|
500
524
|
end
|
@@ -522,6 +546,10 @@ class ActsAsMarkupTest < ActsAsMarkupTestCase
|
|
522
546
|
assert_equal @post.body.to_s, ''
|
523
547
|
end
|
524
548
|
|
549
|
+
should 'return true for .blank?' do
|
550
|
+
assert @post.body.blank?
|
551
|
+
end
|
552
|
+
|
525
553
|
should 'return a blank string for `to_html` method' do
|
526
554
|
assert_match(/[\n\s]*/, @post.body.to_html)
|
527
555
|
end
|
data/test/acts_as_rdoc_test.rb
CHANGED
@@ -17,6 +17,10 @@ class ActsAsRDocTest < ActsAsMarkupTestCase
|
|
17
17
|
should "return original RDoc text for a `to_s` method call on the column value" do
|
18
18
|
assert_equal @rdoctext, @post.body.to_s
|
19
19
|
end
|
20
|
+
|
21
|
+
should 'return false for .blank?' do
|
22
|
+
assert !@post.body.blank?
|
23
|
+
end
|
20
24
|
|
21
25
|
should "return formated html for a `to_html` method call on the column value" do
|
22
26
|
assert_match(/<h2>\s*RDoc Test Text\s*<\/h2>/, @post.body.to_html)
|
@@ -17,6 +17,10 @@ class ActsAsTextileTest < ActsAsMarkupTestCase
|
|
17
17
|
should "return original textile text for a `to_s` method call on the column value" do
|
18
18
|
assert_equal @textile_text, @post.body.to_s
|
19
19
|
end
|
20
|
+
|
21
|
+
should 'return false for .blank?' do
|
22
|
+
assert !@post.body.blank?
|
23
|
+
end
|
20
24
|
|
21
25
|
should "return formated html for a `to_html` method call on the column value" do
|
22
26
|
assert_match(/<h2>Textile Test Text<\/h2>/, @post.body.to_html)
|
@@ -17,6 +17,10 @@ class ActsAsWikitextTest < ActsAsMarkupTestCase
|
|
17
17
|
should "return original wikitext text for a `to_s` method call on the column value" do
|
18
18
|
assert_equal @wikitext, @post.body.to_s
|
19
19
|
end
|
20
|
+
|
21
|
+
should 'return false for .blank?' do
|
22
|
+
assert !@post.body.blank?
|
23
|
+
end
|
20
24
|
|
21
25
|
should "return formated html for a `to_html` method call on the column value" do
|
22
26
|
assert_match(/<h2>Wikitext Test Text<\/h2>/, @post.body.to_html)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vigetlabs-acts_as_markup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Landau
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-08-
|
12
|
+
date: 2008-08-22 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -46,7 +46,7 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 4.0.
|
49
|
+
version: 4.0.3
|
50
50
|
version:
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: wikitext
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- lib/acts/as_markup.rb
|
78
78
|
- lib/acts_as_markup.rb
|
79
79
|
- lib/acts_as_markup/exts/maruku.rb
|
80
|
+
- lib/acts_as_markup/exts/peg_markdown.rb
|
80
81
|
- lib/acts_as_markup/exts/rdiscount.rb
|
81
82
|
- lib/acts_as_markup/exts/rdoc.rb
|
82
83
|
- lib/acts_as_markup/exts/string.rb
|