acts_as_markup 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ == 1.1.2 / 2008-08-22
2
+ * Make sure all markup objects properly respond to the .blank? method call.
3
+
1
4
  == 1.1.0 / 2008-08-12
2
5
 
3
6
  * Use a default for markup language column name when the variable options is used.
data/Manifest.txt CHANGED
@@ -7,6 +7,7 @@ acts_as_markup.gemspec
7
7
  lib/acts/as_markup.rb
8
8
  lib/acts_as_markup.rb
9
9
  lib/acts_as_markup/exts/maruku.rb
10
+ lib/acts_as_markup/exts/peg_markdown.rb
10
11
  lib/acts_as_markup/exts/rdiscount.rb
11
12
  lib/acts_as_markup/exts/rdoc.rb
12
13
  lib/acts_as_markup/exts/string.rb
@@ -1,14 +1,14 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{acts_as_markup}
3
- s.version = "1.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-14}
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.1"])
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.1"])
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.1"])
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
@@ -16,6 +16,11 @@ class Maruku
16
16
  def to_s
17
17
  @text
18
18
  end
19
+
20
+ # used to be compatable with Rails/ActiveSupport
21
+ def blank?
22
+ @text.blank?
23
+ end
19
24
 
20
25
  end
21
26
 
@@ -0,0 +1,8 @@
1
+ require 'peg_markdown'
2
+
3
+ class PEGMarkdown
4
+ # used to be compatable with Rails/ActiveSupport
5
+ def blank?
6
+ self.text.blank?
7
+ end
8
+ end
@@ -5,4 +5,9 @@ class RDiscount
5
5
  def to_s
6
6
  self.text
7
7
  end
8
+
9
+ # used to be compatable with Rails/ActiveSupport
10
+ def blank?
11
+ self.text.blank?
12
+ end
8
13
  end
@@ -2,7 +2,7 @@ require 'active_support'
2
2
 
3
3
  module ActsAsMarkup
4
4
  # :stopdoc:
5
- VERSION = '1.1.1'
5
+ VERSION = '1.1.2'
6
6
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
7
7
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
8
8
  # :startdoc:
@@ -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)
@@ -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
@@ -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: acts_as_markup
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.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-14 00:00:00 -04:00
12
+ date: 2008-08-22 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 4.0.1
53
+ version: 4.0.3
54
54
  version:
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: wikitext
@@ -82,6 +82,7 @@ files:
82
82
  - lib/acts/as_markup.rb
83
83
  - lib/acts_as_markup.rb
84
84
  - lib/acts_as_markup/exts/maruku.rb
85
+ - lib/acts_as_markup/exts/peg_markdown.rb
85
86
  - lib/acts_as_markup/exts/rdiscount.rb
86
87
  - lib/acts_as_markup/exts/rdoc.rb
87
88
  - lib/acts_as_markup/exts/string.rb