RedCloth 4.0.0-x86-mswin32-60

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of RedCloth might be problematic. Click here for more details.

Files changed (49) hide show
  1. data/CHANGELOG +17 -0
  2. data/COPYING +18 -0
  3. data/README +156 -0
  4. data/Rakefile +240 -0
  5. data/bin/redcloth +28 -0
  6. data/ext/redcloth_scan/extconf.rb +9 -0
  7. data/ext/redcloth_scan/redcloth.h +149 -0
  8. data/ext/redcloth_scan/redcloth_attributes.c +650 -0
  9. data/ext/redcloth_scan/redcloth_attributes.rl +78 -0
  10. data/ext/redcloth_scan/redcloth_common.rl +113 -0
  11. data/ext/redcloth_scan/redcloth_inline.c +5102 -0
  12. data/ext/redcloth_scan/redcloth_inline.rl +282 -0
  13. data/ext/redcloth_scan/redcloth_scan.c +9300 -0
  14. data/ext/redcloth_scan/redcloth_scan.rl +523 -0
  15. data/extras/mingw-rbconfig.rb +176 -0
  16. data/extras/ragel_profiler.rb +73 -0
  17. data/lib/redcloth.rb +24 -0
  18. data/lib/redcloth/formatters/base.rb +50 -0
  19. data/lib/redcloth/formatters/html.rb +342 -0
  20. data/lib/redcloth/formatters/latex.rb +227 -0
  21. data/lib/redcloth/formatters/latex_entities.yml +2414 -0
  22. data/lib/redcloth/textile_doc.rb +105 -0
  23. data/lib/redcloth/version.rb +18 -0
  24. data/lib/redcloth_scan.bundle +0 -0
  25. data/lib/redcloth_scan.so +0 -0
  26. data/test/basic.yml +794 -0
  27. data/test/code.yml +195 -0
  28. data/test/definitions.yml +71 -0
  29. data/test/extra_whitespace.yml +64 -0
  30. data/test/filter_html.yml +177 -0
  31. data/test/filter_pba.yml +12 -0
  32. data/test/helper.rb +108 -0
  33. data/test/html.yml +271 -0
  34. data/test/images.yml +202 -0
  35. data/test/instiki.yml +38 -0
  36. data/test/links.yml +214 -0
  37. data/test/lists.yml +283 -0
  38. data/test/poignant.yml +89 -0
  39. data/test/sanitize_html.yml +42 -0
  40. data/test/table.yml +267 -0
  41. data/test/test_custom_tags.rb +46 -0
  42. data/test/test_extensions.rb +31 -0
  43. data/test/test_formatters.rb +15 -0
  44. data/test/test_parser.rb +68 -0
  45. data/test/test_restrictions.rb +41 -0
  46. data/test/textism.yml +480 -0
  47. data/test/threshold.yml +772 -0
  48. data/test/validate_fixtures.rb +73 -0
  49. metadata +104 -0
