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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2211c2daaf9da3b8df7dab3cd4f948262c38486ee0c1c043de67335a17312f58
4
- data.tar.gz: 5a407a0d39c42a07e4d32b30e28b69f60efb74e3bde87adbd168f21a4068979e
3
+ metadata.gz: a044e1820d1eb97772d3ca5f2fa2a55ea802f6affd2197271db0a78492b0639d
4
+ data.tar.gz: 70e6cadbd94fb0cedad4074b900570278c2cf4f3ce8a25fe9604acbd8b0f92d6
5
5
  SHA512:
6
- metadata.gz: c3131329e1dd309bde627e95c3311d8a93aac6c07d68a4a12fb3123f84b507caad3755804de0387a6b0103ce69cb4eedd7417ecfe7b507d7a35146b039699b95
7
- data.tar.gz: 2210d3454044e6080bc23927952d50b39d411a197a9747b6b6ff558594fd4b21619aa943dae95e5f0066146d66853e985fbb371589b0162e7afac8b711988a6b
6
+ metadata.gz: 7d58dfb6bea30c98b036d6acdf0be89447b3a3e9ee907879e42c70a6b8a1dc44279bdc45172df62daa7d37eef28712e01fe5c4c57a5dbf73bcf518ec26f56415
7
+ data.tar.gz: e579fb22d1bb611d8ea437cbf18ff8e5e197a274fe2d7de1480e7546d7b0a120027c83a114cd56dcf810080785cb619e8e80aadd2955f68868334fa97a277e31
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Process
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
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
- [output_strio.string, error_strio.string, status]
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.1
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-19 00:00:00.000000000 Z
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