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
@@ -1,5 +1,5 @@
1
1
  module Dmorrill10
2
2
  module Utils
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -6,6 +6,7 @@ require 'dmorrill10-utils/enumerable'
6
6
  require 'dmorrill10-utils/integer'
7
7
  require 'dmorrill10-utils/string_form_manipulation'
8
8
  require 'dmorrill10-utils/script'
9
+ require 'dmorrill10-utils/process_runner'
9
10
 
10
11
  module Dmorrill10
11
12
  module Utils
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
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-06-23 00:00:00.000000000 Z
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