gio2 2.2.4-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +31 -0
  3. data/ext/gio2/depend +6 -0
  4. data/ext/gio2/extconf.rb +77 -0
  5. data/ext/gio2/rb-gio2-pollable-source.c +59 -0
  6. data/ext/gio2/rb-gio2.c +32 -0
  7. data/ext/gio2/rb-gio2.h +26 -0
  8. data/extconf.rb +65 -0
  9. data/lib/2.0/gio2.so +0 -0
  10. data/lib/2.1/gio2.so +0 -0
  11. data/lib/2.2/gio2.so +0 -0
  12. data/lib/gio2.rb +56 -0
  13. data/lib/gio2/deprecated.rb +118 -0
  14. data/lib/gio2/inet-address.rb +33 -0
  15. data/lib/gio2/input-stream.rb +48 -0
  16. data/lib/gio2/loader.rb +240 -0
  17. data/lib/gio2/pollable-input-stream.rb +60 -0
  18. data/lib/gio2/pollable-output-stream.rb +27 -0
  19. data/lib/gio2/resources.rb +62 -0
  20. data/test/fixture/content-type/x-content/unix-software/autorun.sh +1 -0
  21. data/test/fixture/resource/Rakefile +32 -0
  22. data/test/fixture/resource/logo.png +0 -0
  23. data/test/fixture/resource/ruby-gio2.gresource +0 -0
  24. data/test/fixture/resource/ruby-gio2.gresource.xml +6 -0
  25. data/test/gio2-test-utils.rb +22 -0
  26. data/test/gio2-test-utils/fixture.rb +24 -0
  27. data/test/gio2-test-utils/omissions.rb +23 -0
  28. data/test/gio2-test-utils/socket-client.rb +59 -0
  29. data/test/run-test.rb +51 -0
  30. data/test/test-buffered-input-stream.rb +23 -0
  31. data/test/test-charset-converter.rb +23 -0
  32. data/test/test-content-type.rb +39 -0
  33. data/test/test-data-input-stream.rb +21 -0
  34. data/test/test-dbus.rb +42 -0
  35. data/test/test-file-enumerator.rb +26 -0
  36. data/test/test-file-monitor.rb +33 -0
  37. data/test/test-file.rb +30 -0
  38. data/test/test-inet-address.rb +34 -0
  39. data/test/test-input-stream.rb +36 -0
  40. data/test/test-memory-input-stream.rb +23 -0
  41. data/test/test-memory-output-stream.rb +23 -0
  42. data/test/test-output-stream.rb +39 -0
  43. data/test/test-pollable-input-stream.rb +54 -0
  44. data/test/test-pollable-output-stream.rb +53 -0
  45. data/test/test-resources.rb +58 -0
  46. metadata +115 -0
