glib2 4.2.9 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/glib2/rbglib.h +2 -2
- data/glib2.gemspec +0 -2
- data/lib/glib2/variant-type.rb +43 -0
- data/lib/glib2.rb +1 -0
- data/test/test-variant-type.rb +17 -1
- data/test/test-win32.rb +4 -1
- metadata +4 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61a419aaf4092dea700271f0ac83ba478be21dd6c5d5a3a11f76285fdcc07b93
|
4
|
+
data.tar.gz: 0dc4424cce4b5f931de37cb4751b3a9d57ae976aacfa695a95b011351523853e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0ff336282352a5018a63d8cad0cc72c310d125443e4f252b4cf2d65ba9d7bfd55faef90cdcd76fdc45210127ccd721fd97246c522e57e2b682055b9e9e8d930
|
7
|
+
data.tar.gz: b19d13da372bf202442fb0bfdb7af7e27b1d99a50a5857d577715ac9a3aeeda2b1d7f563222ddea2516a062c031c8e85c477ed6e6219fffe1f65e5a076be1e88
|
data/ext/glib2/rbglib.h
CHANGED
data/glib2.gemspec
CHANGED
@@ -48,14 +48,12 @@ Gem::Specification.new do |s|
|
|
48
48
|
|
49
49
|
s.add_runtime_dependency("pkg-config", ">= 1.3.5")
|
50
50
|
s.add_runtime_dependency("native-package-installer", ">= 1.0.3")
|
51
|
-
s.add_development_dependency("test-unit", ">= 2")
|
52
51
|
|
53
52
|
[
|
54
53
|
["alpine_linux", "glib-dev"],
|
55
54
|
["alt_linux", "glib2-devel"],
|
56
55
|
["arch_linux", "glib2"],
|
57
56
|
["conda", "glib"],
|
58
|
-
["conda", "glib"],
|
59
57
|
["debian", "libglib2.0-dev"],
|
60
58
|
["gentoo_linux", "dev-libs/glib"],
|
61
59
|
["homebrew", "glib"],
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# Copyright (C) 2025 Ruby-GNOME 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
|
+
module GLib
|
18
|
+
class VariantType
|
19
|
+
class << self
|
20
|
+
def try_convert(value)
|
21
|
+
case value
|
22
|
+
when String
|
23
|
+
new(value)
|
24
|
+
when Symbol
|
25
|
+
constant_name = value.to_s.upcase
|
26
|
+
if const_defined?(constant_name)
|
27
|
+
const_get(constant_name)
|
28
|
+
else
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
else
|
32
|
+
nil
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def inspect
|
38
|
+
super.gsub(/>\z/) do
|
39
|
+
" string=#{self}>"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
data/lib/glib2.rb
CHANGED
data/test/test-variant-type.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2015-
|
1
|
+
# Copyright (C) 2015-2025 Ruby-GNOME Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -151,6 +151,22 @@ class TestGLibVariantType < Test::Unit::TestCase
|
|
151
151
|
end
|
152
152
|
end
|
153
153
|
|
154
|
+
sub_test_case ".try_convert" do
|
155
|
+
test "String" do
|
156
|
+
assert_equal(GLib::VariantType::STRING,
|
157
|
+
GLib::VariantType.try_convert("s"))
|
158
|
+
end
|
159
|
+
|
160
|
+
test "Symbol: found" do
|
161
|
+
assert_equal(GLib::VariantType::STRING,
|
162
|
+
GLib::VariantType.try_convert(:string))
|
163
|
+
end
|
164
|
+
|
165
|
+
test "Symbol: not found" do
|
166
|
+
assert_nil(GLib::VariantType.try_convert(:nonexistent))
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
154
170
|
sub_test_case "#initialize" do
|
155
171
|
test "invalid" do
|
156
172
|
assert_raise(ArgumentError.new("invalid type string: \"X\"")) do
|
data/test/test-win32.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2015-
|
1
|
+
# Copyright (C) 2015-2025 Ruby-GNOME Project Team
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -19,6 +19,9 @@ class TestGLibWin32 < Test::Unit::TestCase
|
|
19
19
|
|
20
20
|
def test_get_package_install_directory_of_module
|
21
21
|
only_windows
|
22
|
+
if ENV["GITHUB_ACTIONS"] == "true"
|
23
|
+
omit("We can't detect suitable expected on GitHub Actions")
|
24
|
+
end
|
22
25
|
|
23
26
|
expected = Pathname(RbConfig.ruby).parent.parent.to_s
|
24
27
|
actual = GLib::Win32.get_package_installation_directory_of_module
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glib2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME Project Team
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: pkg-config
|
@@ -37,20 +37,6 @@ dependencies:
|
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: 1.0.3
|
40
|
-
- !ruby/object:Gem::Dependency
|
41
|
-
name: test-unit
|
42
|
-
requirement: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '2'
|
47
|
-
type: :development
|
48
|
-
prerelease: false
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - ">="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '2'
|
54
40
|
description: Ruby/GLib2 provides base features for GLib2 based bindings and many useful
|
55
41
|
utility features.
|
56
42
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
@@ -151,6 +137,7 @@ files:
|
|
151
137
|
- lib/glib2/regex.rb
|
152
138
|
- lib/glib2/time-zone.rb
|
153
139
|
- lib/glib2/value.rb
|
140
|
+
- lib/glib2/variant-type.rb
|
154
141
|
- lib/glib2/variant.rb
|
155
142
|
- lib/glib2/version.rb
|
156
143
|
- lib/gnome/rake/external-package.rb
|
@@ -233,13 +220,12 @@ requirements:
|
|
233
220
|
- 'system: gobject-2.0>=2.56.0: alt_linux: glib2-devel'
|
234
221
|
- 'system: gobject-2.0>=2.56.0: arch_linux: glib2'
|
235
222
|
- 'system: gobject-2.0>=2.56.0: conda: glib'
|
236
|
-
- 'system: gobject-2.0>=2.56.0: conda: glib'
|
237
223
|
- 'system: gobject-2.0>=2.56.0: debian: libglib2.0-dev'
|
238
224
|
- 'system: gobject-2.0>=2.56.0: gentoo_linux: dev-libs/glib'
|
239
225
|
- 'system: gobject-2.0>=2.56.0: homebrew: glib'
|
240
226
|
- 'system: gobject-2.0>=2.56.0: macports: glib2'
|
241
227
|
- 'system: gobject-2.0>=2.56.0: rhel: pkgconfig(gobject-2.0)'
|
242
|
-
rubygems_version: 3.6.
|
228
|
+
rubygems_version: 3.6.9
|
243
229
|
specification_version: 4
|
244
230
|
summary: Ruby/GLib2 is a Ruby binding of GLib-2.x.
|
245
231
|
test_files: []
|