gobject-introspection 3.0.2-x86-mingw32 → 3.0.3-x86-mingw32

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: 715636c914557e97a1fb73f5d6a6e1a85cf16d8c
4
- data.tar.gz: c6e9404fb07f9fcf1de450be86a44f1ce985318c
3
+ metadata.gz: a41a15dec3ee30e1cba996e5ac03a832f5ec0b6b
4
+ data.tar.gz: e6bd5bcf1c1a76e975783bc6d4db8c7bfc26ff7d
5
5
  SHA512:
6
- metadata.gz: 563eb569800290f53461c82f57aa9c740924ae35589bca6d98872a91e1166c94742077dfd1ebceed40cfbb8975c3c9a24b67be7d0c935281ce25da26c13091bc
7
- data.tar.gz: 1468bec85414bc6073600067fcd1550586d31b2d47fac9a6da0f0e2831c887d9b66e04e6a402f31c1aaff82cf0b0e5e3ff6c66e6090e5406c9ce506f57a884af
6
+ metadata.gz: 4ffc01dbf548a85ae256cf778ae14e8478796407567dc008cab487c4716ef6c7c854ffb00db28e367e613ab6ac0b2bb5b14bcb5aa8b3ebf3898e8e58f0366f73
7
+ data.tar.gz: dd8e5091573e1b181cae09b82b011c532a1e9c127935ba6dfe259640767b9711b23a9fd7aa0b9536c9af4ea7c7e66e95f081297309306d00cf59d08fa111d293
@@ -46,6 +46,19 @@ rg_s_default(G_GNUC_UNUSED VALUE klass)
46
46
  return GOBJ2RVAL(g_irepository_get_default());
47
47
  }
48
48
 
49
+ static VALUE
50
+ rg_s_prepend_search_path(VALUE klass, VALUE rb_path)
51
+ {
52
+ g_irepository_prepend_search_path(RVAL2CSTR(rb_path));
53
+ return klass;
54
+ }
55
+
56
+ static VALUE
57
+ rg_s_search_path(G_GNUC_UNUSED VALUE klass)
58
+ {
59
+ return FILENAMEGSLIST2RVAL(g_irepository_get_search_path());
60
+ }
61
+
49
62
 
50
63
  /* Force the namespace to be loaded if it isn't already. If namespace is not
51
64
  * loaded, this function will search for a ".typelib" file using the repository
@@ -101,6 +114,10 @@ rg_get_dependencies(VALUE self, VALUE rb_namespace)
101
114
  repository = SELF(self);
102
115
  namespace_ = RVAL2CSTR(rb_namespace);
103
116
  dependencies = g_irepository_get_dependencies(repository, namespace_);
117
+ if (!dependencies) {
118
+ return Qnil;
119
+ }
120
+
104
121
  rb_dependencies = rb_ary_new();
105
122
  for (i = 0; dependencies[i]; i++) {
106
123
  rb_ary_push(rb_dependencies, CSTR2RVAL(dependencies[i]));
@@ -234,6 +251,8 @@ rb_gi_repository_init(VALUE rb_mGI)
234
251
  RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_IREPOSITORY, "Repository", rb_mGI);
235
252
 
236
253
  RG_DEF_SMETHOD(default, 0);
254
+ RG_DEF_SMETHOD(prepend_search_path, 1);
255
+ RG_DEF_SMETHOD(search_path, 0);
237
256
  RG_DEF_METHOD(require, -1);
238
257
  RG_DEF_METHOD(get_dependencies, 1);
239
258
  RG_DEF_METHOD(loaded_namespaces, 0);
Binary file
Binary file
Binary file
@@ -19,7 +19,14 @@ require "glib2"
19
19
  module GObjectIntrospection
20
20
  class << self
21
21
  def prepend_typelib_path(path)
22
- GLib.prepend_path_to_environment_variable(path, "GI_TYPELIB_PATH")
22
+ path = Pathname(path) unless path.is_a?(Pathname)
23
+ return unless path.exist?
24
+
25
+ dir = path.to_s
26
+ dir = dir.gsub("/", File::ALT_SEPARATOR) if File::ALT_SEPARATOR
27
+ return if Repository.search_path.include?(dir)
28
+
29
+ Repository.prepend_search_path(dir)
23
30
  end
24
31
  end
25
32
  end
@@ -15,7 +15,6 @@
15
15
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
  require "test-unit"
18
- require "test/unit/notify"
19
18
 
20
19
  module GObjectIntrospectionTestUtils
21
20
  def require_version(major, minor, micro)
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2014 Ruby-GNOME2 Project Team
1
+ # Copyright (C) 2012-2015 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
@@ -23,6 +23,13 @@ class TestRepository < Test::Unit::TestCase
23
23
  @repository.require("Gio")
24
24
  end
25
25
 
26
+ def test_search_path
27
+ path = GObjectIntrospection::Repository.search_path
28
+ GObjectIntrospection::Repository.prepend_search_path(__dir__)
29
+ assert_equal([__dir__] + path,
30
+ GObjectIntrospection::Repository.search_path)
31
+ end
32
+
26
33
  def test_get_n_infos
27
34
  assert_kind_of(Integer, @repository.get_n_infos("GObject"))
28
35
  end
@@ -34,8 +41,8 @@ class TestRepository < Test::Unit::TestCase
34
41
 
35
42
  def test_get_dependencies
36
43
  require_version(1, 36, 0)
37
- assert_equal(["GObject-2.0"].sort,
38
- @repository.get_dependencies("Gio").sort)
44
+ assert_equal(["GLib-2.0"].sort,
45
+ @repository.get_dependencies("GObject").sort)
39
46
  end
40
47
 
41
48
  def test_loaded_namespaces
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gobject-introspection
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - The Ruby-GNOME2 Project Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-13 00:00:00.000000000 Z
11
+ date: 2015-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glib2
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 3.0.2
19
+ version: 3.0.3
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: 3.0.2
26
+ version: 3.0.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: test-unit
29
29
  requirement: !ruby/object:Gem::Requirement