hybrid_platforms_conductor 33.2.1 → 33.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/CHANGELOG.md +12 -0
- data/lib/hybrid_platforms_conductor/cmd_runner.rb +1 -1
- data/lib/hybrid_platforms_conductor/core_extensions/bundler/without_bundled_env.rb +37 -0
- data/lib/hybrid_platforms_conductor/executable.rb +2 -0
- data/lib/hybrid_platforms_conductor/version.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/api/cmd_runner_spec.rb +8 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 90e31431abb4e4924342d8057fbb2d2f54d780975ef7079498045a7897262067
|
|
4
|
+
data.tar.gz: 3bfcb046a30115a681d407559f9395766439ada582a0d57070d5bae067776292
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c532fc150a6ac25db61a70de51b88332728cb93b27f1275fda6cf15b0fce03d2fce9b90f7ea1c65134c0475e10708d075235e9abc2ec5710bf8e4823a98dc2e7
|
|
7
|
+
data.tar.gz: d081b32a30c854f0445f98669ba417ee80256f65558b1d274e476b20bd6a0c35133f0f711adae65c9e118a027136caaffce91cd179a2202ae32623b2469d6b54
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [v33.2.2](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.2.1...v33.2.2) (2021-06-21 12:41:35)
|
|
2
|
+
|
|
3
|
+
## Global changes
|
|
4
|
+
### Patches
|
|
5
|
+
|
|
6
|
+
* [[Hotfix(cmd_runner)] Retain dynamically set environment while executing commands](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/d709d5d2871e43196cc1f5f9eaf5b2155b34ed4e)
|
|
7
|
+
|
|
8
|
+
## Changes for cmd_runner
|
|
9
|
+
### Patches
|
|
10
|
+
|
|
11
|
+
* [[Hotfix(cmd_runner)] Retain dynamically set environment while executing commands](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/d709d5d2871e43196cc1f5f9eaf5b2155b34ed4e)
|
|
12
|
+
|
|
1
13
|
# [v33.2.1](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.2.0...v33.2.1) (2021-06-21 10:23:51)
|
|
2
14
|
|
|
3
15
|
## Global changes
|
|
@@ -130,7 +130,7 @@ module HybridPlatformsConductor
|
|
|
130
130
|
(log_to_stdout ? [@logger_stderr] : []) +
|
|
131
131
|
(file_output.nil? ? [] : [file_output])
|
|
132
132
|
) do
|
|
133
|
-
Bundler.
|
|
133
|
+
Bundler.without_bundled_env do
|
|
134
134
|
cmd_result = TTY::Command.new(
|
|
135
135
|
printer: :null,
|
|
136
136
|
pty: true,
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Add a way to clean the current env from Bundler variables
|
|
2
|
+
module Bundler
|
|
3
|
+
|
|
4
|
+
class << self
|
|
5
|
+
|
|
6
|
+
# Run block with all bundler-related variables removed from the current environment
|
|
7
|
+
def without_bundled_env(&block)
|
|
8
|
+
with_env(current_unbundled_env, &block)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# @return [Hash] Environment with all bundler-related variables removed
|
|
12
|
+
def current_unbundled_env
|
|
13
|
+
env = ENV.clone.to_hash
|
|
14
|
+
|
|
15
|
+
env['MANPATH'] = env['BUNDLER_ORIG_MANPATH'] if env.key?('BUNDLER_ORIG_MANPATH')
|
|
16
|
+
|
|
17
|
+
env.delete_if { |k, _| k[0, 7] == 'BUNDLE_' }
|
|
18
|
+
|
|
19
|
+
if env.key?('RUBYOPT')
|
|
20
|
+
rubyopt = env['RUBYOPT'].split
|
|
21
|
+
rubyopt.delete("-r#{File.expand_path('bundler/setup', __dir__)}")
|
|
22
|
+
rubyopt.delete('-rbundler/setup')
|
|
23
|
+
env['RUBYOPT'] = rubyopt.join(' ')
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
if env.key?('RUBYLIB')
|
|
27
|
+
rubylib = env['RUBYLIB'].split(File::PATH_SEPARATOR)
|
|
28
|
+
rubylib.delete(File.expand_path(__dir__))
|
|
29
|
+
env['RUBYLIB'] = rubylib.join(File::PATH_SEPARATOR)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
env
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
end
|
|
@@ -51,6 +51,14 @@ describe HybridPlatformsConductor::CmdRunner do
|
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
it 'keeps dynamically set environment' do
|
|
55
|
+
with_repository do
|
|
56
|
+
value = ('a'..'z').to_a.sample(8).join
|
|
57
|
+
ENV['hpc_test_new_variable'] = value
|
|
58
|
+
expect(test_cmd_runner.run_cmd('echo "${hpc_test_new_variable}"')).to eq [0, "#{value}\n", '']
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
54
62
|
it 'fails when the command does not exit 0' do
|
|
55
63
|
with_repository do
|
|
56
64
|
expect { test_cmd_runner.run_cmd 'exit 1' }.to raise_error(HybridPlatformsConductor::CmdRunner::UnexpectedExitCodeError, 'Command \'exit 1\' returned error code 1 (expected 0).')
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hybrid_platforms_conductor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 33.2.
|
|
4
|
+
version: 33.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Muriel Salvan
|
|
@@ -695,6 +695,7 @@ files:
|
|
|
695
695
|
- lib/hybrid_platforms_conductor/config.rb
|
|
696
696
|
- lib/hybrid_platforms_conductor/confluence.rb
|
|
697
697
|
- lib/hybrid_platforms_conductor/connector.rb
|
|
698
|
+
- lib/hybrid_platforms_conductor/core_extensions/bundler/without_bundled_env.rb
|
|
698
699
|
- lib/hybrid_platforms_conductor/core_extensions/cleanroom/fix_kwargs.rb
|
|
699
700
|
- lib/hybrid_platforms_conductor/core_extensions/symbol/zero.rb
|
|
700
701
|
- lib/hybrid_platforms_conductor/credentials.rb
|