gio2 3.5.1 → 4.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/gio2/extconf.rb +20 -17
- data/ext/gio2/rb-gio2.c +0 -15
- data/ext/gio2/rb-gio2.h +1 -1
- data/lib/gio2/loader.rb +16 -1
- data/lib/gio2/volume.rb +28 -0
- data/test/test-action-map.rb +16 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7c97ae956b7df9431bfca1b7927eda6a52cf5f16941d9eff97baf5e48317203
|
4
|
+
data.tar.gz: bf1e3577f9851f859fa205b07e69b11965e2739ab08937ef349ff442d8bd04b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5305fb1abd26851276a980d096bffde554c8f43a21c9df50f9e8aa59b78f88255299e9afa42e5052492bfeafc8b5867243aa0de671a59e09e6c3a4c231caec20
|
7
|
+
data.tar.gz: 9f6a6c7c54dbb0368b533c0d8ef65ba66ff22e07b2dc5c9cf4d9961ce8bcb00223bbfa6e02f950e2b2cf8ed18036c12b3adb56fbdb49abf095f7c44034d06b73
|
data/ext/gio2/extconf.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#
|
3
|
-
# Copyright (C) 2014-
|
3
|
+
# Copyright (C) 2014-2023 Ruby-GNOME 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
|
@@ -23,30 +23,19 @@ top_dir = base_dir.parent
|
|
23
23
|
top_build_dir = Pathname(".").parent.parent.parent.expand_path
|
24
24
|
|
25
25
|
mkmf_gnome2_dir = top_dir + "glib2" + "lib"
|
26
|
-
|
27
|
-
unless mkmf_gnome2_dir.exist?
|
28
|
-
if /(-\d+\.\d+\.\d+)\z/ =~ base_dir.basename.to_s
|
29
|
-
version_suffix = $1
|
30
|
-
mkmf_gnome2_dir = top_dir + "glib2#{version_suffix}" + "lib"
|
31
|
-
end
|
32
|
-
end
|
26
|
+
$LOAD_PATH.unshift(mkmf_gnome2_dir.to_s) if mkmf_gnome2_dir.exist?
|
33
27
|
|
34
|
-
$LOAD_PATH.unshift(mkmf_gnome2_dir.to_s)
|
35
28
|
|
36
29
|
module_name = "gio2"
|
37
30
|
package_id = "gio-2.0"
|
38
31
|
|
39
32
|
require "mkmf-gnome"
|
40
33
|
|
41
|
-
["glib2"
|
42
|
-
|
43
|
-
|
44
|
-
package_library_name = package.gsub(/-/, "_")
|
45
|
-
build_dir = "#{build_base_path}/#{package_library_name}/#{RUBY_VERSION}"
|
46
|
-
add_depend_package(package, "#{directory}/ext/#{package}",
|
34
|
+
["glib2"].each do |package|
|
35
|
+
add_depend_package(package,
|
36
|
+
"#{package}/ext/#{package}",
|
47
37
|
top_dir.to_s,
|
48
|
-
:
|
49
|
-
:target_build_dir => build_dir)
|
38
|
+
top_build_dir: top_build_dir.to_s)
|
50
39
|
end
|
51
40
|
|
52
41
|
unless required_pkg_config_package(package_id,
|
@@ -66,6 +55,20 @@ end
|
|
66
55
|
create_pkg_config_file("Ruby/GIO2", package_id)
|
67
56
|
|
68
57
|
$defs << "-DRUBY_GIO2_COMPILATION"
|
58
|
+
case RUBY_PLATFORM
|
59
|
+
when /darwin/
|
60
|
+
symbols_in_external_bundles = [
|
61
|
+
"_rbg_define_method",
|
62
|
+
"_rbgobj_add_relative",
|
63
|
+
"_rbgobj_boxed_get",
|
64
|
+
"_rbgobj_gvalue_to_rvalue",
|
65
|
+
"_rbgobj_ruby_object_from_instance",
|
66
|
+
"_rbgobj_set_signal_func",
|
67
|
+
]
|
68
|
+
symbols_in_external_bundles.each do |symbol|
|
69
|
+
$DLDFLAGS << " -Wl,-U,#{symbol}"
|
70
|
+
end
|
71
|
+
end
|
69
72
|
create_makefile(module_name)
|
70
73
|
|
71
74
|
pkg_config_dir = with_config("pkg-config-dir")
|
data/ext/gio2/rb-gio2.c
CHANGED
@@ -22,21 +22,6 @@
|
|
22
22
|
|
23
23
|
#define RG_TARGET_NAMESPACE rb_mGio
|
24
24
|
|
25
|
-
#ifdef _WIN32
|
26
|
-
/* Workaround: See glib2/ext/glib2/rbglib.c for details. */
|
27
|
-
BOOL WINAPI
|
28
|
-
DllMain(G_GNUC_UNUSED HINSTANCE hinstDLL,
|
29
|
-
G_GNUC_UNUSED DWORD fdwReason,
|
30
|
-
G_GNUC_UNUSED LPVOID lpvReserved);
|
31
|
-
BOOL WINAPI
|
32
|
-
DllMain(G_GNUC_UNUSED HINSTANCE hinstDLL,
|
33
|
-
G_GNUC_UNUSED DWORD fdwReason,
|
34
|
-
G_GNUC_UNUSED LPVOID lpvReserved)
|
35
|
-
{
|
36
|
-
return TRUE;
|
37
|
-
}
|
38
|
-
#endif
|
39
|
-
|
40
25
|
void
|
41
26
|
Init_gio2 (void)
|
42
27
|
{
|
data/ext/gio2/rb-gio2.h
CHANGED
data/lib/gio2/loader.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2013-
|
1
|
+
# Copyright (C) 2013-2022 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
|
@@ -76,6 +76,7 @@ module Gio
|
|
76
76
|
require "gio2/settings"
|
77
77
|
require "gio2/settings-schema-source"
|
78
78
|
require "gio2/simple-action"
|
79
|
+
require "gio2/volume"
|
79
80
|
|
80
81
|
require "gio2/deprecated"
|
81
82
|
end
|
@@ -210,6 +211,20 @@ module Gio
|
|
210
211
|
end
|
211
212
|
end
|
212
213
|
|
214
|
+
def rubyish_method_name(function_info, options={})
|
215
|
+
case function_info.name
|
216
|
+
when "get_mount"
|
217
|
+
case function_info.container&.name
|
218
|
+
when "Volume"
|
219
|
+
"get_mount"
|
220
|
+
else
|
221
|
+
super
|
222
|
+
end
|
223
|
+
else
|
224
|
+
super
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
213
228
|
def rubyish_class_name(info)
|
214
229
|
case info.name
|
215
230
|
when /Enum\z/
|
data/lib/gio2/volume.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# Copyright (C) 2022 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 Gio
|
18
|
+
module Volume
|
19
|
+
alias_method :mount_raw, :mount
|
20
|
+
def mount(*args, &block)
|
21
|
+
if args.size.zero?
|
22
|
+
get_mount
|
23
|
+
else
|
24
|
+
mount_raw(*args, &block)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/test/test-action-map.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2015 Ruby-GNOME2 Project Team
|
1
|
+
# Copyright (C) 2015-2022 Ruby-GNOME2 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
|
@@ -48,4 +48,19 @@ class TestActionMap < Test::Unit::TestCase
|
|
48
48
|
assert_equal([action, "X"], args)
|
49
49
|
end
|
50
50
|
end
|
51
|
+
|
52
|
+
def test_gc
|
53
|
+
GC.start
|
54
|
+
n_alive_actions_before = ObjectSpace.each_object(Gio::SimpleAction) {}
|
55
|
+
n_tries = 100
|
56
|
+
n_tries.times do |i|
|
57
|
+
action_name = "test#{i}"
|
58
|
+
action = Gio::SimpleAction.new(action_name)
|
59
|
+
@map.add_action(action)
|
60
|
+
end
|
61
|
+
GC.start
|
62
|
+
n_alive_actions_after = ObjectSpace.each_object(Gio::SimpleAction) {}
|
63
|
+
n_alive_actions = n_alive_actions_after - n_alive_actions_before
|
64
|
+
assert_equal(n_tries, n_alive_actions)
|
65
|
+
end
|
51
66
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gio2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Ruby-GNOME Project Team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fiddle
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 4.1.2
|
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:
|
40
|
+
version: 4.1.2
|
41
41
|
description: Ruby/GIO2 provide Ruby binding to a VFS API and useful APIs for desktop
|
42
42
|
applications (such as networking and D-Bus support).
|
43
43
|
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- lib/gio2/settings-schema-source.rb
|
80
80
|
- lib/gio2/settings.rb
|
81
81
|
- lib/gio2/simple-action.rb
|
82
|
+
- lib/gio2/volume.rb
|
82
83
|
- test/fixture/Rakefile
|
83
84
|
- test/fixture/content-type/x-content/unix-software/autorun.sh
|
84
85
|
- test/fixture/resource/Rakefile
|
@@ -124,7 +125,7 @@ licenses:
|
|
124
125
|
- LGPL-2.1+
|
125
126
|
metadata:
|
126
127
|
msys2_mingw_dependencies: glib-networking
|
127
|
-
post_install_message:
|
128
|
+
post_install_message:
|
128
129
|
rdoc_options: []
|
129
130
|
require_paths:
|
130
131
|
- lib
|
@@ -139,8 +140,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
140
|
- !ruby/object:Gem::Version
|
140
141
|
version: '0'
|
141
142
|
requirements: []
|
142
|
-
rubygems_version: 3.
|
143
|
-
signing_key:
|
143
|
+
rubygems_version: 3.5.0.dev
|
144
|
+
signing_key:
|
144
145
|
specification_version: 4
|
145
146
|
summary: Ruby/GIO2 is a Ruby binding of gio-2.x.
|
146
147
|
test_files: []
|