review 5.9.0 → 5.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6140d24dcd1cdbb98fe8f67131bb080c3bd82a397eb2569d11455b7ac954ef9b
4
- data.tar.gz: 23ca68ed05c615d4535d65ca1120f8180336310a5ea0c157f4001cea8e1e4223
3
+ metadata.gz: c2a456720c918f2f50342dfbd711d1d1b5dbc78d73ff311f28ac1614797f358a
4
+ data.tar.gz: a674bd3277e09fc000f390036824472f2fdf1a51468efe513fe23f21c44246bd
5
5
  SHA512:
6
- metadata.gz: 4d23fb91a4951a077c2d48ff9cf68227dc91e0bc238e4c0825795b7708da887da3bd1f3467c4cace936f07972a279b14cdd57fa8bb3d176e274a47918a3858a0
7
- data.tar.gz: '0005176058f24404f388c55c1b5db58daa034b6b1be049b9b4ca8348c2f8a889cef2bfc3df3eaa96b504186014058a5ca90530b5dd3b60453981816b9c580f11'
6
+ metadata.gz: f0e3c8e8fdc5ea94c7931ddc1292e8a6a59717cbf6bb82e4c56233ef054fb3756dfb961f937252328951e66be184b4f924a8c8ca9bcb820bcb3d3567f98e4672
7
+ data.tar.gz: 7eff5222bde84c529d9688dd1f64c92c414cea0f20191f45ecf25c972f7a79bc3cb01c6381595063110c0f5abe816b01b9ee3fdffea29d0b671dcdf94959dfb7
@@ -20,11 +20,19 @@ jobs:
20
20
  - name: Install TeXLive 2021 in ubuntu
21
21
  if: runner.os == 'Linux'
22
22
  run: |
23
- sudo apt-get update -y -qq && sudo apt-get install -y -qq texlive-lang-japanese texlive-fonts-recommended texlive-fonts-extra texlive-luatex texlive-extra-utils texlive-latex-extra dvipng poppler-utils
23
+ sudo apt-get update -y -qq && sudo apt-get install -y -qq texlive-lang-japanese texlive-fonts-recommended texlive-fonts-extra texlive-luatex texlive-extra-utils texlive-latex-extra dvipng poppler-utils libfuse2
24
24
  - name: Set up Ruby
25
25
  uses: ruby/setup-ruby@v1
26
26
  with:
27
27
  ruby-version: ${{ matrix.ruby }}
28
+ - name: use vendor's imagemagick
29
+ run: |
30
+ export PATH=${GITHUB_WORKSPACE}/vendor/imagemagick:${PATH}
31
+ chmod 755 ${GITHUB_WORKSPACE}/vendor/imagemagick/magick
32
+ ln -s ${GITHUB_WORKSPACE}/vendor/imagemagick/magick ${GITHUB_WORKSPACE}/vendor/imagemagick/compare
33
+ which compare
34
+ magick -version
35
+ compare -version
28
36
  - name: fix ImageMagick policy.xml on Linux
29
37
  if: runner.os == 'Linux'
30
38
  run: sudo sed -i 's/none/read|write/g' /etc/ImageMagick-6/policy.xml
@@ -34,6 +42,7 @@ jobs:
34
42
  node-version: 18
35
43
  - name: Build and test with Rake
36
44
  run: |
45
+ export PATH=${GITHUB_WORKSPACE}/vendor/imagemagick:${PATH}
37
46
  gem install bundler --no-document
38
47
  bundle install --retry 3
39
48
  bundle exec rake
data/NEWS.ja.md CHANGED
@@ -1,3 +1,27 @@
1
+ # Version 5.10.0
2
+ ## バグ修正
3
+ * サブディレクトリとカスタムページを両方指定するとエラーが発生するバグを修正しました([#1913],[#1914])
4
+ * EPUBBuilder: ビルド時間が長い問題を解決しました([#1915],[#1916],[#1919])
5
+ * ImageMagickのcompareのmetricに`SSIM`を使うように変更し、環境によってテストが失敗する問題を修正しました([#1917],[#1921])
6
+ * EPUBMaker: `verify_target_images`が有効な場合、coverimageを暗黙に取り込むよう修正しました([#1918],[#1923])
7
+
8
+ ## 機能強化
9
+ * Ruby 3.4で`csv` gemと`nkf` gemがdefault gemではなくなる警告に対応しました([#1911])
10
+
11
+ ## コントリビューターのみなさん
12
+ * [@fabon-f](https://github.com/fabon-f)
13
+
14
+ [#1911]: https://github.com/kmuto/review/pull/1911
15
+ [#1913]: https://github.com/kmuto/review/issues/1913
16
+ [#1914]: https://github.com/kmuto/review/pull/1914
17
+ [#1915]: https://github.com/kmuto/review/issues/1915
18
+ [#1916]: https://github.com/kmuto/review/issues/1916
19
+ [#1917]: https://github.com/kmuto/review/issues/1917
20
+ [#1918]: https://github.com/kmuto/review/issues/1918
21
+ [#1919]: https://github.com/kmuto/review/pull/1919
22
+ [#1921]: https://github.com/kmuto/review/pull/1921
23
+ [#1923]: https://github.com/kmuto/review/pull/1923
24
+
1
25
  # Version 5.9.0
2
26
  ## バグ修正
3
27
  * LATEXBuilder: `@<code>`, `@<tt>`, `@<tti>`, `@<ttb>`での空白幅が適切になるよう修正しました。またPDF栞の扱いを改善しました([#1906],[#1907])。
data/NEWS.md CHANGED
@@ -1,3 +1,27 @@
1
+ # Version 5.10.0
2
+ ## Bug Fixes
3
+ * Fixed an issue where specifying both a subdirectory and a custom page would cause an error ([#1913], [#1914]).
4
+ * EPUBBuilder: Resolved an issue with long build times. ([#1915], [#1916], [#1919]).
5
+ * EPUBMaker: When `verify_target_images` is enabled, modified to implicitly include coverimage ([#1918], [#1923]).
6
+ * Changed the metric option of ImageMagick's compare command to use `SSIM` ([#1917], [#1921]).
7
+
8
+ ## Enhancements
9
+ * Resolved warnings about the `csv` and `nkf` gems no longer being default gems in Ruby 3.4 ([#1911]).
10
+
11
+ ## Contributors
12
+ * [@fabon-f](https://github.com/fabon-f)
13
+
14
+ [#1911]: https://github.com/kmuto/review/pull/1911
15
+ [#1913]: https://github.com/kmuto/review/issues/1913
16
+ [#1914]: https://github.com/kmuto/review/pull/1914
17
+ [#1915]: https://github.com/kmuto/review/issues/1915
18
+ [#1916]: https://github.com/kmuto/review/issues/1916
19
+ [#1917]: https://github.com/kmuto/review/issues/1917
20
+ [#1918]: https://github.com/kmuto/review/issues/1918
21
+ [#1919]: https://github.com/kmuto/review/pull/1919
22
+ [#1921]: https://github.com/kmuto/review/pull/1921
23
+ [#1923]: https://github.com/kmuto/review/pull/1923
24
+
1
25
  # Version 5.9.0
2
26
  ## Bug Fixes
3
27
  * LATEXBuilder: fix the spacing for `@<code>`, `@<tt>`, `@<tti>`, `@<ttb>` to be more appropriate. Also improved handling of PDF bookmarks ([#1906], [#1907]).
@@ -10,6 +10,7 @@
10
10
  require 'review/configure'
11
11
  require 'review/catalog'
12
12
  require 'review/book/bib'
13
+ require 'review/book/cache'
13
14
 
14
15
  module ReVIEW
15
16
  module Book
@@ -19,6 +20,7 @@ module ReVIEW
19
20
  attr_accessor :catalog
20
21
  attr_reader :basedir
21
22
  attr_accessor :bibpaper_index
23
+ attr_reader :cache
22
24
 
23
25
  def self.load(basedir = '.', config: nil)
24
26
  new(basedir, config: config)
@@ -39,6 +41,8 @@ module ReVIEW
39
41
 
40
42
  @warn_old_files = {} # XXX for checking CHAPS, PREDEF, POSTDEF
41
43
  @basedir_seen = {}
44
+
45
+ @cache = ReVIEW::Book::Cache.new
42
46
  update_rubyenv
43
47
  end
44
48
 
@@ -0,0 +1,54 @@
1
+ #
2
+ # Copyright (c) 2014-2024 Minero Aoki, Kenshi Muto, Masayoshi Takahashi
3
+ #
4
+ # This program is free software.
5
+ # You can distribute or modify this program under the terms of
6
+ # the GNU LGPL, Lesser General Public License version 2.1.
7
+ # For details of LGPL, see the file "COPYING".
8
+ #
9
+ module ReVIEW
10
+ module Book
11
+ class Cache
12
+ def initialize
13
+ @store = {}
14
+ end
15
+
16
+ def reset
17
+ @store.clear
18
+ end
19
+
20
+ # key should be Symbol, not String
21
+ def fetch(key, &block)
22
+ raise ArgumentError, 'Key should be Symbol' unless key.is_a?(Symbol)
23
+
24
+ if cached?(key)
25
+ read(key)
26
+ else
27
+ exec_block_and_save(key, &block)
28
+ end
29
+ end
30
+
31
+ def cached?(key)
32
+ @store.key?(key)
33
+ end
34
+
35
+ private
36
+
37
+ def read(key)
38
+ @store[key]
39
+ end
40
+
41
+ def write(key, value)
42
+ @store[key] = value
43
+ end
44
+
45
+ def exec_block_and_save(key)
46
+ result = yield(key)
47
+
48
+ write(key, result)
49
+
50
+ result
51
+ end
52
+ end
53
+ end
54
+ end
@@ -26,7 +26,9 @@ module ReVIEW
26
26
  end
27
27
 
28
28
  def dir_entries
29
- Dir.glob(File.join(@basedir, '**{,/*/**}/*.*')).uniq.sort.map { |entry| entry.sub(%r{^\./}, '') }
29
+ @book.cache.fetch(:image_finder_dir_entries) do
30
+ Dir.glob(File.join(@basedir, '**{,/*/**}/*.*')).uniq.sort.map { |entry| entry.sub(%r{^\./}, '') }
31
+ end
30
32
  end
31
33
 
32
34
  def add_entry(path)
@@ -773,7 +773,7 @@ EOTGNUPLOT
773
773
  ## override TextUtils::detab
774
774
  def detab(str, num = nil)
775
775
  if num
776
- super(str, num)
776
+ super
777
777
  elsif @tabwidth
778
778
  super(str, @tabwidth)
779
779
  else
@@ -1,6 +1,6 @@
1
1
  # = epubcommon.rb -- super class for EPUBv2 and EPUBv3
2
2
  #
3
- # Copyright (c) 2010-2023 Kenshi Muto and Masayoshi Takahashi
3
+ # Copyright (c) 2010-2024 Kenshi Muto and Masayoshi Takahashi
4
4
  #
5
5
  # This program is free software.
6
6
  # You can distribute or modify this program under the terms of
@@ -320,19 +320,19 @@ module ReVIEW
320
320
  end
321
321
 
322
322
  def produce_write_common(basedir, tmpdir)
323
- File.write("#{tmpdir}/mimetype", mimetype)
323
+ File.write(File.join(tmpdir, 'mimetype'), mimetype)
324
324
 
325
- FileUtils.mkdir_p("#{tmpdir}/META-INF")
326
- File.write("#{tmpdir}/META-INF/container.xml", container)
325
+ FileUtils.mkdir_p(File.join(tmpdir, 'META-INF'))
326
+ File.write(File.join(tmpdir, 'META-INF', 'container.xml'), container)
327
327
 
328
- FileUtils.mkdir_p("#{tmpdir}/OEBPS")
328
+ FileUtils.mkdir_p(File.join(tmpdir, 'OEBPS'))
329
329
  File.write(File.join(tmpdir, opf_path), opf)
330
330
 
331
331
  if config['cover']
332
- if File.exist?("#{basedir}/#{config['cover']}")
333
- FileUtils.cp("#{basedir}/#{config['cover']}", "#{tmpdir}/OEBPS")
332
+ if File.exist?(File.join(basedir, File.basename(config['cover'])))
333
+ FileUtils.cp(File.join(basedir, File.basename(config['cover'])), File.join(tmpdir, 'OEBPS'))
334
334
  else
335
- File.write("#{tmpdir}/OEBPS/#{config['cover']}", cover)
335
+ File.write(File.join(tmpdir, 'OEBPS', File.basename(config['cover'])), cover)
336
336
  end
337
337
  end
338
338
 
@@ -344,13 +344,13 @@ module ReVIEW
344
344
  contents.each do |item|
345
345
  next if /#/.match?(item.file) # skip subgroup
346
346
 
347
- fname = "#{basedir}/#{item.file}"
347
+ fname = File.join(basedir, item.file)
348
348
  unless File.exist?(fname)
349
349
  raise ApplicationError, "#{fname} is not found."
350
350
  end
351
351
 
352
- FileUtils.mkdir_p(File.dirname("#{tmpdir}/OEBPS/#{item.file}"))
353
- FileUtils.cp(fname, "#{tmpdir}/OEBPS/#{item.file}")
352
+ FileUtils.mkdir_p(File.dirname(File.join(tmpdir, 'OEBPS', item.file)))
353
+ FileUtils.cp(fname, File.join(tmpdir, 'OEBPS', item.file))
354
354
  end
355
355
  end
356
356
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2023 Kenshi Muto and Masayoshi Takahashi
1
+ # Copyright (c) 2010-2024 Kenshi Muto and Masayoshi Takahashi
2
2
  #
3
3
  # This program is free software.
4
4
  # You can distribute or modify this program under the terms of
@@ -214,12 +214,17 @@ module ReVIEW
214
214
  File.open(File.join(basetmpdir, content.file)) do |f|
215
215
  f.each_line do |l|
216
216
  l.scan(/url\((.+?)\)/) do |_m|
217
- @config['epubmaker']['force_include_images'].push($1.strip)
217
+ @config['epubmaker']['force_include_images'].push($1.strip.gsub(/\A(['"])(.*)\1\Z/, '\2'))
218
218
  end
219
219
  end
220
220
  end
221
221
  end
222
222
  end
223
+
224
+ if @config['coverimage']
225
+ @config['epubmaker']['force_include_images'].push(File.join(@config['imagedir'], @config['coverimage']))
226
+ end
227
+
223
228
  @config['epubmaker']['force_include_images'] = @config['epubmaker']['force_include_images'].compact.sort.uniq
224
229
  end
225
230
 
@@ -523,7 +528,7 @@ module ReVIEW
523
528
  end
524
529
 
525
530
  def copy_static_file(configname, destdir, destfilename: nil)
526
- destfilename ||= @config[configname]
531
+ destfilename ||= File.basename(@config[configname])
527
532
  unless File.exist?(@config[configname])
528
533
  error! "#{configname}: #{@config[configname]} is not found."
529
534
  end
@@ -455,7 +455,7 @@ module ReVIEW
455
455
 
456
456
  def list(lines, id, caption, lang = nil)
457
457
  puts %Q(<div id="#{normalize_id(id)}" class="caption-code">)
458
- super(lines, id, caption, lang)
458
+ super
459
459
  puts '</div>'
460
460
  end
461
461
 
@@ -480,7 +480,7 @@ module ReVIEW
480
480
 
481
481
  def source(lines, caption = nil, lang = nil)
482
482
  puts %Q(<div class="source-code">)
483
- super(lines, caption, lang)
483
+ super
484
484
  puts '</div>'
485
485
  end
486
486
 
@@ -500,7 +500,7 @@ module ReVIEW
500
500
 
501
501
  def listnum(lines, id, caption, lang = nil)
502
502
  puts %Q(<div id="#{normalize_id(id)}" class="code">)
503
- super(lines, id, caption, lang)
503
+ super
504
504
  puts '</div>'
505
505
  end
506
506
 
@@ -737,7 +737,7 @@ module ReVIEW
737
737
  else
738
738
  puts %Q(<div class="table">)
739
739
  end
740
- super(lines, id, caption)
740
+ super
741
741
  puts '</div>'
742
742
  end
743
743
 
@@ -1117,9 +1117,9 @@ EOS
1117
1117
  chap, id2 = extract_chapter_id(id)
1118
1118
  n = chap.headline_index.number(id2)
1119
1119
  anchor = 'h' + n.tr('.', '-')
1120
- %Q(<a href="#{chap.id}#{extname}##{anchor}">#{super(id)}</a>)
1120
+ %Q(<a href="#{chap.id}#{extname}##{anchor}">#{super}</a>)
1121
1121
  else
1122
- super(id)
1122
+ super
1123
1123
  end
1124
1124
  rescue KeyError
1125
1125
  app_error "unknown headline: #{id}"
@@ -1129,9 +1129,9 @@ EOS
1129
1129
  if @book.config['chapterlink']
1130
1130
  chap, id2 = extract_chapter_id(id)
1131
1131
  anchor = 'h' + chap.headline_index.number(id2).tr('.', '-')
1132
- %Q(<a href="#{chap.id}#{extname}##{anchor}">#{super(id)}</a>)
1132
+ %Q(<a href="#{chap.id}#{extname}##{anchor}">#{super}</a>)
1133
1133
  else
1134
- super(id)
1134
+ super
1135
1135
  end
1136
1136
  rescue KeyError
1137
1137
  app_error "unknown headline: #{id}"
@@ -1154,7 +1154,7 @@ EOS
1154
1154
  end
1155
1155
 
1156
1156
  def inline_list(id)
1157
- str = super(id)
1157
+ str = super
1158
1158
  chapter, id = extract_chapter_id(id)
1159
1159
  if @book.config['chapterlink']
1160
1160
  %Q(<span class="listref"><a href="./#{chapter.id}#{extname}##{normalize_id(id)}">#{str}</a></span>)
@@ -1164,7 +1164,7 @@ EOS
1164
1164
  end
1165
1165
 
1166
1166
  def inline_table(id)
1167
- str = super(id)
1167
+ str = super
1168
1168
  chapter, id = extract_chapter_id(id)
1169
1169
  if @book.config['chapterlink']
1170
1170
  %Q(<span class="tableref"><a href="./#{chapter.id}#{extname}##{normalize_id(id)}">#{str}</a></span>)
@@ -1174,7 +1174,7 @@ EOS
1174
1174
  end
1175
1175
 
1176
1176
  def inline_img(id)
1177
- str = super(id)
1177
+ str = super
1178
1178
  chapter, id = extract_chapter_id(id)
1179
1179
  if @book.config['chapterlink']
1180
1180
  %Q(<span class="imgref"><a href="./#{chapter.id}#{extname}##{normalize_id(id)}">#{str}</a></span>)
@@ -1184,7 +1184,7 @@ EOS
1184
1184
  end
1185
1185
 
1186
1186
  def inline_eq(id)
1187
- str = super(id)
1187
+ str = super
1188
1188
  chapter, id = extract_chapter_id(id)
1189
1189
  if @book.config['chapterlink']
1190
1190
  %Q(<span class="eqref"><a href="./#{chapter.id}#{extname}##{normalize_id(id)}">#{str}</a></span>)
@@ -1308,7 +1308,7 @@ EOS
1308
1308
  end
1309
1309
 
1310
1310
  def inline_raw(str) # rubocop:disable Lint/UselessMethodDefinition
1311
- super(str)
1311
+ super
1312
1312
  end
1313
1313
 
1314
1314
  def nofunc_text(str)
@@ -273,7 +273,7 @@ module ReVIEW
273
273
  end
274
274
 
275
275
  def inline_list(id)
276
- "<span type='list'>#{super(id)}</span>"
276
+ "<span type='list'>#{super}</span>"
277
277
  end
278
278
 
279
279
  def list_header(id, caption, _lang)
@@ -304,7 +304,7 @@ module ReVIEW
304
304
 
305
305
  def list(lines, id, caption, lang = nil)
306
306
  puts '<codelist>'
307
- super(lines, id, caption, lang)
307
+ super
308
308
  puts '</codelist>'
309
309
  end
310
310
 
@@ -329,7 +329,7 @@ module ReVIEW
329
329
 
330
330
  def listnum(lines, id, caption, lang = nil)
331
331
  puts '<codelist>'
332
- super(lines, id, caption, lang)
332
+ super
333
333
  puts '</codelist>'
334
334
  end
335
335
 
@@ -389,15 +389,15 @@ module ReVIEW
389
389
  end
390
390
 
391
391
  def inline_table(id)
392
- "<span type='table'>#{super(id)}</span>"
392
+ "<span type='table'>#{super}</span>"
393
393
  end
394
394
 
395
395
  def inline_img(id)
396
- "<span type='image'>#{super(id)}</span>"
396
+ "<span type='image'>#{super}</span>"
397
397
  end
398
398
 
399
399
  def inline_eq(id)
400
- "<span type='eq'>#{super(id)}</span>"
400
+ "<span type='eq'>#{super}</span>"
401
401
  end
402
402
 
403
403
  def inline_imgref(id)
@@ -725,7 +725,7 @@ module ReVIEW
725
725
  end
726
726
 
727
727
  def inline_raw(str)
728
- super(str).gsub('\\n', "\n")
728
+ super.gsub('\\n', "\n")
729
729
  end
730
730
 
731
731
  def inline_hint(str)
@@ -556,7 +556,7 @@ module ReVIEW
556
556
  end
557
557
 
558
558
  def parse_metric(type, metric)
559
- s = super(type, metric)
559
+ s = super
560
560
  if @book.config['pdfmaker']['use_original_image_size'] && s.empty? && !metric.present?
561
561
  return ' ' # pass empty to \reviewincludegraphics
562
562
  end
@@ -1292,11 +1292,11 @@ module ReVIEW
1292
1292
 
1293
1293
  def inline_sec(id)
1294
1294
  if @book.config['chapterlink']
1295
- n = super(id)
1295
+ n = super
1296
1296
  anchor = n.tr('.', '-')
1297
1297
  macro('reviewsecref', n, sec_label(anchor))
1298
1298
  else
1299
- super(id)
1299
+ super
1300
1300
  end
1301
1301
  rescue KeyError
1302
1302
  app_error "unknown headline: #{id}"
@@ -1306,9 +1306,9 @@ module ReVIEW
1306
1306
  if @book.config['chapterlink']
1307
1307
  chap, id2 = extract_chapter_id(id)
1308
1308
  anchor = chap.headline_index.number(id2).tr('.', '-')
1309
- macro('reviewsecref', super(id), sec_label(anchor))
1309
+ macro('reviewsecref', super, sec_label(anchor))
1310
1310
  else
1311
- super(id)
1311
+ super
1312
1312
  end
1313
1313
  end
1314
1314
 
@@ -1321,7 +1321,7 @@ module ReVIEW
1321
1321
  end
1322
1322
 
1323
1323
  def inline_raw(str) # rubocop:disable Lint/UselessMethodDefinition
1324
- super(str)
1324
+ super
1325
1325
  end
1326
1326
 
1327
1327
  def inline_sub(str)
data/lib/review/logger.rb CHANGED
@@ -3,7 +3,7 @@ require 'logger'
3
3
  module ReVIEW
4
4
  class Logger < ::Logger
5
5
  def initialize(io = $stderr, progname: '--')
6
- super(io, progname: progname)
6
+ super
7
7
  self.formatter = ->(severity, _datetime, name, msg) { "#{severity} #{name}: #{msg}\n" }
8
8
  end
9
9
 
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2023 Kenshi Muto and Masayoshi Takahashi
1
+ # Copyright (c) 2010-2024 Kenshi Muto and Masayoshi Takahashi
2
2
  #
3
3
  # This program is free software.
4
4
  # You can distribute or modify this program under the terms of
@@ -339,6 +339,7 @@ module ReVIEW
339
339
  File.read(file_sty)
340
340
  else
341
341
  warn "File #{file_sty} is not found."
342
+ nil
342
343
  end
343
344
  end
344
345
 
@@ -505,6 +506,15 @@ module ReVIEW
505
506
  template_dir = @basedir
506
507
  template_path = 'layouts/layout.tex.erb'
507
508
  end
509
+
510
+ if @config['cover'] && !File.exist?(@config['cover'])
511
+ error! "File #{@config['cover']} is not found."
512
+ end
513
+
514
+ if @config['titlepage'] && @config['titlefile'] && !File.exist?(@config['titlefile'])
515
+ error! "File #{@config['titlefile']} is not found."
516
+ end
517
+
508
518
  ReVIEW::Template.generate(path: template_path, mode: '-', binding: binding, template_dir: template_dir)
509
519
  rescue StandardError => e
510
520
  if defined?(e.full_message)
@@ -362,7 +362,7 @@ module ReVIEW
362
362
  end
363
363
 
364
364
  def inline_raw(str)
365
- super(str).gsub('\\n', "\n")
365
+ super.gsub('\\n', "\n")
366
366
  end
367
367
 
368
368
  def inline_hidx(_str)
@@ -21,12 +21,12 @@ module ReVIEW
21
21
  print "\x01H#{level}\x01"
22
22
  end
23
23
  # embed header information for tocparser
24
- super(level, label, caption)
24
+ super
25
25
  end
26
26
 
27
27
  def base_block(type, lines, caption = nil)
28
28
  puts "\x01STARTLIST\x01"
29
- super(type, lines, caption)
29
+ super
30
30
  puts "\x01ENDLIST\x01"
31
31
  end
32
32
 
@@ -1,3 +1,3 @@
1
1
  module ReVIEW
2
- VERSION = '5.9.0'.freeze
2
+ VERSION = '5.10.0'.freeze
3
3
  end
data/review.gemspec CHANGED
@@ -14,21 +14,23 @@ Gem::Specification.new do |gem|
14
14
  gem.required_rubygems_version = Gem::Requirement.new('>= 0') if gem.respond_to?(:required_rubygems_version=)
15
15
  gem.metadata = { 'rubygems_mfa_required' => 'true' }
16
16
 
17
- gem.files = `git ls-files`.split("\n").reject { |f| f.match(/^test/) }
17
+ gem.files = `git ls-files`.split("\n").reject { |f| f.match(/^test/) }.reject { |f| f.match(%r{^vendor/imagemagick}) }
18
18
  gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
19
19
  gem.extra_rdoc_files = []
20
20
  gem.require_paths = ['lib']
21
21
 
22
+ gem.add_dependency('csv')
22
23
  gem.add_dependency('image_size')
24
+ gem.add_dependency('nkf')
23
25
  gem.add_dependency('rexml')
24
26
  gem.add_dependency('rouge')
25
27
  gem.add_dependency('rubyzip')
26
28
  gem.add_dependency('tty-logger')
27
- gem.add_development_dependency('mini_magick')
29
+ gem.add_development_dependency('mini_magick', '~> 5.0.0')
28
30
  gem.add_development_dependency('playwright-runner')
29
31
  gem.add_development_dependency('pygments.rb')
30
32
  gem.add_development_dependency('rake')
31
- gem.add_development_dependency('rubocop', '~> 1.59.0')
33
+ gem.add_development_dependency('rubocop', '~> 1.65.1')
32
34
  gem.add_development_dependency('rubocop-performance')
33
35
  gem.add_development_dependency('rubocop-rake')
34
36
  gem.add_development_dependency('simplecov')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: review
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.9.0
4
+ version: 5.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kmuto
@@ -9,8 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-05-04 00:00:00.000000000 Z
12
+ date: 2024-10-29 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: csv
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
14
28
  - !ruby/object:Gem::Dependency
15
29
  name: image_size
16
30
  requirement: !ruby/object:Gem::Requirement
@@ -25,6 +39,20 @@ dependencies:
25
39
  - - ">="
26
40
  - !ruby/object:Gem::Version
27
41
  version: '0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: nkf
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
28
56
  - !ruby/object:Gem::Dependency
29
57
  name: rexml
30
58
  requirement: !ruby/object:Gem::Requirement
@@ -85,16 +113,16 @@ dependencies:
85
113
  name: mini_magick
86
114
  requirement: !ruby/object:Gem::Requirement
87
115
  requirements:
88
- - - ">="
116
+ - - "~>"
89
117
  - !ruby/object:Gem::Version
90
- version: '0'
118
+ version: 5.0.0
91
119
  type: :development
92
120
  prerelease: false
93
121
  version_requirements: !ruby/object:Gem::Requirement
94
122
  requirements:
95
- - - ">="
123
+ - - "~>"
96
124
  - !ruby/object:Gem::Version
97
- version: '0'
125
+ version: 5.0.0
98
126
  - !ruby/object:Gem::Dependency
99
127
  name: playwright-runner
100
128
  requirement: !ruby/object:Gem::Requirement
@@ -143,14 +171,14 @@ dependencies:
143
171
  requirements:
144
172
  - - "~>"
145
173
  - !ruby/object:Gem::Version
146
- version: 1.59.0
174
+ version: 1.65.1
147
175
  type: :development
148
176
  prerelease: false
149
177
  version_requirements: !ruby/object:Gem::Requirement
150
178
  requirements:
151
179
  - - "~>"
152
180
  - !ruby/object:Gem::Version
153
- version: 1.59.0
181
+ version: 1.65.1
154
182
  - !ruby/object:Gem::Dependency
155
183
  name: rubocop-performance
156
184
  requirement: !ruby/object:Gem::Requirement
@@ -333,6 +361,7 @@ files:
333
361
  - lib/review/book/base.rb
334
362
  - lib/review/book/bib.rb
335
363
  - lib/review/book/book_unit.rb
364
+ - lib/review/book/cache.rb
336
365
  - lib/review/book/chapter.rb
337
366
  - lib/review/book/image_finder.rb
338
367
  - lib/review/book/index.rb
@@ -620,7 +649,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
620
649
  - !ruby/object:Gem::Version
621
650
  version: '0'
622
651
  requirements: []
623
- rubygems_version: 3.5.3
652
+ rubygems_version: 3.2.33
624
653
  signing_key:
625
654
  specification_version: 4
626
655
  summary: 'Re:VIEW: a easy-to-use digital publishing system'