libuv 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libuv/reactor.rb +4 -0
- data/lib/libuv/spawn.rb +2 -2
- data/lib/libuv/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f220977b333b90b774da50c8eecc41fed1c43418
|
4
|
+
data.tar.gz: 79328f004deb9ef1d20b0fc828c0f1b41f482333
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a57b7aab9ec36ffcc50e342e771d605c4a0f5e2e6885ead53e43ca1558188f4b71a2ab20c6ae91b29f3a46f0032ef3addb744dee8a8c12ce3331c5bbd729385e
|
7
|
+
data.tar.gz: b8bfefac46bd050cafb5cc2547938e8a8d6e58dd86873819c269e74a05d16b7a095cb039f97af387e7bef074106be3b5cb928c79b53b6ff11d7d1a715ab4b14d
|
data/lib/libuv/reactor.rb
CHANGED
@@ -468,6 +468,10 @@ module Libuv
|
|
468
468
|
Filesystem.new(@reactor)
|
469
469
|
end
|
470
470
|
|
471
|
+
def spawn(cmd, **args)
|
472
|
+
Spawn.new(@reactor, cmd, **args)
|
473
|
+
end
|
474
|
+
|
471
475
|
# Schedule some work to be processed on the event reactor as soon as possible (thread safe)
|
472
476
|
#
|
473
477
|
# @param callback [Proc] the callback to be called on the reactor thread
|
data/lib/libuv/spawn.rb
CHANGED
@@ -36,14 +36,14 @@ module Libuv
|
|
36
36
|
|
37
37
|
# Configure arguments
|
38
38
|
@cmd = FFI::MemoryPointer.from_string(cmd)
|
39
|
-
@args = args.map { |arg| FFI::MemoryPointer.from_string(arg) }
|
39
|
+
@args = Array(args).map { |arg| FFI::MemoryPointer.from_string(arg) }
|
40
40
|
@args.unshift(@cmd)
|
41
41
|
@args_ptr = FFI::MemoryPointer.new(:pointer, @args.length + 1)
|
42
42
|
@args_ptr.write_array_of_pointer(@args)
|
43
43
|
|
44
44
|
# Configure environment
|
45
45
|
if env
|
46
|
-
@env = env.map { |e| FFI::MemoryPointer.from_string(e) }
|
46
|
+
@env = Array(env).map { |e| FFI::MemoryPointer.from_string(e) }
|
47
47
|
@env_ptr = FFI::MemoryPointer.new(:pointer, @env.length + 1)
|
48
48
|
@env_ptr.write_array_of_pointer(@env)
|
49
49
|
end
|
data/lib/libuv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libuv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen von Takach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|