gio2 2.2.3 → 2.2.4

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
  SHA1:
3
- metadata.gz: 44bfc7abe278bdce4a65a5c0e40c60b2800041ca
4
- data.tar.gz: 40d66ad1b5adbe23c538b67fc58b1bbe19e0c7c7
3
+ metadata.gz: 35e64e639c1b6ed569046f628bfe01b331068c31
4
+ data.tar.gz: 4cca5feb7d28bc065700f1b311e90737425799c4
5
5
  SHA512:
6
- metadata.gz: 078a1d568be1d7f9df601054c7a79aec273bb01be6fca6d789e2223d27eee8e5cf762b2e0347572d28515d238c8d6320f968986b2169aeb1c123c1d6aa4455f1
7
- data.tar.gz: d2c42986d5808b09e36dcd176e6982408917a15cabb49384ecefd402c4c43d2410e9ba8ae03a3480c69a0419477902fbaa563ad4aecdf38fd4aec1493ee0c5db
6
+ metadata.gz: d23aef198d1d962dd887b6d4d169a58f05ee4ebc79bf245045b8204fe14075cc07e4271bcb39092a3504c5700a7b97dcf02982073cb1ff5878761ad1f88a9258
7
+ data.tar.gz: 654cec6981a165f45728eaaf69710bb1b43ca99a17803f316fa970fa37da2e9b11411c4110aab18e32aaa5006a598ccf3db26f70a9727509b5bf713bbd29c730
@@ -49,7 +49,7 @@ require "mkmf-gnome2"
49
49
  :target_build_dir => build_dir)
50
50
  end
51
51
 
52
- setup_win32(module_name, base_dir)
52
+ setup_windows(module_name, base_dir)
53
53
 
54
54
  unless required_pkg_config_package(package_id,
55
55
  :debian => "libglib2.0-dev",
@@ -20,6 +20,7 @@ module Gio
20
20
  def pre_load(repository, namespace)
21
21
  define_content_type_class
22
22
  define_mime_type_class
23
+ define_dbus_module
23
24
  define_resources_module
24
25
  @content_type_guess_for_tree_info = nil
25
26
  end
@@ -82,6 +83,11 @@ module Gio
82
83
  @base_module.const_set("MimeType", @mime_type_class)
83
84
  end
84
85
 
86
+ def define_dbus_module
87
+ @dbus_module = Module.new
88
+ @base_module.const_set("DBus", @dbus_module)
89
+ end
90
+
85
91
  def define_resources_module
86
92
  @resources_module = Module.new
87
93
  @base_module.const_set("Resources", @resources_module)
@@ -101,7 +107,11 @@ module Gio
101
107
  end
102
108
  end
103
109
  when /\Aresources_/
104
- load_function_info_resources(info)
110
+ name = rubyish_method_name(info, :prefix => "resources_")
111
+ define_module_function(@resources_module, name, info)
112
+ when /\Adbus_/
113
+ name = rubyish_method_name(info, :prefix => "dbus_")
114
+ define_module_function(@dbus_module, name, info)
105
115
  else
106
116
  super
107
117
  end
@@ -155,7 +165,7 @@ module Gio
155
165
  else
156
166
  case name
157
167
  when /\Acan_be_/
158
- method_name = "#{$1}?"
168
+ method_name = "#{$POSTMATCH}?"
159
169
  when /\Ais_/
160
170
  method_name = "#{$POSTMATCH}?"
161
171
  when /\Aget_/
@@ -169,19 +179,6 @@ module Gio
169
179
  end
170
180
  end
171
181
 
172
-
173
- def load_function_info_resources(info)
174
- method_name = info.name.gsub(/\Aresources_/, "")
175
- receiver = @resources_module
176
- validate = lambda do |arguments|
177
- validate_arguments(info, "#{receiver}.#{method_name}", arguments)
178
- end
179
- receiver.define_singleton_method(method_name) do |*arguments|
180
- validate.call(arguments)
181
- info.invoke(:arguments => arguments)
182
- end
183
- end
184
-
185
182
  def load_function_infos(infos, klass)
186
183
  case klass.name
187
184
  when "Gio::File"
@@ -31,4 +31,9 @@ class TestContentType < Test::Unit::TestCase
31
31
  assert_equal(["audio/mpeg", false],
32
32
  Gio::ContentType.guess("filename.mp3"))
33
33
  end
34
+
35
+ def test_executable
36
+ content_type = Gio::ContentType.new("application/x-executable")
37
+ assert_true(content_type.executable?)
38
+ end
34
39
  end
@@ -0,0 +1,42 @@
1
+ # Copyright (C) 2014 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 TestDBus < Test::Unit::TestCase
18
+ def test_dbus_guid
19
+ guid = Gio::DBus.generate_guid
20
+ assert_true(Gio::DBus.guid?(guid))
21
+ end
22
+
23
+ def test_dbus_name
24
+ name = "org.freedesktop.DBus"
25
+ assert_true(Gio::DBus.name?(name))
26
+ end
27
+
28
+ def test_dbus_unique_name
29
+ name = ":org.freedesktop.DBus"
30
+ assert_true(Gio::DBus.unique_name?(name))
31
+ end
32
+
33
+ def test_dbus_interface_name
34
+ name = "org.freedesktop.DBus"
35
+ assert_true(Gio::DBus.interface_name?(name))
36
+ end
37
+
38
+ def test_dbus_member_name
39
+ member = "StartServiceByName"
40
+ assert_true(Gio::DBus.member_name?(member))
41
+ end
42
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2014 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 TestMemoryInputStream < Test::Unit::TestCase
18
+ def test_memory_input_stream
19
+ assert_nothing_raised do
20
+ Gio::MemoryInputStream.new
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,23 @@
1
+ # Copyright (C) 2014 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 TestMemoryOutputStream < Test::Unit::TestCase
18
+ def test_memory_output_stream
19
+ assert_nothing_raised do
20
+ Gio::MemoryOutputStream.new
21
+ end
22
+ end
23
+ 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: 2.2.3
4
+ version: 2.2.4
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: 2014-10-26 00:00:00.000000000 Z
11
+ date: 2014-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glib2
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.3
19
+ version: 2.2.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.3
26
+ version: 2.2.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gobject-introspection
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 2.2.3
33
+ version: 2.2.4
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: 2.2.3
40
+ version: 2.2.4
41
41
  description: Ruby/GIO2 is a Ruby binding of gio-2.x.
42
42
  email: ruby-gnome2-devel-en@lists.sourceforge.net
43
43
  executables: []
@@ -74,11 +74,14 @@ files:
74
74
  - test/test-charset-converter.rb
75
75
  - test/test-content-type.rb
76
76
  - test/test-data-input-stream.rb
77
+ - test/test-dbus.rb
77
78
  - test/test-file-enumerator.rb
78
79
  - test/test-file-monitor.rb
79
80
  - test/test-file.rb
80
81
  - test/test-inet-address.rb
81
82
  - test/test-input-stream.rb
83
+ - test/test-memory-input-stream.rb
84
+ - test/test-memory-output-stream.rb
82
85
  - test/test-output-stream.rb
83
86
  - test/test-pollable-input-stream.rb
84
87
  - test/test-pollable-output-stream.rb