bluecloth 2.0.9 → 2.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/ChangeLog +29 -2
- data/Rakefile +18 -15
- data/ext/VERSION +1 -1
- data/ext/bluecloth.c +26 -5
- data/ext/config.h +13 -2
- data/ext/css.c +14 -5
- data/ext/cstring.h +1 -1
- data/ext/docheader.c +13 -7
- data/ext/emmatch.c +1 -1
- data/ext/generate.c +134 -48
- data/ext/markdown.c +207 -94
- data/ext/markdown.h +37 -28
- data/ext/mkdio.c +39 -32
- data/ext/mkdio.h +34 -24
- data/ext/resource.c +3 -1
- data/ext/setup.c +47 -0
- data/ext/tags.c +15 -2
- data/ext/tags.h +1 -0
- data/lib/bluecloth.rb +65 -40
- data/rake/documentation.rb +9 -1
- data/rake/hg.rb +34 -3
- data/rake/packaging.rb +1 -1
- data/rake/publishing.rb +2 -9
- data/rake/testing.rb +53 -88
- data/spec/bluecloth/101_changes_spec.rb +17 -17
- data/spec/bluecloth/autolinks_spec.rb +1 -1
- data/spec/bluecloth/blockquotes_spec.rb +18 -18
- data/spec/bluecloth/code_spans_spec.rb +1 -1
- data/spec/bluecloth/emphasis_spec.rb +1 -1
- data/spec/bluecloth/entities_spec.rb +1 -1
- data/spec/bluecloth/hrules_spec.rb +1 -1
- data/spec/bluecloth/images_spec.rb +1 -1
- data/spec/bluecloth/inline_html_spec.rb +1 -1
- data/spec/bluecloth/links_spec.rb +1 -1
- data/spec/bluecloth/lists_spec.rb +1 -1
- data/spec/bluecloth/paragraphs_spec.rb +1 -1
- data/spec/bluecloth/titles_spec.rb +1 -1
- data/spec/bluecloth_spec.rb +13 -13
- data/spec/bugfix_spec.rb +6 -1
- data/spec/contributions_spec.rb +1 -1
- data/spec/discount_spec.rb +2 -2
- data/spec/lib/helpers.rb +1 -124
- data/spec/lib/matchers.rb +1 -1
- data/spec/markdowntest_spec.rb +1 -1
- metadata +10 -10
- metadata.gz.sig +0 -0
data/ext/tags.h
CHANGED
data/lib/bluecloth.rb
CHANGED
@@ -21,7 +21,7 @@ require 'rbconfig'
|
|
21
21
|
#
|
22
22
|
# == Version
|
23
23
|
#
|
24
|
-
# $Id: bluecloth.rb,v
|
24
|
+
# $Id: bluecloth.rb,v 3dd45baec201 2011/01/17 17:14:20 ged $
|
25
25
|
#
|
26
26
|
# == License
|
27
27
|
#
|
@@ -32,20 +32,31 @@ require 'rbconfig'
|
|
32
32
|
class BlueCloth
|
33
33
|
|
34
34
|
# Release Version
|
35
|
-
VERSION = '2.0.
|
35
|
+
VERSION = '2.0.10'
|
36
36
|
|
37
37
|
# The defaults for all supported options.
|
38
38
|
DEFAULT_OPTIONS = {
|
39
|
-
:
|
40
|
-
:
|
41
|
-
:
|
42
|
-
:
|
43
|
-
:
|
44
|
-
:
|
45
|
-
:
|
46
|
-
:
|
47
|
-
:
|
48
|
-
:
|
39
|
+
:alphalists => true,
|
40
|
+
:auto_links => false,
|
41
|
+
:definition_lists => false,
|
42
|
+
:divquotes => false,
|
43
|
+
:escape_html => false,
|
44
|
+
:expand_tabs => true,
|
45
|
+
:header_labels => false,
|
46
|
+
:mdtest_1_compat => false,
|
47
|
+
:pandoc_headers => false,
|
48
|
+
:pseudoprotocols => false,
|
49
|
+
:relaxed => false,
|
50
|
+
:remove_images => false,
|
51
|
+
:remove_links => false,
|
52
|
+
:safe_links => false,
|
53
|
+
:smartypants => true,
|
54
|
+
:strict_mode => true,
|
55
|
+
:strikethrough => true,
|
56
|
+
:superscript => false,
|
57
|
+
:tables => false,
|
58
|
+
:tagtext_mode => false,
|
59
|
+
:xml_cdata => false,
|
49
60
|
}.freeze
|
50
61
|
|
51
62
|
# The number of characters of the original markdown source to include in the
|
@@ -74,20 +85,27 @@ class BlueCloth
|
|
74
85
|
|
75
86
|
flags = 0
|
76
87
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
88
|
+
if opthash[:remove_links] then flags |= MKD_NOLINKS; end
|
89
|
+
if opthash[:remove_images] then flags |= MKD_NOIMAGE; end
|
90
|
+
if ! opthash[:smartypants] then flags |= MKD_NOPANTS; end
|
91
|
+
if opthash[:escape_html] then flags |= MKD_NOHTML; end
|
92
|
+
if opthash[:strict_mode] then flags |= MKD_STRICT; end
|
93
|
+
if opthash[:tagtext_mode] then flags |= MKD_TAGTEXT; end
|
94
|
+
if ! opthash[:pseudoprotocols] then flags |= MKD_NO_EXT; end
|
95
|
+
if opthash[:xml_cdata] then flags |= MKD_CDATA; end
|
96
|
+
if ! opthash[:superscript] then flags |= MKD_NOSUPERSCRIPT; end
|
97
|
+
if ! opthash[:relaxed] then flags |= MKD_NORELAXED; end
|
98
|
+
if ! opthash[:tables] then flags |= MKD_NOTABLES; end
|
99
|
+
if ! opthash[:strikethrough] then flags |= MKD_NOSTRIKETHROUGH; end
|
100
|
+
if opthash[:header_labels] then flags |= MKD_TOC; end
|
101
|
+
if opthash[:mdtest_1_compat] then flags |= MKD_1_COMPAT; end
|
102
|
+
if opthash[:auto_links] then flags |= MKD_AUTOLINK; end
|
103
|
+
if opthash[:safe_links] then flags |= MKD_SAFELINK; end
|
104
|
+
if ! opthash[:pandoc_headers] then flags |= MKD_NOHEADER; end
|
105
|
+
if opthash[:expand_tabs] then flags |= MKD_TABSTOP; end
|
106
|
+
if ! opthash[:divquotes] then flags |= MKD_NODIVQUOTE; end
|
107
|
+
if ! opthash[:alphalists] then flags |= MKD_NOALPHALIST; end
|
108
|
+
if ! opthash[:definition_lists] then flags |= MKD_NODLIST; end
|
91
109
|
|
92
110
|
return flags
|
93
111
|
end
|
@@ -98,20 +116,27 @@ class BlueCloth
|
|
98
116
|
flags = flags.to_i
|
99
117
|
|
100
118
|
opthash = {}
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
119
|
+
if ( flags & MKD_NOLINKS ).nonzero? then opthash[:remove_links] = true; end
|
120
|
+
if ( flags & MKD_NOIMAGE ).nonzero? then opthash[:remove_images] = true; end
|
121
|
+
if !( flags & MKD_NOPANTS ).nonzero? then opthash[:smartypants] = true; end
|
122
|
+
if ( flags & MKD_NOHTML ).nonzero? then opthash[:escape_html] = true; end
|
123
|
+
if ( flags & MKD_STRICT ).nonzero? then opthash[:strict_mode] = true; end
|
124
|
+
if ( flags & MKD_TAGTEXT ).nonzero? then opthash[:tagtext_mode] = true; end
|
125
|
+
if !( flags & MKD_NO_EXT ).nonzero? then opthash[:pseudoprotocols] = true; end
|
126
|
+
if ( flags & MKD_CDATA ).nonzero? then opthash[:xml_cdata] = true; end
|
127
|
+
if !( flags & MKD_NOSUPERSCRIPT ).nonzero? then opthash[:superscript] = true; end
|
128
|
+
if !( flags & MKD_NORELAXED ).nonzero? then opthash[:relaxed] = true; end
|
129
|
+
if !( flags & MKD_NOTABLES ).nonzero? then opthash[:tables] = true; end
|
130
|
+
if !( flags & MKD_NOSTRIKETHROUGH ).nonzero? then opthash[:strikethrough] = true; end
|
131
|
+
if ( flags & MKD_TOC ).nonzero? then opthash[:header_labels] = true; end
|
132
|
+
if ( flags & MKD_1_COMPAT ).nonzero? then opthash[:mdtest_1_compat] = true; end
|
133
|
+
if ( flags & MKD_AUTOLINK ).nonzero? then opthash[:auto_links] = true; end
|
134
|
+
if ( flags & MKD_SAFELINK ).nonzero? then opthash[:safe_links] = true; end
|
135
|
+
if !( flags & MKD_NOHEADER ).nonzero? then opthash[:pandoc_headers] = true; end
|
136
|
+
if ( flags & MKD_TABSTOP ).nonzero? then opthash[:expand_tabs] = true; end
|
137
|
+
if !( flags & MKD_NODIVQUOTE ).nonzero? then opthash[:divquotes] = true; end
|
138
|
+
if !( flags & MKD_NOALPHALIST ).nonzero? then opthash[:alphalists] = true; end
|
139
|
+
if !( flags & MKD_NODLIST ).nonzero? then opthash[:definition_lists] = true; end
|
115
140
|
|
116
141
|
return opthash
|
117
142
|
end
|
data/rake/documentation.rb
CHANGED
@@ -54,6 +54,7 @@ begin
|
|
54
54
|
class YARD::RegistryStore; include YardGlobals; end
|
55
55
|
class YARD::Docstring; include YardGlobals; end
|
56
56
|
module YARD::Templates::Helpers::ModuleHelper; include YardGlobals; end
|
57
|
+
module YARD::Templates::Helpers::HtmlHelper; include YardGlobals; end
|
57
58
|
|
58
59
|
if vvec(RUBY_VERSION) >= vvec("1.9.1")
|
59
60
|
# Monkeypatched to allow more than two '#' characters at the beginning
|
@@ -62,8 +63,15 @@ begin
|
|
62
63
|
require 'yard/parser/ruby/ruby_parser'
|
63
64
|
class YARD::Parser::Ruby::RipperParser < Ripper
|
64
65
|
def on_comment(comment)
|
65
|
-
$stderr.puts "Adding comment: %p" % [ comment ]
|
66
66
|
visit_ns_token(:comment, comment)
|
67
|
+
case comment
|
68
|
+
when /\A# @group\s+(.+)\s*\Z/
|
69
|
+
@groups.unshift [lineno, $1]
|
70
|
+
return
|
71
|
+
when /\A# @endgroup\s*\Z/
|
72
|
+
@groups.unshift [lineno, nil]
|
73
|
+
return
|
74
|
+
end
|
67
75
|
|
68
76
|
comment = comment.gsub(/^\#+\s{0,1}/, '').chomp
|
69
77
|
append_comment = @comments[lineno - 1]
|
data/rake/hg.rb
CHANGED
@@ -83,6 +83,15 @@ unless defined?( HG_DOTDIR )
|
|
83
83
|
return paths
|
84
84
|
end
|
85
85
|
|
86
|
+
### Return the list of files which are not of status 'clean'
|
87
|
+
def get_uncommitted_files
|
88
|
+
list = read_command_output( 'hg', 'status', '-n', '--color', 'never' )
|
89
|
+
list = list.split( /\n/ )
|
90
|
+
|
91
|
+
trace "Changed files: %p" % [ list ]
|
92
|
+
return list
|
93
|
+
end
|
94
|
+
|
86
95
|
### Return the list of files which are of status 'unknown'
|
87
96
|
def get_unknown_files
|
88
97
|
list = read_command_output( 'hg', 'status', '-un', '--color', 'never' )
|
@@ -149,11 +158,21 @@ unless defined?( HG_DOTDIR )
|
|
149
158
|
|
150
159
|
desc "Prepare for a new release"
|
151
160
|
task :prep_release do
|
161
|
+
uncommitted_files = get_uncommitted_files()
|
162
|
+
unless uncommitted_files.empty?
|
163
|
+
log "Uncommitted files:\n",
|
164
|
+
*uncommitted_files.map {|fn| " #{fn}\n" }
|
165
|
+
ask_for_confirmation( "\nRelease anyway?", true ) do
|
166
|
+
log "Okay, releasing with uncommitted versions."
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
152
170
|
tags = get_tags()
|
153
171
|
rev = get_current_rev()
|
172
|
+
pkg_version_tag = "v#{PKG_VERSION}"
|
154
173
|
|
155
174
|
# Look for a tag for the current release version, and if it exists abort
|
156
|
-
if tags.include?(
|
175
|
+
if tags.include?( pkg_version_tag )
|
157
176
|
error "Version #{PKG_VERSION} already has a tag. Did you mean " +
|
158
177
|
"to increment the version in #{VERSION_FILE}?"
|
159
178
|
fail
|
@@ -164,8 +183,8 @@ unless defined?( HG_DOTDIR )
|
|
164
183
|
run 'hg', 'sign'
|
165
184
|
|
166
185
|
# Tag the current rev
|
167
|
-
log "Tagging rev #{rev} as #{
|
168
|
-
run 'hg', 'tag',
|
186
|
+
log "Tagging rev #{rev} as #{pkg_version_tag}"
|
187
|
+
run 'hg', 'tag', pkg_version_tag
|
169
188
|
|
170
189
|
# Offer to push
|
171
190
|
Rake::Task['hg:push'].invoke
|
@@ -229,6 +248,18 @@ unless defined?( HG_DOTDIR )
|
|
229
248
|
end
|
230
249
|
|
231
250
|
|
251
|
+
desc "Update to tip"
|
252
|
+
task :update do
|
253
|
+
run 'hg', 'update'
|
254
|
+
end
|
255
|
+
|
256
|
+
|
257
|
+
desc "Clobber all changes (hg up -C)"
|
258
|
+
task :update_and_clobber do
|
259
|
+
run 'hg', 'update', '-C'
|
260
|
+
end
|
261
|
+
|
262
|
+
|
232
263
|
desc "Check the current code in if tests pass"
|
233
264
|
task :checkin => ['hg:pull', 'hg:newfiles', 'test', COMMIT_MSG_FILE] do
|
234
265
|
targets = get_target_args()
|
data/rake/packaging.rb
CHANGED
@@ -12,7 +12,7 @@ include Config
|
|
12
12
|
### Task: prerelease
|
13
13
|
desc "Append the package build number to package versions"
|
14
14
|
task :prerelease do
|
15
|
-
GEMSPEC.version.version << "
|
15
|
+
GEMSPEC.version.version << "pre#{PKG_BUILD}"
|
16
16
|
Rake::Task[:gem].clear
|
17
17
|
|
18
18
|
Gem::PackageTask.new( GEMSPEC ) do |pkg|
|
data/rake/publishing.rb
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
RELEASE_NOTES_FILE = 'release.notes'
|
6
6
|
RELEASE_ANNOUNCE_FILE = 'release.ann'
|
7
7
|
|
8
|
+
GEM_PUBHOST = '' unless defined?( GEM_PUBHOST )
|
9
|
+
|
8
10
|
require 'net/smtp'
|
9
11
|
require 'net/protocol'
|
10
12
|
require 'openssl'
|
@@ -235,17 +237,8 @@ begin
|
|
235
237
|
|
236
238
|
== Installation
|
237
239
|
|
238
|
-
Via gems:
|
239
|
-
|
240
240
|
$ sudo gem install #{GEMSPEC.name}
|
241
241
|
|
242
|
-
or from source:
|
243
|
-
|
244
|
-
$ wget http://deveiate.org/code/#{PKG_FILE_NAME}.tar.gz
|
245
|
-
$ tar -xzvf #{PKG_FILE_NAME}.tar.gz
|
246
|
-
$ cd #{PKG_FILE_NAME}
|
247
|
-
$ sudo rake install
|
248
|
-
|
249
242
|
== Changes
|
250
243
|
#{relnotes}
|
251
244
|
}.gsub( /^\t+/, '' )
|
data/rake/testing.rb
CHANGED
@@ -16,7 +16,7 @@ end
|
|
16
16
|
SPEC_FILES = [] unless defined?( SPEC_FILES )
|
17
17
|
TEST_FILES = [] unless defined?( TEST_FILES )
|
18
18
|
|
19
|
-
|
19
|
+
COMMON_RSPEC_OPTS = [] unless defined?( COMMON_RSPEC_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
|
@@ -39,149 +39,114 @@ end
|
|
39
39
|
|
40
40
|
### RSpec specifications
|
41
41
|
begin
|
42
|
-
gem 'rspec', '>=
|
42
|
+
gem 'rspec', '>= 2.0.0'
|
43
43
|
|
44
|
-
require '
|
45
|
-
require '
|
44
|
+
require 'rspec'
|
45
|
+
require 'rspec/core/rake_task'
|
46
46
|
|
47
47
|
### Task: spec
|
48
48
|
desc "Run specs"
|
49
49
|
task :spec => 'spec:doc'
|
50
|
+
task :specs => :spec
|
50
51
|
|
51
52
|
namespace :spec do
|
52
53
|
desc "Run rspec every time there's a change to one of the files"
|
53
54
|
task :autotest do
|
54
|
-
require 'autotest
|
55
|
-
|
56
|
-
|
57
|
-
autotester.run
|
55
|
+
require 'autotest'
|
56
|
+
Autotest.add_discovery { "rspec2" }
|
57
|
+
Autotest.run
|
58
58
|
end
|
59
59
|
|
60
60
|
desc "Generate regular color 'doc' spec output"
|
61
|
-
|
62
|
-
task.
|
63
|
-
task.spec_opts = COMMON_SPEC_OPTS + ['-f', 's', '-c']
|
61
|
+
RSpec::Core::RakeTask.new( :doc ) do |task|
|
62
|
+
task.rspec_opts = COMMON_RSPEC_OPTS + ['-f', 'd', '-c']
|
64
63
|
end
|
65
64
|
|
66
65
|
desc "Generate spec output with profiling"
|
67
|
-
|
68
|
-
task.
|
69
|
-
task.spec_opts = COMMON_SPEC_OPTS + ['-f', 'o']
|
66
|
+
RSpec::Core::RakeTask.new( :profile ) do |task|
|
67
|
+
task.rspec_opts = COMMON_RSPEC_OPTS + ['-f', 'p', '-p']
|
70
68
|
end
|
71
69
|
|
72
70
|
desc "Generate quiet non-colored plain-text output"
|
73
|
-
|
74
|
-
task.
|
75
|
-
task.spec_opts = COMMON_SPEC_OPTS + ['-f', 'p']
|
71
|
+
RSpec::Core::RakeTask.new( :quiet ) do |task|
|
72
|
+
task.rspec_opts = COMMON_RSPEC_OPTS + ['-f', 'p']
|
76
73
|
end
|
77
74
|
|
78
75
|
desc "Generate HTML output"
|
79
|
-
|
80
|
-
task.
|
81
|
-
task.spec_opts = COMMON_SPEC_OPTS + ['-f', 'h']
|
76
|
+
RSpec::Core::RakeTask.new( :html ) do |task|
|
77
|
+
task.rspec_opts = COMMON_RSPEC_OPTS + ['-f', 'h']
|
82
78
|
end
|
83
79
|
|
84
|
-
end
|
85
|
-
rescue LoadError => err
|
86
|
-
task :no_rspec do
|
87
|
-
$stderr.puts "Specification tasks not defined: %s" % [ err.message ]
|
88
|
-
end
|
89
|
-
|
90
|
-
task :spec => :no_rspec
|
91
|
-
namespace :spec do
|
92
|
-
task :autotest => :no_rspec
|
93
|
-
task :doc => :no_rspec
|
94
|
-
task :profile => :no_rspec
|
95
|
-
task :quiet => :no_rspec
|
96
|
-
task :html => :no_rspec
|
97
|
-
end
|
98
|
-
end
|
99
|
-
|
100
|
-
|
101
|
-
### Test::Unit tests
|
102
|
-
begin
|
103
|
-
require 'rake/testtask'
|
104
|
-
|
105
|
-
Rake::TestTask.new( :unittests ) do |task|
|
106
|
-
task.libs += [LIBDIR]
|
107
|
-
task.test_files = TEST_FILES
|
108
|
-
task.verbose = true
|
109
|
-
end
|
110
80
|
|
111
|
-
rescue LoadError => err
|
112
|
-
task :no_test do
|
113
|
-
$stderr.puts "Test tasks not defined: %s" % [ err.message ]
|
114
81
|
end
|
115
82
|
|
116
|
-
task :unittests => :no_rspec
|
117
|
-
end
|
118
|
-
|
119
|
-
|
120
|
-
### RCov (via RSpec) tasks
|
121
|
-
begin
|
122
|
-
gem 'rcov'
|
123
|
-
gem 'rspec', '>= 1.1.3'
|
124
|
-
|
125
|
-
require 'spec'
|
126
|
-
require 'rcov'
|
127
|
-
|
128
83
|
### Task: coverage (via RCov)
|
129
84
|
desc "Build test coverage reports"
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
task.rcov_opts = RCOV_OPTS
|
136
|
-
task.rcov = true
|
137
|
-
end
|
85
|
+
RSpec::Core::RakeTask.new( :coverage ) do |task|
|
86
|
+
task.ruby_opts = [ "-I#{LIBDIR}" ]
|
87
|
+
task.rspec_opts = ['-f', 'p', '-b']
|
88
|
+
task.rcov_opts = RCOV_OPTS
|
89
|
+
task.rcov = true
|
138
90
|
end
|
139
91
|
|
140
|
-
|
141
92
|
### Task: rcov
|
142
93
|
task :rcov => :coverage
|
143
94
|
|
144
95
|
### Other coverage tasks
|
145
96
|
namespace :coverage do
|
146
97
|
desc "Generate a detailed text coverage report"
|
147
|
-
|
148
|
-
task.spec_files = SPEC_FILES
|
98
|
+
RSpec::Core::RakeTask.new( :text ) do |task|
|
149
99
|
task.rcov_opts = RCOV_OPTS + ['--text-report']
|
150
100
|
task.rcov = true
|
151
101
|
end
|
152
102
|
|
153
103
|
desc "Show differences in coverage from last run"
|
154
|
-
|
155
|
-
task.
|
156
|
-
task.spec_opts = ['-f', 'p', '-b']
|
104
|
+
RSpec::Core::RakeTask.new( :diff ) do |task|
|
105
|
+
task.rspec_opts = ['-f', 'p', '-b']
|
157
106
|
task.rcov_opts = RCOV_OPTS - ['--save'] + ['--text-coverage-diff']
|
158
107
|
task.rcov = true
|
159
108
|
end
|
160
109
|
|
161
110
|
desc "Run RCov in 'spec-only' mode to check coverage from specs"
|
162
|
-
|
163
|
-
task.spec_files = SPEC_FILES
|
111
|
+
RSpec::Core::RakeTask.new( :speconly ) do |task|
|
164
112
|
task.rcov_opts = ['--exclude', RCOV_EXCLUDES, '--text-report', '--save']
|
165
113
|
task.rcov = true
|
166
114
|
end
|
167
115
|
end
|
168
116
|
|
169
117
|
CLOBBER.include( COVERAGE_TARGETDIR )
|
170
|
-
|
171
118
|
rescue LoadError => err
|
172
|
-
task :
|
173
|
-
$stderr.puts "
|
174
|
-
[ err.message ]
|
119
|
+
task :no_rspec do
|
120
|
+
$stderr.puts "Specification tasks not defined: %s" % [ err.message ]
|
175
121
|
end
|
176
122
|
|
177
|
-
task :
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
task :
|
182
|
-
task :
|
123
|
+
task :spec => :no_rspec
|
124
|
+
namespace :spec do
|
125
|
+
task :autotest => :no_rspec
|
126
|
+
task :doc => :no_rspec
|
127
|
+
task :profile => :no_rspec
|
128
|
+
task :quiet => :no_rspec
|
129
|
+
task :html => :no_rspec
|
183
130
|
end
|
184
|
-
|
131
|
+
end
|
132
|
+
|
133
|
+
|
134
|
+
### Test::Unit tests
|
135
|
+
begin
|
136
|
+
require 'rake/testtask'
|
137
|
+
|
138
|
+
Rake::TestTask.new( :unittests ) do |task|
|
139
|
+
task.libs += [LIBDIR]
|
140
|
+
task.test_files = TEST_FILES
|
141
|
+
task.verbose = true
|
142
|
+
end
|
143
|
+
|
144
|
+
rescue LoadError => err
|
145
|
+
task :no_test do
|
146
|
+
$stderr.puts "Test tasks not defined: %s" % [ err.message ]
|
147
|
+
end
|
148
|
+
|
149
|
+
task :unittests => :no_rspec
|
185
150
|
end
|
186
151
|
|
187
152
|
|