@@ -0,0 +1,73 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'helper'
4
+ require 'erb'
5
+ require 'w3c_validators'
6
+
7
+ class ValidateFixtures < Test::Unit::TestCase
8
+ include W3CValidators
9
+
10
+ def setup
11
+ @v = MarkupValidator.new
12
+ sleep 1 # delay per WC3 request
13
+ end
14
+
15
+ HTML_4_0_TEMPLATE = <<EOD
16
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
17
+ <html>
18
+ <head>
19
+ <title><%= test_name %></title>
20
+ </head>
21
+ <body>
22
+ <%= content %>
23
+ </body>
24
+ </html>
25
+ EOD
26
+ XHTML_1_0_TEMPLATE = <<EOD
27
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
28
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
29
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
30
+ <head>
31
+ <title><%= test_name %></title>
32
+ </head>
33
+ <body>
34
+ <%= content %>
35
+ </body>
36
+ </html>
37
+ EOD
38
+
39
+ fixtures.each do |name, doc|
40
+ if doc['html'] && (doc['valid_html'].nil? || doc['valid_html'])
41
+ define_method("test_html_output_validity_of_#{name}") do
42
+ assert_produces_valid_html(name, doc['html'])
43
+ end
44
+ define_method("test_xhtml_output_validity_of_#{name}") do
45
+ assert_produces_valid_xhtml(name, doc['html'])
46
+ end
47
+ end
48
+ end
49
+
50
+ private
51
+ def assert_produces_valid_html(test_name, content)
52
+ body = ERB.new(HTML_4_0_TEMPLATE, nil,'-%').result(binding)
53
+ assert_validates(body)
54
+ end
55
+
56
+ def assert_produces_valid_xhtml(test_name, content)
57
+ body = ERB.new(XHTML_1_0_TEMPLATE, nil,'-%').result(binding)
58
+ assert_validates(body)
59
+ end
60
+
61
+ def assert_validates(body)
62
+ results = @v.validate_text(body)
63
+ errors = results.errors
64
+ warnings = results.warnings.reject {|w| w.message_id == "247" } # NET-enabling start-tag requires SHORTTAG YES.
65
+
66
+ assert(errors.empty?, "Validator errors: \n" +
67
+ errors.collect {|e| "'#{e.to_s}'"}.join("\n"))
68
+
69
+ assert(warnings.empty?, "Validator warnings: \n" +
70
+ warnings.collect {|w| "'#{w.to_s}'"}.join("\n"))
71
+ end
72
+
73
+ end
metadata ADDED
@@ -0,0 +1,104 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: RedCloth
3
+ version: !ruby/object:Gem::Version
4
+ version: 4.0.0
5
+ platform: x86-mswin32-60
6
+ authors:
7
+ - Jason Garber
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-07-24 00:00:00 -04:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: RedCloth-4.0.0 - Textile parser for Ruby. http://redcloth.org/
17
+ email: redcloth-upwards@rubyforge.org
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README
24
+ - CHANGELOG
25
+ - COPYING
26
+ files:
27
+ - CHANGELOG
28
+ - COPYING
29
+ - README
30
+ - Rakefile
31
+ - bin/redcloth
32
+ - test/basic.yml
33
+ - test/code.yml
34
+ - test/definitions.yml
35
+ - test/extra_whitespace.yml
36
+ - test/filter_html.yml
37
+ - test/filter_pba.yml
38
+ - test/helper.rb
39
+ - test/html.yml
40
+ - test/images.yml
41
+ - test/instiki.yml
42
+ - test/links.yml
43
+ - test/lists.yml
44
+ - test/poignant.yml
45
+ - test/sanitize_html.yml
46
+ - test/table.yml
47
+ - test/test_custom_tags.rb
48
+ - test/test_extensions.rb
49
+ - test/test_formatters.rb
50
+ - test/test_parser.rb
51
+ - test/test_restrictions.rb
52
+ - test/textism.yml
53
+ - test/threshold.yml
54
+ - test/validate_fixtures.rb
55
+ - lib/redcloth
56
+ - lib/redcloth/formatters
57
+ - lib/redcloth/formatters/base.rb
58
+ - lib/redcloth/formatters/html.rb
59
+ - lib/redcloth/formatters/latex.rb
60
+ - lib/redcloth/formatters/latex_entities.yml
61
+ - lib/redcloth/textile_doc.rb
62
+ - lib/redcloth/version.rb
63
+ - lib/redcloth.rb
64
+ - lib/redcloth_scan.bundle
65
+ - extras/mingw-rbconfig.rb
66
+ - extras/ragel_profiler.rb
67
+ - ext/redcloth_scan/redcloth.h
68
+ - ext/redcloth_scan/redcloth_attributes.c
69
+ - ext/redcloth_scan/redcloth_inline.c
70
+ - ext/redcloth_scan/redcloth_scan.c
71
+ - ext/redcloth_scan/extconf.rb
72
+ - ext/redcloth_scan/redcloth_attributes.rl
73
+ - ext/redcloth_scan/redcloth_common.rl
74
+ - ext/redcloth_scan/redcloth_inline.rl
75
+ - ext/redcloth_scan/redcloth_scan.rl
76
+ - lib/redcloth_scan.so
77
+ has_rdoc: false
78
+ homepage: http://redcloth.org/
79
+ post_install_message:
80
+ rdoc_options: []
81
+
82
+ require_paths:
83
+ - lib
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: "0"
89
+ version:
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: "0"
95
+ version:
96
+ requirements: []
97
+
98
+ rubyforge_project: redcloth
99
+ rubygems_version: 1.1.1
100
+ signing_key:
101
+ specification_version: 2
102
+ summary: RedCloth-4.0.0 - Textile parser for Ruby. http://redcloth.org/
103
+ test_files: []
104
+