review 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -0
  3. data/.rubocop.yml +293 -6
  4. data/.rubocop_todo.yml +3 -608
  5. data/.travis.yml +6 -13
  6. data/README.md +5 -3
  7. data/Rakefile +6 -6
  8. data/bin/review-catalog-converter +2 -2
  9. data/bin/review-check +1 -1
  10. data/bin/review-compile +1 -2
  11. data/bin/review-init +6 -3
  12. data/bin/review-validate +3 -3
  13. data/bin/review-vol +2 -1
  14. data/doc/NEWS.ja.md +138 -25
  15. data/doc/NEWS.md +137 -25
  16. data/doc/config.yml.sample +2 -2
  17. data/doc/config.yml.sample-simple +1 -1
  18. data/doc/format.ja.md +86 -5
  19. data/doc/format.md +67 -2
  20. data/doc/makeindex.ja.md +95 -0
  21. data/doc/makeindex.md +97 -0
  22. data/doc/sample.css +214 -0
  23. data/lib/epubmaker.rb +6 -6
  24. data/lib/epubmaker/epubcommon.rb +19 -47
  25. data/lib/epubmaker/epubv2.rb +3 -1
  26. data/lib/epubmaker/epubv3.rb +4 -26
  27. data/lib/epubmaker/producer.rb +46 -46
  28. data/lib/epubmaker/zip_exporter.rb +86 -0
  29. data/lib/review/book/base.rb +13 -15
  30. data/lib/review/book/chapter.rb +2 -1
  31. data/lib/review/book/compilable.rb +9 -9
  32. data/lib/review/book/image_finder.rb +13 -13
  33. data/lib/review/book/index.rb +2 -2
  34. data/lib/review/book/volume.rb +2 -2
  35. data/lib/review/builder.rb +57 -1
  36. data/lib/review/catalog.rb +2 -2
  37. data/lib/review/compiler.rb +15 -7
  38. data/lib/review/configure.rb +11 -0
  39. data/lib/review/epubmaker.rb +403 -401
  40. data/lib/review/ewbbuilder.rb +16 -16
  41. data/lib/review/htmlbuilder.rb +42 -58
  42. data/lib/review/htmltoc.rb +1 -1
  43. data/lib/review/htmlutils.rb +50 -4
  44. data/lib/review/i18n.rb +2 -2
  45. data/lib/review/idgxmlbuilder.rb +30 -47
  46. data/lib/review/latexbuilder.rb +86 -41
  47. data/lib/review/latexutils.rb +19 -19
  48. data/lib/review/markdownbuilder.rb +16 -4
  49. data/lib/review/md2inaobuilder.rb +0 -9
  50. data/lib/review/pdfmaker.rb +91 -48
  51. data/lib/review/preprocessor.rb +1 -1
  52. data/lib/review/rstbuilder.rb +763 -0
  53. data/lib/review/sec_counter.rb +7 -9
  54. data/lib/review/tocparser.rb +3 -3
  55. data/lib/review/tocprinter.rb +5 -5
  56. data/lib/review/topbuilder.rb +48 -56
  57. data/lib/review/version.rb +1 -1
  58. data/lib/review/webmaker.rb +6 -7
  59. data/review.gemspec +1 -0
  60. data/templates/latex/layout.tex.erb +27 -2
  61. data/test/assets/test_template.tex +10 -1
  62. data/test/book_test_helper.rb +1 -2
  63. data/test/run_test.rb +10 -0
  64. data/test/sample-book/src/style.css +215 -0
  65. data/test/sample-book/src/vendor/jumoline/lppl.txt +416 -0
  66. data/test/test_book.rb +0 -1
  67. data/test/test_catalog.rb +1 -0
  68. data/test/test_converter.rb +1 -1
  69. data/test/test_epub3maker.rb +44 -51
  70. data/test/test_epubmaker.rb +82 -38
  71. data/test/test_epubmaker_cmd.rb +1 -1
  72. data/test/test_extentions_hash.rb +8 -1
  73. data/test/test_htmlbuilder.rb +411 -18
  74. data/test/test_i18n.rb +17 -0
  75. data/test/test_idgxmlbuilder.rb +88 -3
  76. data/test/test_image_finder.rb +18 -0
  77. data/test/test_index.rb +2 -0
  78. data/test/test_latexbuilder.rb +96 -8
  79. data/test/test_makerhelper.rb +2 -2
  80. data/test/test_markdownbuilder.rb +22 -1
  81. data/test/test_md2inaobuilder.rb +0 -5
  82. data/test/test_pdfmaker.rb +54 -36
  83. data/test/test_pdfmaker_cmd.rb +1 -1
  84. data/test/test_rstbuilder.rb +356 -0
  85. data/test/test_textutils.rb +14 -4
  86. data/test/test_topbuilder.rb +23 -4
  87. data/test/test_zip_exporter.rb +113 -0
  88. metadata +28 -2
