mupdf 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75c0956dd50c089d4cea76952bdc5c4244a946c674d4e648edc71d749bd1faca
4
- data.tar.gz: c5fe14cf7c06739d4e03480c894ab938c4e0fa68b897bdcf4b49e0f078f33bf5
3
+ metadata.gz: 33eaf76d7941cd48249d245e79852baac44e1735a6ed41b55c57b000c22637b4
4
+ data.tar.gz: ec7b80abfd826b1ae5fd5745e8da85e92da20288989f76552f1e92e8099dcc42
5
5
  SHA512:
6
- metadata.gz: 842db6317559209c6f2a6b0205adc8e2792c395be8fc61c0b5b23a6d750d86daf8a9642b656661efea26981cbbe6e8b64c83cd9448b470941bedc7c8011df04c
7
- data.tar.gz: e3e79b6054b2f4f32947d62b64ca421d71efe1c949d544e99e0464503a22dde8472d4cb5da7e8cf9770d464dd7bd0f8e5b2a95d8351ab7c9347edd88405b32b9
6
+ metadata.gz: 980c614f227fddaba6e878ccab9896c9a517b39bed56334c415061e5968c8cf38ce667080501359ff603b8f996f86f0a441b947b39e5e9a397cf9195815cae32
7
+ data.tar.gz: 6b145288f55da2f363f468126c1d67e0b90d477e69bd56cec0bb3884e56aacd3d1733617e49f68ff50a51370f424d1ffeeab58522abb733e52fde726027f1daf
data/lib/mupdf/box.rb CHANGED
@@ -28,9 +28,10 @@ module MuPDF
28
28
  # @param text [String]
29
29
  # @param kind [Symbol]
30
30
  #
31
- # @return [MuPDF::Box]
31
+ # @return [MuPDF::Box, nil]
32
32
  def self.parse(text, kind:)
33
33
  match = text.match(REGEX)
34
+ return unless match
34
35
 
35
36
  new(
36
37
  l: Integer(match[:l]),
data/lib/mupdf/page.rb CHANGED
@@ -28,62 +28,72 @@ module MuPDF
28
28
 
29
29
  # @param text [String]
30
30
  #
31
- # @return [MuPDF::Box]
31
+ # @return [MuPDF::Box, nil]
32
32
  def self.parse_media_box(text)
33
33
  match = MEDIA_BOX_REGEX.match(text)
34
+ return unless match
35
+
34
36
  MuPDF::Box.parse(match[:content], kind: :media)
35
37
  end
36
38
 
37
39
  # @param text [String]
38
40
  #
39
- # @return [MuPDF::Box]
41
+ # @return [MuPDF::Box, nil]
40
42
  def self.parse_crop_box(text)
41
43
  match = CROP_BOX_REGEX.match(text)
44
+ return unless match
45
+
42
46
  MuPDF::Box.parse(match[:content], kind: :crop)
43
47
  end
44
48
 
45
49
  # @param text [String]
46
50
  #
47
- # @return [MuPDF::Box]
51
+ # @return [MuPDF::Box, nil]
48
52
  def self.parse_art_box(text)
49
53
  match = ART_BOX_REGEX.match(text)
54
+ return unless match
55
+
50
56
  MuPDF::Box.parse(match[:content], kind: :art)
51
57
  end
52
58
 
53
59
  # @param text [String]
54
60
  #
55
- # @return [MuPDF::Box]
61
+ # @return [MuPDF::Box, nil]
56
62
  def self.parse_bleed_box(text)
57
63
  match = BLEED_BOX_REGEX.match(text)
64
+ return unless match
65
+
58
66
  MuPDF::Box.parse(match[:content], kind: :bleed)
59
67
  end
60
68
 
61
69
  # @param text [String]
62
70
  #
63
- # @return [MuPDF::Box]
71
+ # @return [MuPDF::Box, nil]
64
72
  def self.parse_trim_box(text)
65
73
  match = TRIM_BOX_REGEX.match(text)
74
+ return unless match
75
+
66
76
  MuPDF::Box.parse(match[:content], kind: :trim)
67
77
  end
68
78
 
69
79
  # @!attribute media_box
70
- # @return [MuPDFBox]
80
+ # @return [MuPDFBox, nil]
71
81
  attr_accessor :media_box
72
82
 
73
83
  # @!attribute crop_box
74
- # @return [MuPDFBox]
84
+ # @return [MuPDFBox, nil]
75
85
  attr_accessor :crop_box
76
86
 
77
87
  # @!attribute art_box
78
- # @return [MuPDFBox]
88
+ # @return [MuPDFBox, nil]
79
89
  attr_accessor :art_box
80
90
 
81
91
  # @!attribute bleed_box
82
- # @return [MuPDFBox]
92
+ # @return [MuPDFBox, nil]
83
93
  attr_accessor :bleed_box
84
94
 
85
95
  # @!attribute trim_box
86
- # @return [MuPDFBox]
96
+ # @return [MuPDFBox, nil]
87
97
  attr_accessor :trim_box
88
98
 
89
99
  # @!attribute pagenum
data/lib/mupdf/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MuPDF
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mupdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Sylvestre
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-07 00:00:00.000000000 Z
11
+ date: 2025-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: open3
@@ -62,8 +62,8 @@ licenses:
62
62
  metadata:
63
63
  rubygems_mfa_required: 'true'
64
64
  homepage_uri: https://github.com/ksylvest/mupdf
65
- source_code_uri: https://github.com/ksylvest/mupdf/tree/v1.0.0
66
- changelog_uri: https://github.com/ksylvest/mupdf/releases/tag/v1.0.0
65
+ source_code_uri: https://github.com/ksylvest/mupdf/tree/v1.0.2
66
+ changelog_uri: https://github.com/ksylvest/mupdf/releases/tag/v1.0.2
67
67
  documentation_uri: https://mupdf.ksylvest.com/
68
68
  post_install_message:
69
69
  rdoc_options: []