Fixed bug with Grok filter not testing values correctly.

This commit is contained in:
Eric Fontana
2014-12-11 12:46:22 -05:00
parent f1412c6b76
commit 0c283224bd
4 changed files with 10 additions and 7 deletions

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.14.0")]
[assembly: AssemblyFileVersion("1.3.14.0")]
[assembly: AssemblyVersion("1.3.15.0")]
[assembly: AssemblyFileVersion("1.3.15.0")]

View File

@@ -69,7 +69,7 @@ namespace TimberWinR.UnitTests
{
{"LogFilename", @"C:\\Logs1\\test1.log"},
{"Index", 7},
{"Text", null},
{"Text", "crap"},
{"type", "Win32-FileLog"},
{"ComputerName", "dev.vistaprint.net"}
};
@@ -82,7 +82,7 @@ namespace TimberWinR.UnitTests
""condition"": ""\""[type]\"" == \""Win32-FileLog\"""",
""match"":[
""Text"",
""""
""crap""
],
""remove_field"":[
""Index"",

View File

@@ -19,7 +19,7 @@ namespace TimberWinR.Parser
{
get { return fields[i]; }
set { fields[i] = value; }
}
}
public Fields(JObject json)
{
@@ -116,7 +116,10 @@ namespace TimberWinR.Parser
return true; // Yes!
}
}
return true; // Empty field is no match
if (string.IsNullOrEmpty(expr))
return true; // Empty field is no match
else
return false;
}
return false; // Not specified is failure
}

View File

@@ -1,7 +1,7 @@
$packageName = 'TimberWinR-${version}' # arbitrary name for the package, used in messages
$installerType = 'msi' #only one of these: exe, msi, msu
$url = 'http://www.ericfontana.com/TimberWinR/TimberWinR-${version}.0.msi' # download url
$silentArgs = '${PROJECTGUID} /quiet'
$silentArgs = '{593EF0C4-54E0-40D5-A3E3-922CD1C25B9E} /quiet'
$validExitCodes = @(0) #please insert other valid exit codes here, exit codes for ms http://msdn.microsoft.com/en-us/library/aa368542(VS.85).aspx
UnInstall-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" -validExitCodes $validExitCodes