<commit_before>﻿#r "System.Xml"
#r "System.Xml.Linq"
#r "System.IO.Compression"
#r "System.IO.Compression.FileSystem"

using Nake.FS;
using Nake.Run;
using Nake.Log;
using Nake.Env;
using Nake.App;

using System.Linq;
using System.Net;
using System.Xml.Linq;
using System.Diagnostics;
using System.IO.Compression;

const string CoreProject = "Orleankka";
const string AzureProject = "Orleankka.Azure";
const string TestKitProject = "Orleankka.TestKit";
const string FSharpProject = "Orleankka.FSharp";
const string Beta = "";

const string RootPath = "$NakeScriptDirectory$";
const string OutputPath = RootPath + @"\Output";

var PackagePath = @"{OutputPath}\Package";
var ReleasePath = @"{PackagePath}\Release";

var AppVeyor = Var["APPVEYOR"] == "True";
var GES = "EventStore-OSS-Win-v3.0.3";
var Nuget = @"{RootPath}\Packages\NuGet.CommandLine\tools\Nuget.exe";

/// Installs dependencies and builds sources in Debug mode
[Task] void Default()
{
    Install();
    Build();
}

/// Wipeout all build output and temporary build files
[Step] void Clean(string path = OutputPath)
{
    Delete(@"{path}\*.*|-:*.vshost.exe");
    RemoveDir(@"**\bin|**\obj|{path}\*|-:*.vshost.exe");
}

/// Builds sources using specified configuration and output path
[Step] void Build(string config = "Debug", string outDir = OutputPath, bool verbose = false)
{    
    Clean(outDir);

    Exec(@"$ProgramFiles(x86)$\MSBuild\14.0\Bin\MSBuild.exe", 
          "{CoreProject}.sln /p:Configuration={config};OutDir={outDir};ReferencePath={outDir}" + 
           (verbose ? "/v:d" : ""));
}

/// Runs unit tests 
[Step] void Test(string outDir = OutputPath, bool slow = false)
{
    Build("Debug", outDir);

    var tests = new FileSet{@"{outDir}\*.Tests.dll"}.ToString(" ");
    var results = @"{outDir}\nunit-test-results.xml";

    try
    {
        Cmd(@"Packages\NUnit.Runners\tools\nunit-console.exe " + 
            @"/xml:{results} /framework:net-4.0 /noshadow /nologo {tests} " +
            (AppVeyor||slow ? "/include:Always,Slow" : ""));
    }
    finally
    {    	<commit_msg>Fixes #84<commit_after>﻿#r "System.Xml"
#r "System.Xml.Linq"
#r "System.IO.Compression"
#r "System.IO.Compression.FileSystem"

using Nake.FS;
using Nake.Run;
using Nake.Log;
using Nake.Env;
using Nake.App;

using System.Linq;
using System.Net;
using System.Xml.Linq;
using System.Diagnostics;
using System.IO.Compression;

const string CoreProject = "Orleankka";
const string AzureProject = "Orleankka.Azure";
const string TestKitProject = "Orleankka.TestKit";
const string FSharpProject = "Orleankka.FSharp";
const string Beta = "";

const string RootPath = "$NakeScriptDirectory$";
const string OutputPath = RootPath + @"\Output";

var PackagePath = @"{OutputPath}\Package";
var ReleasePath = @"{PackagePath}\Release";

var AppVeyor = Var["APPVEYOR"] == "True";
var GES = "EventStore-OSS-Win-v3.0.3";
var Nuget = @"{RootPath}\Packages\NuGet.CommandLine\tools\Nuget.exe";

/// Installs dependencies and builds sources in Debug mode
[Task] void Default()
{
    Install();
    Build();
}

/// Wipeout all build output and temporary build files
[Step] void Clean(string path = OutputPath)
{
    Delete(@"{path}\*.*|-:*.vshost.exe");
    RemoveDir(@"**\bin|**\obj|{path}\*|-:*.vshost.exe");
}

/// Builds sources using specified configuration and output path
[Step] void Build(string config = "Debug", string outDir = OutputPath, bool verbose = false)
{    
    Clean(outDir);

    Exec(@"$ProgramFiles(x86)$\MSBuild\14.0\Bin\MSBuild.exe", 
          "{CoreProject}.sln /p:Configuration={config};OutDir=\"{outDir}\";ReferencePath=\"{outDir}\"" + 
           (verbose ? "/v:d" : ""));
}

/// Runs unit tests 
[Step] void Test(string outDir = OutputPath, bool slow = false)
{
    Build("Debug", outDir);

    var tests = new FileSet{@"{outDir}\*.Tests.dll"}.ToString(" ");
    var results = @"{outDir}\nunit-test-results.xml";

    try
    {
        Cmd(@"Packages\NUnit.Runners\tools\nunit-console.exe " + 
            @"/xml:{results} /framework:net-4.0 /noshadow /nologo {tests} " +
            (AppVeyor||slow ? "/include:Always,Slow" : ""));
    }
    finally
    {    	
{'fraction_non_alphanumeric': 0.17287234042553193, 'fraction_numerical': 0.005319148936170213, 'mean_word_length': 3.7993039443155454, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3531535', 'n_tokens_mistral': 1475, 'n_tokens_neox': 1401, 'n_words': 311}