fsharp/FAKE — pull request #554 by ilkerde (2014-10-03 11:39:06+00:00)
Title: Change NuGetPack call signature to avoid "kempejada"

This set of changes streamline `NuGetHelper` functions, in particular the usage of `NuGetPack` towards the usage of `NuGet`. A rudimentary approach to intergration testing of `NugetHelper` is provided as well.

### Problem

Creating nuget packages is a fairly common task. FAKE provides nice helpers to do this, in particular the `NuGet` function, which sort of is a "all in" function to create and publish the package in one go. However, if one were to provide two separate targets for creating and publishing the package, the `NuGet` function needs to be called twice. Obviously with the `Publish` property being set to `false` in first call and `true` on the second call.

Interestingly, FAKE NuGetHelpers provide two additional functions: `NuGetPack` and `NuGetPush`. As the names already say it, `NuGetPack` creates the package, while `NuGetPush` publishes it.

Given the user would like to use `NuGetPack` and `NuGetPush` for separate targets instead of `NuGet`, a specific API divergence bubbles up to the public surface: `NuGet` expects a _nuspec template_ to be passed and processes it by replacing the `NugetParams` accordingly. In constrast, `NuGetPack` has the _same call signature_ as `NuGet`, but expects a complete and valid _nuspec file_ as opposed to a _nuspec template file_. This kempejada forces the user to use `NuGet` twice instead of (intuitively) use `NuGetPack` and `NuGetPush` for separate targets.

_Note: This "API divergence" is called **kempejada** here (just out of fun)._

### Solution

`NuGetPack` now performs the same package creation process as `NuGet` does. For a minimum level of verification, an integration is provided. For the integration test some helper functions were needed for function conversion (`CSharpHelper.fs`). I don't like that I've put them right into FakeLib, but I didn't knew a better place to tuck it in.

This change preserves compatibility to any prior `NuGetPack` usage since a complete (non-templated) nuspec file is just processed and passed along to the pack function.

Windows and Mono builds / tests pass. Please review thoroughly. Feedback and comments appreciated.