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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22ccdb2965d983f6e2459c55867d5206b44eb96ec9f39c2a8f89c9afa1cdee80
4
- data.tar.gz: 0b51d3a931731340bfd8f835ade4059a88f80d836d4e16a24fffd9e01e26ac31
3
+ metadata.gz: 62480611b452b245b076118d2b5cbea5c3b34cfc00693c95f58e491682a38642
4
+ data.tar.gz: 7ec927b198b0ebc16041aa328ec795ae206894c0afe7d581cbd24cb569f19f01
5
5
  SHA512:
6
- metadata.gz: 902e725bf6eb5d690fdb8bc251d3a4cef91a7eeb8cd236246015ef98b970f45238bb87b3a321d27d68c1695ea4fb696b293d44c0ae6759f4c34a50475de8203b
7
- data.tar.gz: 1bc5eec245b088941cdca53d848cec717b0de27772890db844b84fe4e734d0695a8b6b7282aa53600a0ad92905298b02de808720ce7b43714b1d48e69a7fedda
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
@@ -29,7 +29,7 @@ RBPDF is distributed via RubyGems, and can be installed the usual way that you i
29
29
 
30
30
  If you are using image file, it is recommended you install:
31
31
  ```
32
- gem install mini_magick
32
+ gem install mini_magick marcel
33
33
  ```
34
34
  or
35
35
  ```
@@ -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
- out['mime'] = image.mime_type
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 image.mime_type
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
@@ -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
data/lib/htmlcolors.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  #============================================================+
2
3
  # File name : htmlcolors.rb
3
4
  # Begin : 2002-04-09
data/lib/rbpdf/version.rb CHANGED
@@ -1,7 +1,8 @@
1
- # Copyright (c) 2011-2023 NAITOH Jun
1
+ # frozen_string_literal: true
2
+ # Copyright (c) 2011-2025 NAITOH Jun
2
3
  # Released under the MIT license
3
4
  # http://www.opensource.org/licenses/MIT
4
5
 
5
6
  module Rbpdf
6
- VERSION = "1.21.3"
7
+ VERSION = "1.21.4"
7
8
  end