lib/pdfkit/configuration.rb in pdfkit-0.8.5 vs lib/pdfkit/configuration.rb in pdfkit-0.8.6
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
class PDFKit
class Configuration
attr_accessor :meta_tag_prefix, :root_url
attr_writer :use_xvfb, :verbose
attr_reader :default_options
@@ -24,10 +26,10 @@
@wkhtmltopdf ||= default_wkhtmltopdf
end
def default_wkhtmltopdf
return @default_command_path if @default_command_path
- if defined?(Bundler::GemfileError) && File.exists?('Gemfile')
+ if defined?(Bundler::GemfileError) && File.exist?('Gemfile')
@default_command_path = `bundle exec which wkhtmltopdf`.chomp.lines.last
end
@default_command_path = `which wkhtmltopdf`.chomp if @default_command_path.nil? || @default_command_path.empty?
@default_command_path
end