RedCloth 4.2.4.pre3 → 4.2.4
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/.gemtest +0 -0
- data/.gitignore +1 -0
- data/CHANGELOG +4 -1
- data/COPYING +1 -1
- data/Gemfile +5 -0
- data/README +11 -9
- data/Rakefile +8 -2
- data/lib/redcloth/formatters/html.rb +2 -2
- data/lib/redcloth/version.rb +2 -2
- data/redcloth.gemspec +2 -3
- data/spec/fixtures/html.yml +9 -1
- data/spec/parser_spec.rb +7 -0
- data/tasks/compile.rake +3 -3
- data/tasks/gems.rake +1 -2
- data/tasks/rspec.rake +4 -2
- data/tasks/rvm.rake +42 -7
- metadata +20 -56
- data/.rvmrc +0 -1
- data/Gemfile.lock +0 -33
- data/Manifest +0 -52
- data/setup.rb +0 -1585
data/.gemtest
ADDED
File without changes
|
data/.gitignore
CHANGED
data/CHANGELOG
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
===
|
1
|
+
=== 4.2.4 / February 7, 2011
|
2
2
|
|
3
|
+
* Add .gemtest to opt-in to rubygems-test program (gem install rubygems-test to participate)
|
4
|
+
* Allow attributes to be set on hr and br tags [Jesse Stormier]
|
5
|
+
* Fix dangling <li> [Stephen Bannasch]
|
3
6
|
* Switch to bundler and rake-compiler for gem management/compilation
|
4
7
|
* Fix invalid YAML for Ruby 1.9.2 [Aaron Patterson]
|
5
8
|
|
data/COPYING
CHANGED
data/Gemfile
CHANGED
data/README
CHANGED
@@ -27,17 +27,17 @@ compiled from C sources automatically when you install the gem on the ruby
|
|
27
27
|
platform. Precompiled binary gems are provided for JRuby and Win32 platforms.
|
28
28
|
|
29
29
|
RedCloth can be compiled with <tt>rake compile</tt>. Ragel 6.3 or greater is
|
30
|
-
|
31
|
-
simply use RedCloth.
|
30
|
+
required. Again, Ragel is NOT needed to simply use RedCloth.
|
32
31
|
|
33
32
|
=== Supported platforms
|
34
33
|
|
35
|
-
By default, the rake compile task builds a native C
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
indicates in which language your
|
34
|
+
By default, the rake compile task builds a native C extension (MRI 1.8 or 1.9)
|
35
|
+
or Java extension (JRuby 1.3). A pure Ruby version can also be generated, but
|
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
|
+
|
39
|
+
The RedCloth::EXTENSION_LANGUAGE constant indicates in which language your
|
40
|
+
copy of RedCloth is compiled.
|
41
41
|
|
42
42
|
=== Compiling gems
|
43
43
|
|
@@ -47,6 +47,8 @@ takes care of compiling and packaging all gems.
|
|
47
47
|
|
48
48
|
# gem install bundler
|
49
49
|
# bundle install
|
50
|
+
# rake-compiler cross-ruby VERSION=1.8.6-p398
|
51
|
+
# rake-compiler cross-ruby VERSION=1.9.1-p243
|
50
52
|
# rake build:all
|
51
53
|
|
52
54
|
== Bugs
|
@@ -55,7 +57,7 @@ Please submit bugs to http://jgarber.lighthouseapp.com/projects/13054-redcloth/o
|
|
55
57
|
|
56
58
|
== Using RedCloth
|
57
59
|
|
58
|
-
RedCloth is simply an extension of the String class
|
60
|
+
RedCloth is simply an extension of the String class that can handle
|
59
61
|
Textile formatting. Use it like a String and output HTML with its
|
60
62
|
RedCloth#to_html method.
|
61
63
|
|
data/Rakefile
CHANGED
@@ -2,9 +2,15 @@
|
|
2
2
|
require 'rubygems'
|
3
3
|
require 'bundler'
|
4
4
|
Bundler.setup
|
5
|
-
Bundler::GemHelper.install_tasks
|
6
5
|
ENV['RUBYOPT'] = nil # Necessary to prevent Bundler from *&^%$#ing up rake-compiler.
|
7
6
|
|
8
7
|
require 'rake/clean'
|
9
8
|
|
10
|
-
|
9
|
+
if File.directory? "ragel"
|
10
|
+
Bundler::GemHelper.install_tasks
|
11
|
+
Bundler.setup(:development)
|
12
|
+
Dir['tasks/**/*.rake'].each { |rake| load File.expand_path(rake) }
|
13
|
+
else
|
14
|
+
# Omit generation/compile tasks. In a gem package we only need testing tasks.
|
15
|
+
load 'tasks/rspec.rake'
|
16
|
+
end
|
@@ -15,7 +15,7 @@ module RedCloth::Formatters::HTML
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def hr(opts)
|
18
|
-
"<hr />\n"
|
18
|
+
"<hr#{pba(opts)} />\n"
|
19
19
|
end
|
20
20
|
|
21
21
|
def acronym(opts)
|
@@ -205,7 +205,7 @@ module RedCloth::Formatters::HTML
|
|
205
205
|
if hard_breaks == false
|
206
206
|
"\n"
|
207
207
|
else
|
208
|
-
"<br />\n"
|
208
|
+
"<br#{pba(opts)} />\n"
|
209
209
|
end
|
210
210
|
end
|
211
211
|
|
data/lib/redcloth/version.rb
CHANGED
@@ -3,9 +3,9 @@ module RedCloth
|
|
3
3
|
MAJOR = 4
|
4
4
|
MINOR = 2
|
5
5
|
TINY = 4
|
6
|
-
RELEASE_CANDIDATE =
|
6
|
+
RELEASE_CANDIDATE = nil
|
7
7
|
|
8
|
-
STRING = [MAJOR, MINOR, TINY, RELEASE_CANDIDATE].join('.')
|
8
|
+
STRING = [MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('.')
|
9
9
|
TAG = "REL_#{[MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('_')}".upcase.gsub(/\.|-/, '_')
|
10
10
|
FULL_VERSION = "#{[MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('.')}"
|
11
11
|
|
data/redcloth.gemspec
CHANGED
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.rdoc_options = ["--charset=UTF-8"]
|
24
24
|
s.require_path = "lib"
|
25
25
|
|
26
|
+
s.files -= ['.rvmrc']
|
26
27
|
s.files -= Dir['ext/**/*']
|
27
28
|
s.files -= Dir['ragel/*']
|
28
29
|
s.files -= Dir['lib/redcloth.jar']
|
@@ -38,11 +39,9 @@ Gem::Specification.new do |s|
|
|
38
39
|
s.files += %w[attributes inline scan].map {|f| "ext/redcloth_scan/redcloth_#{f}.c"}
|
39
40
|
s.files += ["ext/redcloth_scan/redcloth.h"]
|
40
41
|
s.extensions = Dir['ext/**/extconf.rb']
|
41
|
-
s.add_development_dependency('rvm')
|
42
42
|
end
|
43
43
|
|
44
44
|
s.add_development_dependency('rake', '~> 0.8.7')
|
45
|
-
s.add_development_dependency('rspec', '~> 2.
|
45
|
+
s.add_development_dependency('rspec', '~> 2.4')
|
46
46
|
s.add_development_dependency('diff-lcs')
|
47
|
-
s.add_development_dependency('rake-compiler', '~> 0.7.1')
|
48
47
|
end
|
data/spec/fixtures/html.yml
CHANGED
@@ -337,4 +337,12 @@ name: notextile beginning the line
|
|
337
337
|
in: |-
|
338
338
|
<notextile><a href="http://a.com">Sir Bobby Robson</a></notextile>, is a famous footballer
|
339
339
|
html: |-
|
340
|
-
<p><a href="http://a.com">Sir Bobby Robson</a>, is a famous footballer</p>
|
340
|
+
<p><a href="http://a.com">Sir Bobby Robson</a>, is a famous footballer</p>
|
341
|
+
---
|
342
|
+
name: br tag with class
|
343
|
+
in: "br(clear). "
|
344
|
+
html: "<br class=\"clear\" />"
|
345
|
+
---
|
346
|
+
name: hr tag with class
|
347
|
+
in: "hr(clear). "
|
348
|
+
html: "<hr class=\"clear\" />"
|
data/spec/parser_spec.rb
CHANGED
@@ -75,6 +75,13 @@ describe RedCloth do
|
|
75
75
|
html = "<p>This is a paragraph</p>\n<p>This is a<br />\nline break.</p>\n<div>\n<p>test</p>\n</div>"
|
76
76
|
RedCloth.new(input).to_html.should == html
|
77
77
|
end
|
78
|
+
|
79
|
+
it "should not add spurious li tags to the end of markup" do
|
80
|
+
input = "* one\n* two\n* three \n\n"
|
81
|
+
failing_input = "* one\n* two\n* three \n\n\n"
|
82
|
+
RedCloth.new(input).to_html.should_not match(/<li>$/)
|
83
|
+
RedCloth.new(failing_input).to_html.should_not match(/<li>$/)
|
84
|
+
end
|
78
85
|
|
79
86
|
if RUBY_VERSION > "1.9.0"
|
80
87
|
it "should preserve character encoding" do
|
data/tasks/compile.rake
CHANGED
@@ -6,8 +6,8 @@ CLEAN.include [
|
|
6
6
|
]
|
7
7
|
CLOBBER.include [
|
8
8
|
'pkg',
|
9
|
-
'**/*.{c}',
|
10
|
-
'lib
|
9
|
+
'**/*.{c,java}',
|
10
|
+
'lib/**/*.{bundle,so,o,obj,pdb,lib,def,exp,jar}',
|
11
11
|
'lib/redcloth_scan.rb',
|
12
12
|
]
|
13
13
|
|
@@ -30,7 +30,7 @@ else
|
|
30
30
|
io.write(<<-EOF)
|
31
31
|
require 'mkmf'
|
32
32
|
CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
|
33
|
-
$CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
|
33
|
+
$CFLAGS << ' -O0 -Wall -Werror' if CONFIG['CC'] =~ /gcc/
|
34
34
|
dir_config("redcloth_scan")
|
35
35
|
have_library("c", "main")
|
36
36
|
create_makefile("redcloth_scan")
|
data/tasks/gems.rake
CHANGED
data/tasks/rspec.rake
CHANGED
@@ -7,5 +7,7 @@ RSpec::Core::RakeTask.new(:rcov) do |t|
|
|
7
7
|
t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/}
|
8
8
|
end
|
9
9
|
|
10
|
-
task :default =>
|
11
|
-
task :spec =>
|
10
|
+
task :default => :spec
|
11
|
+
task :spec => :compile
|
12
|
+
|
13
|
+
RSpec::Core::RakeTask.new(:test) # for rubygems-test
|
data/tasks/rvm.rake
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
namespace :rvm do
|
2
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']
|
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-2010.02']
|
4
4
|
RVM_GEMSET_NAME = 'redcloth'
|
5
5
|
|
6
6
|
task :setup do
|
@@ -13,16 +13,50 @@ namespace :rvm do
|
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
desc "
|
17
|
-
task :
|
18
|
-
|
16
|
+
desc "Runs specs under each rvm ruby"
|
17
|
+
task :spec => :setup do
|
18
|
+
puts rvm_rubies.join(',')
|
19
|
+
rvm_each_rubie do
|
20
|
+
# Make sure all dependencies are installed but ignore Gemfile.lock. It
|
21
|
+
# gets confused when locked to java and running ruby and vice-versa.
|
22
|
+
STDERR << RVM.run('bundle update').stderr
|
23
|
+
|
24
|
+
result = RVM.perform_set_operation(:rake)
|
25
|
+
STDERR << result.stderr
|
26
|
+
end
|
19
27
|
end
|
20
28
|
|
21
|
-
desc "
|
22
|
-
task :
|
23
|
-
puts
|
29
|
+
desc "Show rubies"
|
30
|
+
task :rubies => :setup do
|
31
|
+
puts rvm_rubies.join(",")
|
24
32
|
end
|
25
33
|
|
34
|
+
namespace :install do
|
35
|
+
task :rubies => :setup do
|
36
|
+
installed_rubies = RVM.list_strings
|
37
|
+
RVM_RUBIES.each do |rubie|
|
38
|
+
if installed_rubies.include?(rubie)
|
39
|
+
puts "info: Rubie #{rubie} already installed."
|
40
|
+
else
|
41
|
+
good_msg = "info: Rubie #{rubie} installed."
|
42
|
+
bad_msg = "Failed #{rubie} install! Check RVM logs here: #{RVM.path}/log/#{rubie}"
|
43
|
+
puts "info: Rubie #{rubie} installation inprogress. This could take awhile..."
|
44
|
+
if RVM.install(rubie,{})
|
45
|
+
puts(good_msg)
|
46
|
+
RVM.use(rubie)
|
47
|
+
RVM.perform_set_operation(:gem, 'install', 'bundler')
|
48
|
+
RVM.reset_current!
|
49
|
+
else
|
50
|
+
abort(bad_msg)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
task :remove => :setup do
|
58
|
+
rvm_rubies.each { |rubie| RVM.remove(rubie) }
|
59
|
+
end
|
26
60
|
end
|
27
61
|
|
28
62
|
|
@@ -31,6 +65,7 @@ end
|
|
31
65
|
def rvm_each_rubie
|
32
66
|
rvm_rubies.each do |rubie|
|
33
67
|
RVM.use(rubie)
|
68
|
+
puts "Using #{rubie}"
|
34
69
|
yield
|
35
70
|
end
|
36
71
|
ensure
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RedCloth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 63
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 4
|
8
8
|
- 2
|
9
9
|
- 4
|
10
|
-
|
11
|
-
version: 4.2.4.pre3
|
10
|
+
version: 4.2.4
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Jason Garber
|
@@ -18,27 +17,13 @@ autorequire:
|
|
18
17
|
bindir: bin
|
19
18
|
cert_chain: []
|
20
19
|
|
21
|
-
date:
|
20
|
+
date: 2011-02-07 00:00:00 -06:00
|
22
21
|
default_executable: redcloth
|
23
22
|
dependencies:
|
24
|
-
- !ruby/object:Gem::Dependency
|
25
|
-
name: rvm
|
26
|
-
prerelease: false
|
27
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
|
-
requirements:
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
hash: 3
|
33
|
-
segments:
|
34
|
-
- 0
|
35
|
-
version: "0"
|
36
|
-
type: :development
|
37
|
-
version_requirements: *id001
|
38
23
|
- !ruby/object:Gem::Dependency
|
39
24
|
name: rake
|
40
25
|
prerelease: false
|
41
|
-
requirement: &
|
26
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
42
27
|
none: false
|
43
28
|
requirements:
|
44
29
|
- - ~>
|
@@ -50,26 +35,26 @@ dependencies:
|
|
50
35
|
- 7
|
51
36
|
version: 0.8.7
|
52
37
|
type: :development
|
53
|
-
version_requirements: *
|
38
|
+
version_requirements: *id001
|
54
39
|
- !ruby/object:Gem::Dependency
|
55
40
|
name: rspec
|
56
41
|
prerelease: false
|
57
|
-
requirement: &
|
42
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
58
43
|
none: false
|
59
44
|
requirements:
|
60
45
|
- - ~>
|
61
46
|
- !ruby/object:Gem::Version
|
62
|
-
hash:
|
47
|
+
hash: 11
|
63
48
|
segments:
|
64
49
|
- 2
|
65
|
-
-
|
66
|
-
version: "2.
|
50
|
+
- 4
|
51
|
+
version: "2.4"
|
67
52
|
type: :development
|
68
|
-
version_requirements: *
|
53
|
+
version_requirements: *id002
|
69
54
|
- !ruby/object:Gem::Dependency
|
70
55
|
name: diff-lcs
|
71
56
|
prerelease: false
|
72
|
-
requirement: &
|
57
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
73
58
|
none: false
|
74
59
|
requirements:
|
75
60
|
- - ">="
|
@@ -79,23 +64,7 @@ dependencies:
|
|
79
64
|
- 0
|
80
65
|
version: "0"
|
81
66
|
type: :development
|
82
|
-
version_requirements: *
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rake-compiler
|
85
|
-
prerelease: false
|
86
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
|
-
requirements:
|
89
|
-
- - ~>
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
hash: 1
|
92
|
-
segments:
|
93
|
-
- 0
|
94
|
-
- 7
|
95
|
-
- 1
|
96
|
-
version: 0.7.1
|
97
|
-
type: :development
|
98
|
-
version_requirements: *id005
|
67
|
+
version_requirements: *id003
|
99
68
|
description: Textile parser for Ruby.
|
100
69
|
email: redcloth-upwards@rubyforge.org
|
101
70
|
executables:
|
@@ -108,14 +77,12 @@ extra_rdoc_files:
|
|
108
77
|
- CHANGELOG
|
109
78
|
files:
|
110
79
|
- .bundle/config
|
80
|
+
- .gemtest
|
111
81
|
- .gitignore
|
112
82
|
- .rspec
|
113
|
-
- .rvmrc
|
114
83
|
- CHANGELOG
|
115
84
|
- COPYING
|
116
85
|
- Gemfile
|
117
|
-
- Gemfile.lock
|
118
|
-
- Manifest
|
119
86
|
- README
|
120
87
|
- Rakefile
|
121
88
|
- bin/redcloth
|
@@ -131,7 +98,6 @@ files:
|
|
131
98
|
- lib/redcloth/version.rb
|
132
99
|
- lib/tasks/pureruby.rake
|
133
100
|
- redcloth.gemspec
|
134
|
-
- setup.rb
|
135
101
|
- spec/benchmark_spec.rb
|
136
102
|
- spec/custom_tags_spec.rb
|
137
103
|
- spec/erb_spec.rb
|
@@ -198,20 +164,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
198
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
199
165
|
none: false
|
200
166
|
requirements:
|
201
|
-
- - "
|
167
|
+
- - ">="
|
202
168
|
- !ruby/object:Gem::Version
|
203
|
-
hash:
|
169
|
+
hash: 3
|
204
170
|
segments:
|
205
|
-
-
|
206
|
-
|
207
|
-
- 1
|
208
|
-
version: 1.3.1
|
171
|
+
- 0
|
172
|
+
version: "0"
|
209
173
|
requirements: []
|
210
174
|
|
211
175
|
rubyforge_project: redcloth
|
212
|
-
rubygems_version: 1.
|
176
|
+
rubygems_version: 1.5.0
|
213
177
|
signing_key:
|
214
178
|
specification_version: 3
|
215
|
-
summary: RedCloth-4.2.4
|
179
|
+
summary: RedCloth-4.2.4
|
216
180
|
test_files: []
|
217
181
|
|