atk 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: bfb43400fc6b6bc8526378f7b109666ac431fba0
4
- data.tar.gz: d0cf5ba7042c2faa447df0158dd3d1af09f85f6d
3
+ metadata.gz: b009ad8112ef10c54552e39303c172e700d13ed0
4
+ data.tar.gz: 35a5565c10bdd316ff7a0b77a38f1d52ced6aee1
5
5
  SHA512:
6
- metadata.gz: 682f0be07ab6213897f099ca4e935750deb527ca69822d28251823521c601091ab548ef3b944d356fe95c46444932b2ee05a99dd16e4aff4362aae405d1d2e88
7
- data.tar.gz: 383206ed4e9f55efb9a5c9f0b15de0141bf6e58c891f44d9e3c28b8315be3066e09064272154ee58e2847e6a795c7ca53490e4898289468ce5b2d20c4821ebde
6
+ metadata.gz: 5e0507b89079d72cb0ed7fa79e09a75002fac9861030f23a363cf2639b4c63ecd775db8a078fa192c2b9491a97b91ce569dd40f4444567396b5c0126eb06dd9c
7
+ data.tar.gz: a325bec0664fc39ac885979b7f6a8002526217156368ac9dd167f6be2b250474a5af7d73fb1b68f0889624a587618e02acb931e00b5c3d57496482a437474598
@@ -47,6 +47,7 @@ setup_windows(module_name, base_dir)
47
47
  unless required_pkg_config_package([package_id, 1, 12, 0],
48
48
  :debian => "libatk1.0-dev",
49
49
  :redhat => "atk-devel",
50
+ :arch => "atk",
50
51
  :homebrew => "atk",
51
52
  :macports => "atk")
52
53
  exit(false)
data/lib/atk.rb CHANGED
@@ -1,3 +1,19 @@
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
+
1
17
  require 'glib2'
2
18
 
3
19
  base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
@@ -19,3 +35,21 @@ if vendor_dir.exist?
19
35
  rescue LoadError
20
36
  end
21
37
  end
38
+
39
+ module Atk
40
+ module Version
41
+ MAJOR, MINOR, MICRO = Atk::BUILD_VERSION
42
+ STRING = Atk::BUILD_VERSION.join(".")
43
+ class << self
44
+ def or_later?(major, minor, micro=nil)
45
+ micro ||= 0
46
+ version = [
47
+ MAJOR,
48
+ MINOR,
49
+ MICRO,
50
+ ]
51
+ (version <=> [major, minor, micro]) >= 0
52
+ end
53
+ end
54
+ end
55
+ end
@@ -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 TestAtkVersion < Test::Unit::TestCase
18
+ include AtkTestUtils
19
+
20
+ test "STRING" do
21
+ major = Atk::Version::MAJOR
22
+ minor = Atk::Version::MINOR
23
+ micro = Atk::Version::MICRO
24
+ assert_equal([major, minor, micro].join("."),
25
+ Atk::Version::STRING)
26
+ end
27
+
28
+ sub_test_case("#or_later?") do
29
+ test "same" do
30
+ assert_true(Atk::Version.or_later?(Atk::Version::MAJOR,
31
+ Atk::Version::MINOR,
32
+ Atk::Version::MICRO))
33
+ end
34
+
35
+ test "later" do
36
+ assert_true(Atk::Version.or_later?(Atk::Version::MAJOR,
37
+ Atk::Version::MINOR - 1,
38
+ Atk::Version::MICRO))
39
+ end
40
+
41
+ test "earlier" do
42
+ assert_false(Atk::Version.or_later?(Atk::Version::MAJOR,
43
+ Atk::Version::MINOR + 1,
44
+ Atk::Version::MICRO))
45
+ end
46
+ end
47
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atk
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/ATK is a Ruby binding of ATK-1.0.x.
28
28
  email: ruby-gnome2-devel-en@lists.sourceforge.net
29
29
  executables: []
@@ -74,6 +74,7 @@ files:
74
74
  - test/atk-test-utils.rb
75
75
  - test/run-test.rb
76
76
  - test/test-text-rectangle.rb
77
+ - test/test-version.rb
77
78
  homepage: http://ruby-gnome2.sourceforge.jp/
78
79
  licenses:
79
80
  - LGPLv2.1 or later