x_aeon_agents 2.4.1 → 2.4.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: b837ff2fe1b67f0d0c47588241e8f0c813662e5153aac917b7661622d6309c5f
4
- data.tar.gz: 1f86b75d4e12a9fd02ccddba80ca349132e74730347f89e3683e61e81b24fd1b
3
+ metadata.gz: b0c0ecbc190f2b15589772c769e542a5ed7442a57b89e189870d4223189499a2
4
+ data.tar.gz: 216c53061eb6a97a312eb6ba1699808afb08976cddf73c895f4c9b440fa6c3e6
5
5
  SHA512:
6
- metadata.gz: 2adcc8a5f71caa6c4fd3dfc939b36133a899e63a067bfcaf44d275d9579c5cdbb26e081e6337e368012b71e629d9fb81a17004c27175a7eb07f89d07c07d65b2
7
- data.tar.gz: 8ed85a0b1e7024d942bcae02e7f03a0325aa0105d8d897fb9e3dd2f6cf52f8192af50ffbd9a9fd0f93eda5cc329e77501ee7045dea38e6d31902e9839f64abf9
6
+ metadata.gz: 8d2632088da899f189c3151589c197add2ab86aa3e7116d7e8d9b62814c820c1eeacbe65dc8bedee06ad975b2bc7212f7a92d91d499e36852789dc443b55d10d
7
+ data.tar.gz: 03ea4dce0983a8e34be65df2069729b9bab0b7cbf0468849098d25b9b22b8c9cd3debc94a9e1b0aa036943a91c6ebcc5a33a286ef0ace744efcf274e27163487
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # [v2.4.2](https://github.com/Muriel-Salvan/x_aeon_agents/compare/v2.4.1...v2.4.2) (2026-11-04 10:39:50)
2
+
3
+ ### Patches
4
+
5
+ * [refactor(helpers): improve run_cmd variable handling and debug logging](https://github.com/Muriel-Salvan/x_aeon_agents/commit/06c0554d12ba667fb23435c6fb36eb0f67754617)
6
+
1
7
  # [v2.4.1](https://github.com/Muriel-Salvan/x_aeon_agents/compare/v2.4.0...v2.4.1) (2026-11-03 13:55:35)
2
8
 
3
9
  ### Patches
@@ -21,34 +21,45 @@ module XAeonAgents
21
21
  # - stderr [String] Full stderr
22
22
  # - exit_status [Integer] Exit status
23
23
  def run_cmd(cmd, expected_exit_status: 0)
24
+ stdout = nil
25
+ stderr = nil
26
+ exit_status = nil
24
27
  stdout_lines = []
25
28
  stderr_lines = []
26
- exit_status = nil
27
- Open3.popen3(cmd) do |stdin, stdout, stderr, wait_thr|
28
- stdin.close
29
+ Open3.popen3(cmd) do |cmd_stdin, cmd_stdout, cmd_stderr, wait_thr|
30
+ cmd_stdin.close
29
31
  [
30
32
  # Parse stdout
31
33
  Thread.new do
32
- stdout.each_line do |line|
34
+ cmd_stdout.each_line do |line|
33
35
  stdout_lines << line
34
36
  end
35
37
  end,
36
38
  # Parse stderr
37
39
  Thread.new do
38
- stderr.each_line do |line|
40
+ cmd_stderr.each_line do |line|
39
41
  stderr_lines << line
40
42
  end
41
43
  end
42
44
  ].each(&:join)
43
45
  exit_status = wait_thr.value.exitstatus
46
+ stdout = stdout_lines.join
47
+ stderr = stderr_lines.join
44
48
  Config.logger.debug "Command `#{cmd}` exited with status: #{exit_status}"
49
+ Config.logger.debug <<~EO_DEBUG_OUTPUT
50
+ ===== STDOUT
51
+ #{stdout}
52
+ ===== STDERR
53
+ #{stderr}
54
+ ===== END OF STDERR
55
+ EO_DEBUG_OUTPUT
45
56
  if !expected_exit_status.nil? && exit_status != expected_exit_status
46
57
  raise UnexpectedExitStatusError, "Command `#{cmd}` exited with status #{exit_status} (expected #{expected_exit_status})"
47
58
  end
48
59
  end
49
60
  {
50
- stdout: stdout_lines.join,
51
- stderr: stderr_lines.join,
61
+ stdout:,
62
+ stderr:,
52
63
  exit_status:
53
64
  }
54
65
  end
@@ -2,5 +2,5 @@ module XAeonAgents
2
2
  # @!group Global API
3
3
 
4
4
  # Gem version
5
- VERSION = '2.4.1'
5
+ VERSION = '2.4.2'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: x_aeon_agents
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan