review 4.0.0 → 5.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (268) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby-tex.yml +31 -0
  3. data/.github/workflows/ruby-win.yml +45 -0
  4. data/.github/workflows/ruby.yml +27 -0
  5. data/.rubocop.yml +141 -38
  6. data/Dockerfile +21 -5
  7. data/NEWS.ja.md +338 -1
  8. data/NEWS.md +339 -2
  9. data/README.md +11 -7
  10. data/Rakefile +7 -2
  11. data/appveyor.yml +0 -20
  12. data/bin/review +2 -4
  13. data/bin/review-catalog-converter +4 -4
  14. data/bin/review-check +8 -12
  15. data/bin/review-checkdep +2 -5
  16. data/bin/review-compile +11 -20
  17. data/bin/review-epub2html +1 -4
  18. data/bin/review-epubmaker +3 -4
  19. data/bin/review-idgxmlmaker +1 -3
  20. data/bin/review-index +5 -86
  21. data/bin/review-init +1 -4
  22. data/bin/review-pdfmaker +1 -3
  23. data/bin/review-preproc +3 -5
  24. data/bin/review-textmaker +1 -3
  25. data/bin/review-update +1 -4
  26. data/bin/review-validate +5 -5
  27. data/bin/review-vol +5 -82
  28. data/bin/review-webmaker +1 -3
  29. data/doc/config.yml.sample +55 -12
  30. data/doc/config.yml.sample-simple +4 -3
  31. data/doc/format.ja.md +119 -17
  32. data/doc/format.md +106 -17
  33. data/doc/makeindex.ja.md +2 -2
  34. data/doc/pdfmaker.ja.md +42 -0
  35. data/doc/pdfmaker.md +41 -0
  36. data/doc/quickstart.ja.md +55 -25
  37. data/doc/quickstart.md +47 -17
  38. data/lib/review.rb +1 -1
  39. data/lib/review/book.rb +2 -2
  40. data/lib/review/book/base.rb +69 -30
  41. data/lib/review/book/bib.rb +21 -0
  42. data/lib/review/book/book_unit.rb +158 -0
  43. data/lib/review/book/chapter.rb +33 -26
  44. data/lib/review/book/index.rb +39 -206
  45. data/lib/review/book/index/item.rb +8 -2
  46. data/lib/review/book/page_metric.rb +7 -7
  47. data/lib/review/book/part.rb +26 -11
  48. data/lib/review/book/volume.rb +5 -5
  49. data/lib/review/builder.rb +124 -27
  50. data/lib/review/call_hook.rb +20 -0
  51. data/lib/review/catalog.rb +3 -2
  52. data/lib/review/compiler.rb +197 -91
  53. data/lib/review/configure.rb +95 -9
  54. data/lib/review/converter.rb +1 -1
  55. data/lib/review/epub2html.rb +6 -1
  56. data/lib/review/epubmaker.rb +116 -117
  57. data/lib/review/epubmaker/content.rb +113 -0
  58. data/lib/review/epubmaker/epubcommon.rb +372 -0
  59. data/lib/review/epubmaker/epubv2.rb +178 -0
  60. data/lib/review/epubmaker/epubv3.rb +231 -0
  61. data/lib/review/epubmaker/producer.rb +168 -0
  62. data/lib/review/epubmaker/reviewheaderlistener.rb +12 -2
  63. data/lib/review/epubmaker/zip_exporter.rb +84 -0
  64. data/lib/review/exception.rb +6 -0
  65. data/lib/review/extentions/string.rb +0 -4
  66. data/lib/review/htmlbuilder.rb +132 -87
  67. data/lib/review/htmlutils.rb +8 -11
  68. data/lib/review/i18n.rb +2 -1
  69. data/lib/review/idgxmlbuilder.rb +156 -76
  70. data/lib/review/idgxmlmaker.rb +22 -18
  71. data/lib/review/img_math.rb +245 -0
  72. data/lib/review/index_builder.rb +654 -0
  73. data/lib/review/init.rb +17 -18
  74. data/lib/review/latexbox.rb +58 -0
  75. data/lib/review/latexbuilder.rb +173 -43
  76. data/lib/review/latexutils.rb +9 -1
  77. data/lib/review/lineinput.rb +112 -2
  78. data/lib/review/logger.rb +42 -3
  79. data/lib/review/makerhelper.rb +12 -187
  80. data/lib/review/markdownbuilder.rb +51 -2
  81. data/lib/review/pdfmaker.rb +78 -73
  82. data/lib/review/plaintextbuilder.rb +98 -14
  83. data/lib/review/preprocessor.rb +18 -12
  84. data/lib/review/rstbuilder.rb +28 -9
  85. data/lib/review/sec_counter.rb +14 -0
  86. data/lib/review/template.rb +6 -0
  87. data/lib/review/textmaker.rb +21 -19
  88. data/lib/review/textutils.rb +3 -12
  89. data/lib/review/tocprinter.rb +242 -97
  90. data/lib/review/topbuilder.rb +91 -24
  91. data/lib/review/update.rb +12 -13
  92. data/lib/review/version.rb +1 -1
  93. data/lib/review/volumeprinter.rb +97 -0
  94. data/lib/review/webmaker.rb +34 -33
  95. data/lib/review/webtocprinter.rb +39 -35
  96. data/lib/review/yamlloader.rb +2 -1
  97. data/review.gemspec +5 -3
  98. data/samples/sample-book/src/.gitignore +1 -0
  99. data/samples/sample-book/src/config-ebook.yml +4 -0
  100. data/samples/sample-book/src/config-epub2.yml +1 -1
  101. data/samples/sample-book/src/config-jlreq-ebook.yml +4 -0
  102. data/samples/sample-book/src/config.yml +3 -3
  103. data/samples/sample-book/src/lib/tasks/review.rake +26 -6
  104. data/samples/syntax-book/Gemfile +1 -1
  105. data/samples/syntax-book/ch01.re +3 -1
  106. data/samples/syntax-book/ch02.re +28 -21
  107. data/samples/syntax-book/ch03.re +1 -1
  108. data/samples/syntax-book/config-jlreq-lualatex.yml +4 -0
  109. data/samples/syntax-book/config-print.yml +3 -0
  110. data/samples/syntax-book/config.yml +1 -1
  111. data/samples/syntax-book/images/img3-2.png +0 -0
  112. data/samples/syntax-book/lib/tasks/review.rake +23 -8
  113. data/templates/html/_colophon.html.erb +23 -0
  114. data/templates/html/_colophon_history.html.erb +9 -0
  115. data/templates/html/_cover.html.erb +10 -0
  116. data/templates/html/_part_body.html.erb +6 -0
  117. data/templates/html/_titlepage.html.erb +20 -0
  118. data/templates/html/layout-html5.html.erb +6 -0
  119. data/templates/html/layout-xhtml1.html.erb +6 -0
  120. data/templates/latex/config.erb +41 -29
  121. data/templates/latex/review-jlreq/README.md +3 -1
  122. data/templates/latex/review-jlreq/review-base.sty +47 -22
  123. data/templates/latex/review-jlreq/review-jlreq.cls +25 -24
  124. data/templates/latex/review-jlreq/review-style.sty +6 -1
  125. data/templates/latex/review-jlreq/review-tcbox.sty +348 -0
  126. data/templates/latex/review-jlreq/reviewmacro.sty +5 -0
  127. data/templates/latex/review-jsbook/README.md +7 -5
  128. data/templates/latex/review-jsbook/review-base.sty +47 -21
  129. data/templates/latex/review-jsbook/review-jsbook.cls +12 -2
  130. data/templates/latex/review-jsbook/review-style.sty +6 -1
  131. data/templates/latex/review-jsbook/review-tcbox.sty +348 -0
  132. data/templates/latex/review-jsbook/reviewmacro.sty +5 -0
  133. data/templates/opf/epubv2.opf.erb +7 -7
  134. data/templates/opf/epubv3.opf.erb +7 -7
  135. data/templates/opf/opf_manifest_epubv2.opf.erb +10 -0
  136. data/templates/opf/opf_manifest_epubv3.opf.erb +10 -0
  137. data/templates/opf/opf_metainfo_epubv2.opf.erb +17 -0
  138. data/templates/opf/opf_metainfo_epubv3.opf.erb +49 -0
  139. data/templates/opf/opf_tocx_epubv2.opf.erb +9 -0
  140. data/templates/opf/opf_tocx_epubv3.opf.erb +17 -0
  141. data/templates/web/html/layout-html5.html.erb +9 -8
  142. data/templates/web/html/layout-xhtml1.html.erb +6 -0
  143. data/test/assets/header_listener.html +35 -0
  144. data/test/assets/img_math/img1.png +0 -0
  145. data/test/assets/img_math/img2.png +0 -0
  146. data/test/assets/img_math/img3.png +0 -0
  147. data/test/assets/syntax_book_index_detail.txt +58 -0
  148. data/test/assets/test_template.tex +12 -9
  149. data/test/assets/test_template_backmatter.tex +12 -9
  150. data/test/book_test_helper.rb +11 -5
  151. data/test/run_test.rb +1 -1
  152. data/test/test_book.rb +62 -63
  153. data/test/test_book_chapter.rb +99 -56
  154. data/test/test_book_part.rb +3 -3
  155. data/test/test_builder.rb +24 -15
  156. data/test/test_catalog.rb +1 -0
  157. data/test/test_catalog_converter_cmd.rb +1 -1
  158. data/test/test_converter.rb +1 -0
  159. data/test/test_epub3maker.rb +170 -126
  160. data/test/test_epubmaker.rb +249 -129
  161. data/test/test_epubmaker_cmd.rb +14 -7
  162. data/test/test_helper.rb +23 -11
  163. data/test/test_htmlbuilder.rb +956 -76
  164. data/test/test_htmlutils.rb +0 -12
  165. data/test/test_i18n.rb +33 -33
  166. data/test/test_idgxmlbuilder.rb +568 -10
  167. data/test/test_idgxmlmaker_cmd.rb +50 -0
  168. data/test/test_image_finder.rb +52 -70
  169. data/test/test_img_math.rb +111 -0
  170. data/test/test_index.rb +62 -52
  171. data/test/test_indexbuilder.rb +52 -0
  172. data/test/test_latexbuilder.rb +1056 -30
  173. data/test/test_latexbuilder_v2.rb +52 -12
  174. data/test/test_lineinput.rb +20 -93
  175. data/test/test_logger.rb +7 -7
  176. data/test/test_makerhelper.rb +0 -12
  177. data/test/test_markdownbuilder.rb +32 -0
  178. data/test/test_pdfmaker.rb +100 -11
  179. data/test/test_pdfmaker_cmd.rb +101 -7
  180. data/test/test_plaintextbuilder.rb +531 -25
  181. data/test/test_review_ext.rb +2 -1
  182. data/test/test_reviewheaderlistener.rb +49 -0
  183. data/test/test_rstbuilder.rb +25 -1
  184. data/test/test_sec_counter.rb +156 -0
  185. data/test/test_template.rb +12 -2
  186. data/test/test_textmaker_cmd.rb +58 -0
  187. data/test/test_tocprinter.rb +46 -0
  188. data/test/test_topbuilder.rb +365 -10
  189. data/test/test_update.rb +44 -44
  190. data/test/test_webtocprinter.rb +75 -43
  191. data/test/test_zip_exporter.rb +5 -6
  192. data/vendor/gentombow/LICENSE +1 -1
  193. data/vendor/gentombow/Makefile +0 -1
  194. data/vendor/gentombow/bounddvi-en.pdf +0 -0
  195. data/vendor/gentombow/bounddvi-en.tex +1 -0
  196. data/vendor/gentombow/bounddvi.pdf +0 -0
  197. data/vendor/gentombow/bounddvi.sty +30 -7
  198. data/vendor/gentombow/bounddvi.tex +1 -0
  199. data/vendor/gentombow/create_archive.sh +1 -0
  200. data/vendor/gentombow/gentombow-ja.pdf +0 -0
  201. data/vendor/gentombow/gentombow-ja.tex +9 -0
  202. data/vendor/gentombow/gentombow.pdf +0 -0
  203. data/vendor/gentombow/gentombow.sty +32 -10
  204. data/vendor/gentombow/gentombow.tex +8 -0
  205. data/vendor/gentombow/tests/gentombow-01-pdfx.tex +8 -0
  206. data/vendor/gentombow/tests/gentombow-02-pdfx.tex +8 -0
  207. data/vendor/jsclasses/LICENSE +1 -1
  208. data/vendor/jsclasses/Makefile +3 -2
  209. data/vendor/jsclasses/create_archive.sh +5 -5
  210. data/vendor/jsclasses/jis/Makefile +3 -2
  211. data/vendor/jsclasses/jis/jsarticle.cls +74 -31
  212. data/vendor/jsclasses/jis/jsbook.cls +74 -31
  213. data/vendor/jsclasses/jis/jsclasses.dtx +176 -36
  214. data/vendor/jsclasses/jis/jsclasses.ins +15 -5
  215. data/vendor/jsclasses/jis/jslogo.dtx +4 -4
  216. data/vendor/jsclasses/jis/jslogo.ins +9 -0
  217. data/vendor/jsclasses/jis/jslogo.sty +4 -16
  218. data/vendor/jsclasses/jis/jspf.cls +73 -30
  219. data/vendor/jsclasses/jis/jsreport.cls +74 -31
  220. data/vendor/jsclasses/jis/jsverb.ins +9 -0
  221. data/vendor/jsclasses/jis/jsverb.sty +1 -13
  222. data/vendor/jsclasses/jis/kiyou.cls +74 -31
  223. data/vendor/jsclasses/jis/minijs.sty +65 -22
  224. data/vendor/jsclasses/jis/okumacro.dtx +4 -5
  225. data/vendor/jsclasses/jis/okumacro.ins +9 -0
  226. data/vendor/jsclasses/jis/okumacro.sty +4 -17
  227. data/vendor/jsclasses/jis/okuverb.ins +9 -0
  228. data/vendor/jsclasses/jis/okuverb.sty +1 -13
  229. data/vendor/jsclasses/jis/winjis.sty +23 -19
  230. data/vendor/jsclasses/jsarticle.cls +74 -31
  231. data/vendor/jsclasses/jsbook.cls +74 -31
  232. data/vendor/jsclasses/jsclasses.dtx +176 -36
  233. data/vendor/jsclasses/jsclasses.ins +15 -5
  234. data/vendor/jsclasses/jsclasses.pdf +0 -0
  235. data/vendor/jsclasses/jslogo.dtx +4 -4
  236. data/vendor/jsclasses/jslogo.ins +9 -0
  237. data/vendor/jsclasses/jslogo.pdf +0 -0
  238. data/vendor/jsclasses/jslogo.sty +4 -16
  239. data/vendor/jsclasses/jspf.cls +73 -30
  240. data/vendor/jsclasses/jsreport.cls +74 -31
  241. data/vendor/jsclasses/jsverb.ins +9 -0
  242. data/vendor/jsclasses/jsverb.pdf +0 -0
  243. data/vendor/jsclasses/jsverb.sty +1 -13
  244. data/vendor/jsclasses/kiyou.cls +74 -31
  245. data/vendor/jsclasses/minijs.sty +68 -22
  246. data/vendor/jsclasses/okumacro.dtx +4 -5
  247. data/vendor/jsclasses/okumacro.ins +9 -0
  248. data/vendor/jsclasses/okumacro.pdf +0 -0
  249. data/vendor/jsclasses/okumacro.sty +4 -17
  250. data/vendor/jsclasses/okuverb.ins +9 -0
  251. data/vendor/jsclasses/okuverb.pdf +0 -0
  252. data/vendor/jsclasses/okuverb.sty +1 -13
  253. data/vendor/jsclasses/tests/relfont.tex +10 -0
  254. data/vendor/jsclasses/winjis.sty +23 -19
  255. metadata +109 -20
  256. data/.rubocop_todo.yml +0 -7
  257. data/lib/epubmaker.rb +0 -23
  258. data/lib/epubmaker/content.rb +0 -110
  259. data/lib/epubmaker/epubcommon.rb +0 -441
  260. data/lib/epubmaker/epubv2.rb +0 -143
  261. data/lib/epubmaker/epubv3.rb +0 -233
  262. data/lib/epubmaker/producer.rb +0 -375
  263. data/lib/epubmaker/zip_exporter.rb +0 -81
  264. data/lib/lineinput.rb +0 -155
  265. data/lib/review/book/compilable.rb +0 -178
  266. data/lib/review/tocparser.rb +0 -271
  267. data/samples/syntax-book/review-ext.rb +0 -14
  268. data/test/test_tocparser.rb +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89a4cecb9a961ec87c1238e52ceadaf474caeeef156ff3d22f2d856ed0959511
