RedCloth 4.2.9 → 4.3.0
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.
- checksums.yaml +7 -0
- data/CHANGELOG +18 -3
- data/Gemfile +3 -3
- data/README.rdoc +22 -34
- data/lib/redcloth/formatters/html.rb +5 -1
- data/lib/redcloth/formatters/latex.rb +5 -3
- data/lib/redcloth/version.rb +6 -6
- data/redcloth.gemspec +11 -22
- data/spec/parser_spec.rb +4 -4
- data/spec/security/CVE-2012-6684_spec.rb +14 -0
- data/tasks/compile.rake +7 -15
- data/tasks/ragel_extension_task.rb +1 -12
- data/tasks/release.rake +6 -11
- data/tasks/rvm.rake +5 -3
- metadata +109 -163
- data/lib/redcloth_scan.jar +0 -0
- data/tasks/gems.rake +0 -37
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b7fe64e2539886d29943f4e885d85dcf8dc03447
|
4
|
+
data.tar.gz: 9459eee884a36becdf207f1d5392840bae5e45d8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4530cd8f7da18a7240faf7fb0f03e8ee6fa34120db0bbee548c4df6d6a3725f9030e703eb891228a0238f67bbfce65d8c601f26d43795b9b14f3e37bdebc786d
|
7
|
+
data.tar.gz: 40dd60702099cd06ae4480d00714e3d155c914ea87fc0f24f12d2c2ea4bc114e206740248ea9f7928575a5668d7d53d6b26c33f1ef4623652ee1a98b4f63090c
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
== 4.3.0 / April 29th, 2016
|
2
|
+
|
3
|
+
* Remove JRuby and Windows cross compilation and support
|
4
|
+
* Add Ruby 2.2.3 testing and support
|
5
|
+
|
6
|
+
* include CVE-2012-6684 fix [Tomas Pospisek]
|
7
|
+
* fix by [Antonio Terceiro]
|
8
|
+
* see http://sources.debian.net/src/ruby-redcloth/4.2.9-4/debian/patches/0001-Filter-out-javascript-links-when-using-filter_html-o.patch/
|
9
|
+
* vulnerability reported by [Kousuke Ebihara]
|
10
|
+
* see http://co3k.org/blog/redcloth-unfixed-xss-en
|
11
|
+
|
12
|
+
== 4.2.9.1 / February 24, 2015
|
13
|
+
|
14
|
+
* Lazy-load latex_entities.yml [Charlie Somerville]
|
15
|
+
|
1
16
|
== 4.2.9 / November 25, 2011
|
2
17
|
|
3
18
|
* Fix RbConfig / Config warning in Ruby 1.9.3. [Steve Purcell, Robert Gleeson, and unclaimedbaggage]
|
@@ -82,7 +97,7 @@
|
|
82
97
|
* Accept multiline content in table cells. [Jason Garber]
|
83
98
|
|
84
99
|
* Change to list attributes so you can give style/class to list items (taken from PyTextile). Breaks backwards compatibility.
|
85
|
-
|
100
|
+
|
86
101
|
Before, the style applied to the first list item applied to the entire list. Now, class/id/style placed
|
87
102
|
before the list applies to the list element and after the hash or asterisk applies to the list item. For
|
88
103
|
example:
|
@@ -163,7 +178,7 @@
|
|
163
178
|
To compile the jruby version of the gem: jruby -S rake compile
|
164
179
|
|
165
180
|
* Added textilize ERB utility method. [edraut]
|
166
|
-
Use it in an ERB template like this: <%=t my_textile_string %> or
|
181
|
+
Use it in an ERB template like this: <%=t my_textile_string %> or
|
167
182
|
<%=r %{Some *textile* if you please!} %>
|
168
183
|
|
169
184
|
* Fix extended blockcode stripping whitespace following blank line. #78
|
@@ -258,4 +273,4 @@
|
|
258
273
|
|
259
274
|
* Over 500 tests prevent regression
|
260
275
|
|
261
|
-
* It's 40 times faster than the previous version.
|
276
|
+
* It's 40 times faster than the previous version.
|
data/Gemfile
CHANGED
data/README.rdoc
CHANGED
@@ -1,59 +1,49 @@
|
|
1
1
|
= RedCloth - Textile parser for Ruby
|
2
2
|
|
3
3
|
Homepage:: http://redcloth.org
|
4
|
+
Maintainer:: Joshua Siler https://github.com/joshuasiler
|
4
5
|
Author:: Jason Garber
|
5
6
|
Copyright:: (c) 2011 Jason Garber
|
6
7
|
License:: MIT
|
7
8
|
|
9
|
+
{<img src="https://travis-ci.org/jgarber/redcloth.svg" />}[https://travis-ci.org/jgarber/redcloth] {<img src="https://codeclimate.com/github/jgarber/redcloth/badges/gpa.svg" />}[https://codeclimate.com/github/jgarber/redcloth]
|
10
|
+
|
8
11
|
(See http://redcloth.org/textile/ for a Textile reference.)
|
9
12
|
|
10
13
|
= RedCloth
|
11
14
|
|
12
15
|
RedCloth is a Ruby library for converting Textile into HTML.
|
13
16
|
|
17
|
+
== Attention - Deprecating JRuby and Windows support in version 4.3
|
18
|
+
|
19
|
+
In order to prioritize merging a fix for the long standing vulnerability *CVE-2012-6684*, our {new maintainer}[https://github.com/joshuasiler] has elected to stop maintaining the precompiled versions for Windows and JRuby.
|
20
|
+
|
14
21
|
== Installing
|
15
22
|
|
16
23
|
RedCloth can be installed via RubyGems:
|
17
24
|
|
18
25
|
gem install RedCloth
|
19
26
|
|
20
|
-
It will install the appropriate Ruby, JRuby, or Win32 gem. If using JRuby,
|
21
|
-
version 1.1.5 or greater is required.
|
22
|
-
|
23
27
|
== Compiling
|
24
28
|
|
25
29
|
If you just want to use RedCloth, you do NOT need to build/compile it. It is
|
26
30
|
compiled from C sources automatically when you install the gem on the ruby
|
27
|
-
platform. Precompiled binary gems are provided for JRuby and Win32 platforms.
|
31
|
+
platform. Precompiled binary gems are provided for JRuby and Win32 platforms prior to version 4.3.
|
28
32
|
|
29
33
|
RedCloth can be compiled with <tt>rake compile</tt>. Ragel 6.3 or greater is
|
30
34
|
required. Again, Ragel is NOT needed to simply use RedCloth.
|
31
35
|
|
32
36
|
=== Supported platforms
|
33
37
|
|
34
|
-
By default, the rake compile task builds a native C extension (MRI 1.8 or 1.9)
|
35
|
-
|
36
|
-
it's super slow and Ruby 1.8-only. The JRuby and pure-Ruby extensions don't
|
37
|
-
support multi-byte characters. Cross-compiling for win32 uses rake-compiler.
|
38
|
+
By default, the rake compile task builds a native C extension (MRI 1.8 or 1.9). A pure Ruby version can also be generated, but it's super slow and Ruby 1.8-only, and doesn't
|
39
|
+
support multi-byte characters.
|
38
40
|
|
39
41
|
The RedCloth::EXTENSION_LANGUAGE constant indicates in which language your
|
40
42
|
copy of RedCloth is compiled.
|
41
43
|
|
42
|
-
=== Compiling gems
|
43
|
-
|
44
|
-
To compile MRI, JRuby, and win32 gems, you need rvm and rake-compiler. These
|
45
|
-
and other dependencies can be installed with bundler. Then rake build:all
|
46
|
-
takes care of compiling and packaging all gems.
|
47
|
-
|
48
|
-
1. gem install bundler
|
49
|
-
2. bundle install
|
50
|
-
3. rake-compiler cross-ruby VERSION=1.8.6-p398
|
51
|
-
4. rake-compiler cross-ruby VERSION=1.9.1-p243
|
52
|
-
5. rake build:all
|
53
|
-
|
54
44
|
== Bugs
|
55
45
|
|
56
|
-
Please submit bugs to
|
46
|
+
Please submit bugs as issues to this repo.
|
57
47
|
|
58
48
|
== Using RedCloth
|
59
49
|
|
@@ -69,7 +59,7 @@ Multi-line example:
|
|
69
59
|
|
70
60
|
doc = RedCloth.new <<EOD
|
71
61
|
h2. Test document
|
72
|
-
|
62
|
+
|
73
63
|
Just a simple test.
|
74
64
|
EOD
|
75
65
|
puts doc.to_html
|
@@ -122,11 +112,11 @@ of small portions of text within a paragraph.
|
|
122
112
|
|
123
113
|
== Links
|
124
114
|
|
125
|
-
To make a hypertext link, put the link text in "quotation
|
115
|
+
To make a hypertext link, put the link text in "quotation
|
126
116
|
marks" followed immediately by a colon and the URL of the link.
|
127
117
|
|
128
|
-
Optional: text in (parentheses) following the link text,
|
129
|
-
but before the closing quotation mark, will become a title
|
118
|
+
Optional: text in (parentheses) following the link text,
|
119
|
+
but before the closing quotation mark, will become a title
|
130
120
|
attribute for the link, visible as a tool tip when a cursor is above it.
|
131
121
|
|
132
122
|
Example:
|
@@ -141,12 +131,12 @@ Will become:
|
|
141
131
|
|
142
132
|
To insert an image, put the URL for the image inside exclamation marks.
|
143
133
|
|
144
|
-
Optional: text that immediately follows the URL in (parentheses) will
|
145
|
-
be used as the Alt text for the image. Images on the web should always
|
146
|
-
have descriptive Alt text for the benefit of readers using non-graphical
|
134
|
+
Optional: text that immediately follows the URL in (parentheses) will
|
135
|
+
be used as the Alt text for the image. Images on the web should always
|
136
|
+
have descriptive Alt text for the benefit of readers using non-graphical
|
147
137
|
browsers.
|
148
138
|
|
149
|
-
Optional: place a colon followed by a URL immediately after the
|
139
|
+
Optional: place a colon followed by a URL immediately after the
|
150
140
|
closing ! to make the image into a link.
|
151
141
|
|
152
142
|
Example:
|
@@ -167,11 +157,11 @@ Will become:
|
|
167
157
|
|
168
158
|
== Defining Acronyms
|
169
159
|
|
170
|
-
HTML allows authors to define acronyms via the tag. The definition appears as a
|
171
|
-
tool tip when a cursor hovers over the acronym. A crucial aid to clear writing,
|
160
|
+
HTML allows authors to define acronyms via the tag. The definition appears as a
|
161
|
+
tool tip when a cursor hovers over the acronym. A crucial aid to clear writing,
|
172
162
|
this should be used at least once for each acronym in documents where they appear.
|
173
163
|
|
174
|
-
To quickly define an acronym in Textile, place the full text in (parentheses)
|
164
|
+
To quickly define an acronym in Textile, place the full text in (parentheses)
|
175
165
|
immediately following the acronym.
|
176
166
|
|
177
167
|
Example:
|
@@ -194,5 +184,3 @@ Styles are applied with curly braces.
|
|
194
184
|
|
195
185
|
table{border:1px solid black}.
|
196
186
|
{background:#ddd;color:red}. |a|red|row|
|
197
|
-
|
198
|
-
|
@@ -111,7 +111,11 @@ module RedCloth::Formatters::HTML
|
|
111
111
|
end
|
112
112
|
|
113
113
|
def link(opts)
|
114
|
-
|
114
|
+
if (filter_html || sanitize_html) && opts[:href] =~ /^\s*javascript:/
|
115
|
+
opts[:name]
|
116
|
+
else
|
117
|
+
"<a href=\"#{escape_attribute opts[:href]}\"#{pba(opts)}>#{opts[:name]}</a>"
|
118
|
+
end
|
115
119
|
end
|
116
120
|
|
117
121
|
def image(opts)
|
@@ -3,7 +3,9 @@ require 'yaml'
|
|
3
3
|
module RedCloth::Formatters::LATEX
|
4
4
|
include RedCloth::Formatters::Base
|
5
5
|
|
6
|
-
|
6
|
+
def self.entities
|
7
|
+
@entities ||= YAML.load(File.read(File.dirname(__FILE__)+'/latex_entities.yml'))
|
8
|
+
end
|
7
9
|
|
8
10
|
module Settings
|
9
11
|
# Maps CSS style names to latex formatting options
|
@@ -275,8 +277,8 @@ module RedCloth::Formatters::LATEX
|
|
275
277
|
# TODO: what do we do with (unknown) unicode entities ?
|
276
278
|
#
|
277
279
|
def entity(opts)
|
278
|
-
text = opts[:text][0..0] == '#' ? opts[:text][1..-1] : opts[:text]
|
279
|
-
|
280
|
+
text = opts[:text][0..0] == '#' ? opts[:text][1..-1] : opts[:text]
|
281
|
+
RedCloth::Formatters::LATEX.entities[text]
|
280
282
|
end
|
281
283
|
|
282
284
|
def dim(opts)
|
data/lib/redcloth/version.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
module RedCloth
|
2
2
|
module VERSION
|
3
3
|
MAJOR = 4
|
4
|
-
MINOR =
|
5
|
-
TINY =
|
6
|
-
RELEASE_CANDIDATE =
|
4
|
+
MINOR = 3
|
5
|
+
TINY = 0
|
6
|
+
# RELEASE_CANDIDATE = 0
|
7
7
|
|
8
|
-
STRING = [MAJOR, MINOR, TINY
|
9
|
-
TAG = "REL_#{[MAJOR, MINOR, TINY
|
10
|
-
FULL_VERSION = "#{[MAJOR, MINOR, TINY
|
8
|
+
STRING = [MAJOR, MINOR, TINY].compact.join('.')
|
9
|
+
TAG = "REL_#{[MAJOR, MINOR, TINY].compact.join('_')}".upcase.gsub(/\.|-/, '_')
|
10
|
+
FULL_VERSION = "#{[MAJOR, MINOR, TINY].compact.join('.')}"
|
11
11
|
|
12
12
|
class << self
|
13
13
|
def to_s
|
data/redcloth.gemspec
CHANGED
@@ -6,7 +6,7 @@ require "redcloth/version"
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "RedCloth"
|
8
8
|
s.version = RedCloth::VERSION.to_s
|
9
|
-
s.authors = ["Jason Garber", "
|
9
|
+
s.authors = ["Jason Garber", "Joshua Siler", "Ola Bini"]
|
10
10
|
s.description = "Textile parser for Ruby."
|
11
11
|
s.summary = RedCloth::SUMMARY
|
12
12
|
s.email = "redcloth-upwards@rubyforge.org"
|
@@ -23,30 +23,19 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.rdoc_options = ["--charset=UTF-8", "--line-numbers", "--inline-source", "--title", "RedCloth", "--main", "README.rdoc"]
|
24
24
|
s.require_paths += ["lib/case_sensitive_require", "ext"]
|
25
25
|
|
26
|
-
s.files -= Dir['lib/redcloth.jar']
|
27
|
-
s.files -= Dir['lib/**/*.dll']
|
28
26
|
s.files -= Dir['lib/**/*.bundle']
|
29
27
|
s.files -= Dir['lib/**/*.so']
|
28
|
+
|
29
|
+
s.platform = 'ruby'
|
30
30
|
|
31
|
-
s.
|
32
|
-
|
33
|
-
|
34
|
-
s.files += ['lib/redcloth_scan.jar']
|
35
|
-
else # MRI or Rubinius
|
36
|
-
s.files += %w[attributes inline scan].map {|f| "ext/redcloth_scan/redcloth_#{f}.c"}
|
37
|
-
s.files += ["ext/redcloth_scan/redcloth.h"]
|
38
|
-
s.extensions = Dir['ext/**/extconf.rb']
|
39
|
-
end
|
31
|
+
s.files += %w[attributes inline scan].map {|f| "ext/redcloth_scan/redcloth_#{f}.c"}
|
32
|
+
s.files += ["ext/redcloth_scan/redcloth.h"]
|
33
|
+
s.extensions = Dir['ext/**/extconf.rb']
|
40
34
|
|
41
|
-
s.add_development_dependency('bundler', '
|
42
|
-
s.add_development_dependency('rake', '~> 0.
|
35
|
+
s.add_development_dependency('bundler', '> 1.3.4')
|
36
|
+
s.add_development_dependency('rake', '~> 10.0.3')
|
43
37
|
s.add_development_dependency('rspec', '~> 2.4')
|
44
38
|
s.add_development_dependency('diff-lcs', '~> 1.1.2')
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
# not installed even though they're not required.
|
49
|
-
# See https://github.com/carlhuda/bundler/issues/issue/1021
|
50
|
-
s.add_development_dependency('rvm', '~> 1.2.6')
|
51
|
-
s.add_development_dependency('rake-compiler', '~> 0.7.1')
|
52
|
-
end
|
39
|
+
|
40
|
+
s.license = "MIT"
|
41
|
+
end
|
data/spec/parser_spec.rb
CHANGED
@@ -6,13 +6,13 @@ describe RedCloth do
|
|
6
6
|
it "should accept options" do
|
7
7
|
lambda {
|
8
8
|
RedCloth.new("test", [:hard_breaks])
|
9
|
-
}.should_not raise_error
|
9
|
+
}.should_not raise_error
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
it "should have a VERSION" do
|
14
|
-
RedCloth.const_defined?("VERSION").should
|
15
|
-
RedCloth::VERSION.const_defined?("STRING").should
|
14
|
+
RedCloth.const_defined?("VERSION").should be_truthy
|
15
|
+
RedCloth::VERSION.const_defined?("STRING").should be_truthy
|
16
16
|
end
|
17
17
|
|
18
18
|
it "should show the version as a string" do
|
@@ -21,7 +21,7 @@ describe RedCloth do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
it "should have EXTENSION_LANGUAGE" do
|
24
|
-
RedCloth.const_defined?("EXTENSION_LANGUAGE").should
|
24
|
+
RedCloth.const_defined?("EXTENSION_LANGUAGE").should be_truthy
|
25
25
|
RedCloth::EXTENSION_LANGUAGE.should_not be_empty
|
26
26
|
RedCloth::DESCRIPTION.should include(RedCloth::EXTENSION_LANGUAGE)
|
27
27
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-6684
|
2
|
+
|
3
|
+
require 'redcloth'
|
4
|
+
|
5
|
+
describe 'CVE-2012-6684' do
|
6
|
+
|
7
|
+
it 'should not let javascript links pass through' do
|
8
|
+
# PoC from http://co3k.org/blog/redcloth-unfixed-xss-en
|
9
|
+
output = RedCloth.new('["clickme":javascript:alert(%27XSS%27)]', [:filter_html, :filter_styles, :filter_classes, :filter_ids]).to_html
|
10
|
+
expect(output).to_not match(/href=.javascript:alert/)
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
end
|
data/tasks/compile.rake
CHANGED
@@ -12,19 +12,16 @@ CLOBBER.include [
|
|
12
12
|
]
|
13
13
|
|
14
14
|
# Load the Gem specification for the current platform (Ruby or JRuby).
|
15
|
-
def gemspec(platform =
|
15
|
+
def gemspec(platform = 'ruby')
|
16
16
|
Gem::Specification.load(File.expand_path('../../redcloth.gemspec', __FILE__))
|
17
17
|
end
|
18
18
|
|
19
19
|
require 'rake/extensiontask'
|
20
|
-
require 'rake/javaextensiontask'
|
21
20
|
require File.dirname(__FILE__) + '/ragel_extension_task'
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
extconf = "ext/redcloth_scan/extconf.rb"
|
27
|
-
file extconf do
|
22
|
+
|
23
|
+
extconf = "ext/redcloth_scan/extconf.rb"
|
24
|
+
file extconf do
|
28
25
|
FileUtils.mkdir(File.dirname(extconf)) unless File.directory?(File.dirname(extconf))
|
29
26
|
File.open(extconf, "w") do |io|
|
30
27
|
io.write(<<-EOF)
|
@@ -36,12 +33,7 @@ have_library("c", "main")
|
|
36
33
|
create_makefile("redcloth_scan")
|
37
34
|
EOF
|
38
35
|
end
|
39
|
-
end
|
40
|
-
|
41
|
-
Rake::RagelExtensionTask.new("redcloth_scan", gemspec) do |ext|
|
42
|
-
if ENV['RUBY_CC_VERSION']
|
43
|
-
ext.cross_compile = true
|
44
|
-
ext.cross_platform = ['i386-mingw32', 'i386-mswin32-60']
|
45
|
-
end
|
46
|
-
end
|
47
36
|
end
|
37
|
+
|
38
|
+
Rake::RagelExtensionTask.new("redcloth_scan", gemspec) do |ext|
|
39
|
+
end
|
@@ -42,17 +42,14 @@ module Rake
|
|
42
42
|
{
|
43
43
|
'scan' => {
|
44
44
|
'c' => "#{@ext_dir}/redcloth_scan.c",
|
45
|
-
'java' => "#{@ext_dir}/RedclothScanService.java",
|
46
45
|
'rb' => "#{@ext_dir}/redcloth_scan.rb"
|
47
46
|
},
|
48
47
|
'inline' => {
|
49
48
|
'c' => "#{@ext_dir}/redcloth_inline.c",
|
50
|
-
'java' => "#{@ext_dir}/RedclothInline.java",
|
51
49
|
'rb' => "#{@ext_dir}/redcloth_inline.rb"
|
52
50
|
},
|
53
51
|
'attributes' => {
|
54
52
|
'c' => "#{@ext_dir}/redcloth_attributes.c",
|
55
|
-
'java' => "#{@ext_dir}/RedclothAttributes.java",
|
56
53
|
'rb' => "#{@ext_dir}/redcloth_attributes.rb"
|
57
54
|
}
|
58
55
|
}[machine][lang]
|
@@ -88,7 +85,6 @@ module Rake
|
|
88
85
|
def host_language_flag
|
89
86
|
{
|
90
87
|
'c' => 'C',
|
91
|
-
'java' => 'J',
|
92
88
|
'rb' => 'R'
|
93
89
|
}[lang]
|
94
90
|
end
|
@@ -96,7 +92,6 @@ module Rake
|
|
96
92
|
def preferred_code_style
|
97
93
|
{
|
98
94
|
'c' => 'T0',
|
99
|
-
'java' => nil,
|
100
95
|
'rb' => 'F1'
|
101
96
|
}[lang]
|
102
97
|
end
|
@@ -117,11 +112,5 @@ module Rake
|
|
117
112
|
"c"
|
118
113
|
end
|
119
114
|
end
|
120
|
-
|
121
|
-
include RagelGenerationTasks
|
122
|
-
|
123
|
-
def lang
|
124
|
-
"java"
|
125
|
-
end
|
126
|
-
end
|
115
|
+
|
127
116
|
end
|
data/tasks/release.rake
CHANGED
@@ -1,15 +1,10 @@
|
|
1
1
|
namespace :release do
|
2
|
-
desc '
|
3
|
-
task :
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
Dir['*.gem'].select {|g| g =~ /\w+-[^-]+-\w+.gem/ }.each do |gem_file|
|
9
|
-
sh("gem push #{gem_file}")
|
10
|
-
end
|
11
|
-
end
|
2
|
+
desc 'Push all gems to rubygems.org'
|
3
|
+
task :gem do
|
4
|
+
puts "Did you git tag and git push the tag for this release yet?"
|
5
|
+
sh("rm *.gem")
|
6
|
+
sh("gem build redcloth.gemspec")
|
7
|
+
sh("gem push RedCloth-*.gem")
|
12
8
|
end
|
13
9
|
end
|
14
10
|
|
15
|
-
Rake::Task['release'].prerequisites.unshift('build')
|
data/tasks/rvm.rake
CHANGED
@@ -1,12 +1,14 @@
|
|
1
|
+
require 'rvm'
|
2
|
+
|
1
3
|
namespace :rvm do
|
2
4
|
|
3
|
-
RVM_RUBIES = ['
|
5
|
+
RVM_RUBIES = ['ruby-1.8.6-p398', 'ruby-1.9.1-p243', 'ruby-1.9.2-p136', 'ruby-2.2.3p173']
|
4
6
|
RVM_GEMSET_NAME = 'redcloth'
|
5
7
|
|
6
8
|
task :setup do
|
7
9
|
unless @rvm_setup
|
8
10
|
rvm_lib_path = "#{`echo $rvm_path`.strip}/lib"
|
9
|
-
|
11
|
+
#$LOAD_PATH.unshift(rvm_lib_path) unless $LOAD_PATH.include?(rvm_lib_path)
|
10
12
|
require 'rvm'
|
11
13
|
require 'tmpdir'
|
12
14
|
@rvm_setup = true
|
@@ -21,7 +23,7 @@ namespace :rvm do
|
|
21
23
|
# gets confused when locked to java and running ruby and vice-versa.
|
22
24
|
STDERR << RVM.run('bundle update').stderr
|
23
25
|
|
24
|
-
result = RVM.
|
26
|
+
result = RVM.run("rake test")
|
25
27
|
STDOUT << result.stdout
|
26
28
|
STDERR << result.stderr
|
27
29
|
end
|
metadata
CHANGED
@@ -1,140 +1,100 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: RedCloth
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 4
|
8
|
-
- 2
|
9
|
-
- 9
|
10
|
-
version: 4.2.9
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 4.3.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Jason Garber
|
14
|
-
-
|
8
|
+
- Joshua Siler
|
15
9
|
- Ola Bini
|
16
10
|
autorequire:
|
17
11
|
bindir: bin
|
18
12
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
23
16
|
name: bundler
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
hash: 3
|
31
|
-
segments:
|
32
|
-
- 1
|
33
|
-
- 0
|
34
|
-
- 10
|
35
|
-
version: 1.0.10
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ">"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.3.4
|
36
22
|
type: :development
|
37
|
-
version_requirements: *id001
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: rake
|
40
23
|
prerelease: false
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ">"
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: 1.3.4
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: rake
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - "~>"
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 10.0.3
|
52
36
|
type: :development
|
53
|
-
version_requirements: *id002
|
54
|
-
- !ruby/object:Gem::Dependency
|
55
|
-
name: rspec
|
56
37
|
prerelease: false
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 10.0.3
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: rspec
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '2.4'
|
67
50
|
type: :development
|
68
|
-
version_requirements: *id003
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: diff-lcs
|
71
51
|
prerelease: false
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '2.4'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: diff-lcs
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
82
63
|
version: 1.1.2
|
83
64
|
type: :development
|
84
|
-
version_requirements: *id004
|
85
|
-
- !ruby/object:Gem::Dependency
|
86
|
-
name: rvm
|
87
|
-
prerelease: false
|
88
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ~>
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
hash: 19
|
94
|
-
segments:
|
95
|
-
- 1
|
96
|
-
- 2
|
97
|
-
- 6
|
98
|
-
version: 1.2.6
|
99
|
-
type: :development
|
100
|
-
version_requirements: *id005
|
101
|
-
- !ruby/object:Gem::Dependency
|
102
|
-
name: rake-compiler
|
103
65
|
prerelease: false
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
hash: 1
|
110
|
-
segments:
|
111
|
-
- 0
|
112
|
-
- 7
|
113
|
-
- 1
|
114
|
-
version: 0.7.1
|
115
|
-
type: :development
|
116
|
-
version_requirements: *id006
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - "~>"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 1.1.2
|
117
71
|
description: Textile parser for Ruby.
|
118
72
|
email: redcloth-upwards@rubyforge.org
|
119
|
-
executables:
|
73
|
+
executables:
|
120
74
|
- redcloth
|
121
|
-
extensions:
|
75
|
+
extensions:
|
122
76
|
- ext/redcloth_scan/extconf.rb
|
123
|
-
extra_rdoc_files:
|
77
|
+
extra_rdoc_files:
|
124
78
|
- README.rdoc
|
125
79
|
- COPYING
|
126
80
|
- CHANGELOG
|
127
|
-
files:
|
128
|
-
- .gemtest
|
129
|
-
- .rspec
|
81
|
+
files:
|
82
|
+
- ".gemtest"
|
83
|
+
- ".rspec"
|
130
84
|
- CHANGELOG
|
131
85
|
- COPYING
|
132
86
|
- Gemfile
|
133
87
|
- README.rdoc
|
134
88
|
- Rakefile
|
135
|
-
- doc/textile_reference.html
|
136
89
|
- bin/redcloth
|
90
|
+
- doc/textile_reference.html
|
91
|
+
- ext/redcloth_scan/extconf.rb
|
92
|
+
- ext/redcloth_scan/redcloth.h
|
93
|
+
- ext/redcloth_scan/redcloth_attributes.c
|
94
|
+
- ext/redcloth_scan/redcloth_inline.c
|
95
|
+
- ext/redcloth_scan/redcloth_scan.c
|
137
96
|
- lib/case_sensitive_require/RedCloth.rb
|
97
|
+
- lib/redcloth.rb
|
138
98
|
- lib/redcloth/erb_extension.rb
|
139
99
|
- lib/redcloth/formatters/base.rb
|
140
100
|
- lib/redcloth/formatters/html.rb
|
@@ -142,8 +102,6 @@ files:
|
|
142
102
|
- lib/redcloth/formatters/latex_entities.yml
|
143
103
|
- lib/redcloth/textile_doc.rb
|
144
104
|
- lib/redcloth/version.rb
|
145
|
-
- lib/redcloth.rb
|
146
|
-
- lib/redcloth_scan.jar
|
147
105
|
- lib/tasks/pureruby.rake
|
148
106
|
- redcloth.gemspec
|
149
107
|
- spec/benchmark_spec.rb
|
@@ -177,89 +135,77 @@ files:
|
|
177
135
|
- spec/formatters/sanitized_html_spec.rb
|
178
136
|
- spec/formatters/style_filtered_html_spec.rb
|
179
137
|
- spec/parser_spec.rb
|
138
|
+
- spec/security/CVE-2012-6684_spec.rb
|
180
139
|
- spec/spec_helper.rb
|
181
140
|
- tasks/compile.rake
|
182
|
-
- tasks/gems.rake
|
183
141
|
- tasks/ragel_extension_task.rb
|
184
142
|
- tasks/release.rake
|
185
143
|
- tasks/rspec.rake
|
186
144
|
- tasks/rvm.rake
|
187
|
-
- ext/redcloth_scan/redcloth_attributes.c
|
188
|
-
- ext/redcloth_scan/redcloth_inline.c
|
189
|
-
- ext/redcloth_scan/redcloth_scan.c
|
190
|
-
- ext/redcloth_scan/redcloth.h
|
191
|
-
- ext/redcloth_scan/extconf.rb
|
192
145
|
homepage: http://redcloth.org
|
193
|
-
licenses:
|
194
|
-
|
146
|
+
licenses:
|
147
|
+
- MIT
|
148
|
+
metadata: {}
|
195
149
|
post_install_message:
|
196
|
-
rdoc_options:
|
197
|
-
- --charset=UTF-8
|
198
|
-
- --line-numbers
|
199
|
-
- --inline-source
|
200
|
-
- --title
|
150
|
+
rdoc_options:
|
151
|
+
- "--charset=UTF-8"
|
152
|
+
- "--line-numbers"
|
153
|
+
- "--inline-source"
|
154
|
+
- "--title"
|
201
155
|
- RedCloth
|
202
|
-
- --main
|
156
|
+
- "--main"
|
203
157
|
- README.rdoc
|
204
|
-
require_paths:
|
158
|
+
require_paths:
|
205
159
|
- lib
|
206
160
|
- lib/case_sensitive_require
|
207
161
|
- ext
|
208
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
209
|
-
|
210
|
-
requirements:
|
162
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
211
164
|
- - ">="
|
212
|
-
- !ruby/object:Gem::Version
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
version: "0"
|
217
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
218
|
-
none: false
|
219
|
-
requirements:
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
220
169
|
- - ">="
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
|
223
|
-
segments:
|
224
|
-
- 0
|
225
|
-
version: "0"
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '0'
|
226
172
|
requirements: []
|
227
|
-
|
228
173
|
rubyforge_project: redcloth
|
229
|
-
rubygems_version:
|
174
|
+
rubygems_version: 2.4.8
|
230
175
|
signing_key:
|
231
|
-
specification_version:
|
232
|
-
summary: RedCloth-4.
|
233
|
-
test_files:
|
176
|
+
specification_version: 4
|
177
|
+
summary: RedCloth-4.3.0
|
178
|
+
test_files:
|
234
179
|
- spec/benchmark_spec.rb
|
180
|
+
- spec/parser_spec.rb
|
181
|
+
- spec/extension_spec.rb
|
235
182
|
- spec/custom_tags_spec.rb
|
183
|
+
- spec/spec_helper.rb
|
236
184
|
- spec/erb_spec.rb
|
237
|
-
- spec/
|
238
|
-
- spec/fixtures/
|
185
|
+
- spec/fixtures/lists.yml
|
186
|
+
- spec/fixtures/links.yml
|
239
187
|
- spec/fixtures/code.yml
|
240
|
-
- spec/fixtures/
|
241
|
-
- spec/fixtures/
|
188
|
+
- spec/fixtures/textism.yml
|
189
|
+
- spec/fixtures/basic.yml
|
242
190
|
- spec/fixtures/filter_html.yml
|
191
|
+
- spec/fixtures/table.yml
|
192
|
+
- spec/fixtures/instiki.yml
|
243
193
|
- spec/fixtures/filter_pba.yml
|
244
|
-
- spec/fixtures/
|
194
|
+
- spec/fixtures/threshold.yml
|
245
195
|
- spec/fixtures/images.yml
|
246
|
-
- spec/fixtures/
|
247
|
-
- spec/fixtures/links.yml
|
248
|
-
- spec/fixtures/lists.yml
|
249
|
-
- spec/fixtures/poignant.yml
|
196
|
+
- spec/fixtures/definitions.yml
|
250
197
|
- spec/fixtures/sanitize_html.yml
|
251
|
-
- spec/fixtures/
|
252
|
-
- spec/fixtures/
|
253
|
-
- spec/fixtures/
|
254
|
-
- spec/formatters/
|
255
|
-
- spec/formatters/filtered_html_spec.rb
|
198
|
+
- spec/fixtures/poignant.yml
|
199
|
+
- spec/fixtures/extra_whitespace.yml
|
200
|
+
- spec/fixtures/html.yml
|
201
|
+
- spec/formatters/id_filtered_html_spec.rb
|
256
202
|
- spec/formatters/html_no_breaks_spec.rb
|
257
203
|
- spec/formatters/html_spec.rb
|
258
|
-
- spec/formatters/id_filtered_html_spec.rb
|
259
204
|
- spec/formatters/latex_spec.rb
|
260
|
-
- spec/formatters/
|
205
|
+
- spec/formatters/style_filtered_html_spec.rb
|
206
|
+
- spec/formatters/class_filtered_html_spec.rb
|
261
207
|
- spec/formatters/no_span_caps_html_spec.rb
|
208
|
+
- spec/formatters/filtered_html_spec.rb
|
209
|
+
- spec/formatters/lite_mode_html_spec.rb
|
262
210
|
- spec/formatters/sanitized_html_spec.rb
|
263
|
-
- spec/
|
264
|
-
- spec/parser_spec.rb
|
265
|
-
- spec/spec_helper.rb
|
211
|
+
- spec/security/CVE-2012-6684_spec.rb
|
data/lib/redcloth_scan.jar
DELETED
Binary file
|
data/tasks/gems.rake
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
Rake::Task['build'].prerequisites.unshift('compile')
|
2
|
-
|
3
|
-
namespace :build do
|
4
|
-
desc "Generate Windows binary gems"
|
5
|
-
task :win do
|
6
|
-
unless File.directory?(File.expand_path('~/.rake-compiler'))
|
7
|
-
STDERR.puts <<-EOM
|
8
|
-
|
9
|
-
You must install Windows rubies to ~/.rake-compiler with:
|
10
|
-
|
11
|
-
rake-compiler cross-ruby VERSION=1.8.6-p398
|
12
|
-
# (Later 1.9.1 patch levels don't compile on mingw)
|
13
|
-
rake-compiler cross-ruby VERSION=1.9.1-p243
|
14
|
-
EOM
|
15
|
-
exit(1)
|
16
|
-
end
|
17
|
-
# rvm and mingw ruby versions have to match to avoid errors
|
18
|
-
sh "rvm ruby-1.8.6-p398@redcloth rake cross compile RUBY_CC_VERSION=1.8.6"
|
19
|
-
sh "rvm ruby-1.9.1-p243@redcloth rake cross compile RUBY_CC_VERSION=1.9.1"
|
20
|
-
# This will copy the .so files to the proper place
|
21
|
-
sh "rake cross native gem RUBY_CC_VERSION=1.8.6:1.9.1"
|
22
|
-
end
|
23
|
-
|
24
|
-
desc 'Generate JRuby binary gem'
|
25
|
-
task :jruby do
|
26
|
-
sh "rvm jruby@redcloth rake java gem"
|
27
|
-
end
|
28
|
-
|
29
|
-
desc "Build ruby, windows, and jruby gems into the pkg directory"
|
30
|
-
task :all => [
|
31
|
-
:clobber,
|
32
|
-
"rvm:spec",
|
33
|
-
:jruby,
|
34
|
-
:win,
|
35
|
-
:build
|
36
|
-
]
|
37
|
-
end
|