malmal 0.4.2-aarch64-linux-gnu → 0.5.0-aarch64-linux-gnu

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: 726e18917a89d90401b846744216a671a99d0c717c46c673a0fc5634e10b12b1
4
- data.tar.gz: 66d1c5b6fd36e773b32eebe495fd9410b2e2272ede1c567db783fdcdde014082
3
+ metadata.gz: 5637c9fce95b38ee434f3dc5560881dc9846c324d03cc0081658526fb239e9ab
4
+ data.tar.gz: bdc92041a51ce8aa497187fc2378a7c856e3c3eb80e13fb82f31276157161b80
5
5
  SHA512:
6
- metadata.gz: 69d08354fb3b8400a2c8fdf14d274561aba13b38de7a1f8db15f7cdbe371024b89c55cb63c783dcce6d22400dd81f5898459022c453719635d24c53cc9a17015
7
- data.tar.gz: 75a8c5d18253e3cb84f559d28a713c10d244a08a723fce38de73f2fbac16cfea51e2847635b626795c1000c4b341a1d5a87ababb396143158239421678a1c4f3
6
+ metadata.gz: 99c5517ecb37702422e819dcc78083985e6f87fe6832d0822fd7006c7c166e216045815c45a8e4cf2c047be67abdef2ca60d409132c4468a2b01b289bbc63ddd
7
+ data.tar.gz: 78a6a4d57f64c937a9c2d42c239c9336e70d5426ffd53673f87feedaec8438d98a64bb70fdf98d31ad2a45237cb89d86b78b9e6457dbe657103aea5e9d92f5ea
data/README.md CHANGED
@@ -86,9 +86,9 @@ else
86
86
  end
87
87
  ```
88
88
 
89
- The type can change: a BMP, TIFF or ICO comes out as a PNG. `Malmal::Sanitized` has
89
+ The type can change: a BMP, TIFF or PSD comes out as a PNG. `Malmal::Sanitized` has
90
90
  `data`, `file_type`, `content_type`, `extension`, `width`, `height`, `frames` and
91
- `report`. `sanitize` also takes `types`, `pdf_dpi`, `pdf_jpeg`, `pdf_text` and
91
+ `report`. `sanitize` also takes `types`, `keep_cmyk`, `keep_profile`, `pdf_dpi`, `pdf_jpeg`, `pdf_text` and
92
92
  `pdf_vector_text`; PDFs are rebuilt only by a library built with `cdr-pdf`. Both
93
93
  exceptions are a `Malmal::SanitizeError`.
94
94
 
Binary file
@@ -12,7 +12,7 @@ module Malmal
12
12
  class Scanner
13
13
  POLICIES = %i[default strict documents].freeze
14
14
  LIMITS = %i[max_size max_decompressed max_pixels max_depth scan_timeout].freeze
15
- SANITIZE_OPTIONS = %i[types pdf_dpi pdf_jpeg pdf_text pdf_vector_text].freeze
15
+ SANITIZE_OPTIONS = %i[types keep_cmyk keep_profile pdf_dpi pdf_jpeg pdf_text pdf_vector_text].freeze
16
16
  DEFAULT_MAX_MEMORY = 512 << 20
17
17
 
18
18
  # The handle is freed when the scanner is collected, unless #close
@@ -90,8 +90,8 @@ module Malmal
90
90
  # the upload. Raises Rejected, NotRebuilt or ScanError otherwise; in
91
91
  # every case the upload is not to be kept.
92
92
  #
93
- # +jpeg_quality+ (1 to 100), +types+, +pdf_dpi+, +pdf_jpeg+, +pdf_text+
94
- # and +pdf_vector_text+ are the options of the rebuild.
93
+ # +jpeg_quality+ (1 to 100), +types+, +keep_cmyk+, +keep_profile+, +pdf_dpi+, +pdf_jpeg+,
94
+ # +pdf_text+ and +pdf_vector_text+ are the options of the rebuild.
95
95
  def sanitize(data, filename: nil, content_type: nil, jpeg_quality: nil, **options)
96
96
  unknown = options.keys - SANITIZE_OPTIONS
97
97
  raise ArgumentError, "unknown option #{unknown.first.inspect}" unless unknown.empty?
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Malmal
4
4
  # The version of the gem, which is also the version of the library it loads.
5
- VERSION = "0.4.2"
5
+ VERSION = "0.5.0"
6
6
  end
data/sig/malmal.rbs CHANGED
@@ -81,7 +81,7 @@ module Malmal
81
81
  ?max_pixels: Integer, ?max_depth: Integer, ?scan_timeout: Numeric) -> void
82
82
  def scan: (input data, ?filename: String?, ?content_type: String?) -> Report
83
83
  def sanitize: (input data, ?filename: String?, ?content_type: String?, ?jpeg_quality: Integer?,
84
- ?types: Array[Symbol | String], ?pdf_dpi: Integer, ?pdf_jpeg: bool, ?pdf_text: bool,
84
+ ?types: Array[Symbol | String], ?keep_cmyk: bool, ?keep_profile: bool, ?pdf_dpi: Integer, ?pdf_jpeg: bool, ?pdf_text: bool,
85
85
  ?pdf_vector_text: bool) -> Sanitized
86
86
  def overdue: () -> Integer
87
87
  def library_version: () -> String
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: malmal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: aarch64-linux-gnu
6
6
  authors:
7
7
  - nguyenthuan155632