onlyoffice_pdf_parser 0.4.0 → 0.5.0

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: aa1e4904848f330f9e50f850cfdcab6e4b0e170e2478491a94c1e6ca5172bea2
4
- data.tar.gz: afc8fcd96b544e8d7ec8dd5cab7db1d7225359a0d2e5423b706243fa24252654
3
+ metadata.gz: afe6bc6beb5b689e3e74b6917d452004775197b716394e6c75d379468ee970b4
4
+ data.tar.gz: a4a0928fe36eeb98a5032f8acda836cb37e4217dac3dd0a759cecee352908a1d
5
5
  SHA512:
6
- metadata.gz: '05112925b5f8dfb5abd423435e96410344e421e1cf1705733b2c142cf2225bee45dc1611e89915d70233ac548ae131edf6711d91500c3bf85b76a6562b3a493f'
7
- data.tar.gz: 45e19650bd51a9bffca33598e45831389eb4caa6a732651a901cedd1fce41813c7ffe3dc2dfcbfc19f08532289da43c01a8f33e30c4fda0dcba3bb015cd6a603
6
+ metadata.gz: cbe234313126d9b7728ae1ea2ebf1e4824feaaa589775f701b1caaf4e75626fbce6ef8ea66c748fbba38170de4330f5c02458263fbad69e86db922287f034471
7
+ data.tar.gz: '0603019b80a5204e5b0b9d7277bb24344851b5788a8d94afba3fa6f56eacf34d73e4521598c3692a9d93a964ca843c4dd3e24a9ce0d24946276793d4a0ea86d7'
@@ -8,7 +8,6 @@ require_relative 'helpers/cursor_point'
8
8
  module OnlyofficePdfParser
9
9
  # class for storing bmp image pixels data
10
10
  class BmpImage
11
- include Magick
12
11
  attr_accessor :path_to_image, :pixels, :width, :height
13
12
  # @return [String] binary dat of file
14
13
  attr_reader :data
@@ -92,7 +91,7 @@ module OnlyofficePdfParser
92
91
 
93
92
  private
94
93
 
95
- # @param param [String] file path of file binaryt
94
+ # @param param [String] file path of file binary data
96
95
  # @return [Void] init class data
97
96
  def init_data(param)
98
97
  if OnlyofficePdfParser::FileHelper.file_path?(param)
@@ -108,7 +107,9 @@ module OnlyofficePdfParser
108
107
  def fetch_pixels
109
108
  tmp_file = Tempfile.new('onlyoffice_pdf_parser')
110
109
  File.binwrite(tmp_file, data)
111
- @pixels = ImageList.new(tmp_file.path).get_pixels(0, 0, width, height).each_slice(width).to_a
110
+ @pixels = Magick::ImageList.new(tmp_file.path)
111
+ .get_pixels(0, 0, width, height)
112
+ .each_slice(width).to_a
112
113
  tmp_file.unlink
113
114
  end
114
115
 
@@ -14,8 +14,8 @@ module PdfConvertToBmpHelper
14
14
 
15
15
  private
16
16
 
17
- # @param path_pattern [String] pattern to find bmps
18
- # @return [Array<String>] list of bmps
17
+ # @param path_pattern [String] pattern to find BMPs
18
+ # @return [Array<String>] list of BMPs
19
19
  def multipage_files(path_pattern)
20
20
  files_dir = File.dirname(path_pattern)
21
21
  files_base = File.basename(path_pattern, '.*')
@@ -15,7 +15,7 @@ module OnlyofficePdfParser
15
15
  attr_accessor :pages
16
16
  # @return [String] full path to file
17
17
  attr_accessor :file_path
18
- # @return [Array<String>] bin representation of bmps
18
+ # @return [Array<String>] bin representation of BMPs
19
19
  attr_reader :pages_in_bmp
20
20
 
21
21
  def initialize(pages: [], file_path: nil)
@@ -4,6 +4,6 @@ module OnlyofficePdfParser
4
4
  # Module with version of Gem
5
5
  module Version
6
6
  # @return [String] version of gem
7
- STRING = '0.4.0'
7
+ STRING = '0.5.0'
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onlyoffice_pdf_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Lobashov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-01-21 00:00:00.000000000 Z
12
+ date: 2022-10-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: image_size
@@ -49,16 +49,22 @@ dependencies:
49
49
  name: rmagick
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '4'
55
+ - - "<"
56
+ - !ruby/object:Gem::Version
57
+ version: '6'
55
58
  type: :runtime
56
59
  prerelease: false
57
60
  version_requirements: !ruby/object:Gem::Requirement
58
61
  requirements:
59
- - - "~>"
62
+ - - ">="
60
63
  - !ruby/object:Gem::Version
61
64
  version: '4'
65
+ - - "<"
66
+ - !ruby/object:Gem::Version
67
+ version: '6'
62
68
  - !ruby/object:Gem::Dependency
63
69
  name: overcommit
64
70
  requirement: !ruby/object:Gem::Requirement
@@ -235,14 +241,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
235
241
  requirements:
236
242
  - - ">="
237
243
  - !ruby/object:Gem::Version
238
- version: '2.5'
244
+ version: '2.6'
239
245
  required_rubygems_version: !ruby/object:Gem::Requirement
240
246
  requirements:
241
247
  - - ">="
242
248
  - !ruby/object:Gem::Version
243
249
  version: '0'
244
250
  requirements: []
245
- rubygems_version: 3.3.4
251
+ rubygems_version: 3.3.7
246
252
  signing_key:
247
253
  specification_version: 4
248
254
  summary: ONLYOFFICE PDF Parser Gem