Skip to content

Commit 0eef675

Browse files
committed
Release version 1.1.0
changes: * Use `PSDefaultParameterValues` declared by the user in global scope _Previously these were not passed on to the scriptblock_
1 parent b6e4f64 commit 0eef675

File tree

5 files changed

+22
-20
lines changed

5 files changed

+22
-20
lines changed

.vscode/settings.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
"files.eol": "\r\n",
66
"files.insertFinalNewline": true,
77
"files.trimTrailingWhitespace": true,
8-
"powershell.codeFormatting.ignoreOneLineBlock": false,
8+
"powershell.codeFormatting.openBraceOnSameLine": true,
9+
"powershell.codeFormatting.newLineAfterOpenBrace": false,
910
"powershell.codeFormatting.newLineAfterCloseBrace": true,
10-
"powershell.codeFormatting.newLineAfterOpenBrace": true,
11-
"powershell.codeFormatting.openBraceOnSameLine": false,
12-
"powershell.codeFormatting.whitespaceAfterSeparator": true,
11+
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true,
12+
"powershell.codeFormatting.whitespaceBeforeOpenParen": true,
1313
"powershell.codeFormatting.whitespaceAroundOperator": true,
14-
"powershell.codeFormatting.whitespaceBeforeOpenBrace": false,
15-
"powershell.codeFormatting.whitespaceBeforeOpenParen": false,
14+
"powershell.codeFormatting.whitespaceAfterSeparator": true,
15+
"powershell.codeFormatting.ignoreOneLineBlock": true,
1616
"powershell.scriptAnalysis.settingsPath": "PSScriptAnalyzerSettings.psd1",
1717
"[markdown]": {
1818
"editor.wordwrap": "on",

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1+
# Change Log
2+
3+
## 1.1.0 [2017-07-29]
4+
### Enhancements
5+
* Use `PSDefaultParameterValues` decalred by the user in global scope
6+
_Previously these were not passed on to the scriptblock_
7+
18
## 1.0.0 [2017-07-29]
29
Initial release

Spread/Public/Invoke-WithParameter.ps1

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
function Invoke-WithParameter
2-
{
1+
function Invoke-WithParameter {
32
[CmdletBinding()]
43
param(
54
[Parameter(Mandatory = $true)]
@@ -9,28 +8,24 @@ function Invoke-WithParameter
98
$Parameter
109
)
1110

12-
End
13-
{
14-
# Initialize local instance
15-
$PSDefaultParameterValues = @{}
11+
End {
12+
# Initialize local instance with global values
13+
$PSDefaultParameterValues = $global:PSDefaultParameterValues
1614

17-
while($Parameter)
18-
{
15+
while ($Parameter) {
1916
# Spread & Shift
2017
$param, $value, $Parameter = $Parameter
2118

2219
# Clean $param from `-` delim and support `Function:Param`
2320
$param = $param.trimStart("-").trimEnd(":")
2421

25-
if($param -notmatch ":")
26-
{
22+
if ($param -notmatch ":") {
2723
$param = "*:" + $param
2824
}
2925

3026
$PSDefaultParameterValues[$param] = $value
3127
}
32-
if ($DebugPreference -ne "SilentlyContinue")
33-
{
28+
if ($DebugPreference -ne "SilentlyContinue") {
3429
$PSDefaultParameterValues | Out-Default
3530
}
3631

Spread/Spread.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'Spread.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '1.0.0'
15+
ModuleVersion = '1.1.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
PSGalleryAPIKey:
1111
secure: s9Uw6gnBI2xdDYtpJE5m8C3eDvrXBDGO/abptsu9NCtCrdxoU/N+3YfjffOTysw+
1212

13-
version: 1.0.0.{build}
13+
version: 1.1.0.{build}
1414

1515
# Don't rebuild when I tag a release on GitHub
1616
skip_tags: true

0 commit comments

Comments
 (0)