4
- data.tar.gz: 869b3b59d13a0fa2fc8b5812f0c52ae63f3e1faaad59c3ce0d0230d7baacefc4
3
+ metadata.gz: 3cb9e501ea85d00f7dc928d4f6304b0b710a6d137583585c0d31a29dab29eede
4
+ data.tar.gz: 8c50af2163c54fa4e2e0fd49f62cedbe45b1f5b29146bfc6e6fdccc8a57ed95c
5
5
  SHA512:
6
- metadata.gz: 45a497fd65af6dce68031d1ebf4fd04e961462e667c37b1e81082dae503c7d562aa165664c67794731a6997c439066161be3344b58811b6e04ec482b7a07c0ec
7
- data.tar.gz: 8944e5336301dc89c65de91656b7084a322b50fdf699ca3e82748206a0c0a5b49a0199e095e25be8258145ec3bde1564de5e7273e31e4272cfc12641f1d0b163
6
+ metadata.gz: 854d53265b02b978ed8615b09863db0491743cb72caa4762445bfed5c32cb368e7d0c3d87e9d264492f273555e352a4252ddc26a0d38050046e84a454acb981f
7
+ data.tar.gz: 4f9756da487921f5b7fbaddd3d840e43642738a67fa341a1f6e1b35d01cf2447563ba645c3f9b010626bac25a901b6effe2fbb9d1c478fc84cb0bc88a2d22944
@@ -0,0 +1,31 @@
1
+ name: Test with TeXLive
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ${{ matrix.os }}
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ ruby: [2.5, 3.0]
13
+ os: [ubuntu-20.04]
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Install TeXLive 2020 in ubuntu
17
+ if: runner.os == 'Linux'
18
+ run: |
19
+ 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
20
+ - name: Set up Ruby
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby }}
24
+ - name: fix ImageMagick policy.xml on Linux
25
+ if: runner.os == 'Linux'
26
+ run: sudo sed -i 's/none/read|write/g' /etc/ImageMagick-6/policy.xml
27
+ - name: Build and test with Rake
28
+ run: |
29
+ gem install bundler --no-document
30
+ bundle install --retry 3
31
+ bundle exec rake
@@ -0,0 +1,45 @@
1
+ name: TestWin
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: windows-latest
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ ruby: [ '3.0', '2.6', '2.5', '2.4' ]
13
+
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ - name: Build and test with Rake
21
+ shell: bash
22
+ run: |
23
+ gem install bundler --no-document
24
+ bundle install --retry 3
25
+ bundle exec ruby test/run_test.rb --max-diff-target-string-size=10000 --verbose=v
26
+ - name: install Re:VIEW and epubcheck-ruby
27
+ shell: bash
28
+ run: |
29
+ gem install -N epubcheck-ruby
30
+ rake install
31
+ - name: Test with epubcheck-ruby
32
+ shell: bash
33
+ run: |
34
+ review-init hello
35
+ cd hello
36
+ ruby -e 'Dir.glob("*.re"){|path| File.write(path, File.read(path).gsub("=", "= foo")) }'
37
+ review-epubmaker config.yml
38
+ epubcheck book.epub
39
+ cd ..
40
+ review-init hello2 --epub-version 2
41
+ cd hello2
42
+ ruby -e 'Dir.glob("*.re"){|path| File.write(path, File.read(path).gsub("=", "= foo")) }'
43
+ review-epubmaker config.yml
44
+ epubcheck book.epub
45
+ cd ..
@@ -0,0 +1,27 @@
1
+ name: Test
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ${{ matrix.os }}
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ ruby: [2.4, 2.5, 2.6, 2.7, 3.0]
13
+ os: [ubuntu-latest, macOS-latest]
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ - name: fix ImageMagick policy.xml on Linux
21
+ if: runner.os == 'Linux'
22
+ run: sudo sed -i 's/none/read|write/g' /etc/ImageMagick-6/policy.xml
23
+ - name: Build and test with Rake
24
+ run: |
25
+ gem install bundler --no-document
26
+ bundle install --retry 3
27
+ bundle exec rake
data/.rubocop.yml CHANGED
@@ -1,15 +1,14 @@
1
1
  AllCops:
