glib2 3.1.4 → 3.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/ext/glib2/rbglib.h +1 -1
  3. data/lib/glib2.rb +21 -12
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4a0e809eb3966b864ba319af252ace4d8d0e0ec
4
- data.tar.gz: 1421bc6c6c4bc59d90b1c34d0bb697fa7110dd68
3
+ metadata.gz: 63162f607225357f5000148a30b78d4e856108fc
4
+ data.tar.gz: af52e69e8ebb8b838c515ce7c6120d744b2b2089
5
5
  SHA512:
6
- metadata.gz: 7501d41d4435ad1a036be55210a03a44b9261d173fa24feb7c0f6838ac2a8a46bb86feb7d4ca41b43d9f8763d9f1753777f132bcdfe2a54e4eeb66d68c57feee
7
- data.tar.gz: ccb5160f1b25a62f3813dd059b4328f6efb3dd1b37114eacbfc2cd26be3c53dc52cfe18ba32c89f1a06d61779e41a485c3d38771fd36f86c89522ee85e2d2cf3
6
+ metadata.gz: 65c30286f254b6ca93c5fbcbb05d024f6f0c80045c0787dcdf7009829089d8d7b16a9034ea20ad1c3aff4c27237616f775ad88c736f0013cae742d2b41ab02c0
7
+ data.tar.gz: 8acb18d55e8b8aefb14a5a7b8f89fd01fa93e90b8767d82c79a1d930c4741a4ca359bf5a02fa94d76a1931e7a8f7f4167837dd896e5372d8a91a385187d91022
@@ -36,7 +36,7 @@ extern "C" {
36
36
 
37
37
  #define RBGLIB_MAJOR_VERSION 3
38
38
  #define RBGLIB_MINOR_VERSION 1
39
- #define RBGLIB_MICRO_VERSION 4
39
+ #define RBGLIB_MICRO_VERSION 6
40
40
 
41
41
  #ifndef RB_ZALLOC
42
42
  # ifdef ZALLOC
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2005-2016 Ruby-GNOME2 Project Team
1
+ # Copyright (C) 2005-2017 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
@@ -87,21 +87,30 @@ module GLib
87
87
 
88
88
  def prepend_path_to_environment_variable(path, environment_name)
89
89
  path = Pathname(path) unless path.is_a?(Pathname)
90
- if path.exist?
91
- separator = ::File::PATH_SEPARATOR
92
-
93
- paths = (ENV[environment_name] || '').split(/#{Regexp.escape(separator)}/)
94
- dir = path.to_s
95
- dir = dir.gsub(/\//, ::File::ALT_SEPARATOR) if ::File::ALT_SEPARATOR
96
- unless paths.include?(dir)
97
- paths = [dir] + paths
98
- ENV[environment_name] = paths.join(separator)
99
- end
90
+ return unless path.exist?
91
+
92
+ dir = path.to_s
93
+ dir = dir.gsub(/\//, ::File::ALT_SEPARATOR) if ::File::ALT_SEPARATOR
94
+
95
+ separator = ::File::PATH_SEPARATOR
96
+ paths = (ENV[environment_name] || '').split(separator)
97
+ unless paths.include?(dir)
98
+ paths = [dir] + paths
99
+ ENV[environment_name] = paths.join(separator)
100
100
  end
101
101
  end
102
102
 
103
103
  def prepend_dll_path(path)
104
- prepend_path_to_environment_variable(path, "PATH")
104
+ path = Pathname(path) unless path.is_a?(Pathname)
105
+ return unless path.exist?
106
+
107
+ begin
108
+ require "ruby_installer/runtime"
109
+ rescue LoadError
110
+ prepend_path_to_environment_variable(path, "PATH")
111
+ else
112
+ RubyInstaller::Runtime.add_dll_directory(path.to_s)
113
+ end
105
114
  end
106
115
  end
107
116
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.4
4
+ version: 3.1.6
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: 2017-05-30 00:00:00.000000000 Z
11
+ date: 2017-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pkg-config