bluecloth 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,40 +1,30 @@
1
1
  #
2
2
  # RDoc Rake tasks
3
- # $Id: rdoc.rb 93 2009-03-20 13:02:30Z deveiant $
3
+ # $Id: rdoc.rb 111 2009-07-15 16:05:47Z deveiant $
4
4
  #
5
5
 
6
- gem 'rdoc', '>= 2.4.1'
6
+ gem 'rdoc', '>= 2.4.3'
7
7
 
8
8
  require 'rubygems'
9
9
  require 'rdoc/rdoc'
10
10
  require 'rake/clean'
11
-
11
+ require 'rdoc/task'
12
12
 
13
13
  # Append docs/lib to the load path if it exists for a locally-installed Darkfish
14
14
  DOCSLIB = DOCSDIR + 'lib'
15
15
  $LOAD_PATH.unshift( DOCSLIB.to_s ) if DOCSLIB.exist?
16
16
 
17
17
  # Make relative string paths of all the stuff we need to generate docs for
18
- DOCFILES = LIB_FILES + EXT_FILES + GEMSPEC.extra_rdoc_files
18
+ DOCFILES = Rake::FileList[ LIB_FILES + EXT_FILES + GEMSPEC.extra_rdoc_files ]
19
19
 
20
20
 
21
21
  directory RDOCDIR.to_s
22
22
  CLOBBER.include( RDOCDIR )
23
23
 
24
24
  desc "Build API documentation in #{RDOCDIR}"
25
- task :rdoc => [ Rake.application.rakefile, *DOCFILES ] do
26
- args = RDOC_OPTIONS
27
- args += [ '-o', RDOCDIR.to_s ]
28
- args += [ '-f', 'darkfish' ]
29
- args += DOCFILES.collect {|pn| pn.to_s }
30
-
31
- trace "Building docs with arguments: %s" % [ args.join(' ') ]
32
- RDoc::RDoc.new.document( args ) rescue nil
25
+ RDoc::Task.new do |task|
26
+ task.main = "README"
27
+ task.rdoc_files.include( DOCFILES )
28
+ task.rdoc_dir = RDOCDIR.to_s
29
+ task.options = RDOC_OPTIONS
33
30
  end
34
-
35
- desc "Rebuild API documentation in #{RDOCDIR}"
36
- task :rerdoc do
37
- rm_r( RDOCDIR ) if RDOCDIR.exist?
38
- Rake::Task[ :rdoc ].invoke
39
- end
40
-
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Rake tasklib for testing tasks
3
- # $Id: testing.rb 99 2009-04-14 13:03:03Z deveiant $
3
+ # $Id: testing.rb 111 2009-07-15 16:05:47Z deveiant $
4
4
  #
5
5
  # Authors:
6
6
  # * Michael Granger <ged@FaerieMUD.org>
@@ -16,7 +16,7 @@ end
16
16
  SPEC_FILES = [] unless defined?( SPEC_FILES )
17
17
  TEST_FILES = [] unless defined?( TEST_FILES )
18
18
 
19
- COMMON_SPEC_OPTS = ['-Du', '-b'] unless defined?( COMMON_SPEC_OPTS )
19
+ COMMON_SPEC_OPTS = ['-Du'] unless defined?( COMMON_SPEC_OPTS )
20
20
 
21
21
  COVERAGE_TARGETDIR = BASEDIR + 'coverage' unless defined?( COVERAGE_TARGETDIR )
22
22
  RCOV_EXCLUDES = 'spec,tests,/Library/Ruby,/var/lib,/usr/local/lib' unless
@@ -35,6 +35,13 @@ describe BlueCloth do
35
35
  include BlueCloth::TestConstants,
36
36
  BlueCloth::Matchers
37
37
 
38
+ it "defines the top-level Markdown constant" do
39
+ Object.const_defined?('Markdown').should be_true()
40
+ # :FIXME: This is probably a fragile test, as anything else that defines it before
41
+ # the BlueCloth tests run could lead to a false failure. I at least know that it'll
42
+ # work in my environment, and I'm not sure how else to test it.
43
+ ::Markdown.should be_equal( ::BlueCloth )
44
+ end
38
45
 
39
46
  it "knows what version of Discount was used to build it" do
40
47
  BlueCloth.discount_version.should =~ /^\d+\.\d+\.\d+.*RELAXED/
@@ -3,10 +3,10 @@
3
3
  BEGIN {
4
4
  require 'pathname'
5
5
  basedir = Pathname.new( __FILE__ ).dirname.parent
6
-
6
+
7
7
  libdir = basedir + 'lib'
8
8
  extdir = basedir + 'ext'
9
-
9
+
10
10
  $LOAD_PATH.unshift( libdir ) unless $LOAD_PATH.include?( libdir )
11
11
  $LOAD_PATH.unshift( extdir ) unless $LOAD_PATH.include?( extdir )
12
12
  }