2
2
  Exclude:
3
- - lib/lineinput.rb
4
3
  - lib/uuid.rb
5
4
  - test/syntax-book/*
5
+ - tmp/*
6
6
  DisplayCopNames: true
7
+ NewCops: enable
7
8
 
8
9
  require:
9
10
  - rubocop-performance
10
11
 
11
- inherit_from: .rubocop_todo.yml
12
-
13
12
  #### Lint
14
13
 
15
14
  Lint/EmptyWhen:
@@ -25,9 +24,6 @@ Lint/AssignmentInCondition:
25
24
  Lint/ParenthesesAsGroupedExpression:
26
25
  Enabled: true
27
26
 
28
- #Lint/RescueWithoutErrorClass:
29
- # Enabled: false
30
-
31
27
  Lint/UnderscorePrefixedVariableName:
32
28
  Enabled: true
33
29
 
@@ -40,6 +36,25 @@ Lint/UnusedMethodArgument:
40
36
  Lint/UselessAssignment:
41
37
  Enabled: true
42
38
 
39
+ Lint/ErbNewArguments:
40
+ Enabled: false
41
+
42
+ Lint/DeprecatedOpenSSLConstant:
43
+ Enabled: true
44
+
45
+ Lint/MixedRegexpCaptureTypes:
46
+ Enabled: true
47
+
48
+ Lint/RaiseException:
49
+ Enabled: true
50
+
51
+ Lint/StructNewOverride:
52
+ Enabled: true
53
+
54
+ # make it enable when supporting only Ruby 3.0 and higher.
55
+ Lint/RedundantDirGlobSort:
56
+ Enabled: false
57
+
43
58
  #### Performance
44
59
 
45
60
  Performance/RegexpMatch:
@@ -50,11 +65,44 @@ Performance/ReverseEach:
50
65
 
51
66
  # Use tr instead of gsub.
52
67
  Performance/StringReplacement:
53
- Enabled: false
68
+ Enabled: true
54
69
 
55
70
  Performance/RangeInclude:
56
71
  Enabled: true
57
72
 
73
+ Performance/DeletePrefix:
74
+ Enabled: false
75
+
76
+ Performance/RedundantMerge:
77
+ Enabled: true
78
+
79
+ Performance/AncestorsInclude:
80
+ Enabled: true
81
+
82
+ Performance/BigDecimalWithNumericArgument:
83
+ Enabled: true
84
+
85
+ Performance/RedundantSortBlock:
86
+ Enabled: true
87
+
88
+ Performance/RedundantStringChars:
89
+ Enabled: true
90
+
91
+ Performance/ReverseFirst:
92
+ Enabled: true
93
+
94
+ Performance/SortReverse:
95
+ Enabled: true
96
+
97
+ Performance/Squeeze:
98
+ Enabled: true
99
+
100
+ Performance/StringInclude:
101
+ Enabled: false
102
+
103
+ Performance/CollectionLiteralInLoop:
104
+ Enabled: false
105
+
58
106
  #### Style
59
107
 
60
108
  Style/AccessModifierDeclarations:
@@ -69,7 +117,7 @@ Style/Alias:
69
117
  Enabled: true
70
118
 
71
119
  Style/AndOr:
72
- Enabled: false
120
+ Enabled: true
73
121
 
74
122
  Style/BarePercentLiterals:
75
123
  EnforcedStyle: percent_q
@@ -78,9 +126,6 @@ Style/BarePercentLiterals:
78
126
  Style/BlockDelimiters:
79
127
  Enabled: true
80
128
 
81
- Style/BracesAroundHashParameters:
82
- Enabled: false
83
-
84
129
  Style/CaseEquality:
85
130
  Enabled: false
86
131
 
@@ -93,6 +138,9 @@ Style/ClassMethods:
93
138
  Style/CommentedKeyword:
94
139
  Enabled: false
95
140
 
141
+ Style/DocumentDynamicEvalDefinition:
142
+ Enabled: false
143
+
96
144
  Style/FloatDivision:
97
145
  Enabled: false
98
146
 
@@ -117,7 +165,7 @@ Style/EmptyElse:
117
165
  Enabled: true
118
166
 
119
167
  Style/EvalWithLocation:
120
- Enabled: false
168
+ Enabled: true
121
169
 
122
170
  Style/FormatString:
123
171
  EnforcedStyle: sprintf
@@ -138,13 +186,10 @@ Style/IfUnlessModifier:
138
186
  Style/MutableConstant:
139
187
  Enabled: false
140
188
 
141
- #Style/MultipleComparison:
142
- # Enabled: true
143
-
144
- Style/UnneededInterpolation:
189
+ Style/MultipleComparison:
145
190
  Enabled: true
146
191
 
147
- Performance/RedundantMerge:
192
+ Style/RedundantInterpolation:
148
193
  Enabled: true
149
194
 
150
195
  Style/ZeroLengthPredicate:
@@ -213,6 +258,9 @@ Style/MethodCallWithArgsParentheses:
213
258
  - 'source'
214
259
  - 'assert'
215
260
  - 'assert_equal'
261
+ - 'assert_raise'
262
+ - 'assert_raises'
263
+ - 'assert_nothing_raised'
216
264
  - 'sh'
217
265
  - 'mv'
218
266
  - 'rm_rf'
@@ -301,14 +349,56 @@ Style/TrailingCommaInHashLiteral:
301
349
  Style/WordArray:
302
350
  MinSize: 10
303
351
 
304
- Style/UnneededPercentQ:
352
+ Style/RedundantPercentQ:
305
353
  Enabled: false
306
354
 
307
355
  Style/WhileUntilModifier:
308
356
  Enabled: false
309
357
 
310
- #Style/YodaCondition:
311
- # Enabled: true
358
+ Style/YodaCondition:
359
+ Enabled: true
360
+
361
+ Style/ExponentialNotation:
362
+ Enabled: true
363
+
364
+ Style/HashEachMethods:
365
+ Enabled: true
366
+
367
+ Style/HashTransformKeys:
368
+ Enabled: true
369
+
370
+ Style/HashTransformValues:
371
+ Enabled: true
372
+
373
+ Style/RedundantFetchBlock:
374
+ Enabled: true
375
+
376
+ Style/RedundantRegexpCharacterClass:
377
+ Enabled: true
378
+
379
+ Style/RedundantRegexpEscape:
380
+ Enabled: true
381
+
382
+ Style/SlicingWithRange:
383
+ Enabled: false
384
+
385
+ Style/AccessorGrouping:
386
+ Enabled: false
387
+
388
+ Style/CaseLikeIf:
389
+ Enabled: false
390
+
391
+ Style/StringConcatenation:
392
+ Enabled: false
393
+
394
+ Style/OptionalBooleanParameter:
395
+ Enabled: false
396
+
397
+ Style/SoleNestedConditional:
398
+ Enabled: false
399
+
400
+ Style/CombinableLoops:
401
+ Enabled: false
312
402
 
313
403
  ### Layout
314
404
 
@@ -316,7 +406,7 @@ Layout/BlockAlignment:
316
406
  Enabled: true
317
407
 
318
408
  Layout/EndAlignment:
319
- Enabled: AlignWith
409
+ Enabled: true
320
410
 
321
411
  Layout/MultilineMethodCallBraceLayout:
322
412
  Enabled: true
@@ -336,7 +426,7 @@ Layout/EmptyLines:
336
426
  Enabled: true
337
427
 
338
428
  Layout/EmptyLineAfterGuardClause:
339
- Enabled: false
429
+ Enabled: true
340
430
 
341
431
  Layout/EmptyLinesAroundAccessModifier:
342
432
  Enabled: true
@@ -351,7 +441,7 @@ Layout/EmptyLinesAroundModuleBody:
351
441
  Enabled: true
352
442
 
353
443
  Layout/EndOfLine:
354
- Enabled: false
444
+ Enabled: true
355
445
 
356
446
  Layout/ExtraSpacing:
357
447
  Enabled: true
@@ -362,17 +452,17 @@ Layout/IndentationConsistency:
362
452
  Layout/IndentationWidth:
363
453
  Enabled: true
364
454
 
365
- Layout/IndentFirstHashElement:
455
+ Layout/FirstHashElementIndentation:
366
456
  Enabled: true
367
457
 
368
- Layout/IndentHeredoc:
458
+ Layout/HeredocIndentation:
369
459
  Enabled: false
370
460
 
371
461
  Layout/LeadingCommentSpace:
372
462
  Enabled: true
373
463
 
374
464
  Layout/MultilineOperationIndentation:
375
- Enabled: false
465
+ Enabled: true
376
466
 
377
467
  Layout/SpaceAroundBlockParameters:
378
468
  EnforcedStyleInsidePipes: no_space
@@ -394,7 +484,7 @@ Layout/SpaceAroundOperators:
394
484
  Enabled: true
395
485
 
396
486
  Layout/SpaceBeforeBlockBraces:
397
- Enabled: false
487
+ Enabled: true
398
488
 
399
489
  Layout/SpaceBeforeComma:
400
490
  Enabled: true
@@ -412,20 +502,31 @@ Layout/SpaceInsideStringInterpolation:
412
502
  EnforcedStyle: no_space
413
503
  Enabled: true
414
504
 
415
- Layout/TrailingBlankLines:
505
+ Layout/TrailingEmptyLines:
416
506
  Enabled: true
417
507
 
418
508
  Layout/TrailingWhitespace:
419
509
  Enabled: true
420
510
  AllowInHeredoc: true
421
511
 
512
+ Layout/EmptyLinesAroundAttributeAccessor:
513
+ Enabled: true
514
+
515
+ Layout/SpaceAroundMethodCallOperator:
516
+ Enabled: true
517
+
518
+ Layout/LineLength:
519
+ Max: 256
520
+ Exclude:
521
+ - "test/**/*"
522
+
422
523
  #### Metrics
