diff options
| author | Marat Radchenko <marat@slonopotamus.org> | 2020-01-20 12:39:33 +0300 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2020-01-20 02:39:33 -0700 |
| commit | d4fa0b5a059006f4e1e263cc508be1890e8257dd (patch) | |
| tree | 415cd32ad432fc4a05f2ba2e8b8070d253ee337c /lib/asciidoctor-epub3.rb | |
| parent | 1176fc5283002fd58c820179dc454c155a606b88 (diff) | |
resolves #223 set up Rubocop linter (PR #226)
resolves #223
Rubocop config was takes as-is from https://github.com/asciidoctor/asciidoctor-pdf/blob/e80edba41fa724bef5f43ca30028afd873e07317/.rubocop.yml
* Apply rubocop auto-fix
Manual adjustments:
1. Changed parentheses in nested assignments in packager.rb
Old:
if ::File.readable?(resolved_avatar = ::File.join workdir, avatar)
New:
if ::File.readable? resolved_avatar = (::File.join workdir, avatar)
2. Dropped pre-ruby-2.0 support from Gemfile
3. Joined nested if's starting with `if doc.attr? 'publisher'` into if/elsif chain in packager.rb
It was triggering 'Bundler/DuplicatedGem: Gem kindlegen requirements already given on line 12 of the Gemfile.'.
But since oldest supported is 2.3, this should be ok.
Diffstat (limited to 'lib/asciidoctor-epub3.rb')
| -rw-r--r-- | lib/asciidoctor-epub3.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/asciidoctor-epub3.rb b/lib/asciidoctor-epub3.rb index 974555b..d4f9a10 100644 --- a/lib/asciidoctor-epub3.rb +++ b/lib/asciidoctor-epub3.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'asciidoctor' require 'asciidoctor/extensions' require 'gepub' |
