gobject-introspection 3.0.2-x64-mingw32 → 3.0.3-x64-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: 82de27aba917e4690a1c964864257c1bf091addf
4
- data.tar.gz: 055e37da438940a927e39fc3ef70bc4ad4bae730
3
+ metadata.gz: 839e2fc18f0af2a0b3c4ac05bd6d18b30efd655e
4
+ data.tar.gz: 217b48a451f52f089991f8ec99270a45ea663011
5
5
  SHA512:
6
- metadata.gz: 729670904084b4c9251108eb3af122df22a017c756dc87ef7b0a2948bcb62ee3e4a79dc8660f6654eb3f67b0e4385431124469532f0991838b91876f9dcf0bd6
7
- data.tar.gz: d5717c7aafe15df114b76c64ee6666bc60e57c56a568c223ffad23afd1cfb839c435953586c536650c77d7c75a19464e427ab6699d5d1e7214024a334e1a6fe9
6
+ metadata.gz: 593901922239659fbb6611b112a3a2e0d271792fe4068db1a6e4ac3357d9d80ce152297a84c29baf90b1c06274b3cab94a960bd03c288324c3ba51b9c918321d
7
+ data.tar.gz: d272caee1f2ccb111b929107f7979a9ae2190c09797b331c5841ce32aabee496ac7add1fb72a6db983a140fd3631c6c3cc2275a509843cdf582174f53bde6ba7
@@ -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: x64-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