bluecloth 2.0.7 → 2.0.9

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.
Files changed (47) hide show
  1. data.tar.gz.sig +0 -0
  2. data/ChangeLog +36 -6
  3. data/Rakefile +46 -26
  4. data/Rakefile.local +13 -6
  5. data/ext/VERSION +1 -1
  6. data/ext/bluecloth.c +46 -21
  7. data/ext/bluecloth.h +13 -2
  8. data/ext/cstring.h +3 -1
  9. data/ext/emmatch.c +188 -0
  10. data/ext/generate.c +203 -248
  11. data/ext/html5.c +24 -0
  12. data/ext/markdown.c +122 -98
  13. data/ext/markdown.h +16 -2
  14. data/ext/mkdio.c +43 -9
  15. data/ext/mkdio.h +11 -0
  16. data/ext/resource.c +1 -1
  17. data/ext/tags.c +110 -0
  18. data/ext/tags.h +18 -0
  19. data/lib/bluecloth.rb +33 -26
  20. data/rake/documentation.rb +115 -0
  21. data/rake/helpers.rb +375 -308
  22. data/rake/hg.rb +17 -3
  23. data/rake/manual.rb +11 -6
  24. data/rake/packaging.rb +7 -1
  25. data/rake/publishing.rb +162 -88
  26. data/spec/bluecloth/101_changes_spec.rb +1 -0
  27. data/spec/bluecloth/autolinks_spec.rb +1 -0
  28. data/spec/bluecloth/blockquotes_spec.rb +1 -0
  29. data/spec/bluecloth/code_spans_spec.rb +1 -0
  30. data/spec/bluecloth/emphasis_spec.rb +1 -0
  31. data/spec/bluecloth/entities_spec.rb +1 -0
  32. data/spec/bluecloth/hrules_spec.rb +1 -0
  33. data/spec/bluecloth/images_spec.rb +1 -0
  34. data/spec/bluecloth/inline_html_spec.rb +25 -61
  35. data/spec/bluecloth/lists_spec.rb +1 -0
  36. data/spec/bluecloth/paragraphs_spec.rb +1 -0
  37. data/spec/bluecloth/titles_spec.rb +1 -0
  38. data/spec/bluecloth_spec.rb +22 -6
  39. data/spec/bugfix_spec.rb +79 -2
  40. data/spec/contributions_spec.rb +1 -0
  41. data/spec/discount_spec.rb +46 -2
  42. data/spec/lib/helpers.rb +8 -8
  43. data/spec/lib/matchers.rb +5 -17
  44. data/spec/markdowntest_spec.rb +2 -34
  45. metadata +48 -17
  46. metadata.gz.sig +0 -0
  47. data/rake/rdoc.rb +0 -30
data/spec/lib/matchers.rb CHANGED
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'bluecloth'
4
+
5
+ require 'tidy'
4
6
  require 'diff/lcs'
5
7
  require 'diff/lcs/callbacks'
6
8
  require 'spec/lib/constants'
7
- require 'rbconfig'
8
9
 
9
10
 
10
11
  ### Fixturing functions
@@ -134,24 +135,11 @@ module BlueCloth::Matchers
134
135
  class TidyTransformMatcher < TransformMatcher
135
136
 
136
137
  TIDY_OPTIONS = {}
137
- @tidy = nil
138
-
139
- ### Fetch the class-global Tidy object, creating it if necessary
140
- def self::tidy_object
141
- unless @tidy
142
- require 'tidy'
143
- soext = Config::CONFIG['LIBRUBY_ALIASES'].sub( /.*\./, '' )
144
- Tidy.path = "libtidy.#{soext}"
145
- @tidy = Tidy.new( TIDY_OPTIONS )
146
- end
147
-
148
- return @tidy
149
- end
150
-
151
138
 
152
139
  ### Set the matcher's expected output to a tidied version of the input +html+.
153
140
  def initialize( html )