@@ -28,7 +28,7 @@ module ReVIEW
28
28
  @counter[n] += 1
29
29
  end
30
30
  if @counter.size > n
31
- (n+1 .. @counter.size).each do |i|
31
+ (n+1..@counter.size).each do |i|
32
32
  @counter[i] = 0
33
33
  end
34
34
  end
@@ -54,15 +54,13 @@ module ReVIEW
54
54
  return "#{@chapter.format_number}#{I18n.t("chapter_postfix")}"
55
55
  end
56
56
  end
57
- else
58
- if secnolevel >= level
59
- prefix = @chapter.format_number(false)
60
- 0.upto(level - 2) do |i|
61
- prefix << ".#{@counter[i]}"
62
- end
63
- prefix << I18n.t("chapter_postfix")
64
- return prefix
57
+ elsif secnolevel >= level
58
+ prefix = @chapter.format_number(false)
59
+ 0.upto(level - 2) do |i|
60
+ prefix << ".#{@counter[i]}"
65
61
  end
62
+ prefix << I18n.t("chapter_postfix")
63
+ return prefix
66
64
  end
67
65
  end
68
66
  end
@@ -39,9 +39,9 @@ module ReVIEW
39
39
  while line = f.gets
40
40
  case line
41
41
  when /\A\#@/
42
- ;
42
+ # do nothing
43
43
  when /\A\s*\z/
