glib2 4.2.8 → 4.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f73c2aeccbe33e4fc00063406400c70d157b3e90331d07eae42007242b518a3
4
- data.tar.gz: 34bfe0e8723d767be4742af921884d4caf613dbe6371909db1b58f56045ffb63
3
+ metadata.gz: e9cf0be023ff1699f1f32519a77b9fcd62cc78aae25f8d9eb5f08d45cb480f89
4
+ data.tar.gz: 122977c7845f0bb8bbd836731f8ed66ce7b3414d701bee323b4b29a1ca5f0e08
5
5
  SHA512:
6
- metadata.gz: eee51e2c97525cc960253ae764e9ea7ac9394ce682e33a5543601a12d5273822be5839a5eaff7f805ed79337f0d9a5d8d465cc759c3372a1562c4f2ed4f22429
7
- data.tar.gz: eca136856e69dd264707b0af4f497c67b2d8ba88c3d24bc2325ed6a859a7aa31f7cc16f4fb5b5ebf425a8101dd2a348ebc763b96802997b3be39bcba44c2063b
6
+ metadata.gz: daf21cbb4533811a42428dfe7c9d145c09de5f31ca3aba035476b340f8766009de203657659c3fe04abaa4f12e0b174ca4a2f7ec2b3ecbdfd5e8bfa5f5518c12
7
+ data.tar.gz: dd3bd710fa040bba104b471e52f343f56069c4864b00c0237f65a6c4426dd94dc26c0d7dad72485ce0ced625d77aab175efb360df2dc7e3cd9ee345cdf04be9e
data/ext/glib2/rbglib.h CHANGED
@@ -32,8 +32,8 @@
32
32
  G_BEGIN_DECLS
33
33
 
34
34
  #define RBGLIB_MAJOR_VERSION 4
35
- #define RBGLIB_MINOR_VERSION 2
36
- #define RBGLIB_MICRO_VERSION 8
35
+ #define RBGLIB_MINOR_VERSION 3
36
+ #define RBGLIB_MICRO_VERSION 0
37
37
 
38
38
  /* For Ruby < 3.0 */
39
39
  #ifndef RB_LL2NUM
data/glib2.gemspec CHANGED
@@ -52,9 +52,16 @@ Gem::Specification.new do |s|
52
52
 
53
53
  [
54
54
  ["alpine_linux", "glib-dev"],
55
+ ["alt_linux", "glib2-devel"],
56
+ ["arch_linux", "glib2"],
55
57
  ["conda", "glib"],
58
+ ["debian", "libglib2.0-dev"],
59
+ ["gentoo_linux", "dev-libs/glib"],
60
+ ["homebrew", "glib"],
61
+ ["macports", "glib2"],
62
+ ["rhel", "pkgconfig(gobject-2.0)"],
56
63
  ].each do |platform, package|
57
- s.requirements << "system: gobject-2.0: #{platform}: #{package}"
64
+ s.requirements << "system: gobject-2.0>=2.56.0: #{platform}: #{package}"
58
65
  end
59
66
 
60
67
  s.metadata["msys2_mingw_dependencies"] = "glib2"
@@ -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
@@ -343,6 +343,7 @@ require "glib2/regex"
343
343
  require "glib2/time-zone"
344
344
  require "glib2/value"
345
345
  require "glib2/variant"
346
+ require "glib2/variant-type"
346
347
 
347
348
  =begin
348
349
  Don't we need this?
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2015-2021 Ruby-GNOME Project Team
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-2021 Ruby-GNOME Project Team
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.2.8
4
+ version: 4.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Ruby-GNOME Project Team
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-20 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: pkg-config
@@ -151,6 +151,7 @@ files:
151
151
  - lib/glib2/regex.rb
152
152
  - lib/glib2/time-zone.rb
153
153
  - lib/glib2/value.rb
154
+ - lib/glib2/variant-type.rb
154
155
  - lib/glib2/variant.rb
155
156
  - lib/glib2/version.rb
156
157
  - lib/gnome/rake/external-package.rb
@@ -229,9 +230,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
230
  - !ruby/object:Gem::Version
230
231
  version: '0'
231
232
  requirements:
232
- - 'system: gobject-2.0: alpine_linux: glib-dev'
233
- - 'system: gobject-2.0: conda: glib'
234
- rubygems_version: 3.6.2
233
+ - 'system: gobject-2.0>=2.56.0: alpine_linux: glib-dev'
234
+ - 'system: gobject-2.0>=2.56.0: alt_linux: glib2-devel'
235
+ - 'system: gobject-2.0>=2.56.0: arch_linux: glib2'
236
+ - 'system: gobject-2.0>=2.56.0: conda: glib'
237
+ - 'system: gobject-2.0>=2.56.0: debian: libglib2.0-dev'
238
+ - 'system: gobject-2.0>=2.56.0: gentoo_linux: dev-libs/glib'
239
+ - 'system: gobject-2.0>=2.56.0: homebrew: glib'
240
+ - 'system: gobject-2.0>=2.56.0: macports: glib2'
241
+ - 'system: gobject-2.0>=2.56.0: rhel: pkgconfig(gobject-2.0)'
242
+ rubygems_version: 3.6.7
235
243
  specification_version: 4
236
244
  summary: Ruby/GLib2 is a Ruby binding of GLib-2.x.
237
245
  test_files: []