gio2 3.3.7 → 3.3.8

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
  SHA256:
3
- metadata.gz: 627f7ff7ad178e595c190636229afdc0a52f85692992196173f2eab8c059f0b2
4
- data.tar.gz: d40bf44ac0c79e5b501cadf70a5975c332a0760225a21757d68c711eb8d88f1c
3
+ metadata.gz: 741721a2dcc24884a3725014dd3a535b3077d61447cf767397fcc2f6d4a4b618
4
+ data.tar.gz: cd78753af48448bbd53f7bf989d17464e8811d6bb1b298bdfc584cef5a9ff8c9
5
5
  SHA512:
6
- metadata.gz: 1700e512a0f34c301e9282bc22db9353405191158b9928b1c3877643348ac486eeb7403cf793221e52566eb614fabc8bae45998b1402277d4d0d3bbc791c9544
7
- data.tar.gz: 07254f585c4e8def7eb027505ac6a7ead2278e1107ce09213b43e985fc6edcd66444c3e4bee733f83dd0f9a9d0a479e9e960dc35e82ce4a173b9ea045f548624
6
+ metadata.gz: e875d0b677d3431bac3ea260a64a8201bc273af30125d6c335fa09cf4252a76fe82fee50d1f7c4fc26bb220a2ef309ef287621a3da53a7042af7a911c8a7b196
7
+ data.tar.gz: 817a30eba075643064204eb73da2cd14ce4c67932949eb010d9c279a3fc4459be01f6edadc900bcee4b5426c393976647bc4d2993d0bfccb84816587b9ed0512
@@ -1,6 +1,6 @@
1
1
  # -*- ruby -*-
2
2
  #
3
- # Copyright (C) 2018 Ruby-GNOME2 Project Team
3
+ # Copyright (C) 2018 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
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.description =
25
25
  "Ruby/GIO2 provide Ruby binding to a VFS API and useful APIs " +
26
26
  "for desktop applications (such as networking and D-Bus support)."
27
- s.author = "The Ruby-GNOME2 Project Team"
27
+ s.author = "The Ruby-GNOME Project Team"
28
28
  s.email = "ruby-gnome2-devel-en@lists.sourceforge.net"
29
29
  s.homepage = "https://ruby-gnome2.osdn.jp/"
30
30
  s.licenses = ["LGPL-2.1+"]
@@ -0,0 +1,24 @@
1
+ # Copyright (C) 2019 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 Icon
19
+ def eql?(other)
20
+ other.is_a?(self.class) and
21
+ hash == other.hash
22
+ end
23
+ end
24
+ end
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013-2016 Ruby-GNOME2 Project Team
1
+ # Copyright (C) 2013-2019 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
@@ -51,6 +51,7 @@ module Gio
51
51
  require "gio2/application-command-line"
52
52
  require "gio2/content-type"
53
53
  require "gio2/file"
54
+ require "gio2/icon"
54
55
  require "gio2/inet-address"
55
56
  require "gio2/input-stream"
56
57
  require "gio2/menu-item"
@@ -113,7 +114,7 @@ module Gio
113
114
  when /\Adbus_/
114
115
  name = rubyish_method_name(info, :prefix => "dbus_")
115
116
  define_singleton_method(@dbus_module, name, info)
116
- when /\Afile_/
117
+ when /\A{file,icon}_/
117
118
  # Ignore because they are defined by load_interface_info
118
119
  else
119
120
  super
@@ -171,6 +172,17 @@ module Gio
171
172
  end
172
173
  end
173
174
 
175
+ def load_function_info_singleton_method(info, klass, method_name)
176
+ case "#{klass.name}##{method_name}"
177
+ when "Gio::Icon#hash"
178
+ define_method(info, klass, method_name)
179
+ when "Gio::Icon#new_for_string"
180
+ super(info, klass, "find")
181
+ else
182
+ super
183
+ end
184
+ end
185
+
174
186
  def rubyish_class_name(info)
175
187
  case info.name
176
188
  when /Enum\z/
@@ -0,0 +1,49 @@
1
+ # Copyright (C) 2019 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
+ class TestIcon < Test::Unit::TestCase
18
+ include GioTestUtils::Fixture
19
+ include GioTestUtils::Omissions
20
+
21
+ sub_test_case(".find") do
22
+ def test_found
23
+ assert_equal(Gio::ThemedIcon.new("open"),
24
+ Gio::Icon.find("open"))
25
+ end
26
+
27
+ def test_not_found
28
+ Gio::Icon.find("nonexistent")
29
+ end
30
+ end
31
+
32
+ sub_test_case(".hash") do
33
+ def test_use_as_key
34
+ hash = {Gio::Icon => true}
35
+ assert do
36
+ hash[Gio::Icon]
37
+ end
38
+ end
39
+ end
40
+
41
+ sub_test_case("#hash") do
42
+ def test_use_as_key
43
+ hash = {Gio::Icon.find("open") => true}
44
+ assert do
45
+ hash[Gio::Icon.find("open")]
46
+ end
47
+ end
48
+ end
49
+ end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gio2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.7
4
+ version: 3.3.8
5
5
  platform: ruby
6
6
  authors:
7
- - The Ruby-GNOME2 Project Team
7
+ - The Ruby-GNOME Project Team
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 2019-08-16 00:00:00.000000000 Z
11
+ date: 2019-09-09 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: gobject-introspection
@@ -15,14 +16,14 @@ dependencies:
15
16
  requirements:
16
17
  - - '='
17
18
  - !ruby/object:Gem::Version
18
- version: 3.3.7
19
+ version: 3.3.8
19
20
  type: :runtime
20
21
  prerelease: false
21
22
  version_requirements: !ruby/object:Gem::Requirement
22
23
  requirements:
23
24
  - - '='
24
25
  - !ruby/object:Gem::Version
25
- version: 3.3.7
26
+ version: 3.3.8
26
27
  description: Ruby/GIO2 provide Ruby binding to a VFS API and useful APIs for desktop
27
28
  applications (such as networking and D-Bus support).
28
29
  email: ruby-gnome2-devel-en@lists.sourceforge.net
@@ -49,6 +50,7 @@ files:
49
50
  - lib/gio2/content-type.rb
50
51
  - lib/gio2/deprecated.rb
51
52
  - lib/gio2/file.rb
53
+ - lib/gio2/icon.rb
52
54
  - lib/gio2/inet-address.rb
53
55
  - lib/gio2/input-stream.rb
54
56
  - lib/gio2/loader.rb
@@ -81,6 +83,7 @@ files:
81
83
  - test/test-file-enumerator.rb
82
84
  - test/test-file-monitor.rb
83
85
  - test/test-file.rb
86
+ - test/test-icon.rb
84
87
  - test/test-inet-address.rb
85
88
  - test/test-input-stream.rb
86
89
  - test/test-memory-input-stream.rb