Skip to content

Commit 88ea1aa

Browse files
committed
merge readme
2 parents 246a229 + 3ecfd23 commit 88ea1aa

21 files changed

Lines changed: 817 additions & 516 deletions
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Custom issue template
3+
about: Describe this issue template's purpose here.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ script:
2424
- sudo pwsh -C 'Install-Module Pester -Force'
2525
# updated help is needed for tests, run as a Job to avoid Write-Progress output
2626
- sudo pwsh -C '(update-help &) | Wait-Job'
27-
- pwsh -C 'Import-Module Pester;cd .\Bookmarks\; Invoke-Pester -EnableExit;'
27+
- pwsh -C 'Import-Module Pester;cd .\Bookmarks\; Invoke-Pester -EnableExit;'
28+
- pwsh -C 'Import-Module Pester;cd .\Currency-Conv\; Invoke-Pester -EnableExit;'

7Zip/7zip-Archive.SmokeTests.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Import-Module .\7zip-Archive.psm1
2+
3+
4+
ls -Exclude .git | New-ZipFile "scripts"
5+
Test-ZipFileContent .\scripts.7z
6+
Get-ZipFileContent -Archive .\scripts.7z
7+
Remove-ZipFileContent -Archive .\scripts.7z -File "temp.log"
8+
Read-ZipFile -Archive .\scripts.7z
9+
Add-ZipFileContent -Path .\scripts.7z -FileName .\7zip-Archive.psd1

7Zip/7zip-Archive.psd1

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
# RootModule = ''
1212

1313
# Version number of this module.
14-
ModuleVersion = '1.0.2'
14+
15+
ModuleVersion = '1.1.0'
1516

1617
# Supported PSEditions
1718
# CompatiblePSEditions = @()
@@ -111,19 +112,9 @@
111112

112113
# ReleaseNotes of this module
113114
ReleaseNotes = '
114-
First public release.
115-
Supported function:
116-
Read-ZipFile szr
117-
Add-ZipFileContent sza
118-
Remove-ZipFileContent szrm
119-
Test-ZipFileContent szt
120-
Get-ZipFileContent br
121-
Full documentation at the Github: https://github.com/stadub/PowershellScripts/tree/master/7Zip
122-
Changelog:
123-
Update icon.
124-
Remove extra shared functions
125-
Add update checker
126-
Change test environment to StrictMode=Latest
115+
Fix update checker path
116+
Fix unit tests to work with strict mode
117+
Add ci and build scripts
127118
'
128119

129120
} # End of PSData hashtable

7Zip/7zip-Archive.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
. $PSScriptRoot\Functions.ps1
44

5-
CheckPsGalleryUpdate 7Zip "1.0.2"
5+
szCheckPsGalleryUpdate 7Zip "1.1.0"
66

77
_Initalize
88

7Zip/Aliases.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ Set-Alias sza Add-ZipFileContent -Scope Global
33
Set-Alias szrm Remove-ZipFileContent -Scope Global
44
Set-Alias szt Test-ZipFileContent -Scope Global
55
Set-Alias br Get-ZipFileContent -Scope Global
6+
Set-Alias szc New-ZipFile -Scope Global
67

