komenda 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/komenda/process.rb +8 -8
- data/lib/komenda/result.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f61bfb2ae2678d1a23fb5730df34bfb4da84246
|
4
|
+
data.tar.gz: 389179e3dc70aef14515646e2524d8ee3821fc33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d4c8315300bd7b46cf1944cba8fa2484bf28666ae2663da1db0ecd20dce44b06cb21beb85f9866be9bb59c03be14118603bf1d7c31cb83d1d0639459e0a7880
|
7
|
+
data.tar.gz: ca3a6b8d2fe921315c931439545bdeb3351d3245975a313e91f8a110a2ed73460912ddf5fcd992dadff780e1754de75e263ed2950f760e998c45ef15d5b28721
|
data/lib/komenda/process.rb
CHANGED
@@ -74,19 +74,19 @@ module Komenda
|
|
74
74
|
|
75
75
|
# @param [ProcessBuilder] process_builder
|
76
76
|
def run_process(process_builder)
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
Dir.chdir(process_builder.cwd) { run_popen3(process_builder) }
|
81
|
-
end
|
77
|
+
opts = {}
|
78
|
+
opts[:chdir] = process_builder.cwd unless process_builder.cwd.nil?
|
79
|
+
run_popen3(process_builder.env, process_builder.command, opts)
|
82
80
|
rescue Exception => exception
|
83
81
|
emit(:error, exception)
|
84
82
|
raise exception
|
85
83
|
end
|
86
84
|
|
87
|
-
# @param [
|
88
|
-
|
89
|
-
|
85
|
+
# @param [Hash] env
|
86
|
+
# @param [Array<String>] command
|
87
|
+
# @param [Hash] opts
|
88
|
+
def run_popen3(env, command, opts)
|
89
|
+
Open3.popen3(env, *command, opts) do |stdin, stdout, stderr, wait_thr|
|
90
90
|
@pid = wait_thr.pid
|
91
91
|
stdin.close
|
92
92
|
read_streams([stdout, stderr]) do |data, stream|
|
data/lib/komenda/result.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: komenda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cargo Media
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: events
|
@@ -87,14 +87,14 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
90
|
+
version: 0.35.0
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
97
|
+
version: 0.35.0
|
98
98
|
description: Convenience wrapper around `Open3` to run shell commands in Ruby.
|
99
99
|
email: hello@cargomedia.ch
|
100
100
|
executables: []
|
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
129
|
rubyforge_project:
|
130
|
-
rubygems_version: 2.
|
130
|
+
rubygems_version: 2.6.2
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: Convenience wrapper around `Open3` to run shell commands in Ruby.
|