gdk_pixbuf2 3.0.3 → 3.0.4

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: 7d58cfe8c3c75325f3ddaaa6c0f78430c40925b4
4
- data.tar.gz: 448de8bb4c178d89fc351bc0ca85dcf95c3072f3
3
+ metadata.gz: 68698f0233e4d73496505beb6ac231fcb14e7c30
4
+ data.tar.gz: cd307634d4007ba083c3db968e591b9aa0159335
5
5
  SHA512:
6
- metadata.gz: 70f828f4889b2fe4fa3dd78b972f48446046eef14525cab3268c6e2ccab5c415b0f8ee94ed7cc223a9757990191836d8d235abe1b14cf542a8ea7c3326d89e37
7
- data.tar.gz: c3b6fc3a6152df163095f695b06202682d5c717acbd28a42c95cfac0a90229d290cd32ddfece75195af99fa7ff8249f92595d4ef20142bebd1f29b49f6ccf41c
6
+ metadata.gz: 134246edf7536eb1a6fddb8991bd1ffe9b63b4d06188c627c332dde50da1f21a398162afe632721fba01e04b70539757dc6870ce145339d4d47e5cc1e44445e0
7
+ data.tar.gz: 27aedab805fd806a283091bed146924f83c670ae5024e37e6466a0ea19dd87fd8a579d6480f685fc0b056a68b3b11e13889393ce8ac6f2e060ea5fce4d88a199
@@ -45,6 +45,7 @@ unless required_pkg_config_package(package_id,
45
45
  :debian => "libgdk-pixbuf2.0-dev",
46
46
  :redhat => "gtk2-devel",
47
47
  :fedora => "gdk-pixbuf2-devel",
48
+ :arch => "gdk-pixbuf2",
48
49
  :homebrew => "gdk-pixbuf",
49
50
  :macports => "gdk-pixbuf2")
50
51
  exit(false)
data/lib/gdk_pixbuf2.rb CHANGED
@@ -1,4 +1,20 @@
1
- require 'glib2'
1
+ # Copyright (C) 2002-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
+ require "glib2"
2
18
 
3
19
  base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
4
20
  vendor_dir = base_dir + "vendor" + "local"
@@ -39,6 +55,7 @@ module Gdk
39
55
  loader
40
56
  end
41
57
  end
58
+
42
59
  class Pixbuf
43
60
  LOG_DOMAIN = "GdkPixbuf"
44
61
 
@@ -51,6 +68,25 @@ module Gdk
51
68
  end
52
69
  end
53
70
  end
71
+
72
+ module Version
73
+ MAJOR = Gdk::Pixbuf::MAJOR
74
+ MINOR = Gdk::Pixbuf::MINOR
75
+ MICRO = Gdk::Pixbuf::MICRO
76
+ STRING = "#{MAJOR}.#{MINOR}.#{MICRO}"
77
+
78
+ class << self
79
+ def or_later?(major, minor, micro=nil)
80
+ micro ||= 0
81
+ version = [
82
+ MAJOR,
83
+ MINOR,
84
+ MICRO,
85
+ ]
86
+ (version <=> [major, minor, micro]) >= 0
87
+ end
88
+ end
89
+ end
54
90
  end
55
91
  end
56
92
 
@@ -0,0 +1,20 @@
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
+ require "test-unit"
18
+
19
+ module GdkPixbufTestUtils
20
+ end
data/test/run-test.rb ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Copyright (C) 2015 Ruby-GNOME2 Project Team
4
+ #
5
+ # This library is free software; you can redistribute it and/or
6
+ # modify it under the terms of the GNU Lesser General Public
7
+ # License as published by the Free Software Foundation; either
8
+ # version 2.1 of the License, or (at your option) any later version.
9
+ #
10
+ # This library is distributed in the hope that it will be useful,
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ # Lesser General Public License for more details.
14
+ #
15
+ # You should have received a copy of the GNU Lesser General Public
16
+ # License along with this library; if not, write to the Free Software
17
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+
19
+ ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
20
+ ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
21
+
22
+ glib_base = File.join(ruby_gnome2_base, "glib2")
23
+ gdk_pixbuf2_base = File.join(ruby_gnome2_base, "gdk_pixbuf2")
24
+
25
+ modules = [
26
+ [glib_base, "glib2"],
27
+ [gdk_pixbuf2_base, "gdk_pixbuf2"]
28
+ ]
29
+ modules.each do |target, module_name|
30
+ if system("which make > /dev/null")
31
+ `make -C #{target.dump} > /dev/null` or exit(false)
32
+ end
33
+ $LOAD_PATH.unshift(File.join(target, "ext", module_name))
34
+ $LOAD_PATH.unshift(File.join(target, "lib"))
35
+ end
36
+
37
+ $LOAD_PATH.unshift(File.join(glib_base, "test"))
38
+ require "glib-test-init"
39
+
40
+ $LOAD_PATH.unshift(File.join(gdk_pixbuf2_base, "test"))
41
+ require "gdk_pixbuf2-test-utils"
42
+
43
+ require "gdk_pixbuf2"
44
+
45
+ exit Test::Unit::AutoRunner.run(true)
@@ -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 TestGdkPixbufVersion < Test::Unit::TestCase
18
+ include GdkPixbufTestUtils
19
+
20
+ test "STRING" do
21
+ major = Gdk::Pixbuf::Version::MAJOR
22
+ minor = Gdk::Pixbuf::Version::MINOR
23
+ micro = Gdk::Pixbuf::Version::MICRO
24
+ assert_equal([major, minor, micro].join("."),
25
+ Gdk::Pixbuf::Version::STRING)
26
+ end
27
+
28
+ sub_test_case("#or_later?") do
29
+ test "same" do
30
+ assert_true(Gdk::Pixbuf::Version.or_later?(Gdk::Pixbuf::Version::MAJOR,
31
+ Gdk::Pixbuf::Version::MINOR,
32
+ Gdk::Pixbuf::Version::MICRO))
33
+ end
34
+
35
+ test "later" do
36
+ assert_true(Gdk::Pixbuf::Version.or_later?(Gdk::Pixbuf::Version::MAJOR,
37
+ Gdk::Pixbuf::Version::MINOR - 1,
38
+ Gdk::Pixbuf::Version::MICRO))
39
+ end
40
+
41
+ test "earlier" do
42
+ assert_false(Gdk::Pixbuf::Version.or_later?(Gdk::Pixbuf::Version::MAJOR,
43
+ Gdk::Pixbuf::Version::MINOR + 1,
44
+ Gdk::Pixbuf::Version::MICRO))
45
+ end
46
+ end
47
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gdk_pixbuf2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.4
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-16 00:00:00.000000000 Z
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glib2
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.3
19
+ version: 3.0.4
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.0.3
26
+ version: 3.0.4
27
27
  description: Ruby/GdkPixbuf2 is a Ruby binding of GdkPixbuf-2.x.
28
28
  email: ruby-gnome2-devel-en@lists.sourceforge.net
29
29
  executables: []
@@ -63,6 +63,9 @@ files:
63
63
  - sample/simpleanim.rb
64
64
  - sample/utils.rb
65
65
  - sample/xpm.rb
66
+ - test/gdk_pixbuf2-test-utils.rb
67
+ - test/run-test.rb
68
+ - test/test-version.rb
66
69
  homepage: http://ruby-gnome2.sourceforge.jp/
67
70
  licenses:
68
71
  - LGPLv2.1 or later