cem_win_spec 0.1.14 → 0.1.15
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/Gemfile.lock +1 -1
- data/lib/cem_win_spec/test_runner.rb +12 -13
- data/lib/cem_win_spec/version.rb +1 -1
- data/lib/cem_win_spec/win_exec/cmd/base_cmd.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7305e5d69856b227f75621053def37c6543b1e1adc2d77ffd0a921ca9fbd9e9b
|
|
4
|
+
data.tar.gz: dac6bc35280bac694ed1e6cf3d8236e1ee810efc185caea6382ea0f09df98170
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 504a3229f08f9f74816de1d6fa93c1c95f54f595aab62dc20e905090c3ed4412fb71d9e91f90c3ae72553348cca70d62be9dcaa8beac09d6656eb1e0937704b8
|
|
7
|
+
data.tar.gz: 7e93c63e3d55b1da8d13326ec240439de7905aa4a29a9ba9a521d5d70134f366420877abbf9b9bb655adff8cc452acee3a4c9dad0c86e93ecd251ca6cd1ffec8
|
data/Gemfile.lock
CHANGED
|
@@ -69,21 +69,20 @@ module CemWinSpec
|
|
|
69
69
|
def install_ruby(**opts)
|
|
70
70
|
new_command('Install ruby', **opts) do
|
|
71
71
|
tool_dir = remote_ruby_tool_dir
|
|
72
|
-
choco_ver = remote_choco_ruby_version
|
|
73
72
|
ruby_ver = remote_ruby_version
|
|
74
|
-
|
|
73
|
+
installer_url = remote_ruby_installer_url
|
|
74
|
+
next unless tool_dir && ruby_ver
|
|
75
|
+
|
|
76
|
+
cmds = [
|
|
77
|
+
"$rubyBin = '#{tool_dir}\\bin'",
|
|
78
|
+
"$uList = (uru ls 2>&1 | Out-String)",
|
|
79
|
+
]
|
|
80
|
+
if installer_url
|
|
81
|
+
cmds << "if (-not (Test-Path \"$rubyBin\")) { $inst = \"$env:TEMP\\rubyinstaller.exe\"; Invoke-WebRequest -Uri '#{installer_url}' -OutFile $inst -UseBasicParsing; Start-Process -FilePath $inst -ArgumentList '/verysilent', '/dir=#{tool_dir}' -Wait; Remove-Item $inst -Force }"
|
|
82
|
+
end
|
|
83
|
+
cmds << "if ($uList -notmatch '#{ruby_ver}') { uru admin add \"$rubyBin\" }"
|
|
75
84
|
|
|
76
|
-
remote_run(
|
|
77
|
-
[
|
|
78
|
-
"$rubyBin = '#{tool_dir}\\bin'",
|
|
79
|
-
"$uList = (uru ls 2>&1 | Out-String)",
|
|
80
|
-
"if (-not (Test-Path $rubyBin)) { choco install ruby --version=#{choco_ver} -y --no-progress }",
|
|
81
|
-
"if ($uList -notmatch '#{ruby_ver}') { uru admin add $rubyBin }",
|
|
82
|
-
],
|
|
83
|
-
ruby_cmd: false,
|
|
84
|
-
add_envs: false,
|
|
85
|
-
chdir: false,
|
|
86
|
-
)
|
|
85
|
+
remote_run(cmds, ruby_cmd: false, add_envs: false, chdir: false)
|
|
87
86
|
end
|
|
88
87
|
end
|
|
89
88
|
|
data/lib/cem_win_spec/version.rb
CHANGED
|
@@ -18,10 +18,10 @@ module CemWinSpec
|
|
|
18
18
|
'322' => 'C:\tools\ruby\3.2.2',
|
|
19
19
|
'405' => 'C:\tools\ruby\4.0.5',
|
|
20
20
|
}.freeze
|
|
21
|
-
|
|
22
|
-
'278' =>
|
|
23
|
-
'322' =>
|
|
24
|
-
'405' => '4.0.5',
|
|
21
|
+
RUBY_INSTALLER_URL_BY_RUBY_VER = {
|
|
22
|
+
'278' => nil,
|
|
23
|
+
'322' => nil,
|
|
24
|
+
'405' => 'https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-4.0.5-1/rubyinstaller-4.0.5-1-x64.exe',
|
|
25
25
|
}.freeze
|
|
26
26
|
|
|
27
27
|
attr_accessor :working_dir, :env_vars, :puppet_version
|
|
@@ -86,10 +86,10 @@ module CemWinSpec
|
|
|
86
86
|
TOOL_DIR_BY_RUBY_VER[ruby_version]
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
-
def
|
|
89
|
+
def ruby_installer_url
|
|
90
90
|
return nil unless ruby_version
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
RUBY_INSTALLER_URL_BY_RUBY_VER[ruby_version]
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
# Formats the command to be run
|