@@ -32,8 +32,8 @@ describe BlueCloth, "bugfixes" do
32
32
  @basedir = Pathname.new( __FILE__ ).dirname.parent
33
33
  @datadir = @basedir + 'spec/data'
34
34
  end
35
-
36
-
35
+
36
+
37
37
 
38
38
  ### Test to be sure the README file can be transformed.
39
39
  it "can transform the included README file" do
@@ -55,14 +55,14 @@ describe BlueCloth, "bugfixes" do
55
55
  lambda { BlueCloth.new(markdown).to_html }.should_not raise_error()
56
56
  end
57
57
 
58
-
58
+
59
59
  it "provides a workaround for the second regexp-engine overflow bug" do
60
60
  datafile = @datadir + 're-overflow2.txt'
61
61
  markdown = datafile.read
62
62
 
63
63
  lambda { BlueCloth.new(markdown).to_html }.should_not raise_error()
64
64
  end
65
-
65
+
66
66
 
67
67
  it "correctly wraps <strong> tags around two characters enclosed in four asterisks" do
68
68
  the_markdown( "**aa**" ).should be_transformed_into( "<p><strong>aa</strong></p>" )
@@ -114,8 +114,21 @@ describe BlueCloth, "bugfixes" do
114
114
 
115
115
  $VERBOSE = oldverbose
116
116
  end
117
-
118
-
117
+
118
+
119
+ it "doesn't hang when presented with a series of hyphens (rails-security DoS/#57)" do
120
+ the_indented_markdown( <<-"END_MARKDOWN" ).should be_transformed_into(<<-"END_HTML").without_indentation
121
+ This line of markdown below will hang you if you're running BlueCloth 1.x.
122
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
123
+
124
+ END_MARKDOWN
125
+ <p>This line of markdown below will hang you if you're running BlueCloth 1.x.</p>
126
+
127
+ <hr />
128
+ END_HTML
129
+ end
130
+
131
+
119
132
  end
120
133
 
121
134
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bluecloth
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Granger
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-29 00:00:00 -07:00
12
+ date: 2009-07-15 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -122,6 +122,16 @@ dependencies:
122
122
  - !ruby/object:Gem::Version
123
123
  version: 4.0.3
124
124
  version:
125
+ - !ruby/object:Gem::Dependency
126
+ name: rdoc
127
+ type: :development
128
+ version_requirement:
129
+ version_requirements: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: 2.4.3
134
+ version:
125
135
  - !ruby/object:Gem::Dependency
126
136
  name: rcodetools
127
137
  type: :development
@@ -200,66 +210,65 @@ files:
200
210
  - rake/testing.rb
201
211
  - rake/verifytask.rb
202
212
  - rake/win32.rb
