mupdf 1.0.1 → 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: 05e6a6512e33869f2f404082dd81f74ae2b8510c173674ade3098645805028f9
4
- data.tar.gz: 0a426de664750da3d5c586199861096e330628a3697fb3854a57215449a1ab9a
3
+ metadata.gz: 33eaf76d7941cd48249d245e79852baac44e1735a6ed41b55c57b000c22637b4
4
+ data.tar.gz: ec7b80abfd826b1ae5fd5745e8da85e92da20288989f76552f1e92e8099dcc42
5
5
  SHA512:
6
- metadata.gz: 8808759fa4b42c1b8a361b706c6d3dd614bad2a7db2a6bea88ed610033a3e8f8ca23e78de45afed4b40fa3462b8da9fb5b0890c4c4c0b26545715a169523556d
7
- data.tar.gz: 31a021a75da552cc82063cde4e16cd3ee96d83603628dc48dc9afacd4b076a3e85662ca76a5f24effb42fb819424f79bd889c499786bbda9dfc3555850e99acd
6
+ metadata.gz: 980c614f227fddaba6e878ccab9896c9a517b39bed56334c415061e5968c8cf38ce667080501359ff603b8f996f86f0a441b947b39e5e9a397cf9195815cae32
7
+ data.tar.gz: 6b145288f55da2f363f468126c1d67e0b90d477e69bd56cec0bb3884e56aacd3d1733617e49f68ff50a51370f424d1ffeeab58522abb733e52fde726027f1daf
data/lib/mupdf/box.rb CHANGED
@@ -28,7 +28,7 @@ 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
34
  return unless match
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.1'
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.1
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-02-02 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.1
66
- changelog_uri: https://github.com/ksylvest/mupdf/releases/tag/v1.0.1
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: []