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 /asciidoctor-epub3.gemspec | |
| 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 'asciidoctor-epub3.gemspec')
| -rw-r--r-- | asciidoctor-epub3.gemspec | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/asciidoctor-epub3.gemspec b/asciidoctor-epub3.gemspec index 448cf10..ce5568f 100644 --- a/asciidoctor-epub3.gemspec +++ b/asciidoctor-epub3.gemspec @@ -1,4 +1,5 @@ -# -*- encoding: utf-8 -*- +# frozen_string_literal: true + require File.expand_path('lib/asciidoctor-epub3/version', File.dirname(__FILE__)) require 'open3' unless defined? Open3 @@ -32,9 +33,11 @@ An extension for Asciidoctor that converts AsciiDoc documents to EPUB3 and KF8/M s.add_development_dependency 'rake', '~> 12.3.0' s.add_development_dependency 'rspec', '~> 3.9.0' + s.add_development_dependency 'rubocop', '~> 0.78.0' + s.add_development_dependency 'rubocop-rspec', '~> 1.37.0' s.add_runtime_dependency 'asciidoctor', '>= 1.5.0', '< 3.0.0' + s.add_runtime_dependency 'concurrent-ruby', '~> 1.1.0' s.add_runtime_dependency 'gepub', '~> 1.0.0' s.add_runtime_dependency 'thread_safe', '~> 0.3.0' - s.add_runtime_dependency 'concurrent-ruby', '~> 1.1.0' end |
