RedCloth 4.2.3-x86-mswin32-60 → 4.2.4.pre2-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.

@@ -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
@@ -0,0 +1,11 @@
1
+ require 'rspec/core/rake_task'
2
+
3
+ RSpec::Core::RakeTask.new(:spec)
4
+
5
+ RSpec::Core::RakeTask.new(:rcov) do |t|
6
+ t.rcov = true
7
+ t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/}
8
+ end
9
+
10
+ task :default => [:spec]
11
+ task :spec => [:compile]
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 CHANGED
@@ -1,49 +1,127 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RedCloth
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
4
+ hash: 270495393
5
+ prerelease: true
5
6
  segments:
6
7
  - 4
7
8
  - 2
8
- - 3
9
- version: 4.2.3
9
+ - 4
10
+ - pre2
11
+ version: 4.2.4.pre2
10
12
  platform: x86-mswin32-60
11
13
  authors:
12
14
  - Jason Garber
15
+ - why the lucky stiff
16
+ - Ola Bini
13
17
  autorequire:
14
18
  bindir: bin
15
19
  cert_chain: []
16
20
 
17
- date: 2010-03-01 00:00:00 -05:00
18
- default_executable:
19
- dependencies: []
20
-
21
- description: |-
22
- RedCloth-4.2.3 - Textile parser for Ruby.
23
- http://redcloth.org/
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.
24
100
  email: redcloth-upwards@rubyforge.org
25
101
  executables:
26
102
  - redcloth
27
103
  extensions: []
28
104
 
29
105
  extra_rdoc_files:
30
- - CHANGELOG
31
- - lib/case_sensitive_require/RedCloth.rb
32
- - lib/redcloth/erb_extension.rb
33
- - lib/redcloth/formatters/base.rb
34
- - lib/redcloth/formatters/html.rb
35
- - lib/redcloth/formatters/latex.rb
36
- - lib/redcloth/textile_doc.rb
37
- - lib/redcloth/version.rb
38
- - lib/redcloth.rb
106
+ - COPYING
39
107
  - README
108
+ - CHANGELOG
40
109
  files:
41
- - bin/redcloth
110
+ - .bundle/config
111
+ - .gitignore
112
+ - .rspec
113
+ - .rvmrc
42
114
  - CHANGELOG
43
115
  - COPYING
44
- - ext/redcloth_scan/extconf.rb
45
- - ext/redcloth_scan/redcloth.h
116
+ - Gemfile
117
+ - Gemfile.lock
118
+ - Manifest
119
+ - README
120
+ - Rakefile
121
+ - bin/redcloth
122
+ - doc/textile_reference.html
46
123
  - lib/case_sensitive_require/RedCloth.rb
124
+ - lib/redcloth.rb
47
125
  - lib/redcloth/erb_extension.rb
48
126
  - lib/redcloth/formatters/base.rb
49
127
  - lib/redcloth/formatters/html.rb
@@ -51,14 +129,11 @@ files:
51
129
  - lib/redcloth/formatters/latex_entities.yml
52
130
  - lib/redcloth/textile_doc.rb
53
131
  - lib/redcloth/version.rb
54
- - lib/redcloth.rb
55
132
  - lib/tasks/pureruby.rake
56
- - Manifest
57
- - Rakefile
58
- - README
133
+ - redcloth.gemspec
59
134
  - setup.rb
135
+ - spec/benchmark_spec.rb
60
136
  - spec/custom_tags_spec.rb
61
- - spec/differs/inline.rb
62
137
  - spec/erb_spec.rb
63
138
  - spec/extension_spec.rb
64
139
  - spec/fixtures/basic.yml
@@ -88,49 +163,56 @@ files:
88
163
  - spec/formatters/sanitized_html_spec.rb
89
164
  - spec/formatters/style_filtered_html_spec.rb
90
165
  - spec/parser_spec.rb
91
- - spec/spec.opts
92
166
  - spec/spec_helper.rb
93
- - RedCloth.gemspec
94
- - lib/redcloth_scan.so
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
95
181
  has_rdoc: true
96
182
  homepage: http://redcloth.org
97
183
  licenses: []
98
184
 
99
185
  post_install_message:
100
186
  rdoc_options:
101
- - --line-numbers
102
- - --inline-source
103
- - --title
104
- - RedCloth
105
- - --main
106
- - README
187
+ - --charset=UTF-8
107
188
  require_paths:
108
189
  - lib
109
- - ext
110
- - lib/case_sensitive_require
111
190
  required_ruby_version: !ruby/object:Gem::Requirement
191
+ none: false
112
192
  requirements:
113
193
  - - ">="
114
194
  - !ruby/object:Gem::Version
195
+ hash: 3
115
196
  segments:
116
- - 1
117
- - 8
118
- - 4
119
- version: 1.8.4
197
+ - 0
198
+ version: "0"
120
199
  required_rubygems_version: !ruby/object:Gem::Requirement
200
+ none: false
121
201
  requirements:
122
- - - ">="
202
+ - - ">"
123
203
  - !ruby/object:Gem::Version
204
+ hash: 25
124
205
  segments:
125
206
  - 1
126
- - 2
127
- version: "1.2"
207
+ - 3
208
+ - 1
209
+ version: 1.3.1
128
210
  requirements: []
129
211
 
130
212
  rubyforge_project: redcloth
131
- rubygems_version: 1.3.6
213
+ rubygems_version: 1.3.7
132
214
  signing_key:
133
215
  specification_version: 3
134
- summary: RedCloth-4.2.3 - Textile parser for Ruby. http://redcloth.org/
216
+ summary: RedCloth-4.2.4.pre2
135
217
  test_files: []
136
218