poppler 3.0.5 → 3.0.6

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
  SHA1:
3
- metadata.gz: bbe02658bbc2c92f2f6c7fa84d4e3cc1208fcc08
4
- data.tar.gz: c93e08f6d996f577ad9590a6150722febe3b29f8
3
+ metadata.gz: eaf2d6545806ef60b4c0e83a5fc886b70871cd3c
4
+ data.tar.gz: ef40da5e19d537d140375b00ecb4b9ab94290fc3
5
5
  SHA512:
6
- metadata.gz: 4a94578593e42ae6fab33440ecd7488da2176163c7c8ef7063ffe410ec39a631cb25d2ed3f2df287e2f6041b4b5c8fdfe399eba9c969782eb95f60de9f2dfb7a
7
- data.tar.gz: f0e9686b8db1ee9d1ceeb0b81a340a83942becffab9238ef5412ae54f329ddd58e4119d203d97b8147e36cf289712acff7b58281ab68e8c60858f1b57183b4b9
6
+ metadata.gz: 11781c118e2b3d2d2130b073c8aca7650be8b78343d2660a5b97ae369d1be27a056517de2953216a3718b1ecf0d95281555a6b75b63cd46c70e3a9c7378d9fd9
7
+ data.tar.gz: 14c010e886be6b15aa77ba01dfaef1896266617285bff361898e8132a0a7e9400b13894aa2665bfd976e755dd061f464f08c074dca723d1146a0370d38a0228a
@@ -1,4 +1,4 @@
1
- # Copyright(C) 2006-2009 Ruby-GNOME2 Project.
1
+ # Copyright(C) 2006-2015 Ruby-GNOME2 Project.
2
2
  #
3
3
  # This library is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU Lesser General Public License as published by
@@ -34,6 +34,23 @@ module Poppler
34
34
 
35
35
  VERSION = version.split(".").collect {|x| x.to_i}
36
36
 
37
+ module Version
38
+ MAJOR, MINOR, MICRO = BUILD_VERSION
39
+ STRING = "#{MAJOR}.#{MINOR}.#{MICRO}"
40
+
41
+ class << self
42
+ def or_later?(major, minor, micro=nil)
43
+ micro || 0
44
+ version = [
45
+ MAJOR,
46
+ MINOR,
47
+ MICRO,
48
+ ]
49
+ (version <=> [major, minor, micro]) >= 0
50
+ end
51
+ end
52
+ end
53
+
37
54
  class Document
38
55
  private
39
56
  def pdf_data?(data)
@@ -29,4 +29,4 @@ class Test::Unit::TestCase
29
29
  include PopplerTestUtils
30
30
  end
31
31
 
32
- exit Test::Unit::AutoRunner.run(true)
32
+ exit Test::Unit::AutoRunner.run(true, File.join(base_dir, "test"))
@@ -0,0 +1,47 @@
1
+ # Copyright (C) 2015 Ruby-GNOME2 Project Team
2
+ #
3
+ # This library is free software; you can redistribute it and/or
4
+ # modify it under the terms of the GNU Lesser General Public
5
+ # License as published by the Free Software Foundation; either
6
+ # version 2.1 of the License, or (at your option) any later version.
7
+ #
8
+ # This library is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
+ # Lesser General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU Lesser General Public
14
+ # License along with this library; if not, write to the Free Software
15
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
+
17
+ class TestPopplerVersion < Test::Unit::TestCase
18
+ include PopplerTestUtils
19
+
20
+ test "STRING" do
21
+ major = Poppler::Version::MAJOR
22
+ minor = Poppler::Version::MINOR
23
+ micro = Poppler::Version::MICRO
24
+ assert_equal([major, minor, micro].join("."),
25
+ Poppler::Version::STRING)
26
+ end
27
+
28
+ sub_test_case("#or_later?") do
29
+ test "same" do
30
+ assert_true(Poppler::Version.or_later?(Poppler::Version::MAJOR,
31
+ Poppler::Version::MINOR,
32
+ Poppler::Version::MICRO))
33
+ end
34
+
35
+ test "later" do
36
+ assert_true(Poppler::Version.or_later?(Poppler::Version::MAJOR,
37
+ Poppler::Version::MINOR - 1,
38
+ Poppler::Version::MICRO))
39
+ end
40
+
41
+ test "earlier" do
42
+ assert_false(Poppler::Version.or_later?(Poppler::Version::MAJOR,
43
+ Poppler::Version::MINOR + 1,
44
+ Poppler::Version::MICRO))
45
+ end
46
+ end
47
+ end
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.0.5
4
+ version: 3.0.6
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: 2015-09-22 00:00:00.000000000 Z
11
+ date: 2015-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cairo
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.5
33
+ version: 3.0.6
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.0.5
40
+ version: 3.0.6
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: []
@@ -90,6 +90,7 @@ files:
90
90
  - test/fixtures/image.png
91
91
  - test/poppler-test-utils.rb
92
92
  - test/run-test.rb
93
+ - test/test-version.rb
93
94
  - test/test_annotation.rb
94
95
  - test/test_color.rb
95
96
  - test/test_constants.rb