Skip to content

Commit

Permalink
Merge branch 'release/0.13.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
gep13 committed Jun 7, 2016
2 parents 67b9768 + c2a57ab commit f7346f2
Show file tree
Hide file tree
Showing 139 changed files with 3,072 additions and 357 deletions.
4 changes: 3 additions & 1 deletion GitReleaseManager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ issue-labels-include:
- Bug
- Feature
- Improvement
- Documentation
- Documentation
issue-labels-exclude:
- Build
25 changes: 25 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
### New on 0.13.0 (Released 2016/06/07)

* DotNetCoreTest() alias calls DotNetCoreRun()
* Fix DotNet CLI multi-arguments
* Cannot parse AssemblyInfo.cs files generated by MonoDevelop
* Cake.Core.Tooling.ToolRepository.Register(FilePath) path not validated
* Problems using XmlPeek and XmlPoke in XML files with DOCTYPE
* MakeNSIS() does not support filepath for scripts with blanks in path name
* Custom command line switches can't contain spaces in value
* Signtool: Add support for description URL (/du)
* Support uploading test results XML to AppVeyor
* Add support for the vstest.console.exe unit test runner
* Add Module Support
* Add setter for Verbosity in ICakeLog
* Add support for additional arguments to DotNetCoreExecute and DotNetCoreRun
* Allow setting boolean values for built in Cake arguments
* Add DevelopmentDependency to NuGetPackSettings
* Project parser should support TargetFrameworkProfile
* Add tests for Project Parser
* Cake.Core.Tooling namespace isn't documented
* Incorrect documentation in obsolete attribute
* Correct documentation for ILMerge
* Add Summary Documentation for all aliases


### New on 0.12.0 (Released 2016/05/25)

* Fix globalization & white space issue
Expand Down
4 changes: 2 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ bool publishingError = false;
// SETUP / TEARDOWN
///////////////////////////////////////////////////////////////////////////////