7Zip/Functions.ps1

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
function _Initalize() {
44

5-
$script:_binDir = Get-ProfileDir "7zip" "bin"
5+
$script:_binDir = szGet-ProfileDir "7zip" "bin"
66
Write-Debug "The 7-zip is dir set to $_binDir"
77
$script:_7zWin = Join-Path $_binDir "7za.exe"
88
$script:_7zWinDownloadDir='https://www.7-zip.org/a/7za920.zip'
@@ -22,19 +22,19 @@ function Test-7ZipInstall {
2222
Write-Debug "Trying to locate 7-zip by the path: $script:_7zWin"
2323

2424
if( -not (Test-Path "$script:_7zWin")){
25-
Write-Output '7Zip didn''t found.'
25+
Write-Output '7Zip didn''t downloaded.'
2626
Write-Output 'Now script going to try to download it.'
2727

28-
$file = Get-TempFileName
28+
$file = szGet-TempFileName
2929
Write-Debug "Temp file: ${file}"
3030

31-
Receive-File "7-Zip" $file $_7zWinDownloadDir
31+
szReceive-File "7-Zip" $file $_7zWinDownloadDir
3232
Write-Debug "Extracting to directory ${_binDir}"
3333
if ( -not (Test-Path $_binDir )) {
3434
New-Item -Path $_binDir -ItemType 'Directory'
3535
}
3636

37-
Extract-ZipFile -FileName "$file" -Path "$_binDir"
37+
szExtract-ZipFile -FileName "$file" -Path "$_binDir"
3838
}
3939
$script:_7zPath = $script:_7zWin
4040

@@ -56,7 +56,7 @@ function AddKeyArg {
5656
$AllArgs = $null,
5757
[string]$Key = $null
5858
)
59-
if( -not (Test-Empty $Key)){
59+
if( -not (szTest-Empty $Key)){
6060
$AllArgs += "-p$Key"
6161
}
6262
return $AllArgs
@@ -206,7 +206,6 @@ function Remove-ZipFileContent {
206206
[Alias("Path","Name", "Archive", "p")]
207207
[string]$ArchiveName,
208208

209-
[ValidateScript( { Test-Path $_ -pathType leaf })]
210209
[Parameter(Position = 1, Mandatory = $true)]
211210
[Alias("File", "f")]
212211
[string]$FileName,
@@ -364,7 +363,7 @@ function New-ZipFile {
364363
process {
365364

366365
$FileNames| ForEach-Object{
367-
if( -not (Test-Empty $_) ){
366+
if( -not (szTest-Empty $_) ){
368367
Write-Debug "Adding file ""$_"""
369368
$files += $_
370369
}
@@ -432,7 +431,7 @@ function New-ZipFile {
432431
}
433432

434433

435-
if( -not (Test-Empty $([string]$SplitSize) )){
434+
if( -not (szTest-Empty $([string]$SplitSize) )){
436435

437436
$factorName="b"
438437
switch ( $SplitSizeFactor )
@@ -518,7 +517,7 @@ function Test-ZipFileContent {
518517
$AllArgs = @('t', "$ArchiveName")
519518

520519

521-
if( -not (Test-Empty $FileName) ){
520+
if( -not (szTest-Empty $FileName) ){
522521
$AllArgs += "$FileName"
523522
}
524523

@@ -586,12 +585,12 @@ function Get-ZipFileContent {
586585

587586
$AllArgs = @('e', "$ArchiveName")
588587

589-
if( -not (Test-Empty $FileName) ){
588+
if( -not (szTest-Empty $FileName) ){
590589
$AllArgs += "$FileName"
591590
}
592591

593-
if( -not (Test-Empty $destFolder) ){
594-
CreateFolderIfNotExist "${destFolder}"
592+
if( -not (szTest-Empty $destFolder) ){
593+
szCreateFolderIfNotExist "${destFolder}"
595594
$AllArgs += "-o$destFolder"
596595
}
597596

7Zip/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Test-ZipFileContent - Perform zip file check
8282

8383
| Cmdlet | Alias |
8484
| ---------------------|:------:|
85+
| New-ZipFile | szc |
8586
| Read-ZipFile | szr |
8687
| Add-ZipFileContent | sza |
8788
| Remove-ZipFileContent| szrm |
@@ -179,10 +180,11 @@ Test-ZipFileContent - Perform zip file check
179180

180181
## Changelog
181182

182-
### [v1.1.0](https://github.com/stadub/PowershellScripts/releases/tag/v0.9.5)
183+
### [v1.1.0](https://github.com/stadub/PowershellScripts/releases/tag/v0.9.5) Spet 9, 2019
183184

184185
* Fix Remove-ZipFileContent returns Cannot validate argument on parameter 'FileName'. #14
185186
* Fix 7-zpi szc New-ZipFile alias is absent bug #14
187+
* Add smoke tests
186188

187189
### [v1.0.0](https://github.com/stadub/PowershellScripts/releases/tag/v0.4.0)
188190

0 commit comments

Comments
 (0)