From 89cb880a5d118826c5ea20c7064ac0c869a2c54e Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sun, 12 Jan 2025 14:27:10 +0000 Subject: [PATCH 1/3] Bump `prawn-dev` to version 0.5.0 --- prawn.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prawn.gemspec b/prawn.gemspec index 9ae7c30c7..c4ca6e29d 100644 --- a/prawn.gemspec +++ b/prawn.gemspec @@ -53,6 +53,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency('pdf-inspector', '>= 1.2.1', '< 2.0.a') spec.add_development_dependency('pdf-reader', '~> 1.4', '>= 1.4.1') - spec.add_development_dependency('prawn-dev', '~> 0.4.0') + spec.add_development_dependency('prawn-dev', '~> 0.5.0') spec.add_development_dependency('prawn-manual_builder', '~> 0.4.0') end From 7821f32abdf984a05ded73a8e5e2a1fd264fbc82 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sun, 12 Jan 2025 14:44:23 +0000 Subject: [PATCH 2/3] Add TODOs for RuboCop `Style/AccessModifierDeclarations` - The autocorrections break everything, so I'll leave these to someone more experienced with the codebase. --- lib/prawn.rb | 2 +- spec/prawn/document/security_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/prawn.rb b/lib/prawn.rb index 47f0297a0..d615922ba 100644 --- a/lib/prawn.rb +++ b/lib/prawn.rb @@ -37,7 +37,7 @@ module Prawn # @return [Boolean] attr_accessor :debug - module_function :debug, :debug= + module_function :debug, :debug= # rubocop:todo Style/AccessModifierDeclarations module_function diff --git a/spec/prawn/document/security_spec.rb b/spec/prawn/document/security_spec.rb index f12b808bd..0395ebce4 100644 --- a/spec/prawn/document/security_spec.rb +++ b/spec/prawn/document/security_spec.rb @@ -82,7 +82,7 @@ def doc_with_permissions(permissions) let(:pdf) do Prawn::Document.new do |pdf| class << pdf - public :owner_password_hash, :user_password_hash, :user_encryption_key + public :owner_password_hash, :user_password_hash, :user_encryption_key # rubocop:todo Style/AccessModifierDeclarations end pdf.encrypt_document( user_password: 'foo', From cf0f20399754685a851e514f3c1c6392f4d30267 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Mon, 13 Jan 2025 11:26:31 +0000 Subject: [PATCH 3/3] Make the RuboCop `todo`s into `disable`s. - These are public APIs and not going to change soon. --- lib/prawn.rb | 2 +- spec/prawn/document/security_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/prawn.rb b/lib/prawn.rb index d615922ba..df1a255fb 100644 --- a/lib/prawn.rb +++ b/lib/prawn.rb @@ -37,7 +37,7 @@ module Prawn # @return [Boolean] attr_accessor :debug - module_function :debug, :debug= # rubocop:todo Style/AccessModifierDeclarations + module_function :debug, :debug= # rubocop:disable Style/AccessModifierDeclarations module_function diff --git a/spec/prawn/document/security_spec.rb b/spec/prawn/document/security_spec.rb index 0395ebce4..682d75be8 100644 --- a/spec/prawn/document/security_spec.rb +++ b/spec/prawn/document/security_spec.rb @@ -82,7 +82,7 @@ def doc_with_permissions(permissions) let(:pdf) do Prawn::Document.new do |pdf| class << pdf - public :owner_password_hash, :user_password_hash, :user_encryption_key # rubocop:todo Style/AccessModifierDeclarations + public :owner_password_hash, :user_password_hash, :user_encryption_key # rubocop:disable Style/AccessModifierDeclarations end pdf.encrypt_document( user_password: 'foo',