rbpdf 1.21.3 → 1.21.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +9 -0
- data/README.md +1 -1
- data/lib/core/mini_magick.rb +12 -2
- data/lib/core/rmagick.rb +1 -0
- data/lib/htmlcolors.rb +1 -0
- data/lib/rbpdf/version.rb +3 -2
- data/lib/rbpdf.rb +585 -150
- data/rbpdf.gemspec +1 -1
- metadata +3 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62480611b452b245b076118d2b5cbea5c3b34cfc00693c95f58e491682a38642
|
4
|
+
data.tar.gz: 7ec927b198b0ebc16041aa328ec795ae206894c0afe7d581cbd24cb569f19f01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b130cdf112781f49837fd843b33c1b69b18d285d3c1b67f54175bf251ad26ab298ddc6eb7b65f042a5398723246b1886b0ab943bde6cfac95ce3d35f89918471
|
7
|
+
data.tar.gz: 4b0d107351e49042a60426d3923ff4a0c805fd40f14ebcfa3182ea7e9abd74452f3c72ca1b047b25c7a5017dd38e8062f1ac7e5b5c4936976f363411f6d7597f
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
1.21.4 2025-05-06
|
2
|
+
- mini_magick v5.0 supoort and marcel gem added (#100, #102, #105)
|
3
|
+
- Warning "literal string will be frozen in the future" appears on Ruby 3.4 (#101, #103, #106) (by pavel)
|
4
|
+
- Support Ruby 3.4 and Rails 7.2/8.0 (#104)
|
5
|
+
- Support Ruby 3.3 and Rails 7.1 (#96)
|
6
|
+
- convertHTMLColorToDec was changed to deprecated. use convert_html_color_to_dec_array instead (#95)
|
7
|
+
- Colour gradients support (#94)
|
8
|
+
- Fixed putjavascript() method not being a protected method. (#93)
|
9
|
+
|
1
10
|
1.21.3 2023-07-15
|
2
11
|
- Javascript Form & XHTML Form support (#84)
|
3
12
|
|
data/README.md
CHANGED
data/lib/core/mini_magick.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# coding: ASCII-8BIT
|
2
|
+
# frozen_string_literal: true
|
2
3
|
# The MIT License
|
3
4
|
#
|
4
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -51,18 +52,27 @@ module Rbpdf
|
|
51
52
|
return false
|
52
53
|
end
|
53
54
|
|
55
|
+
unless Object.const_defined?(:Marcel)
|
56
|
+
Error('No Marcel: Non-PNG file is not supported.: ' + filename);
|
57
|
+
return false
|
58
|
+
end
|
59
|
+
|
54
60
|
image = MiniMagick::Image.open(filename)
|
55
61
|
|
56
62
|
width = image.width
|
57
63
|
height = image.height
|
58
64
|
|
59
|
-
|
65
|
+
mime_type = File.open filename do |file|
|
66
|
+
::Marcel::MimeType.for file
|
67
|
+
end
|
68
|
+
|
69
|
+
out['mime'] = mime_type
|
60
70
|
out[0] = width
|
61
71
|
out[1] = height
|
62
72
|
|
63
73
|
# These are actually meant to return integer values But I couldn't seem to find anything saying what those values are.
|
64
74
|
# So for now they return strings. The only place that uses this at the moment is the parsejpeg method, so I've changed that too.
|
65
|
-
case
|
75
|
+
case mime_type
|
66
76
|
when "image/gif"
|
67
77
|
out[2] = "GIF"
|
68
78
|
when "image/jpeg"
|
data/lib/core/rmagick.rb
CHANGED
data/lib/htmlcolors.rb
CHANGED
data/lib/rbpdf/version.rb
CHANGED