dmorrill10-utils 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,16 @@
|
|
1
|
+
class ProcessRunner
|
2
|
+
|
3
|
+
# Starts an independent process asynchronously with the given +command+.
|
4
|
+
# @param [Array] command The command to run.
|
5
|
+
# @param [Hash] options Options with which the process should be started.
|
6
|
+
# => (see IO#popen) for more information on available options.
|
7
|
+
# @return [IO] Pipe to the started process.
|
8
|
+
# @raise (see IO#popen)
|
9
|
+
def self.go(command, options={})
|
10
|
+
pipe = IO.popen command.push(options)
|
11
|
+
|
12
|
+
Process.detach pipe.pid
|
13
|
+
|
14
|
+
pipe
|
15
|
+
end
|
16
|
+
end
|
data/lib/dmorrill10-utils.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dmorrill10-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-01 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Group of random Ruby mixin utility functions.
|
15
15
|
email:
|
@@ -28,6 +28,7 @@ files:
|
|
28
28
|
- lib/dmorrill10-utils/class.rb
|
29
29
|
- lib/dmorrill10-utils/enumerable.rb
|
30
30
|
- lib/dmorrill10-utils/integer.rb
|
31
|
+
- lib/dmorrill10-utils/process_runner.rb
|
31
32
|
- lib/dmorrill10-utils/script.rb
|
32
33
|
- lib/dmorrill10-utils/string_form_manipulation.rb
|
33
34
|
- lib/dmorrill10-utils/version.rb
|