eac_ruby_utils 0.92.0 → 0.92.1

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: 0d74824328749892433f50acfff8dd16d867abab61ab7115c55f4e3de45a8a8c
4
- data.tar.gz: 04b5e0aa890040410a27a38597dc8d46758f406666ae90042bd0ff13fa0cdb60
3
+ metadata.gz: 8de300b93d07c47da4a3d924293ad423cf59e56278812ee2c02e6060f0b32de0
4
+ data.tar.gz: 43c29306043eba3bdc3eba1c668a377b9a37fc9f108a1d14c5f106631a30bf1d
5
5
  SHA512:
6
- metadata.gz: 908be31eb44d2d44909f78f7ef5e3a7bb5bf7f5a731d6e0640604c83cf655ca8f49d854114abc9f1a72b3c918999bd651a6bcc78b2a885083d057331a0d4c4eb
7
- data.tar.gz: 2bab742f8f453836e06bca57d3528fa442542c53aad1c22fdde7563dfb2d29ffa41ce35700c474b12e338be97cfe2990270882292eb102392868721c25023679
6
+ metadata.gz: 75858a212a0efc521ba2e7b284e895d2f1ade46c0536489f92b6b93085ecaf4673b68f0ab803f3c71c7f4efd32a41f2a323be66b330a2bd30ba26568027c3b52
7
+ data.tar.gz: 6fff23095dbbe059107b0051d91e7c84ab329ba147f45a774c0fe8c33dcd41f969d6125bd36001f9bd747184cf7f73a261d3f6752f20a42376f2b26620c71f3d
@@ -5,15 +5,23 @@ require 'open3'
5
5
  module EacRubyUtils
6
6
  module Envs
7
7
  class Process
8
+ EXIT_CODE_KEY = :exit_code
9
+ ERR_KEY = :stderr
10
+ OUT_KEY = :stdout
11
+
8
12
  def initialize(command)
9
- @data = { command: command }
10
- @data[:stdout], @data[:stderr], @data[:exit_code] = Open3.capture3(command)
11
- @data[:exit_code] = @data[:exit_code].to_i
13
+ self.data = { command: command }
14
+ data[OUT_KEY], data[ERR_KEY], data[EXIT_CODE_KEY] = Open3.capture3(command)
15
+ data[EXIT_CODE_KEY] = data[EXIT_CODE_KEY].to_i
12
16
  end
13
17
 
14
18
  def to_h
15
- @data.dup
19
+ data.dup
16
20
  end
21
+
22
+ private
23
+
24
+ attr_accessor :data
17
25
  end
18
26
  end
19
27
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyUtils
4
- VERSION = '0.92.0'
4
+ VERSION = '0.92.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_ruby_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.92.0
4
+ version: 0.92.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-22 00:00:00.000000000 Z
11
+ date: 2022-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport