From 01b193c77c256be968e49108191783e9a586cb8b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 18:45:23 +0000 Subject: [PATCH 1/2] Bump wicked_pdf from 2.7.0 to 2.8.0 Bumps [wicked_pdf](https://github.com/mileszs/wicked_pdf) from 2.7.0 to 2.8.0. - [Release notes](https://github.com/mileszs/wicked_pdf/releases) - [Changelog](https://github.com/mileszs/wicked_pdf/blob/master/CHANGELOG.md) - [Commits](https://github.com/mileszs/wicked_pdf/commits) --- updated-dependencies: - dependency-name: wicked_pdf dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 786c80466..0de55e49b 100644 --- a/Gemfile +++ b/Gemfile @@ -61,7 +61,7 @@ gem "uglifier", "~> 4.2.0" gem "uuidtools", "~> 2.2.0" gem "view_component", "~> 3.11.0" gem "whenever", "~> 1.0.0", require: false -gem "wicked_pdf", "~> 2.7.0" +gem "wicked_pdf", "~> 2.8.0" gem "wkhtmltopdf-binary", "~> 0.12.6" source "https://rails-assets.org" do diff --git a/Gemfile.lock b/Gemfile.lock index 3a2663f90..b456fc8b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -271,7 +271,7 @@ GEM httpi (2.5.0) rack socksify - i18n (1.14.1) + i18n (1.14.4) concurrent-ruby (~> 1.0) i18n-tasks (0.9.37) activesupport (>= 4.0.2) @@ -347,7 +347,7 @@ GEM mini_magick (4.12.0) mini_mime (1.1.5) mini_portile2 (2.8.5) - minitest (5.22.2) + minitest (5.22.3) mixlib-cli (2.1.8) mixlib-config (3.0.27) tomlrb @@ -678,7 +678,7 @@ GEM websocket-extensions (0.1.5) whenever (1.0.0) chronic (>= 0.6.3) - wicked_pdf (2.7.0) + wicked_pdf (2.8.0) activesupport wkhtmltopdf-binary (0.12.6.6) xpath (3.2.0) @@ -790,7 +790,7 @@ DEPENDENCIES view_component (~> 3.11.0) web-console (~> 4.2.1) whenever (~> 1.0.0) - wicked_pdf (~> 2.7.0) + wicked_pdf (~> 2.8.0) wkhtmltopdf-binary (~> 0.12.6) BUNDLED WITH From f8e7bf042d82b883e9a7a9df48da120c48e275cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 19 Mar 2024 21:22:42 +0100 Subject: [PATCH 2/2] Update wicked_pdf initializer to the latest version We haven't been updating this file for a long time so, and this version uses the `configure` method instead of the `config` hash. We're also adding a few comments already included in previous versions of wicked pdf that we hadn't copied to our initializer. --- config/initializers/wicked_pdf.rb | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/config/initializers/wicked_pdf.rb b/config/initializers/wicked_pdf.rb index 8a4ead8ee..4e7cb9dbd 100644 --- a/config/initializers/wicked_pdf.rb +++ b/config/initializers/wicked_pdf.rb @@ -8,15 +8,23 @@ # # https://github.com/mileszs/wicked_pdf/blob/master/README.md -WickedPdf.config = { +WickedPdf.configure do |config| # Path to the wkhtmltopdf executable: This usually isn't needed if using # one of the wkhtmltopdf-binary family of gems. - # exe_path: '/usr/local/bin/wkhtmltopdf', + # config.exe_path = '/usr/local/bin/wkhtmltopdf', # or - # exe_path: Gem.bin_path('wkhtmltopdf-binary', 'wkhtmltopdf') + # config.exe_path = Gem.bin_path('wkhtmltopdf-binary', 'wkhtmltopdf') + + # Needed for wkhtmltopdf 0.12.6+ to use many wicked_pdf asset helpers + config.enable_local_file_access = true # Layout file to be used for all PDFs # (but can be overridden in `render :pdf` calls) - # layout: 'pdf.html', - enable_local_file_access: true -} + # config.layout = 'pdf.html', + + # Using wkhtmltopdf without an X server can be achieved by enabling the + # 'use_xvfb' flag. This will wrap all wkhtmltopdf commands around the + # 'xvfb-run' command, in order to simulate an X server. + # + # config.use_xvfb = true, +end