44
- ;
44
+ # do nothing
45
45
  when /\A(={2,})[\[\s\{]/
46
46
  lev = $1.size
47
47
  error! filename, f.lineno, "section level too deep: #{lev}" if lev > 5
@@ -81,7 +81,7 @@ module ReVIEW
81
81
  error! filename, beg, 'unterminated list' unless line
82
82
 
83
83
  when %r<\A//\w>
84
- ;
84
+ # do nothing
85
85
  else
86
86
  #if node_stack.empty?
87
87
  # error! filename, f.lineno, 'text found before section label'
@@ -70,13 +70,13 @@ module ReVIEW
70
70
  if node.chapter?
71
71
  vol = node.volume
72
72
  @out.printf "%3s %3dKB %6dC %5dL %s (%s)\n",
73
- chapnumstr(node.number),
74
- vol.kbytes, vol.chars, vol.lines,
75
- node.label, node.chapter_id
73
+ chapnumstr(node.number),
74
+ vol.kbytes, vol.chars, vol.lines,
75
+ node.label, node.chapter_id
76
76
  else ## for section node
77
77
  @out.printf "%17s %5dL %s\n",
78
- '', node.estimated_lines,
79
- " #{' ' * (node.level - 1)}#{number} #{node.label}"
78
+ '', node.estimated_lines,
79
+ " #{' ' * (node.level - 1)}#{number} #{node.label}"
80
80
  end
81
81
  end
82
82
 
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
3
  # Copyright (c) 2002-2006 Minero Aoki
4
- # 2008-2016 Minero Aoki, Kenshi Muto
4
+ # 2008-2017 Minero Aoki, Kenshi Muto
5
5
  #
6
6
  # This program is free software.
7
7
  # You can distribute or modify this program under the terms of
@@ -52,6 +52,7 @@ module ReVIEW
52
52
  @subsubsection = 0
53
53
  @subsubsubsection = 0
54
54
  @blank_seen = true
55
+ @sec_counter = SecCounter.new(5, @chapter)
55
56
 
56
57
  @titles = {
57
58
  "emlist" => "インラインリスト",
@@ -129,47 +130,9 @@ module ReVIEW
129
130
  $stderr.puts "#{@location.filename}:#{@location.lineno}: error: #{msg}"
130
131
  end
131
132
 
132
- def messages
133
- error_messages() + warning_messages()
134
- end
135
-
136
133
  def headline(level, label, caption)
137
- prefix = ""
138
- blank
139
- case level
140
- when 1
141
- if @chapter.number.to_s =~ /\A\d+\Z/
142
- prefix = "第#{@chapter.number}章 "
143
- elsif @chapter.number.present?
144
- prefix = "#{@chapter.number} "
145
- end
146
- @section = 0
147
- @subsection = 0
148
- @subsubsection = 0
149
- @subsubsubsection = 0
150
- when 2
151
- @section += 1
152
- prefix = @chapter.number.present? ? "#{@chapter.number}.#{@section} " : ""
153
- @subsection = 0
154
- @subsubsection = 0
155
- @subsubsubsection = 0
156
- when 3
157
- @subsection += 1
158
- prefix = @chapter.number.present? ? "#{@chapter.number}.#{@section}.#{@subsection} " : ""
159
- @subsubsection = 0
160
- @subsubsubsection = 0
161
- when 4
162
- @subsubsection += 1
163
- prefix = @chapter.number.present? ? "#{@chapter.number}.#{@section}.#{@subsection}.#{@subsubsection} " : ""
164
- @subsubsubsection = 0
165
- when 5
166
- @subsubsubsection += 1
167
- prefix = @chapter.number.present? ? "#{@chapter.number}.#{@section}.#{@subsection}.#{@subsubsection}.#{@subsubsubsection} " : ""
168
- else
169
- raise "caption level too deep or unsupported: #{level}"
170
- end
171
- prefix = "" if (level.to_i > @book.config["secnolevel"])
172
- puts "■H#{level}■#{prefix}#{compile_inline(caption)}"
134
+ prefix, anchor = headline_prefix(level)
135
+ puts %Q[■H#{level}■#{prefix}#{compile_inline(caption)}]
173
136
  end
174
137
 
175
138
  def ul_begin
@@ -232,11 +195,10 @@ module ReVIEW
232
195
  def inline_list(id)
233
196
  chapter, id = extract_chapter_id(id)
234
197
  if get_chap(chapter).nil?
235
- %Q[#{I18n.t("list")}#{I18n.t("format_number_without_chapter", [@chapter.list(id).number])}]
198
+ %Q[#{I18n.t("list")}#{I18n.t("format_number_without_chapter", [chapter.list(id).number])}]
236
199
  else
237
- %Q[#{I18n.t("list")}#{I18n.t("format_number", [get_chap(chapter), @chapter.list(id).number])}]
200
+ %Q[#{I18n.t("list")}#{I18n.t("format_number", [get_chap(chapter), chapter.list(id).number])}]
238
201
  end
239
-
240
202
  end
241
203
 
242
204
  def list_header(id, caption, lang)
@@ -385,10 +347,12 @@ module ReVIEW
385
347
  end
386
348
 
387
349
  def comment(lines, comment = nil)
388
- lines ||= []
389
- lines.unshift comment unless comment.blank?
390
- str = lines.join("")
391
- puts "◆→DTP連絡:#{str}←◆"
350
+ if @book.config["draft"]
351
+ lines ||= []
352
+ lines.unshift comment unless comment.blank?
353
+ str = lines.join("")
354
+ puts "◆→#{str}←◆"
355
+ end
392
356
  end
393
357
 
394
358
  def footnote(id, str)
@@ -505,7 +469,7 @@ module ReVIEW
505
469
 
506
470
  def inline_comment(str)
507
471
  if @book.config["draft"]
508
- %Q[◆→DTP連絡:#{str}←◆]
472
+ "◆→#{str}←◆"
509
473
  else
510
474
  ""
511
475
  end
@@ -515,6 +479,26 @@ module ReVIEW
515
479
  %Q[◆→TeX式ここから←◆#{str}◆→TeX式ここまで←◆]
516
480
  end
517
481
 
482
+ def bibpaper(lines, id, caption)
483
+ bibpaper_header id, caption
484
+ unless lines.empty?
485
+ bibpaper_bibpaper id, caption, lines
486
+ end
487
+ end
488
+
489
+ def bibpaper_header(id, caption)
490
+ print "[#{@chapter.bibpaper(id).number}]"
491
+ puts " #{compile_inline(caption)}"
492
+ end
493
+
494
+ def bibpaper_bibpaper(id, caption, lines)
495
+ print split_paragraph(lines).join("")
496
+ end
497
+
498
+ def inline_bib(id)
499
+ %Q([#{@chapter.bibpaper(id).number}])
500
+ end
501
+
518
502
  def inline_hd_chap(chap, id)
519
503
  if chap.number
520
504
  n = chap.headline_index.number(id)
@@ -536,6 +520,20 @@ module ReVIEW
536
520
  def nonum_end(level)
537
521
  end
538
522
 
523
+ def notoc_begin(level, label, caption)
524
+ puts "■H#{level}■#{compile_inline(caption)}◆→DTP連絡:目次に掲載しない←◆"
525
+ end
526
+
527
+ def notoc_end(level)
528
+ end
529
+
530
+ def nodisp_begin(level, label, caption)
531
+ # return empty
532
+ end
533
+
534
+ def nodisp_end(level)
535
+ end
536
+
539
537
  def common_column_begin(type, caption)
540
538
  blank
541
539
  puts "◆→開始:#{@titles[type]}←◆"
@@ -716,11 +714,6 @@ module ReVIEW
716
714
  ""
717
715
  end
718
716
 
719
- def tsize(id)
720
- # FIXME
721
- ""
722
- end
723
-
724
717
  def dtp(str)
725
718
  # FIXME
726
719
  end
@@ -759,14 +752,13 @@ module ReVIEW
759
752
 
760
753
  def inline_chapref(id)
761
754
  chs = ["", "「", "」"]
762
- unless @book.config["chapref"].nil?
755
+ if @book.config["chapref"]
763
756
  _chs = @book.config["chapref"].split(",")
764
757
  if _chs.size != 3
765
758
  error "--chapsplitter must have exactly 3 parameters with comma."
766
759
  else
767
760
  chs = _chs
768
761
  end
769
- else
770
762
  end
771
763
  "#{chs[0]}#{@book.chapter_index.number(id)}#{chs[1]}#{@book.chapter_index.title(id)}#{chs[2]}"
772
764
  rescue KeyError
@@ -1,3 +1,3 @@
1
1
  module ReVIEW
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
@@ -35,7 +35,7 @@ module ReVIEW
35
35
  end
36
36
 
37
37
  def parse_opts(args)
38
- cmd_config = Hash.new
38
+ cmd_config = {}
39
39
  opts = OptionParser.new
40
40
 
41
41
  opts.banner = "Usage: review-webmaker configfile"
@@ -93,10 +93,10 @@ module ReVIEW
93
93
  build_body(@path, yamlfile)
94
94
  copy_backmatter(@path)
95
95
 
96
- copy_images(@config["imagedir"], "#{@path}/images")
96
+ copy_images(@config["imagedir"], "#{@path}/#{@config["imagedir"]}")
97
97
 
98
- copy_resources("covers", "#{@path}/images")
99
- copy_resources("adv", "#{@path}/images")
98
+ copy_resources("covers", "#{@path}/#{@config["imagedir"]}")
99
+ copy_resources("adv", "#{@path}/#{@config["imagedir"]}")
100
100
  copy_resources(@config["fontdir"], "#{@path}/fonts", @config["font_ext"])
101
101
  end
102
102
 
@@ -120,7 +120,6 @@ module ReVIEW
120
120
  part.chapters.each do |chap|
121
121
  build_chap(chap, base_path, basetmpdir, false)
122
122
  end
123
-
124
123
  end
125
124
  end
126
125
 
@@ -232,8 +231,8 @@ module ReVIEW
232
231
  def build_indexpage(basetmpdir)
233
232
  File.open("#{basetmpdir}/index.html", "w") do |f|
234
233
  if @config["coverimage"]
235
- file = File.join("images", @config["coverimage"])
236
- @body = <<-EOT
234
+ file = File.join(@config["imagedir"], @config["coverimage"])
235
+ @body = <<-EOT
237
236
  <div id="cover-image" class="cover-image">
238
237
  <img src="#{file}" class="max"/>
239
238
  </div>
data/review.gemspec CHANGED
@@ -24,6 +24,7 @@ Gem::Specification.new do |gem|
24
24
  gem.require_paths = ["lib"]
25
25
 
26
26
  gem.add_dependency("rubyzip")
27
+ gem.add_dependency("rouge")
27
28
  gem.add_development_dependency("rake")
28
29
  gem.add_development_dependency("test-unit")
29
30
  gem.add_development_dependency("pygments.rb")
@@ -27,7 +27,9 @@
27
27
  \usepackage{amsmath}
28
28
 
29
29
  %% if you use @<u>{} (underline), use jumoline.sty
30
- %%\usepackage{jumoline}
30
+ \IfFileExists{jumoline.sty}{
31
+ \usepackage{jumoline}
32
+ }
31
33
 
32
34
  \newenvironment{shadedb}{%
33
35
  \def\FrameCommand{\fboxsep=\FrameSep \colorbox{shadecolorb}}%
@@ -79,6 +81,8 @@
79
81
  \lstnewenvironment{reviewemlistnumlst}[1][]{\lstset{numbers=left, #1}}{}
80
82
  \lstnewenvironment{reviewlistlst}[1][]{\lstset{#1}}{}
81
83
  \lstnewenvironment{reviewlistnumlst}[1][]{\lstset{numbers=left, #1}}{}
84
+ \lstnewenvironment{reviewsourcelst}[1][]{\lstset{#1}}{}
85
+ \lstnewenvironment{reviewsourcenumlst}[1][]{\lstset{numbers=left, #1}}{}
82
86
  \lstnewenvironment{reviewcmdlst}[1][]{\lstset{backgroundcolor=\color{white}, frameround=tttt, frame=trbl, #1}}{}
83
87
  <%- end -%>
84
88
 
@@ -102,6 +106,10 @@
102
106
  \begin{shaded}\small\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
103
107
  \end{alltt}\end{shaded}\par\vspace*{0.5zw}}
104
108
 
109
+ \newenvironment{reviewsource}{%
110
+ \begin{shaded}\small\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
111
+ \end{alltt}\end{shaded}\par\vspace*{0.5zw}}
112
+
105
113
  \newenvironment{reviewcmd}{%
106
114
  \color{white}\medskip\small\begin{shadedb}\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
107
115
  \end{alltt}\end{shadedb}}
@@ -140,6 +148,9 @@
140
148
  \newcommand{\reviewemlistcaption}[1]{%
141
149
  \medskip{\small\noindent #1}\vspace*{-1.3zw}}
142
150
 
151
+ \newcommand{\reviewsourcecaption}[1]{%
152
+ \medskip{\small\noindent #1}\vspace*{-1.3zw}}
153
+
143
154
  \newcommand{\reviewcmdcaption}[1]{%
144
155
  \medskip{\small\noindent #1}\vspace*{-1.3zw}}
145
156
 
@@ -236,6 +247,10 @@
236
247
  <%- if @config["usepackage"] -%>
237
248
  <%= @config["usepackage"] %>
238
249
  <%- end -%>
250
+ <%- if @config["makeindex"] -%>
251
+ \usepackage{makeidx}
252
+ \makeindex
253
+ <%- end -%>
239
254
 
240
255
  \begin{document}
241
256
 
@@ -248,7 +263,7 @@
248
263
  \begin{titlepage}
249
264
  <%- if @config["coverimage"] -%>
250
265
  \begin{center}
251
- \includegraphics[<%= @coverimageoption%>]{./images/<%= @config["coverimage"] %>}
266
+ \includegraphics[<%= @coverimageoption%>]{./<%= @config["imagedir"] %>/<%= @config["coverimage"] %>}
252
267
  \end{center}
253
268
  \clearpage
254
269
  <%- end -%>
@@ -257,6 +272,10 @@
257
272
  \mbox{} \vskip5zw
258
273
  \reviewtitlefont%
259
274
  {\Huge <%= escape_latex(@config.name_of("booktitle")) %> \par}%
275
+ <%- if @config["subtitle"] -%>
276
+ \vskip 1em%
277
+ {\Large <%= escape_latex(@config.name_of("subtitle")) %> \par}%
278
+ <%- end -%>
260
279
  \vskip 15em%
261
280
  {\huge
262
281
  \lineskip .75em
@@ -307,6 +326,9 @@
307
326
  <%- if @input_files["POSTDEF"] -%>
308
327
  <%= @input_files["POSTDEF"] %>
309
328
  <%- end -%>
329
+ <%- if @config["pdfmaker"]["makeindex"] -%>
330
+ \printindex
331
+ <%- end -%>
310
332
 
311
333
  %%% profile
312
334
  <%- if @config["profile"] -%>
@@ -330,6 +352,9 @@
330
352
  \vspace*{\fill}
331
353
 
332
354
  {\noindent\reviewtitlefont\Large <%= escape_latex(@config.name_of("booktitle")) %>} \\
355
+ <%- if @config["subtitle"] -%>
356
+ {\noindent\reviewtitlefont\large <%= escape_latex(@config.name_of("subtitle")) %>} \\
357
+ <%- end -%>
333
358
  \rule[8pt]{14cm}{1pt} \\
334
359
  {\noindent
335
360
  <%= @config["pubhistory"].to_s.gsub(/\n/){"\n\n\\noindent\n"} %>
@@ -23,7 +23,9 @@
23
23
  \usepackage{amsmath}
24
24
 
25
25
  %% if you use @<u>{} (underline), use jumoline.sty
26
- %%\usepackage{jumoline}
26
+ \IfFileExists{jumoline.sty}{
27
+ \usepackage{jumoline}
28
+ }
27
29
 
28
30
  \newenvironment{shadedb}{%
29
31
  \def\FrameCommand{\fboxsep=\FrameSep \colorbox{shadecolorb}}%
@@ -64,6 +66,10 @@
64
66
  \begin{shaded}\small\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
65
67
  \end{alltt}\end{shaded}\par\vspace*{0.5zw}}
66
68
 
69
+ \newenvironment{reviewsource}{%
70
+ \begin{shaded}\small\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
71
+ \end{alltt}\end{shaded}\par\vspace*{0.5zw}}
72
+
67
73
  \newenvironment{reviewcmd}{%
68
74
  \color{white}\medskip\small\begin{shadedb}\setlength{\baselineskip}{1.3zw}\begin{alltt}}{%
69
75
  \end{alltt}\end{shadedb}}
@@ -102,6 +108,9 @@
102
108
  \newcommand{\reviewemlistcaption}[1]{%
103
109
  \medskip{\small\noindent #1}\vspace*{-1.3zw}}
104
110
 
111
+ \newcommand{\reviewsourcecaption}[1]{%
112
+ \medskip{\small\noindent #1}\vspace*{-1.3zw}}
113
+
105
114
  \newcommand{\reviewcmdcaption}[1]{%
106
115
  \medskip{\small\noindent #1}\vspace*{-1.3zw}}
107
116
 
@@ -25,14 +25,13 @@ module BookTestHelper
25
25
  end
26
26
 
27
27
  def get_instance_variables(obj)
28
- obj.instance_variables.inject({}) do |memo, name|
28
+ obj.instance_variables.each_with_object({}) do |name, memo|
29
29
  value = obj.instance_variable_get(name)
30
30
  if value.instance_variables.empty?
31
31
  memo[name] = value
32
32
  else
33
33
  memo[name] = get_instance_variables(value)
34
34
  end
35
- memo
36
35
  end
37
36
  end
38
37
  end
data/test/run_test.rb ADDED
@@ -0,0 +1,10 @@
1
+ base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
2
+ lib_dir = File.join(base_dir, "lib")
3
+ test_dir = File.join(base_dir, "test")
4
+
5
+ $LOAD_PATH.unshift(lib_dir)
6
+
7
+ require 'test/unit'
8
+
9
+ argv = ["--max-diff-target-string-size=10000"]
10
+ exit Test::Unit::AutoRunner.run(true, test_dir, argv)