review 4.0.0 → 5.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby-tex.yml +31 -0
- data/.github/workflows/ruby-win.yml +45 -0
- data/.github/workflows/ruby.yml +27 -0
- data/.rubocop.yml +141 -38
- data/Dockerfile +21 -5
- data/NEWS.ja.md +338 -1
- data/NEWS.md +339 -2
- data/README.md +11 -7
- data/Rakefile +7 -2
- data/appveyor.yml +0 -20
- data/bin/review +2 -4
- data/bin/review-catalog-converter +4 -4
- data/bin/review-check +8 -12
- data/bin/review-checkdep +2 -5
- data/bin/review-compile +11 -20
- data/bin/review-epub2html +1 -4
- data/bin/review-epubmaker +3 -4
- data/bin/review-idgxmlmaker +1 -3
- data/bin/review-index +5 -86
- data/bin/review-init +1 -4
- data/bin/review-pdfmaker +1 -3
- data/bin/review-preproc +3 -5
- data/bin/review-textmaker +1 -3
- data/bin/review-update +1 -4
- data/bin/review-validate +5 -5
- data/bin/review-vol +5 -82
- data/bin/review-webmaker +1 -3
- data/doc/config.yml.sample +55 -12
- data/doc/config.yml.sample-simple +4 -3
- data/doc/format.ja.md +119 -17
- data/doc/format.md +106 -17
- data/doc/makeindex.ja.md +2 -2
- data/doc/pdfmaker.ja.md +42 -0
- data/doc/pdfmaker.md +41 -0
- data/doc/quickstart.ja.md +55 -25
- data/doc/quickstart.md +47 -17
- data/lib/review.rb +1 -1
- data/lib/review/book.rb +2 -2
- data/lib/review/book/base.rb +69 -30
- data/lib/review/book/bib.rb +21 -0
- data/lib/review/book/book_unit.rb +158 -0
- data/lib/review/book/chapter.rb +33 -26
- data/lib/review/book/index.rb +39 -206
- data/lib/review/book/index/item.rb +8 -2
- data/lib/review/book/page_metric.rb +7 -7
- data/lib/review/book/part.rb +26 -11
- data/lib/review/book/volume.rb +5 -5
- data/lib/review/builder.rb +124 -27
- data/lib/review/call_hook.rb +20 -0
- data/lib/review/catalog.rb +3 -2
- data/lib/review/compiler.rb +197 -91
- data/lib/review/configure.rb +95 -9
- data/lib/review/converter.rb +1 -1
- data/lib/review/epub2html.rb +6 -1
- data/lib/review/epubmaker.rb +116 -117
- data/lib/review/epubmaker/content.rb +113 -0
- data/lib/review/epubmaker/epubcommon.rb +372 -0
- data/lib/review/epubmaker/epubv2.rb +178 -0
- data/lib/review/epubmaker/epubv3.rb +231 -0
- data/lib/review/epubmaker/producer.rb +168 -0
- data/lib/review/epubmaker/reviewheaderlistener.rb +12 -2
- data/lib/review/epubmaker/zip_exporter.rb +84 -0
- data/lib/review/exception.rb +6 -0
- data/lib/review/extentions/string.rb +0 -4
- data/lib/review/htmlbuilder.rb +132 -87
- data/lib/review/htmlutils.rb +8 -11
- data/lib/review/i18n.rb +2 -1
- data/lib/review/idgxmlbuilder.rb +156 -76
- data/lib/review/idgxmlmaker.rb +22 -18
- data/lib/review/img_math.rb +245 -0
- data/lib/review/index_builder.rb +654 -0
- data/lib/review/init.rb +17 -18
- data/lib/review/latexbox.rb +58 -0
- data/lib/review/latexbuilder.rb +173 -43
- data/lib/review/latexutils.rb +9 -1
- data/lib/review/lineinput.rb +112 -2
- data/lib/review/logger.rb +42 -3
- data/lib/review/makerhelper.rb +12 -187
- data/lib/review/markdownbuilder.rb +51 -2
- data/lib/review/pdfmaker.rb +78 -73
- data/lib/review/plaintextbuilder.rb +98 -14
- data/lib/review/preprocessor.rb +18 -12
- data/lib/review/rstbuilder.rb +28 -9
- data/lib/review/sec_counter.rb +14 -0
- data/lib/review/template.rb +6 -0
- data/lib/review/textmaker.rb +21 -19
- data/lib/review/textutils.rb +3 -12
- data/lib/review/tocprinter.rb +242 -97
- data/lib/review/topbuilder.rb +91 -24
- data/lib/review/update.rb +12 -13
- data/lib/review/version.rb +1 -1
- data/lib/review/volumeprinter.rb +97 -0
- data/lib/review/webmaker.rb +34 -33
- data/lib/review/webtocprinter.rb +39 -35
- data/lib/review/yamlloader.rb +2 -1
- data/review.gemspec +5 -3
- data/samples/sample-book/src/.gitignore +1 -0
- data/samples/sample-book/src/config-ebook.yml +4 -0
- data/samples/sample-book/src/config-epub2.yml +1 -1
- data/samples/sample-book/src/config-jlreq-ebook.yml +4 -0
- data/samples/sample-book/src/config.yml +3 -3
- data/samples/sample-book/src/lib/tasks/review.rake +26 -6
- data/samples/syntax-book/Gemfile +1 -1
- data/samples/syntax-book/ch01.re +3 -1
- data/samples/syntax-book/ch02.re +28 -21
- data/samples/syntax-book/ch03.re +1 -1
- data/samples/syntax-book/config-jlreq-lualatex.yml +4 -0
- data/samples/syntax-book/config-print.yml +3 -0
- data/samples/syntax-book/config.yml +1 -1
- data/samples/syntax-book/images/img3-2.png +0 -0
- data/samples/syntax-book/lib/tasks/review.rake +23 -8
- data/templates/html/_colophon.html.erb +23 -0
- data/templates/html/_colophon_history.html.erb +9 -0
- data/templates/html/_cover.html.erb +10 -0
- data/templates/html/_part_body.html.erb +6 -0
- data/templates/html/_titlepage.html.erb +20 -0
- data/templates/html/layout-html5.html.erb +6 -0
- data/templates/html/layout-xhtml1.html.erb +6 -0
- data/templates/latex/config.erb +41 -29
- data/templates/latex/review-jlreq/README.md +3 -1
- data/templates/latex/review-jlreq/review-base.sty +47 -22
- data/templates/latex/review-jlreq/review-jlreq.cls +25 -24
- data/templates/latex/review-jlreq/review-style.sty +6 -1
- data/templates/latex/review-jlreq/review-tcbox.sty +348 -0
- data/templates/latex/review-jlreq/reviewmacro.sty +5 -0
- data/templates/latex/review-jsbook/README.md +7 -5
- data/templates/latex/review-jsbook/review-base.sty +47 -21
- data/templates/latex/review-jsbook/review-jsbook.cls +12 -2
- data/templates/latex/review-jsbook/review-style.sty +6 -1
- data/templates/latex/review-jsbook/review-tcbox.sty +348 -0
- data/templates/latex/review-jsbook/reviewmacro.sty +5 -0
- data/templates/opf/epubv2.opf.erb +7 -7
- data/templates/opf/epubv3.opf.erb +7 -7
- data/templates/opf/opf_manifest_epubv2.opf.erb +10 -0
- data/templates/opf/opf_manifest_epubv3.opf.erb +10 -0
- data/templates/opf/opf_metainfo_epubv2.opf.erb +17 -0
- data/templates/opf/opf_metainfo_epubv3.opf.erb +49 -0
- data/templates/opf/opf_tocx_epubv2.opf.erb +9 -0
- data/templates/opf/opf_tocx_epubv3.opf.erb +17 -0
- data/templates/web/html/layout-html5.html.erb +9 -8
- data/templates/web/html/layout-xhtml1.html.erb +6 -0
- data/test/assets/header_listener.html +35 -0
- data/test/assets/img_math/img1.png +0 -0
- data/test/assets/img_math/img2.png +0 -0
- data/test/assets/img_math/img3.png +0 -0
- data/test/assets/syntax_book_index_detail.txt +58 -0
- data/test/assets/test_template.tex +12 -9
- data/test/assets/test_template_backmatter.tex +12 -9
- data/test/book_test_helper.rb +11 -5
- data/test/run_test.rb +1 -1
- data/test/test_book.rb +62 -63
- data/test/test_book_chapter.rb +99 -56
- data/test/test_book_part.rb +3 -3
- data/test/test_builder.rb +24 -15
- data/test/test_catalog.rb +1 -0
- data/test/test_catalog_converter_cmd.rb +1 -1
- data/test/test_converter.rb +1 -0
- data/test/test_epub3maker.rb +170 -126
- data/test/test_epubmaker.rb +249 -129
- data/test/test_epubmaker_cmd.rb +14 -7
- data/test/test_helper.rb +23 -11
- data/test/test_htmlbuilder.rb +956 -76
- data/test/test_htmlutils.rb +0 -12
- data/test/test_i18n.rb +33 -33
- data/test/test_idgxmlbuilder.rb +568 -10
- data/test/test_idgxmlmaker_cmd.rb +50 -0
- data/test/test_image_finder.rb +52 -70
- data/test/test_img_math.rb +111 -0
- data/test/test_index.rb +62 -52
- data/test/test_indexbuilder.rb +52 -0
- data/test/test_latexbuilder.rb +1056 -30
- data/test/test_latexbuilder_v2.rb +52 -12
- data/test/test_lineinput.rb +20 -93
- data/test/test_logger.rb +7 -7
- data/test/test_makerhelper.rb +0 -12
- data/test/test_markdownbuilder.rb +32 -0
- data/test/test_pdfmaker.rb +100 -11
- data/test/test_pdfmaker_cmd.rb +101 -7
- data/test/test_plaintextbuilder.rb +531 -25
- data/test/test_review_ext.rb +2 -1
- data/test/test_reviewheaderlistener.rb +49 -0
- data/test/test_rstbuilder.rb +25 -1
- data/test/test_sec_counter.rb +156 -0
- data/test/test_template.rb +12 -2
- data/test/test_textmaker_cmd.rb +58 -0
- data/test/test_tocprinter.rb +46 -0
- data/test/test_topbuilder.rb +365 -10
- data/test/test_update.rb +44 -44
- data/test/test_webtocprinter.rb +75 -43
- data/test/test_zip_exporter.rb +5 -6
- data/vendor/gentombow/LICENSE +1 -1
- data/vendor/gentombow/Makefile +0 -1
- data/vendor/gentombow/bounddvi-en.pdf +0 -0
- data/vendor/gentombow/bounddvi-en.tex +1 -0
- data/vendor/gentombow/bounddvi.pdf +0 -0
- data/vendor/gentombow/bounddvi.sty +30 -7
- data/vendor/gentombow/bounddvi.tex +1 -0
- data/vendor/gentombow/create_archive.sh +1 -0
- data/vendor/gentombow/gentombow-ja.pdf +0 -0
- data/vendor/gentombow/gentombow-ja.tex +9 -0
- data/vendor/gentombow/gentombow.pdf +0 -0
- data/vendor/gentombow/gentombow.sty +32 -10
- data/vendor/gentombow/gentombow.tex +8 -0
- data/vendor/gentombow/tests/gentombow-01-pdfx.tex +8 -0
- data/vendor/gentombow/tests/gentombow-02-pdfx.tex +8 -0
- data/vendor/jsclasses/LICENSE +1 -1
- data/vendor/jsclasses/Makefile +3 -2
- data/vendor/jsclasses/create_archive.sh +5 -5
- data/vendor/jsclasses/jis/Makefile +3 -2
- data/vendor/jsclasses/jis/jsarticle.cls +74 -31
- data/vendor/jsclasses/jis/jsbook.cls +74 -31
- data/vendor/jsclasses/jis/jsclasses.dtx +176 -36
- data/vendor/jsclasses/jis/jsclasses.ins +15 -5
- data/vendor/jsclasses/jis/jslogo.dtx +4 -4
- data/vendor/jsclasses/jis/jslogo.ins +9 -0
- data/vendor/jsclasses/jis/jslogo.sty +4 -16
- data/vendor/jsclasses/jis/jspf.cls +73 -30
- data/vendor/jsclasses/jis/jsreport.cls +74 -31
- data/vendor/jsclasses/jis/jsverb.ins +9 -0
- data/vendor/jsclasses/jis/jsverb.sty +1 -13
- data/vendor/jsclasses/jis/kiyou.cls +74 -31
- data/vendor/jsclasses/jis/minijs.sty +65 -22
- data/vendor/jsclasses/jis/okumacro.dtx +4 -5
- data/vendor/jsclasses/jis/okumacro.ins +9 -0
- data/vendor/jsclasses/jis/okumacro.sty +4 -17
- data/vendor/jsclasses/jis/okuverb.ins +9 -0
- data/vendor/jsclasses/jis/okuverb.sty +1 -13
- data/vendor/jsclasses/jis/winjis.sty +23 -19
- data/vendor/jsclasses/jsarticle.cls +74 -31
- data/vendor/jsclasses/jsbook.cls +74 -31
- data/vendor/jsclasses/jsclasses.dtx +176 -36
- data/vendor/jsclasses/jsclasses.ins +15 -5
- data/vendor/jsclasses/jsclasses.pdf +0 -0
- data/vendor/jsclasses/jslogo.dtx +4 -4
- data/vendor/jsclasses/jslogo.ins +9 -0
- data/vendor/jsclasses/jslogo.pdf +0 -0
- data/vendor/jsclasses/jslogo.sty +4 -16
- data/vendor/jsclasses/jspf.cls +73 -30
- data/vendor/jsclasses/jsreport.cls +74 -31
- data/vendor/jsclasses/jsverb.ins +9 -0
- data/vendor/jsclasses/jsverb.pdf +0 -0
- data/vendor/jsclasses/jsverb.sty +1 -13
- data/vendor/jsclasses/kiyou.cls +74 -31
- data/vendor/jsclasses/minijs.sty +68 -22
- data/vendor/jsclasses/okumacro.dtx +4 -5
- data/vendor/jsclasses/okumacro.ins +9 -0
- data/vendor/jsclasses/okumacro.pdf +0 -0
- data/vendor/jsclasses/okumacro.sty +4 -17
- data/vendor/jsclasses/okuverb.ins +9 -0
- data/vendor/jsclasses/okuverb.pdf +0 -0
- data/vendor/jsclasses/okuverb.sty +1 -13
- data/vendor/jsclasses/tests/relfont.tex +10 -0
- data/vendor/jsclasses/winjis.sty +23 -19
- metadata +109 -20
- data/.rubocop_todo.yml +0 -7
- data/lib/epubmaker.rb +0 -23
- data/lib/epubmaker/content.rb +0 -110
- data/lib/epubmaker/epubcommon.rb +0 -441
- data/lib/epubmaker/epubv2.rb +0 -143
- data/lib/epubmaker/epubv3.rb +0 -233
- data/lib/epubmaker/producer.rb +0 -375
- data/lib/epubmaker/zip_exporter.rb +0 -81
- data/lib/lineinput.rb +0 -155
- data/lib/review/book/compilable.rb +0 -178
- data/lib/review/tocparser.rb +0 -271
- data/samples/syntax-book/review-ext.rb +0 -14
- data/test/test_tocparser.rb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cb9e501ea85d00f7dc928d4f6304b0b710a6d137583585c0d31a29dab29eede
|
4
|
+
data.tar.gz: 8c50af2163c54fa4e2e0fd49f62cedbe45b1f5b29146bfc6e6fdccc8a57ed95c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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:
|
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:
|
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
|
-
|
142
|
-
# Enabled: true
|
143
|
-
|
144
|
-
Style/UnneededInterpolation:
|
189
|
+
Style/MultipleComparison:
|
145
190
|
Enabled: true
|
146
191
|
|
147
|
-
|
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/
|
352
|
+
Style/RedundantPercentQ:
|
305
353
|
Enabled: false
|
306
354
|
|
307
355
|
Style/WhileUntilModifier:
|
308
356
|
Enabled: false
|
309
357
|
|
310
|
-
|
311
|
-
|
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:
|
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:
|
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:
|
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/
|
455
|
+
Layout/FirstHashElementIndentation:
|
366
456
|
Enabled: true
|
367
457
|
|
368
|
-
Layout/
|
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:
|
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:
|
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/
|
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:
|
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:
|
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
|
-
|
481
|
-
|
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/
|
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
|