rsvg2 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 +4 -4
- data/lib/rsvg2.rb +18 -0
- data/test/run-test.rb +2 -2
- data/test/test-version.rb +47 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1c3d96babec0d8a9680978065ee628adaf40b71
|
4
|
+
data.tar.gz: 7f614d9cd0cd75c5cc005fe4306d8629bd6c2196
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1918bf80c3fbe4a66ec961b89a8abfd795ddb4ebb72c422df41e10993fb7d14e345088d1499bbb5c38c3dccc98b09285051ab00489ff04a07ab6a9ebafc8c28
|
7
|
+
data.tar.gz: 6bb254a56d4bab37c72d7f958bb1d13cc2af60e67b5a8974d3e4270a4dffb3bba5da39271d4088c57dc87da588de73a337ae257af1e1e27f23762157a0a79fd2
|
data/lib/rsvg2.rb
CHANGED
@@ -78,6 +78,24 @@ module RSVG
|
|
78
78
|
end
|
79
79
|
end
|
80
80
|
end
|
81
|
+
|
82
|
+
module Version
|
83
|
+
MAJOR, MINOR, MICRO = BUILD_VERSION
|
84
|
+
STRING = "#{MAJOR}.#{MINOR}.#{MICRO}"
|
85
|
+
|
86
|
+
class << self
|
87
|
+
def or_later?(major, minor, micro=nil)
|
88
|
+
micro || 0
|
89
|
+
version = [
|
90
|
+
MAJOR,
|
91
|
+
MINOR,
|
92
|
+
MICRO,
|
93
|
+
]
|
94
|
+
(version <=> [major, minor, micro]) >= 0
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
81
99
|
end
|
82
100
|
|
83
101
|
module Cairo
|
data/test/run-test.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#
|
3
|
-
# Copyright (C) 2014 Ruby-GNOME2 Project Team
|
3
|
+
# Copyright (C) 2014-2015 Ruby-GNOME2 Project Team
|
4
4
|
#
|
5
5
|
# This library is free software; you can redistribute it and/or
|
6
6
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -46,4 +46,4 @@ require "rsvg2-test-utils"
|
|
46
46
|
|
47
47
|
require "rsvg2"
|
48
48
|
|
49
|
-
exit Test::Unit::AutoRunner.run(true)
|
49
|
+
exit Test::Unit::AutoRunner.run(true, File.join(rsvg2_base, "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 TestRSVGVersion < Test::Unit::TestCase
|
18
|
+
include RSVG2TestUtils
|
19
|
+
|
20
|
+
test "STRING" do
|
21
|
+
major = RSVG::Version::MAJOR
|
22
|
+
minor = RSVG::Version::MINOR
|
23
|
+
micro = RSVG::Version::MICRO
|
24
|
+
assert_equal([major, minor, micro].join("."),
|
25
|
+
RSVG::Version::STRING)
|
26
|
+
end
|
27
|
+
|
28
|
+
sub_test_case("#or_later?") do
|
29
|
+
test "same" do
|
30
|
+
assert_true(RSVG::Version.or_later?(RSVG::Version::MAJOR,
|
31
|
+
RSVG::Version::MINOR,
|
32
|
+
RSVG::Version::MICRO))
|
33
|
+
end
|
34
|
+
|
35
|
+
test "later" do
|
36
|
+
assert_true(RSVG::Version.or_later?(RSVG::Version::MAJOR,
|
37
|
+
RSVG::Version::MINOR - 1,
|
38
|
+
RSVG::Version::MICRO))
|
39
|
+
end
|
40
|
+
|
41
|
+
test "earlier" do
|
42
|
+
assert_false(RSVG::Version.or_later?(RSVG::Version::MAJOR,
|
43
|
+
RSVG::Version::MINOR + 1,
|
44
|
+
RSVG::Version::MICRO))
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsvg2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
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-
|
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.
|
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.
|
40
|
+
version: 3.0.6
|
41
41
|
description: Ruby/RSVG is a Ruby binding of librsvg-2.x.
|
42
42
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
43
43
|
executables: []
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- test/rsvg2-test-utils.rb
|
62
62
|
- test/run-test.rb
|
63
63
|
- test/test-handle.rb
|
64
|
+
- test/test-version.rb
|
64
65
|
homepage: http://ruby-gnome2.sourceforge.jp/
|
65
66
|
licenses:
|
66
67
|
- LGPLv2.1 or later
|