154
- @html = self.class.tidy_object.clean( html )
141
+ @tidy = Tidy.open( TIDY_OPTIONS )
142
+ @html = @tidy.clean( html )
155
143
  end
156
144
 
157
145
 
@@ -159,7 +147,7 @@ module BlueCloth::Matchers
159
147
  ### expected HTML after normalizing them both with 'tidy'.
160
148
  def matches?( bluecloth )
161
149
  @bluecloth = bluecloth
162
- @output_html = self.class.tidy_object.clean( bluecloth.to_html )
150
+ @output_html = @tidy.clean( bluecloth.to_html )
163
151
  return @output_html == @html
164
152
  end
165
153
 
@@ -7,20 +7,19 @@ BEGIN {
7
7
  libdir = basedir + 'lib'
8
8
  extdir = basedir + 'ext'
9
9
 
10
+ $LOAD_PATH.unshift( basedir ) unless $LOAD_PATH.include?( basedir )
10
11
  $LOAD_PATH.unshift( libdir ) unless $LOAD_PATH.include?( libdir )
11
12
  $LOAD_PATH.unshift( extdir ) unless $LOAD_PATH.include?( extdir )
12
13
  }
13
14
 
14
15
  require 'spec'
15
16
  require 'bluecloth'
17
+ require 'tidy'
16
18
 
17
19
  require 'spec/lib/helpers'
18
20
  require 'spec/lib/constants'
19
21
  require 'spec/lib/matchers'
20
22
 
21
- require 'rbconfig'
22
- require 'dl'
23
-
24
23
 
25
24
  #####################################################################
26
25
  ### C O N T E X T S
@@ -30,37 +29,6 @@ describe BlueCloth, "-- MarkdownTest 1.0.3: " do
30
29
  include BlueCloth::TestConstants,
31
30
  BlueCloth::Matchers
32
31
 
33
- before( :all ) do
34
- soext = Config::CONFIG['LIBRUBY_ALIASES'].sub( /.*\./, '' )
35
- @dlname = "libtidy.#{soext}"
36
-
37
- begin
38
- DL.dlopen( @dlname )
39
- rescue RuntimeError => err
40
- @have_libtidy = false
41
- @tidy_error = err.message
42
- rescue DL::DLError => err
43
- @have_libtidy = false
44
- @tidy_error = err.message
45
- else
46
- @have_libtidy = true
47
- @tidy_error = nil
48
- end
49
-
50
- begin
51
- require 'tidy'
52
- rescue LoadError, NameError => err
53
- @have_libtidy = false
54
- @tidy_error = err.message
55
- end
56
-
57
- end
58
-
59
- before( :each ) do
60
- pending( "These tests require the tidy library: #@tidy_error" ) unless @have_libtidy
61
- end
62
-
63
-
64
32
  markdowntest_dir = Pathname.new( __FILE__ ).dirname + 'data/markdowntest'
65
33
  pattern = markdowntest_dir + '*.text'
66
34
  Pathname.glob( pattern.to_s ).each do |textfile|
metadata CHANGED
@@ -1,15 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bluecloth
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7
4
+ hash: 29
5
+ prerelease: false
6
+ segments:
7
+ - 2
8
+ - 0
9
+ - 9
10
+ version: 2.0.9
5
11
  platform: ruby
6
12
  authors:
7
13
  - Michael Granger
8
14
  autorequire:
9
15
  bindir: bin
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1Y5DerCAagMVuDQ
34
+ U0BLmWDFzPGGWlPeQCrYHCr+AcJz+NRnaHCKLZdSKj/RHuTOt+gblRex8FAh8NeA
35
+ cmlhXe46pZNJgWKbxZah85jIjx95hR8vOI+NAM5iH9kOqK13DrxacTKPhqj5PjwF
36
+ -----END CERTIFICATE-----
11
37
 
12
- date: 2010-01-25 00:00:00 -08:00
38
+ date: 2010-09-23 00:00:00 -07:00
13
39
  default_executable:
14
40
  dependencies: []
15
41
 
@@ -61,10 +87,13 @@ files:
61
87
  - ext/Csio.c
62
88
  - ext/css.c
63
89
  - ext/docheader.c
90
+ - ext/emmatch.c
64
91
  - ext/generate.c
92
+ - ext/html5.c
65
93
  - ext/markdown.c
66
94
  - ext/mkdio.c
67
95
  - ext/resource.c
96
+ - ext/tags.c
68
97
  - ext/version.c
69
98
  - ext/xml.c
70
99
  - ext/xmlpage.c
@@ -74,15 +103,16 @@ files:
74
103
  - ext/cstring.h
75
104
  - ext/markdown.h
76
105
  - ext/mkdio.h
106
+ - ext/tags.h
77
107
  - ext/extconf.rb
78
108
  - rake/191_compat.rb
79
109
  - rake/dependencies.rb
110
+ - rake/documentation.rb
80
111
  - rake/helpers.rb
81
112
  - rake/hg.rb
82
113
  - rake/manual.rb
83
114
  - rake/packaging.rb
84
115
  - rake/publishing.rb
85
- - rake/rdoc.rb
86
116
  - rake/style.rb
87
117
  - rake/svn.rb
88
118
  - rake/testing.rb
@@ -145,36 +175,37 @@ licenses: []
145
175
 
146
176
  post_install_message:
147
177
  rdoc_options:
148
- - -w
149
- - "4"
150
- - -HN
151
- - -i
178
+ - --tab-width=4
179
+ - --show-hash
180
+ - --include
152
181
  - .
153
- - -m
154
- - README
155
- - -t
156
- - bluecloth
157
- - -W
158
- - http://deveiate.org/projects/BlueCloth/browser/
182
+ - --main=README
183
+ - --title=bluecloth
159
184
  require_paths:
160
185
  - lib
161
186
  - ext
162
187
  required_ruby_version: !ruby/object:Gem::Requirement
188
+ none: false
163
189
  requirements:
164
190
  - - ">="
165
191
  - !ruby/object:Gem::Version
192
+ hash: 3
193
+ segments:
194
+ - 0
166
195
  version: "0"
167
- version:
168
196
  required_rubygems_version: !ruby/object:Gem::Requirement
197
+ none: false
169
198
  requirements:
170
199
  - - ">="
171
200
  - !ruby/object:Gem::Version
201
+ hash: 3
202
+ segments:
203
+ - 0
172
204
  version: "0"
173
- version:
174
205
  requirements: []
175
206
 
176
207
  rubyforge_project:
177
- rubygems_version: 1.3.5
208
+ rubygems_version: 1.3.7
178
209
  signing_key:
179
210
  specification_version: 3
180
211
  summary: BlueCloth is a Ruby implementation of Markdown
metadata.gz.sig ADDED
Binary file
data/rake/rdoc.rb DELETED
@@ -1,30 +0,0 @@
1
- #
2
- # RDoc Rake tasks
3
-
4
- #
5
-
6
- gem 'rdoc', '>= 2.4.3'
7
-
8
- require 'rubygems'
9
- require 'rdoc/rdoc'
10
- require 'rake/clean'
11
- require 'rdoc/task'
12
-
13
- # Append docs/lib to the load path if it exists for a locally-installed Darkfish
14
- DOCSLIB = DOCSDIR + 'lib'
15
- $LOAD_PATH.unshift( DOCSLIB.to_s ) if DOCSLIB.exist?
16
-
17
- # Make relative string paths of all the stuff we need to generate docs for
18
- DOCFILES = Rake::FileList[ LIB_FILES + EXT_FILES + GEMSPEC.extra_rdoc_files ]
19
-
20
-
21
- directory RDOCDIR.to_s
22
- CLOBBER.include( RDOCDIR )
23
-
24
- desc "Build API documentation in #{RDOCDIR}"
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
30
- end