Skip to content

Commit

Permalink
Build 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cdhunt committed May 17, 2016
1 parent c6484ef commit 2b7f270
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 48 deletions.
Binary file modified poshspec.psd1
Binary file not shown.
50 changes: 2 additions & 48 deletions poshspec.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -35,60 +35,14 @@ function Get-PoshspecParam {
)

$assertion = $Should.ToString().Trim()
<#
if ($PSBoundParameters.ContainsKey("Target"))
{
$Target = '`"' + $Target + '`"'
}
if ($PSBoundParameters.ContainsKey("Property"))
{
$Property = "'" + $Property + "'"
}
if ($PSBoundParameters.ContainsKey("Qualifier"))
{
$Qualifier = "'" + $Qualifier + "'"
}
#$targetName = $Target
#>

if (-not $PSBoundParameters.ContainsKey("FriendlyName"))
{
$FriendlyName = $Target
}

$expressionString = $TestExpression.ToString()
<#
$expandedTokens = foreach ($token in $tokens)
{
if ($token.Type -eq 'Variable')
{
$variable = Get-Variable $token.Content -ErrorAction SilentlyContinue
if (-not [string]::IsNullOrEmpty($variable.Value))
{
$value = "'" + $variable.Value + "'"
Write-Output -InputObject $value
}
else
{
Throw "Could not find a variable in scope by the name '$($token.Content)'"
}
}
else
{
if ($token.Type -eq 'String') {
Write-Output -InputObject ('"' + $token.Content + '"')
} else {
if ($token.Type -ne 'NewLine') {
Write-Output -InputObject $token.Content
}
}
}
}
$expressionString = $expandedTokens -join " "
#>

if ($PSBoundParameters.ContainsKey("Property"))
{
$expressionString += " | Select-Object -ExpandProperty '$Property'"
Expand Down

0 comments on commit 2b7f270

Please sign in to comment.