Skip to content

Commit

Permalink
Bump pdf-core dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
pointlessone committed Mar 11, 2017
1 parent a2edad1 commit c109d28
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions lib/prawn/security.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ module PDF
module Core
module_function

# Like PdfObject, but returns an encrypted result if required.
# Like pdf_object, but returns an encrypted result if required.
# For direct objects, requires the object identifier and generation number
# from the indirect object referencing obj.
#
Expand All @@ -232,7 +232,7 @@ def encrypted_pdf_object(obj, key, id, gen, in_content_stream = false)
).gsub(/[\\\n\(\)]/) { |m| "\\#{m}" }
"(#{obj})"
when String
PdfObject(
pdf_object(
ByteString.new(
Prawn::Document::Security.encrypt_string(obj, key, id, gen)
),
Expand All @@ -245,17 +245,17 @@ def encrypted_pdf_object(obj, key, id, gen, in_content_stream = false)
raise PDF::Core::Errors::FailedObjectConversion,
'A PDF Dictionary must be keyed by names'
end
output << PdfObject(k.to_sym, in_content_stream) << ' ' <<
output << pdf_object(k.to_sym, in_content_stream) << ' ' <<
encrypted_pdf_object(v, key, id, gen, in_content_stream) << "\n"
end
output << '>>'
when NameTree::Value
PdfObject(obj.name) + ' ' +
pdf_object(obj.name) + ' ' +
encrypted_pdf_object(obj.value, key, id, gen, in_content_stream)
when PDF::Core::OutlineRoot, PDF::Core::OutlineItem
encrypted_pdf_object(obj.to_hash, key, id, gen, in_content_stream)
else # delegate back to PdfObject
PdfObject(obj, in_content_stream)
else # delegate back to pdf_object
pdf_object(obj, in_content_stream)
end
end

Expand Down
2 changes: 1 addition & 1 deletion prawn.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
spec.licenses = %w[PRAWN GPL-2.0 GPL-3.0]

spec.add_dependency('ttfunk', '~> 1.5')
spec.add_dependency('pdf-core', '~> 0.6.1')
spec.add_dependency('pdf-core', '~> 0.7.0')

spec.add_development_dependency('pdf-inspector', '~> 1.2.1')
spec.add_development_dependency('yard')
Expand Down
4 changes: 2 additions & 2 deletions spec/manual_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
MANUAL_HASH =
case RUBY_ENGINE
when 'ruby'
'b213efa532c7f2a159f69ee5559efe95333810e302ea09f60772ffdea6bb74eb477d6e7411454ba58376cf75e17bc6f7181eee991ac5d7d0c0bac71c9892a41c'
'b55f154c9093c60f38051c75920c8157c775b946b0c77ffafc0a8a634ad5401e8ceafd0b96942839f82bacd726a690af3fdd1fd9e185616f67c6c0edfcfd0460'
when 'jruby'
'0d65981e685d44c83d4ed1b0c7266da0d2b2d7c749d5d332b6837a29d44a808d03ee2ed09a9a6cf9105cf90f8a6af44dad4a5f152e6a11b05561a74ddf54b643'
'd2eb71ea3ddc35acb185de671a6fa48862ebad5727ce372e3a742f45d31447765c4004fbe5fbfdc1f5a32903ac87182c75e6abe021ab003c8af6e6cc33e0d01e'
end
# rubocop: enable Metrics/LineLength

Expand Down

0 comments on commit c109d28

Please sign in to comment.