poppler 3.2.1 → 3.2.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
- SHA1:
3
- metadata.gz: 4a02871b05bf27912f337fccbd39f0e0dd831ff8
4
- data.tar.gz: 9699319dafb19d455ab9e8fa860f7fec50367e55
2
+ SHA256:
3
+ metadata.gz: 5502c5277e7e245a0887ca0a84adf66a4092d966e18852141c7812e31f119e51
4
+ data.tar.gz: 551d8e677310d2f391faa39688c0836916de66a6a92320e40e756af5dc1bd970
5
5
  SHA512:
6
- metadata.gz: 81d7183ce05c6ccc8603f5380c5e365ea419aafbfccac6bd48b1ddc199cf4f1b5ae1ec83e7d8a10de2b360ba1e1f06b6834b8ba1ebd8b10091d5387254bce404
7
- data.tar.gz: 58b77ac810b5ced5826f38ca79d3fa1a19c205d23322e48f6df8a26a9d21b47694f74cc938176aa6e66cc355fd48881404c7995f5584443abb713735250bfbb6
6
+ metadata.gz: f101f8b9097c37c0cf48dbfe071337cdb2fa10cc841089ec6333229cb2bff939509219e952a5def0ca984440b64700c4d4256961ba11ada22067f4e8adcd8c82
7
+ data.tar.gz: 847add202613a7d719fdb57000a717bd679d0161c0ea1a7c07bc86d00518c7f37587af5a9a57a521cab249a4ec7b609a7683d5b61237703639b2f56fc389a84d
@@ -32,7 +32,7 @@ namespace :dependency do
32
32
  unless PKGConfig.check_version?("poppler", 0, 12, 0)
33
33
  unless NativePackageInstaller.install(:alt_linux => "libpoppler-glib-devel",
34
34
  :debian => "libpoppler-glib-dev",
35
- :redhat => "poppler-glib-devel",
35
+ :redhat => "pkgconfig(poppler-glib)",
36
36
  :arch_linux => "poppler",
37
37
  :homebrew => "poppler",
38
38
  :macports => "poppler",
data/lib/poppler/page.rb CHANGED
@@ -57,5 +57,15 @@ module Poppler
57
57
  find_text_with_options(text, options)
58
58
  end
59
59
  end
60
+
61
+ alias_method :thumbnail_size_raw, :thumbnail_size
62
+ def thumbnail_size
63
+ have_thumnbial, width, height = thumbnail_size_raw
64
+ if have_thumnbial
65
+ [width, height]
66
+ else
67
+ nil
68
+ end
69
+ end
60
70
  end
61
71
  end
data/test/test-page.rb CHANGED
@@ -89,6 +89,37 @@ class TestPage < Test::Unit::TestCase
89
89
  end
90
90
  end
91
91
 
92
+ sub_test_case("#thumbnail_size") do
93
+ def create_document
94
+ pdf = StringIO.new
95
+ surface = Cairo::PDFSurface.new(pdf, 10, 20)
96
+ yield(surface) if block_given?
97
+ surface.finish
98
+ Poppler::Document.new(pdf.string)
99
+ end
100
+
101
+ def only_cairo_version(major, minor, micro=nil)
102
+ unless Cairo.satisfied_version?(major, minor, micro)
103
+ omit("Require cairo >= #{major}.#{minor}.#{micro}")
104
+ end
105
+ end
106
+
107
+ def test_exist
108
+ only_cairo_version(1, 15, 4)
109
+ document = create_document do |surface|
110
+ surface.set_thumbnail_size(5, 10)
111
+ end
112
+ page = document[0]
113
+ assert_equal([5, 10], page.thumbnail_size)
114
+ end
115
+
116
+ def test_not_exist
117
+ document = create_document
118
+ page = document[0]
119
+ assert_nil(page.thumbnail_size)
120
+ end
121
+ end
122
+
92
123
  private
93
124
  def find_first_image_mapping(document)
94
125
  document.each do |page|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poppler
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME2 Project Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-19 00:00:00.000000000 Z
11
+ date: 2018-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cairo-gobject
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.2.1
19
+ version: 3.2.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.2.1
26
+ version: 3.2.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gio2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.2.1
33
+ version: 3.2.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.2.1
40
+ version: 3.2.2
41
41
  description: Ruby/Poppler is a Ruby binding of poppler-glib.
42
42
  email: ruby-gnome2-devel-en@lists.sourceforge.net
43
43
  executables: []
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
- rubygems_version: 2.5.2.1
105
+ rubygems_version: 2.7.6
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: Ruby/Poppler is a Ruby binding of poppler-glib.