203
- - spec/data/antsugar.txt
204
- - spec/data/ml-announce.txt
205
- - spec/data/re-overflow.txt
206
- - spec/data/re-overflow2.txt
207
- - spec/data/markdowntest/Amps and angle encoding.text
208
- - spec/data/markdowntest/Auto links.text
209
- - spec/data/markdowntest/Backslash escapes.text
210
- - spec/data/markdowntest/Blockquotes with code blocks.text
211
- - spec/data/markdowntest/Code Blocks.text
212
- - spec/data/markdowntest/Code Spans.text
213
- - spec/data/markdowntest/Hard-wrapped paragraphs with list-like lines.text
214
- - spec/data/markdowntest/Horizontal rules.text
215
- - spec/data/markdowntest/Inline HTML (Advanced).text
216
- - spec/data/markdowntest/Inline HTML (Simple).text
217
- - spec/data/markdowntest/Inline HTML comments.text
218
- - spec/data/markdowntest/Links, inline style.text
219
- - spec/data/markdowntest/Links, reference style.text
220
- - spec/data/markdowntest/Links, shortcut references.text
221
- - spec/data/markdowntest/Literal quotes in titles.text
222
- - spec/data/markdowntest/Markdown Documentation - Basics.text
223
- - spec/data/markdowntest/Markdown Documentation - Syntax.text
224
- - spec/data/markdowntest/Nested blockquotes.text
225
- - spec/data/markdowntest/Ordered and unordered lists.text
226
- - spec/data/markdowntest/Strong and em together.text
227
- - spec/data/markdowntest/Tabs.text
228
- - spec/data/markdowntest/Tidyness.text
229
- - spec/data/markdowntest/Amps and angle encoding.html
230
- - spec/data/markdowntest/Auto links.html
231
- - spec/data/markdowntest/Backslash escapes.html
232
- - spec/data/markdowntest/Blockquotes with code blocks.html
233
- - spec/data/markdowntest/Code Blocks.html
234
- - spec/data/markdowntest/Code Spans.html
235
- - spec/data/markdowntest/Hard-wrapped paragraphs with list-like lines.html
236
- - spec/data/markdowntest/Horizontal rules.html
237
- - spec/data/markdowntest/Inline HTML (Advanced).html
238
- - spec/data/markdowntest/Inline HTML (Simple).html
239
- - spec/data/markdowntest/Inline HTML comments.html
240
- - spec/data/markdowntest/Links, inline style.html
241
- - spec/data/markdowntest/Links, reference style.html
242
- - spec/data/markdowntest/Links, shortcut references.html
243
- - spec/data/markdowntest/Literal quotes in titles.html
244
- - spec/data/markdowntest/Markdown Documentation - Basics.html
245
- - spec/data/markdowntest/Markdown Documentation - Syntax.html
246
- - spec/data/markdowntest/Nested blockquotes.html
247
- - spec/data/markdowntest/Ordered and unordered lists.html
248
- - spec/data/markdowntest/Strong and em together.html
249
- - spec/data/markdowntest/Tabs.html
250
- - spec/data/markdowntest/Tidyness.html
251
- - ext/VERSION
213
+ - ./LICENSE.discount
214
+ - ./spec/data/antsugar.txt
215
+ - ./spec/data/ml-announce.txt
216
+ - ./spec/data/re-overflow.txt
217
+ - ./spec/data/re-overflow2.txt
218
+ - ./spec/data/markdowntest/Amps and angle encoding.text
219
+ - ./spec/data/markdowntest/Auto links.text
220
+ - ./spec/data/markdowntest/Backslash escapes.text
221
+ - ./spec/data/markdowntest/Blockquotes with code blocks.text
222
+ - ./spec/data/markdowntest/Code Blocks.text
223
+ - ./spec/data/markdowntest/Code Spans.text
224
+ - ./spec/data/markdowntest/Hard-wrapped paragraphs with list-like lines.text
225
+ - ./spec/data/markdowntest/Horizontal rules.text
226
+ - ./spec/data/markdowntest/Inline HTML (Advanced).text
227
+ - ./spec/data/markdowntest/Inline HTML (Simple).text
228
+ - ./spec/data/markdowntest/Inline HTML comments.text
229
+ - ./spec/data/markdowntest/Links, inline style.text
230
+ - ./spec/data/markdowntest/Links, reference style.text
231
+ - ./spec/data/markdowntest/Links, shortcut references.text
232
+ - ./spec/data/markdowntest/Literal quotes in titles.text
233
+ - ./spec/data/markdowntest/Markdown Documentation - Basics.text
234
+ - ./spec/data/markdowntest/Markdown Documentation - Syntax.text
235
+ - ./spec/data/markdowntest/Nested blockquotes.text
236
+ - ./spec/data/markdowntest/Ordered and unordered lists.text
237
+ - ./spec/data/markdowntest/Strong and em together.text
238
+ - ./spec/data/markdowntest/Tabs.text
239
+ - ./spec/data/markdowntest/Tidyness.text
240
+ - ./spec/data/markdowntest/Amps and angle encoding.html
241
+ - ./spec/data/markdowntest/Auto links.html
242
+ - ./spec/data/markdowntest/Backslash escapes.html
243
+ - ./spec/data/markdowntest/Blockquotes with code blocks.html
244
+ - ./spec/data/markdowntest/Code Blocks.html
245
+ - ./spec/data/markdowntest/Code Spans.html
246
+ - ./spec/data/markdowntest/Hard-wrapped paragraphs with list-like lines.html
247
+ - ./spec/data/markdowntest/Horizontal rules.html
248
+ - ./spec/data/markdowntest/Inline HTML (Advanced).html
249
+ - ./spec/data/markdowntest/Inline HTML (Simple).html
250
+ - ./spec/data/markdowntest/Inline HTML comments.html
251
+ - ./spec/data/markdowntest/Links, inline style.html
252
+ - ./spec/data/markdowntest/Links, reference style.html
253
+ - ./spec/data/markdowntest/Links, shortcut references.html
254
+ - ./spec/data/markdowntest/Literal quotes in titles.html
255
+ - ./spec/data/markdowntest/Markdown Documentation - Basics.html
256
+ - ./spec/data/markdowntest/Markdown Documentation - Syntax.html
257
+ - ./spec/data/markdowntest/Nested blockquotes.html
258
+ - ./spec/data/markdowntest/Ordered and unordered lists.html
259
+ - ./spec/data/markdowntest/Strong and em together.html
260
+ - ./spec/data/markdowntest/Tabs.html
261
+ - ./spec/data/markdowntest/Tidyness.html
262
+ - ./ext/VERSION
252
263
  - Rakefile.local
253
264
  - LICENSE.discount
254
265
  has_rdoc: true
255
266
  homepage: http://deveiate.org/projects/BlueCloth/
256
- licenses: []
257
-
258
267
  post_install_message:
259
268
  rdoc_options:
260
269
  - -w
261
270
  - "4"
262
- - -SHN
271
+ - -HN
263
272
  - -i
264
273
  - .
265
274
  - -m