RedCloth 4.2.4.pre2-x86-mingw32
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.
- data/.gitignore +25 -0
- data/.rspec +1 -0
- data/.rvmrc +1 -0
- data/CHANGELOG +232 -0
- data/COPYING +18 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +33 -0
- data/Manifest +52 -0
- data/README +196 -0
- data/Rakefile +10 -0
- data/bin/redcloth +28 -0
- data/doc/textile_reference.html +631 -0
- data/ext/redcloth_scan/redcloth.h +220 -0
- data/lib/case_sensitive_require/RedCloth.rb +6 -0
- data/lib/redcloth.rb +44 -0
- data/lib/redcloth/erb_extension.rb +27 -0
- data/lib/redcloth/formatters/base.rb +63 -0
- data/lib/redcloth/formatters/html.rb +345 -0
- data/lib/redcloth/formatters/latex.rb +322 -0
- data/lib/redcloth/formatters/latex_entities.yml +2414 -0
- data/lib/redcloth/textile_doc.rb +103 -0
- data/lib/redcloth/version.rb +34 -0
- data/lib/tasks/pureruby.rake +17 -0
- data/redcloth.gemspec +48 -0
- data/setup.rb +1585 -0
- data/spec/benchmark_spec.rb +15 -0
- data/spec/custom_tags_spec.rb +50 -0
- data/spec/erb_spec.rb +10 -0
- data/spec/extension_spec.rb +26 -0
- data/spec/fixtures/basic.yml +1028 -0
- data/spec/fixtures/code.yml +257 -0
- data/spec/fixtures/definitions.yml +82 -0
- data/spec/fixtures/extra_whitespace.yml +64 -0
- data/spec/fixtures/filter_html.yml +177 -0
- data/spec/fixtures/filter_pba.yml +20 -0
- data/spec/fixtures/html.yml +340 -0
- data/spec/fixtures/images.yml +279 -0
- data/spec/fixtures/instiki.yml +38 -0
- data/spec/fixtures/links.yml +291 -0
- data/spec/fixtures/lists.yml +462 -0
- data/spec/fixtures/poignant.yml +89 -0
- data/spec/fixtures/sanitize_html.yml +42 -0
- data/spec/fixtures/table.yml +434 -0
- data/spec/fixtures/textism.yml +509 -0
- data/spec/fixtures/threshold.yml +762 -0
- data/spec/formatters/class_filtered_html_spec.rb +7 -0
- data/spec/formatters/filtered_html_spec.rb +7 -0
- data/spec/formatters/html_no_breaks_spec.rb +9 -0
- data/spec/formatters/html_spec.rb +13 -0
- data/spec/formatters/id_filtered_html_spec.rb +7 -0
- data/spec/formatters/latex_spec.rb +13 -0
- data/spec/formatters/lite_mode_html_spec.rb +7 -0
- data/spec/formatters/no_span_caps_html_spec.rb +7 -0
- data/spec/formatters/sanitized_html_spec.rb +7 -0
- data/spec/formatters/style_filtered_html_spec.rb +7 -0
- data/spec/parser_spec.rb +95 -0
- data/spec/spec_helper.rb +36 -0
- data/tasks/compile.rake +47 -0
- data/tasks/gems.rake +38 -0
- data/tasks/ragel_extension_task.rb +127 -0
- data/tasks/release.rake +15 -0
- data/tasks/rspec.rake +11 -0
- data/tasks/rvm.rake +43 -0
- data/test/ragel_profiler.rb +73 -0
- data/test/validate_fixtures.rb +74 -0
- metadata +218 -0
data/tasks/release.rake
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
namespace :release do
|
2
|
+
desc 'Upload all packages and tag git'
|
3
|
+
task :all => ['build:all', :release, :push_native_gems]
|
4
|
+
|
5
|
+
desc 'Push all gems to rubygems.org (gemcutter)'
|
6
|
+
task :push_native_gems do
|
7
|
+
Dir.chdir('pkg') do
|
8
|
+
Dir['*.gem'].each do |gem_file|
|
9
|
+
sh("gem push #{gem_file}")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
Rake::Task['release'].prerequisites.unshift('build')
|
data/tasks/rspec.rake
ADDED
data/tasks/rvm.rake
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
namespace :rvm do
|
2
|
+
|
3
|
+
RVM_RUBIES = ['jruby-1.5.3', 'ruby-1.8.6-p398', 'ruby-1.9.1-p243', 'ruby-1.9.2-head', 'ree-1.8.7']
|
4
|
+
RVM_GEMSET_NAME = 'redcloth'
|
5
|
+
|
6
|
+
task :setup do
|
7
|
+
unless @rvm_setup
|
8
|
+
rvm_lib_path = "#{`echo $rvm_path`.strip}/lib"
|
9
|
+
$LOAD_PATH.unshift(rvm_lib_path) unless $LOAD_PATH.include?(rvm_lib_path)
|
10
|
+
require 'rvm'
|
11
|
+
require 'tmpdir'
|
12
|
+
@rvm_setup = true
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
desc "Install development gems using bundler to each rubie version"
|
17
|
+
task :bundle => :setup do
|
18
|
+
rvm_each_rubie { RVM.run 'gem install bundler; bundle install' }
|
19
|
+
end
|
20
|
+
|
21
|
+
desc "Echo command to run specs under each rvm ruby"
|
22
|
+
task :spec => :setup do
|
23
|
+
puts "rvm #{rvm_rubies.join(',')} rake"
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
# RVM Helper Methods
|
30
|
+
|
31
|
+
def rvm_each_rubie
|
32
|
+
rvm_rubies.each do |rubie|
|
33
|
+
RVM.use(rubie)
|
34
|
+
yield
|
35
|
+
end
|
36
|
+
ensure
|
37
|
+
RVM.reset_current!
|
38
|
+
end
|
39
|
+
|
40
|
+
def rvm_rubies(options={})
|
41
|
+
RVM_RUBIES.map{ |rubie| "#{rubie}@#{RVM_GEMSET_NAME}" }
|
42
|
+
end
|
43
|
+
|
@@ -0,0 +1,73 @@
|
|
1
|
+
class RagelProfiler
|
2
|
+
MEM_CONVERSION = 1024
|
3
|
+
|
4
|
+
COMMANDS = { :compile => %w(ragel rlgen-cd gcc-4.0 gnumake cc1),
|
5
|
+
:test => %w(ruby) }
|
6
|
+
|
7
|
+
FIELDS = %w(compile_time compile_max_rss test_time test_max_rss file_size)
|
8
|
+
|
9
|
+
@@results = {}
|
10
|
+
|
11
|
+
def initialize(name)
|
12
|
+
@name = name
|
13
|
+
@@results[name] = []
|
14
|
+
end
|
15
|
+
|
16
|
+
def measure(type)
|
17
|
+
raise "not a valid type" unless COMMANDS.keys.include?(type)
|
18
|
+
regex = COMMANDS[type].map {|c| Regexp.escape(c) }.join("|")
|
19
|
+
t = Thread.new do
|
20
|
+
Thread.current[:max] = 0
|
21
|
+
loop do
|
22
|
+
Thread.current[:max] = [run(regex), Thread.current[:max]].max
|
23
|
+
sleep 0.5
|
24
|
+
end
|
25
|
+
end
|
26
|
+
begin_time = Time.now
|
27
|
+
yield
|
28
|
+
total_time = Time.now - begin_time
|
29
|
+
|
30
|
+
t.kill
|
31
|
+
store_result(type, "time", total_time)
|
32
|
+
store_result(type, "max_rss", t[:max])
|
33
|
+
end
|
34
|
+
|
35
|
+
def ext_size(file)
|
36
|
+
store_result(:file, "size", File.size(file) / MEM_CONVERSION)
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.results
|
40
|
+
out = []
|
41
|
+
out << "name\t" + FIELDS.join("\t")
|
42
|
+
@@results.each do |name, results|
|
43
|
+
out << [name, results ].flatten.join("\t")
|
44
|
+
end
|
45
|
+
out.join("\n")
|
46
|
+
end
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def store_result(type, metric, value)
|
51
|
+
index = FIELDS.index("#{type.to_s}_#{metric}")
|
52
|
+
@@results[@name][index] = "%.2f" % value
|
53
|
+
end
|
54
|
+
|
55
|
+
def run(ps_regex)
|
56
|
+
ps_command = "ps axucww"
|
57
|
+
ps_output = `#{ps_command}`
|
58
|
+
fields = ps_output.to_a.first.downcase.split
|
59
|
+
memory_index = fields.index("rss")
|
60
|
+
pid_index = fields.index("pid")
|
61
|
+
ppid_index = fields.index("ppid")
|
62
|
+
total = ps_output.grep(/(#{ps_regex})\s+$/i).map do |com|
|
63
|
+
Float(com.split[memory_index]).abs
|
64
|
+
end.inject(0) { |s,v| s += v }
|
65
|
+
if total
|
66
|
+
return total/MEM_CONVERSION
|
67
|
+
else
|
68
|
+
STDERR.puts "Command not found. No processes found matching #{ps_regex}."
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require File.join(File.dirname(__FILE__), 'helper')
|
4
|
+
|
5
|
+
require 'erb'
|
6
|
+
require 'w3c_validators'
|
7
|
+
|
8
|
+
class ValidateFixtures < Test::Unit::TestCase
|
9
|
+
include W3CValidators
|
10
|
+
|
11
|
+
def setup
|
12
|
+
@v = MarkupValidator.new
|
13
|
+
sleep 1 # delay per WC3 request
|
14
|
+
end
|
15
|
+
|
16
|
+
HTML_4_0_TEMPLATE = <<EOD
|
17
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
18
|
+
<html>
|
19
|
+
<head>
|
20
|
+
<title><%= test_name %></title>
|
21
|
+
</head>
|
22
|
+
<body>
|
23
|
+
<%= content %>
|
24
|
+
</body>
|
25
|
+
</html>
|
26
|
+
EOD
|
27
|
+
XHTML_1_0_TEMPLATE = <<EOD
|
28
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
29
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
30
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
31
|
+
<head>
|
32
|
+
<title><%= test_name %></title>
|
33
|
+
</head>
|
34
|
+
<body>
|
35
|
+
<%= content %>
|
36
|
+
</body>
|
37
|
+
</html>
|
38
|
+
EOD
|
39
|
+
|
40
|
+
fixtures.each do |name, doc|
|
41
|
+
if doc['html'] && (doc['valid_html'].nil? || doc['valid_html'])
|
42
|
+
define_method("test_html_output_validity_of_#{name}") do
|
43
|
+
assert_produces_valid_html(name, doc['html'])
|
44
|
+
end
|
45
|
+
define_method("test_xhtml_output_validity_of_#{name}") do
|
46
|
+
assert_produces_valid_xhtml(name, doc['html'])
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
private
|
52
|
+
def assert_produces_valid_html(test_name, content)
|
53
|
+
body = ERB.new(HTML_4_0_TEMPLATE, nil,'-%').result(binding)
|
54
|
+
assert_validates(body)
|
55
|
+
end
|
56
|
+
|
57
|
+
def assert_produces_valid_xhtml(test_name, content)
|
58
|
+
body = ERB.new(XHTML_1_0_TEMPLATE, nil,'-%').result(binding)
|
59
|
+
assert_validates(body)
|
60
|
+
end
|
61
|
+
|
62
|
+
def assert_validates(body)
|
63
|
+
results = @v.validate_text(body)
|
64
|
+
errors = results.errors
|
65
|
+
warnings = results.warnings.reject {|w| w.message_id == "247" } # NET-enabling start-tag requires SHORTTAG YES.
|
66
|
+
|
67
|
+
assert(errors.empty?, "Validator errors: \n" +
|
68
|
+
errors.collect {|e| "'#{e.to_s}'"}.join("\n"))
|
69
|
+
|
70
|
+
assert(warnings.empty?, "Validator warnings: \n" +
|
71
|
+
warnings.collect {|w| "'#{w.to_s}'"}.join("\n"))
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
metadata
ADDED
@@ -0,0 +1,218 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: RedCloth
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 270495393
|
5
|
+
prerelease: true
|
6
|
+
segments:
|
7
|
+
- 4
|
8
|
+
- 2
|
9
|
+
- 4
|
10
|
+
- pre2
|
11
|
+
version: 4.2.4.pre2
|
12
|
+
platform: x86-mingw32
|
13
|
+
authors:
|
14
|
+
- Jason Garber
|
15
|
+
- why the lucky stiff
|
16
|
+
- Ola Bini
|
17
|
+
autorequire:
|
18
|
+
bindir: bin
|
19
|
+
cert_chain: []
|
20
|
+
|
21
|
+
date: 2010-11-22 00:00:00 -06:00
|
22
|
+
default_executable: redcloth
|
23
|
+
dependencies:
|
24
|
+
- !ruby/object:Gem::Dependency
|
25
|
+
prerelease: false
|
26
|
+
type: :development
|
27
|
+
name: rvm
|
28
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
hash: 3
|
34
|
+
segments:
|
35
|
+
- 0
|
36
|
+
version: "0"
|
37
|
+
requirement: *id001
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
prerelease: false
|
40
|
+
type: :development
|
41
|
+
name: rake
|
42
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
hash: 49
|
48
|
+
segments:
|
49
|
+
- 0
|
50
|
+
- 8
|
51
|
+
- 7
|
52
|
+
version: 0.8.7
|
53
|
+
requirement: *id002
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
prerelease: false
|
56
|
+
type: :development
|
57
|
+
name: rspec
|
58
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
60
|
+
requirements:
|
61
|
+
- - ~>
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
hash: 1
|
64
|
+
segments:
|
65
|
+
- 2
|
66
|
+
- 1
|
67
|
+
version: "2.1"
|
68
|
+
requirement: *id003
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
prerelease: false
|
71
|
+
type: :development
|
72
|
+
name: diff-lcs
|
73
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ">="
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
hash: 3
|
79
|
+
segments:
|
80
|
+
- 0
|
81
|
+
version: "0"
|
82
|
+
requirement: *id004
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
prerelease: false
|
85
|
+
type: :development
|
86
|
+
name: rake-compiler
|
87
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
88
|
+
none: false
|
89
|
+
requirements:
|
90
|
+
- - ~>
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
hash: 1
|
93
|
+
segments:
|
94
|
+
- 0
|
95
|
+
- 7
|
96
|
+
- 1
|
97
|
+
version: 0.7.1
|
98
|
+
requirement: *id005
|
99
|
+
description: Textile parser for Ruby.
|
100
|
+
email: redcloth-upwards@rubyforge.org
|
101
|
+
executables:
|
102
|
+
- redcloth
|
103
|
+
extensions: []
|
104
|
+
|
105
|
+
extra_rdoc_files:
|
106
|
+
- COPYING
|
107
|
+
- README
|
108
|
+
- CHANGELOG
|
109
|
+
files:
|
110
|
+
- .bundle/config
|
111
|
+
- .gitignore
|
112
|
+
- .rspec
|
113
|
+
- .rvmrc
|
114
|
+
- CHANGELOG
|
115
|
+
- COPYING
|
116
|
+
- Gemfile
|
117
|
+
- Gemfile.lock
|
118
|
+
- Manifest
|
119
|
+
- README
|
120
|
+
- Rakefile
|
121
|
+
- bin/redcloth
|
122
|
+
- doc/textile_reference.html
|
123
|
+
- lib/case_sensitive_require/RedCloth.rb
|
124
|
+
- lib/redcloth.rb
|
125
|
+
- lib/redcloth/erb_extension.rb
|
126
|
+
- lib/redcloth/formatters/base.rb
|
127
|
+
- lib/redcloth/formatters/html.rb
|
128
|
+
- lib/redcloth/formatters/latex.rb
|
129
|
+
- lib/redcloth/formatters/latex_entities.yml
|
130
|
+
- lib/redcloth/textile_doc.rb
|
131
|
+
- lib/redcloth/version.rb
|
132
|
+
- lib/tasks/pureruby.rake
|
133
|
+
- redcloth.gemspec
|
134
|
+
- setup.rb
|
135
|
+
- spec/benchmark_spec.rb
|
136
|
+
- spec/custom_tags_spec.rb
|
137
|
+
- spec/erb_spec.rb
|
138
|
+
- spec/extension_spec.rb
|
139
|
+
- spec/fixtures/basic.yml
|
140
|
+
- spec/fixtures/code.yml
|
141
|
+
- spec/fixtures/definitions.yml
|
142
|
+
- spec/fixtures/extra_whitespace.yml
|
143
|
+
- spec/fixtures/filter_html.yml
|
144
|
+
- spec/fixtures/filter_pba.yml
|
145
|
+
- spec/fixtures/html.yml
|
146
|
+
- spec/fixtures/images.yml
|
147
|
+
- spec/fixtures/instiki.yml
|
148
|
+
- spec/fixtures/links.yml
|
149
|
+
- spec/fixtures/lists.yml
|
150
|
+
- spec/fixtures/poignant.yml
|
151
|
+
- spec/fixtures/sanitize_html.yml
|
152
|
+
- spec/fixtures/table.yml
|
153
|
+
- spec/fixtures/textism.yml
|
154
|
+
- spec/fixtures/threshold.yml
|
155
|
+
- spec/formatters/class_filtered_html_spec.rb
|
156
|
+
- spec/formatters/filtered_html_spec.rb
|
157
|
+
- spec/formatters/html_no_breaks_spec.rb
|
158
|
+
- spec/formatters/html_spec.rb
|
159
|
+
- spec/formatters/id_filtered_html_spec.rb
|
160
|
+
- spec/formatters/latex_spec.rb
|
161
|
+
- spec/formatters/lite_mode_html_spec.rb
|
162
|
+
- spec/formatters/no_span_caps_html_spec.rb
|
163
|
+
- spec/formatters/sanitized_html_spec.rb
|
164
|
+
- spec/formatters/style_filtered_html_spec.rb
|
165
|
+
- spec/parser_spec.rb
|
166
|
+
- spec/spec_helper.rb
|
167
|
+
- tasks/compile.rake
|
168
|
+
- tasks/gems.rake
|
169
|
+
- tasks/ragel_extension_task.rb
|
170
|
+
- tasks/release.rake
|
171
|
+
- tasks/rspec.rake
|
172
|
+
- tasks/rvm.rake
|
173
|
+
- test/ragel_profiler.rb
|
174
|
+
- test/validate_fixtures.rb
|
175
|
+
- ext/redcloth_scan/redcloth_attributes.c
|
176
|
+
- ext/redcloth_scan/redcloth_inline.c
|
177
|
+
- ext/redcloth_scan/redcloth_scan.c
|
178
|
+
- ext/redcloth_scan/redcloth.h
|
179
|
+
- lib/1.8/redcloth_scan.so
|
180
|
+
- lib/1.9/redcloth_scan.so
|
181
|
+
has_rdoc: true
|
182
|
+
homepage: http://redcloth.org
|
183
|
+
licenses: []
|
184
|
+
|
185
|
+
post_install_message:
|
186
|
+
rdoc_options:
|
187
|
+
- --charset=UTF-8
|
188
|
+
require_paths:
|
189
|
+
- lib
|
190
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
191
|
+
none: false
|
192
|
+
requirements:
|
193
|
+
- - ">="
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
hash: 3
|
196
|
+
segments:
|
197
|
+
- 0
|
198
|
+
version: "0"
|
199
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
|
+
none: false
|
201
|
+
requirements:
|
202
|
+
- - ">"
|
203
|
+
- !ruby/object:Gem::Version
|
204
|
+
hash: 25
|
205
|
+
segments:
|
206
|
+
- 1
|
207
|
+
- 3
|
208
|
+
- 1
|
209
|
+
version: 1.3.1
|
210
|
+
requirements: []
|
211
|
+
|
212
|
+
rubyforge_project: redcloth
|
213
|
+
rubygems_version: 1.3.7
|
214
|
+
signing_key:
|
215
|
+
specification_version: 3
|
216
|
+
summary: RedCloth-4.2.4.pre2
|
217
|
+
test_files: []
|
218
|
+
|