@@ -0,0 +1,30 @@
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 TestFile < Test::Unit::TestCase
18
+ include GioTestUtils::Fixture
19
+ include GioTestUtils::Omissions
20
+
21
+ class TestContentType < self
22
+ def test_guess_content_type
23
+ omit_on_os_x
24
+ path = fixture_path("content-type", "x-content", "unix-software")
25
+ dir = Gio::File.path(path)
26
+ assert_equal(["x-content/unix-software"],
27
+ dir.guess_content_types.collect(&:to_s))
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,34 @@
1
+ # Copyright (C) 2013-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 TestInetAddress < Test::Unit::TestCase
18
+ class TestConstructor < self
19
+ def test_string
20
+ address = Gio::InetAddress.new("127.0.0.1")
21
+ assert_equal("127.0.0.1", address.to_s)
22
+ end
23
+
24
+ def test_any
25
+ address = Gio::InetAddress.any(:ipv4)
26
+ assert_predicate(address, :any?)
27
+ end
28
+
29
+ def test_loopback
30
+ address = Gio::InetAddress.loopback(:ipv4)
31
+ assert_predicate(address, :loopback?)
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,36 @@
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 TestInputStream < Test::Unit::TestCase
18
+ include GioTestUtils::SocketClient
19
+
20
+ def setup
21
+ setup_socket_client
22
+ @stream = @connection.input_stream
23
+ end
24
+
25
+ def teardown
26
+ teardown_socket_client
27
+ end
28
+
29
+ def test_read
30
+ data = "Hello\n"
31
+ client = @server.accept
32
+ client.write(data)
33
+ client.flush
34
+ assert_equal(data, @stream.read)
35
+ end
36
+ 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
@@ -0,0 +1,39 @@
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 TestOutputStream < Test::Unit::TestCase
18
+ include GioTestUtils::SocketClient
19
+
20
+ def setup
21
+ setup_socket_client
22
+ @stream = @connection.output_stream
23
+ end
24
+
25
+ def teardown
26
+ teardown_socket_client
27
+ end
28
+
29
+ def test_write
30
+ data = "Hello\n"
31
+ assert_equal(data.bytesize, @stream.write(data))
32
+ client = @server.accept
33
+ begin
34
+ assert_equal(data, client.gets)
35
+ ensure
36
+ client.close
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,54 @@
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 TestPollableInputStream < Test::Unit::TestCase
18
+ include GioTestUtils::SocketClient
19
+
20
+ def setup
21
+ setup_socket_client
22
+ @stream = @connection.input_stream
23
+ end
24
+
25
+ def teardown
26
+ teardown_socket_client
27
+ end
28
+
29
+ def test_create_socket
30
+ called = false
31
+ source = @stream.create_source do |stream|
32
+ called = true
33
+ false
34
+ end
35
+ source.attach
36
+ client = @server.accept
37
+ client.write("Hello\n")
38
+ client.flush
39
+ GLib::Idle.add do
40
+ client.close
41
+ @loop.quit
42
+ end
43
+ @loop.run
44
+ assert_true(called)
45
+ end
46
+
47
+ def test_read_nonblocking
48
+ data = "Hello\n"
49
+ client = @server.accept
50
+ client.write(data)
51
+ client.flush
52
+ assert_equal(data, @stream.read_nonblocking)
53
+ end
54
+ end
@@ -0,0 +1,53 @@
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 TestPollableOutputStream < Test::Unit::TestCase
18
+ include GioTestUtils::SocketClient
19
+
20
+ def setup
21
+ setup_socket_client
22
+ @stream = @connection.output_stream
23
+ end
24
+
25
+ def teardown
26
+ teardown_socket_client
27
+ end
28
+
29
+ def test_create_socket
30
+ called = false
31
+ source = @stream.create_source do |stream|
32
+ called = true
33
+ false
34
+ end
35
+ source.attach
36
+ GLib::Idle.add do
37
+ @loop.quit
38
+ end
39
+ @loop.run
40
+ assert_true(called)
41
+ end
42
+
43
+ def test_write_nonblocking
44
+ data = "Hello\n"
45
+ assert_equal(data.bytesize, @stream.write_nonblocking(data))
46
+ client = @server.accept
47
+ begin
48
+ assert_equal(data, client.gets)
49
+ ensure
50
+ client.close
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,58 @@
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
+
18
+ class TestResources < Test::Unit::TestCase
19
+ include GioTestUtils::Fixture
20
+
21
+ def fixture_path(*components)
22
+ super("resource", *components)
23
+ end
24
+
25
+ def setup
26
+ gresource = fixture_path("ruby-gio2.gresource")
27
+ @resource = Gio::Resource.load(gresource)
28
+ Gio::Resources.register(@resource)
29
+ end
30
+
31
+ def teardown
32
+ Gio::Resources.unregister(@resource)
33
+ end
34
+
35
+ def test_lookup_data
36
+ data = Gio::Resources.lookup_data("/org/ruby-gnome2/test/logo.png")
37
+ assert_equal(File.open(fixture_path("logo.png"), "rb", &:read),
38
+ data)
39
+ end
40
+
41
+ def test_open_stream
42
+ Gio::Resources.open_stream("/org/ruby-gnome2/test/logo.png") do |input|
43
+ assert_equal(File.open(fixture_path("logo.png"), "rb", &:read),
44
+ input.read)
45
+ end
46
+ end
47
+
48
+ def test_enumerate_children
49
+ assert_equal(["logo.png"],
50
+ Gio::Resources.enumerate_children("/org/ruby-gnome2/test"))
51
+ end
52
+
53
+ def test_get_info
54
+ data = File.open(fixture_path("logo.png"), "rb", &:read)
55
+ assert_equal([true, data.bytesize, 0],
56
+ Gio::Resources.get_info("/org/ruby-gnome2/test/logo.png"))
57
+ end
58
+ end
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gio2
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.2.4
5
+ platform: x64-mingw32
6
+ authors:
7
+ - The Ruby-GNOME2 Project Team
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: glib2
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '='
18
+ - !ruby/object:Gem::Version
19
+ version: 2.2.4
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '='
25
+ - !ruby/object:Gem::Version
26
+ version: 2.2.4
27
+ - !ruby/object:Gem::Dependency
28
+ name: gobject-introspection
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 2.2.4
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 2.2.4
41
+ description: Ruby/GIO2 is a Ruby binding of gio-2.x.
42
+ email: ruby-gnome2-devel-en@lists.sourceforge.net
43
+ executables: []
44
+ extensions: []
45
+ extra_rdoc_files: []
46
+ files:
47
+ - Rakefile
48
+ - ext/gio2/depend
49
+ - ext/gio2/extconf.rb
50
+ - ext/gio2/rb-gio2-pollable-source.c
51
+ - ext/gio2/rb-gio2.c
52
+ - ext/gio2/rb-gio2.h
53
+ - extconf.rb
54
+ - lib/2.0/gio2.so
55
+ - lib/2.1/gio2.so
56
+ - lib/2.2/gio2.so
57
+ - lib/gio2.rb
58
+ - lib/gio2/deprecated.rb
59
+ - lib/gio2/inet-address.rb
60
+ - lib/gio2/input-stream.rb
61
+ - lib/gio2/loader.rb
62
+ - lib/gio2/pollable-input-stream.rb
63
+ - lib/gio2/pollable-output-stream.rb
64
+ - lib/gio2/resources.rb
65
+ - test/fixture/content-type/x-content/unix-software/autorun.sh
66
+ - test/fixture/resource/Rakefile
67
+ - test/fixture/resource/logo.png
68
+ - test/fixture/resource/ruby-gio2.gresource
69
+ - test/fixture/resource/ruby-gio2.gresource.xml
70
+ - test/gio2-test-utils.rb
71
+ - test/gio2-test-utils/fixture.rb
72
+ - test/gio2-test-utils/omissions.rb
73
+ - test/gio2-test-utils/socket-client.rb
74
+ - test/run-test.rb
75
+ - test/test-buffered-input-stream.rb
76
+ - test/test-charset-converter.rb
77
+ - test/test-content-type.rb
78
+ - test/test-data-input-stream.rb
79
+ - test/test-dbus.rb
80
+ - test/test-file-enumerator.rb
81
+ - test/test-file-monitor.rb
82
+ - test/test-file.rb
83
+ - test/test-inet-address.rb
84
+ - test/test-input-stream.rb
85
+ - test/test-memory-input-stream.rb
86
+ - test/test-memory-output-stream.rb
87
+ - test/test-output-stream.rb
88
+ - test/test-pollable-input-stream.rb
89
+ - test/test-pollable-output-stream.rb
90
+ - test/test-resources.rb
91
+ homepage: http://ruby-gnome2.sourceforge.jp/
92
+ licenses:
93
+ - LGPLv2.1 or later
94
+ metadata: {}
95
+ post_install_message:
96
+ rdoc_options: []
97
+ require_paths:
98
+ - lib
99
+ required_ruby_version: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 1.9.3
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ version: '0'
109
+ requirements: []
110
+ rubyforge_project:
111
+ rubygems_version: 2.2.2
112
+ signing_key:
113
+ specification_version: 4
114
+ summary: Ruby/GIO2 is a Ruby binding of gio-2.x.
115
+ test_files: []