rb-process 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rb/process/version.rb +1 -1
- data/lib/rb/process.rb +13 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a044e1820d1eb97772d3ca5f2fa2a55ea802f6affd2197271db0a78492b0639d
|
|
4
|
+
data.tar.gz: 70e6cadbd94fb0cedad4074b900570278c2cf4f3ce8a25fe9604acbd8b0f92d6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d58dfb6bea30c98b036d6acdf0be89447b3a3e9ee907879e42c70a6b8a1dc44279bdc45172df62daa7d37eef28712e01fe5c4c57a5dbf73bcf518ec26f56415
|
|
7
|
+
data.tar.gz: e579fb22d1bb611d8ea437cbf18ff8e5e197a274fe2d7de1480e7546d7b0a120027c83a114cd56dcf810080785cb619e8e80aadd2955f68868334fa97a277e31
|
data/lib/rb/process/version.rb
CHANGED
data/lib/rb/process.rb
CHANGED
|
@@ -17,6 +17,18 @@ module Process
|
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
+
class Err
|
|
21
|
+
attr_reader :stdout
|
|
22
|
+
attr_reader :stderr
|
|
23
|
+
attr_reader :status
|
|
24
|
+
|
|
25
|
+
def initialize(stdout, stderr, status)
|
|
26
|
+
@stdout = stdout
|
|
27
|
+
@stderr = stderr
|
|
28
|
+
@status = status
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
20
32
|
def self.run(*args, output: STDOUT, error: STDERR, **options, &block)
|
|
21
33
|
output_strio = StringIO.new
|
|
22
34
|
error_strio = StringIO.new
|
|
@@ -89,7 +101,7 @@ module Process
|
|
|
89
101
|
when true
|
|
90
102
|
output_strio.string
|
|
91
103
|
else
|
|
92
|
-
|
|
104
|
+
Err.new(output_strio.string, error_strio.string, status)
|
|
93
105
|
end
|
|
94
106
|
end
|
|
95
107
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rb-process
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- initdc
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Add the missing methods to the Ruby Process, you can use it with method
|
|
14
14
|
chaining
|