423
524
 
424
525
  Metrics/BlockNesting:
425
526
  Max: 4
426
527
 
427
528
  Metrics/ModuleLength:
428
- Max: 200
529
+ Max: 300
429
530
 
430
531
  Metrics/ParameterLists:
431
532
  Max: 8
@@ -438,11 +539,6 @@ Metrics/ClassLength:
438
539
  Exclude:
439
540
  - 'test/*.rb'
440
541
 
441
- Metrics/LineLength:
442
- Max: 256
443
- Exclude:
444
- - "test/**/*"
445
-
446
542
  ### should be < 50
447
543
  Metrics/MethodLength:
448
544
  Max: 100
@@ -453,7 +549,7 @@ Metrics/MethodLength:
453
549
 
454
550
  ### should be < 20
455
551
  Metrics/CyclomaticComplexity:
456
- Max: 32
552
+ Max: 25
457
553
 
458
554
  ### should be < 60
459
555
  Metrics/AbcSize:
@@ -477,8 +573,8 @@ Naming/AccessorMethodName:
477
573
  Enabled: true
478
574
 
479
575
  # When defining the == operator, name its argument other.
480
- #Style/BinaryOperatorParameterName:
481
- # Enabled: true
576
+ Naming/BinaryOperatorParameterName:
577
+ Enabled: true
482
578
 
483
579
  Naming/FileName:
484
580
  Enabled: false
@@ -492,7 +588,7 @@ Naming/MemoizedInstanceVariableName:
492
588
  Naming/MethodName:
493
589
  Enabled: true
494
590
 
495
- Naming/UncommunicativeMethodParamName:
591
+ Naming/MethodParameterName:
496
592
  Enabled: false
497
593
 
498
594
  # Use snake_case for variable names.
@@ -502,8 +598,15 @@ Naming/VariableName:
502
598
  Naming/VariableNumber:
503
599
  EnforcedStyle: normalcase
504
600
  Enabled: true
601
+ Exclude:
602
+ - test/*
505
603
 
506
604
  #### Security
507
605
 
508
606
  Security/YAMLLoad:
509
607
  Enabled: true
608
+
609
+ #### Gemspec
610
+
611
+ Gemspec/RequiredRubyVersion:
612
+ Enabled: false