From fb27087d977ecc3306730c7eb5cec9bee8d1d7bb Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Fri, 11 Oct 2024 22:29:35 +0200 Subject: [PATCH] Add frozen_string_literal magic header --- lib/wicked_pdf.rb | 2 ++ lib/wicked_pdf/binary.rb | 4 +++- lib/wicked_pdf/middleware.rb | 2 ++ lib/wicked_pdf/option_parser.rb | 2 ++ lib/wicked_pdf/pdf_helper.rb | 2 ++ lib/wicked_pdf/progress.rb | 2 ++ lib/wicked_pdf/railtie.rb | 2 ++ lib/wicked_pdf/tempfile.rb | 2 ++ lib/wicked_pdf/version.rb | 4 +++- lib/wicked_pdf/wicked_pdf_helper.rb | 2 ++ lib/wicked_pdf/wicked_pdf_helper/assets.rb | 2 ++ 11 files changed, 24 insertions(+), 2 deletions(-) diff --git a/lib/wicked_pdf.rb b/lib/wicked_pdf.rb index dc05576f..f0d26eab 100644 --- a/lib/wicked_pdf.rb +++ b/lib/wicked_pdf.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # wkhtml2pdf Ruby interface # http://wkhtmltopdf.org/ diff --git a/lib/wicked_pdf/binary.rb b/lib/wicked_pdf/binary.rb index 383f9ea1..c7c7f348 100644 --- a/lib/wicked_pdf/binary.rb +++ b/lib/wicked_pdf/binary.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + class WickedPdf class Binary - EXE_NAME = 'wkhtmltopdf'.freeze + EXE_NAME = 'wkhtmltopdf' attr_reader :path, :default_version diff --git a/lib/wicked_pdf/middleware.rb b/lib/wicked_pdf/middleware.rb index 0761455c..73322b56 100644 --- a/lib/wicked_pdf/middleware.rb +++ b/lib/wicked_pdf/middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class WickedPdf class Middleware def initialize(app, options = {}, conditions = {}) diff --git a/lib/wicked_pdf/option_parser.rb b/lib/wicked_pdf/option_parser.rb index 3b5fb583..d6c86855 100644 --- a/lib/wicked_pdf/option_parser.rb +++ b/lib/wicked_pdf/option_parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class WickedPdf class OptionParser BINARY_VERSION_WITHOUT_DASHES = Gem::Version.new('0.12.0') diff --git a/lib/wicked_pdf/pdf_helper.rb b/lib/wicked_pdf/pdf_helper.rb index bc0ac7c5..94297624 100644 --- a/lib/wicked_pdf/pdf_helper.rb +++ b/lib/wicked_pdf/pdf_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class WickedPdf module PdfHelper def self.prepended(base) diff --git a/lib/wicked_pdf/progress.rb b/lib/wicked_pdf/progress.rb index 0b517072..7b9bab1e 100644 --- a/lib/wicked_pdf/progress.rb +++ b/lib/wicked_pdf/progress.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class WickedPdf module Progress require 'pty' if RbConfig::CONFIG['target_os'] !~ /mswin|mingw/ && RUBY_ENGINE != 'truffleruby' # no support for windows and truffleruby diff --git a/lib/wicked_pdf/railtie.rb b/lib/wicked_pdf/railtie.rb index 1e9d0a36..4f7fde0a 100644 --- a/lib/wicked_pdf/railtie.rb +++ b/lib/wicked_pdf/railtie.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'wicked_pdf/pdf_helper' require 'wicked_pdf/wicked_pdf_helper' require 'wicked_pdf/wicked_pdf_helper/assets' diff --git a/lib/wicked_pdf/tempfile.rb b/lib/wicked_pdf/tempfile.rb index bcbd4c08..5654ba9b 100644 --- a/lib/wicked_pdf/tempfile.rb +++ b/lib/wicked_pdf/tempfile.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'tempfile' require 'stringio' diff --git a/lib/wicked_pdf/version.rb b/lib/wicked_pdf/version.rb index 701b5304..0d338481 100644 --- a/lib/wicked_pdf/version.rb +++ b/lib/wicked_pdf/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class WickedPdf - VERSION = '2.8.2'.freeze + VERSION = '2.8.1' end diff --git a/lib/wicked_pdf/wicked_pdf_helper.rb b/lib/wicked_pdf/wicked_pdf_helper.rb index dea4f1d3..3ce0ace9 100644 --- a/lib/wicked_pdf/wicked_pdf_helper.rb +++ b/lib/wicked_pdf/wicked_pdf_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class WickedPdf module WickedPdfHelper def self.root_path diff --git a/lib/wicked_pdf/wicked_pdf_helper/assets.rb b/lib/wicked_pdf/wicked_pdf_helper/assets.rb index 686d2d0c..dffde1dc 100644 --- a/lib/wicked_pdf/wicked_pdf_helper/assets.rb +++ b/lib/wicked_pdf/wicked_pdf_helper/assets.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'net/http' require 'delegate' require 'stringio'