Setup(() =>
Setup(context =>
{
parameters.SetBuildVersion(
BuildVersion.CalculatingSemanticVersion(
Expand All @@ -44,7 +44,7 @@ Setup(() =>
BuildPackages.GetPackages(
nugetRooPath: parameters.Paths.Directories.NugetRoot,
semVersion: parameters.Version.SemVersion,
packageIds: new [] { "Cake", "Cake.Core", "Cake.Common", "Cake.Testing", "Cake.NuGet" },
packageIds: new [] { "Cake", "Cake.Core", "Cake.Common", "Cake.Testing" },
chocolateyPackageIds: new [] { "cake.portable" }
)
);
Expand Down
2 changes: 1 addition & 1 deletion build/parameters.cake
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class BuildParameters
IsLocalBuild = buildSystem.IsLocalBuild,
IsRunningOnUnix = context.IsRunningOnUnix(),
IsRunningOnWindows = context.IsRunningOnWindows(),
IsRunningOnAppVeyor = context.IsRunningOnWindows(),
IsRunningOnAppVeyor = buildSystem.AppVeyor.IsRunningOnAppVeyor,
IsPullRequest = buildSystem.AppVeyor.Environment.PullRequest.IsPullRequest,
IsMainCakeRepo = StringComparer.OrdinalIgnoreCase.Equals("cake-build/cake", buildSystem.AppVeyor.Environment.Repository.Name),
IsMainCakeBranch = StringComparer.OrdinalIgnoreCase.Equals("main", buildSystem.AppVeyor.Environment.Repository.Branch),
Expand Down
2 changes: 1 addition & 1 deletion nuspec/Cake.Common.nuspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" minClientVersion="2.8">
<id>Cake.Common</id>
<version>0.0.0</version>
<authors>Patrik Svensson</authors>
Expand Down
26 changes: 0 additions & 26 deletions nuspec/Cake.NuGet.nuspec

This file was deleted.

4 changes: 4 additions & 0 deletions src/Cake.Common.Tests/Cake.Common.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
<Compile Include="Fixtures\Build\JenkinsInfoFixture.cs" />
<Compile Include="Fixtures\Build\TravisCIFixture.cs" />
<Compile Include="Fixtures\Build\TravisCIInfoFixture.cs" />
<Compile Include="Fixtures\Solution\Project\ProjectParserFixture.cs" />
<Compile Include="Fixtures\Tools\CakeRunnerFixture.cs" />
<Compile Include="Fixtures\IO\FileCopyFixture.cs" />
<Compile Include="Fixtures\IO\FileDeleteFixture.cs" />
Expand Down Expand Up @@ -100,6 +101,7 @@
<Compile Include="Fixtures\Tools\DNU\DNUFixture.cs" />
<Compile Include="Fixtures\Tools\DNU\Pack\DNUPackerFixture.cs" />
<Compile Include="Fixtures\Tools\DNU\Restorer\DNURestorerFixture.cs" />
<Compile Include="Fixtures\Tools\VSTestRunnerFixture.cs" />
<Compile Include="Fixtures\Tools\SpecFlow\StepDefinitionReport\SpecFlowStepDefinitionReporterFixture.cs" />
<Compile Include="Fixtures\Tools\SpecFlow\TestExecutionReport\SpecFlowTestExecutionReporterFixture.cs" />
<Compile Include="Fixtures\Tools\SpecFlow\SpecFlowFixture.cs" />
Expand Down Expand Up @@ -217,6 +219,7 @@
<Compile Include="Unit\IO\Paths\ConvertableDirectoryPathTests.cs" />
<Compile Include="Unit\IO\Paths\ConvertableFilePathTests.cs" />
<Compile Include="Unit\Security\FileHashCalculatorTests.cs" />
<Compile Include="Unit\Solution\Project\ProjectParserTests.cs" />
<Compile Include="Unit\Solution\Project\Properties\AssemblyInfoCreatorTests.cs" />
<Compile Include="Unit\Solution\Project\Properties\AssemblyInfoParserTests.cs" />
<Compile Include="Unit\Diagnostics\LoggingAliasesTests.cs" />
Expand Down Expand Up @@ -308,6 +311,7 @@
<Compile Include="Unit\Tools\SpecFlow\TestExecutionReport\SpecFlowTestExecutionReporterTests.cs" />
<Compile Include="Unit\Tools\TextTransform\TextTemplateAliasTests.cs" />
<Compile Include="Unit\Tools\TextTransform\TextTransformRunnerTests.cs" />
<Compile Include="Unit\Tools\VSTest\VSTestRunnerTests.cs" />
<Compile Include="Unit\Tools\WiX\LightRunnerTests.cs" />
<Compile Include="Unit\Tools\WiX\CandleRunnerTests.cs" />
<Compile Include="Unit\Tools\XBuild\XBuildSettingsExtensionsTests.cs" />
Expand Down
5 changes: 5 additions & 0 deletions src/Cake.Common.Tests/Fixtures/AssemblyInfoParserFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public AssemblyInfoParserFixture()
CreateAssemblyInfo = true;
}

public void WithAssemblyInfoContents(string assemblyInfoContents)
{
FileSystem.CreateFile("/Working/output.cs").SetContent(assemblyInfoContents);
}

public AssemblyInfoParseResult Parse()
{
if (CreateAssemblyInfo && Path != null)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using Cake.Common.Solution.Project;
using Cake.Common.Tests.Properties;
using Cake.Core;
using Cake.Core.Diagnostics;
using Cake.Core.IO;
using Cake.Testing;
using NSubstitute;

namespace Cake.Common.Tests.Fixtures.Solution.Project
{
internal sealed class ProjectParserFixture
{
public ProjectParserFixture()
{
ProjFilePath = "/Working/Cake.Sample.csproj";
Pattern = "/Working/Cake.*.csproj";

var environment = FakeEnvironment.CreateUnixEnvironment();
Environment = environment;
var fileSystem = new FakeFileSystem(environment);
fileSystem.CreateFile(ProjFilePath.FullPath).SetContent(Resources.Csproj_ProjectFile);
fileSystem.CreateFile("/Working/Cake.Incomplete.csproj").SetContent(Resources.Csproj_IncompleteFile);
FileSystem = fileSystem;

Globber = Substitute.For<IGlobber>();
Globber.GetFiles(Pattern).Returns(new FilePath[] { "/Working/Cake.Sample.csproj", "/Working/Cake.Incomplete.csproj" });

Log = Substitute.For<ICakeLog>();
}

public ICakeEnvironment Environment { get; set; }

public ProjectParserResult Parse()
{
var parser = new ProjectParser(FileSystem, Environment);
return parser.Parse(ProjFilePath);
}

public ProjectParserResult ParseIncomplete()
{
var parser = new ProjectParser(FileSystem, Environment);
return parser.Parse("/Working/Cake.Incomplete.csproj");
}

public string Pattern { get; set; }
public IFileSystem FileSystem { get; set; }
public IGlobber Globber { get; set; }
public ICakeLog Log { get; set; }
public FilePath ProjFilePath { get; set; }
}
}
30 changes: 30 additions & 0 deletions src/Cake.Common.Tests/Fixtures/Tools/VSTestRunnerFixture.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Cake.Common.Tools.VSTest;
using Cake.Core.IO;
using Cake.Testing.Fixtures;
using System.Collections.Generic;

namespace Cake.Common.Tests.Fixtures.Tools
{
internal sealed class VSTestRunnerFixture : ToolFixture<VSTestSettings>
{
public IEnumerable<FilePath> AssemblyPaths { get; set; }

public VSTestRunnerFixture()
: base("vstest.console.exe")
{
AssemblyPaths = new[] { new FilePath("./Test1.dll") };
Environment.SetSpecialPath(SpecialPath.ProgramFilesX86, "/ProgramFilesX86");
}

protected override FilePath GetDefaultToolPath(string toolFilename)
{
return new FilePath("/ProgramFilesX86/Microsoft Visual Studio 11.0/Common7/IDE/CommonExtensions/Microsoft/TestWindow/vstest.console.exe");
}

protected override void RunTool()
{
var tool = new VSTestRunner(FileSystem, Environment, ProcessRunner, Tools);
tool.Run(AssemblyPaths, Settings);
}
}
}
5 changes: 3 additions & 2 deletions src/Cake.Common.Tests/Fixtures/XmlPeekAliasesFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal sealed class XmlPeekAliasesFixture
public FilePath XmlPath { get; set; }
public XmlPeekSettings Settings { get; set; }

public XmlPeekAliasesFixture(bool xmlExists = true)
public XmlPeekAliasesFixture(bool xmlExists = true, bool xmlWithDtd = false)
{
Settings = new XmlPeekSettings();

Expand All @@ -24,7 +24,8 @@ public XmlPeekAliasesFixture(bool xmlExists = true)

if (xmlExists)
{
var xmlFile = fileSystem.CreateFile("/Working/web.config").SetContent(Resources.XmlPeek_Xml);
string content = xmlWithDtd ? Resources.XmlPeek_Xml_Dtd : Resources.XmlPeek_Xml;
var xmlFile = fileSystem.CreateFile("/Working/web.config").SetContent(content);
XmlPath = xmlFile.Path;
}

Expand Down
27 changes: 23 additions & 4 deletions src/Cake.Common.Tests/Fixtures/XmlPokeFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal sealed class XmlPokeFixture
public FilePath XmlPath { get; set; }
public XmlPokeSettings Settings { get; set; }

public XmlPokeFixture(bool xmlExists = true)
public XmlPokeFixture(bool xmlExists = true, bool xmlWithDtd = false)
{
Settings = new XmlPokeSettings();

Expand All @@ -27,7 +27,8 @@ public XmlPokeFixture(bool xmlExists = true)

if (xmlExists)
{
var xmlFile = fileSystem.CreateFile("/Working/web.config").SetContent(Resources.XmlPoke_Xml);
string content = xmlWithDtd ? Resources.XmlPoke_Xml_Dtd : Resources.XmlPoke_Xml;
var xmlFile = fileSystem.CreateFile("/Working/web.config").SetContent(content);
XmlPath = xmlFile.Path;
}

Expand All @@ -43,6 +44,11 @@ public void Poke(string xpath, string value)
XmlPokeAliases.XmlPoke(Context, XmlPath, xpath, value, Settings);
}

public string PokeString(string xml, string xpath, string value)
{
return XmlPokeAliases.XmlPokeString(Context, xml, xpath, value, Settings);
}

public bool TestIsValue(string xpath, string value)
{
var xmlString = new StreamReader(FileSystem.GetFile(XmlPath).OpenRead()).ReadToEnd();
Expand All @@ -52,7 +58,7 @@ public bool TestIsValue(string xpath, string value)
public bool TestIsValue(string xml, string xpath, string value)
{
using (var reader = new StringReader(xml))
using (var xmlReader = XmlReader.Create(reader))
using (var xmlReader = XmlReader.Create(reader, GetXmlReaderSettings(Settings)))
{

var document = new XmlDocument();
Expand All @@ -78,7 +84,7 @@ public bool TestIsRemoved(string xpath)
public bool TestIsRemoved(string xml, string xpath)
{
using (var reader = new StringReader(xml))
using (var xmlReader = XmlReader.Create(reader))
using (var xmlReader = XmlReader.Create(reader, GetXmlReaderSettings(Settings)))
{

var document = new XmlDocument();
Expand All @@ -94,5 +100,18 @@ public bool TestIsRemoved(string xml, string xpath)
return nodes != null && nodes.Count == 0;
}
}

/// <summary>
/// Gets a XmlReaderSettings from a XmlPokeSettings
/// </summary>
/// <returns>The xml reader settings.</returns>
/// <param name="settings">Additional settings to tweak Xml Poke behavior.</param>
private static XmlReaderSettings GetXmlReaderSettings(XmlPokeSettings settings)
{
var xmlReaderSettings = new XmlReaderSettings();
xmlReaderSettings.DtdProcessing = (DtdProcessing)settings.DtdProcessing;

return xmlReaderSettings;
}
}
}
Loading

0 comments on commit f7346f2

Please sign in to comment.