Skip to content

Commit

Permalink
Address code lints
Browse files Browse the repository at this point in the history
  • Loading branch information
abrom committed Nov 19, 2024
1 parent 911b023 commit bdbc3e8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ source 'https://rubygems.org'
gemspec

gem 'childprocess', '~> 5.0'
gem 'combine_pdf', '~> 1.0'
gem 'mini_magick', '~> 4.12'
gem 'pdf-reader', '~> 2.11'
gem 'puma', '~> 6.4'
Expand Down
2 changes: 0 additions & 2 deletions grover.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,4 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

spec.add_dependency 'nokogiri', '~> 1'

spec.add_development_dependency 'combine_pdf', '~> 1.0'
end
2 changes: 1 addition & 1 deletion lib/grover/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Configuration
:use_jpeg_middleware, :js_runtime_bin,
:node_env_vars, :allow_file_uris

def initialize
def initialize # rubocop:disable Metrics/MethodLength
@options = {}
@meta_tag_prefix = 'grover-'
@ignore_path = nil
Expand Down
8 changes: 3 additions & 5 deletions lib/grover/middleware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,9 @@ def add_cover_content(grover)
end

def load_combine_pdf
begin
require 'combine_pdf'
rescue ::LoadError
raise Grover::Error, 'Please add/install the "combine_pdf" gem to use the front/back cover page feature'
end
require 'combine_pdf'
rescue ::LoadError
raise Grover::Error, 'Please add/install the "combine_pdf" gem to use the front/back cover page feature'
end

def fetch_cover_pdf(path)
Expand Down

0 comments on commit bdbc3e8

Please sign in to comment.