beaker 7.0.1 → 7.1.0
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 +13 -1
- data/lib/beaker/host/pswindows/file.rb +17 -6
- data/lib/beaker/version.rb +1 -1
- 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: 4ea7f3f43b306931d7cb6d414af927a1396091dbb90c4c8f8885bada0de6230f
|
4
|
+
data.tar.gz: bfd05c6c0d6004ccf971192865fa06c17ead095f5ce6be56504581128bc50728
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f7059b1e52018945c234b0f2569637137407bf1d060b72f180feff3ea0ce00a96b4370b02ce81fb9f5119c6d923d4260dd1ed2773f404d10d0ea80cd917b05a
|
7
|
+
data.tar.gz: cf11aa915baf2ead800ebaa9994da0a632e3e727dc9abcf525293ff03501f5139f7c337e775815c6433b8091c078d69f397292f45f70dc8f8120567aa17a6040
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [7.0
|
3
|
+
## [7.1.0](https://github.com/voxpupuli/beaker/tree/7.1.0) (2025-10-01)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/voxpupuli/beaker/compare/7.0.1...7.1.0)
|
6
|
+
|
7
|
+
**Implemented enhancements:**
|
8
|
+
|
9
|
+
- \(\#1955\) Implement the powershell tmpfile method with extensions [\#1956](https://github.com/voxpupuli/beaker/pull/1956) ([michael-riddle](https://github.com/michael-riddle))
|
10
|
+
|
11
|
+
**Closed issues:**
|
12
|
+
|
13
|
+
- The tmpfile method in pswindows needs to implement the use of the extension parameter [\#1955](https://github.com/voxpupuli/beaker/issues/1955)
|
14
|
+
|
15
|
+
## [7.0.1](https://github.com/voxpupuli/beaker/tree/7.0.1) (2025-08-15)
|
4
16
|
|
5
17
|
[Full Changelog](https://github.com/voxpupuli/beaker/compare/7.0.0...7.0.1)
|
6
18
|
|
@@ -1,15 +1,26 @@
|
|
1
1
|
module PSWindows::File
|
2
2
|
include Beaker::CommandFactory
|
3
3
|
|
4
|
-
def tmpfile(
|
4
|
+
def tmpfile(name = '', extension = nil)
|
5
|
+
tmp_path = exec(powershell('[System.IO.Path]::GetTempPath()')).stdout.chomp
|
6
|
+
|
7
|
+
if name.empty?
|
8
|
+
base_name = exec(powershell('[System.IO.Path]::GetRandomFileName()')).stdout.chomp
|
9
|
+
else
|
10
|
+
base_name = name
|
11
|
+
end
|
12
|
+
|
5
13
|
if extension
|
6
|
-
#
|
7
|
-
|
8
|
-
|
14
|
+
# Remove existing extension if present and add the new one
|
15
|
+
base_name = base_name.sub(/\.[^.]+$/, '')
|
16
|
+
final_name = "#{base_name}.#{extension}"
|
17
|
+
else
|
18
|
+
final_name = base_name
|
9
19
|
end
|
20
|
+
file_path = File.join(tmp_path, final_name)
|
10
21
|
|
11
|
-
|
12
|
-
|
22
|
+
exec(powershell("New-Item -Path '#{file_path}' -ItemType 'file' -Force"))
|
23
|
+
file_path
|
13
24
|
end
|
14
25
|
|
15
26
|
def tmpdir(name = '')
|
data/lib/beaker/version.rb
CHANGED