Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Commit

Permalink
Resolved merge conflicts between coreclr and master
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodejunkie committed May 27, 2016
1 parent d803cce commit 301d1d0
Show file tree
Hide file tree
Showing 20 changed files with 126 additions and 56 deletions.
39 changes: 36 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,52 @@ function Install-Dotnet
if(($LASTEXITCODE -ne 0) -Or ((Test-Path Env:\APPVEYOR) -eq $true))
{
Write-Host "Dotnet CLI not found - downloading latest version"
& { iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1')) }

# Prepare the dotnet CLI folder
$env:DOTNET_INSTALL_DIR="$(Convert-Path "$PSScriptRoot")\.dotnet\win7-x64"
if (!(Test-Path $env:DOTNET_INSTALL_DIR))
{
mkdir $env:DOTNET_INSTALL_DIR | Out-Null
}

# Download the dotnet CLI install script
if (!(Test-Path .\dotnet\install.ps1))
{
Invoke-WebRequest "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1" -OutFile ".\.dotnet\dotnet-install.ps1"
}

# Run the dotnet CLI install
& .\.dotnet\dotnet-install.ps1

# Add the dotnet folder path to the process. This gets skipped
# by Install-DotNetCli if it's already installed.
Remove-PathVariable $env:DOTNET_INSTALL_DIR
$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH"

}
}

function Remove-PathVariable
{
[cmdletbinding()]
param([string] $VariableToRemove)
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
$newItems = $path.Split(';') | Where-Object { $_.ToString() -inotlike $VariableToRemove }
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "User")
$path = [Environment]::GetEnvironmentVariable("PATH", "Process")
$newItems = $path.Split(';') | Where-Object { $_.ToString() -inotlike $VariableToRemove }
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "Process")
}

function Restore-Packages
{
param([string] $DirectoryName)
& dotnet restore -v Error ("""" + $DirectoryName + """")
& dotnet restore -v Warning ("""" + $DirectoryName + """")
}

function Test-Projects
{
& dotnet test;
& dotnet test -c Release;
if($LASTEXITCODE -ne 0)
{
exit 3
Expand Down
4 changes: 2 additions & 2 deletions samples/Nancy.Demo.Hosting.Kestrel/HomeModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ public class HomeModule : NancyModule
{
public HomeModule()
{
Get["/"] = (o, token) => Task.FromResult<dynamic>("Hello from Nancy running on CoreCLR");
Get("/", (args, ct) => Task.FromResult("Hello from Nancy running on CoreCLR"));

Get["/conneg/{name}"] = (parameters, token) => Task.FromResult<dynamic>(new Person() { Name = parameters.name });
Get("/conneg/{name}", (args, token) => Task.FromResult(new Person() { Name = args.name }));
}
}
}
1 change: 1 addition & 0 deletions src/Nancy/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

"buildOptions": {
"embed": [
"ErrorHandling/Resources/**/*.*",
"Diagnostics/Resources/**/*.*",
"Diagnostics/Views/**/*.*"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
7 changes: 5 additions & 2 deletions test/Nancy.Embedded.Tests/Nancy.Embedded.Tests.xproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
7 changes: 5 additions & 2 deletions test/Nancy.Hosting.Self.Tests/Nancy.Hosting.Self.Tests.xproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
26 changes: 7 additions & 19 deletions test/Nancy.Owin.Tests/AppBuilderExtensionsFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using global::Owin;

using Microsoft.Owin.Testing;

using Nancy.Testing;

using Xunit;

using HttpStatusCode = Nancy.HttpStatusCode;

public class AppBuilderExtensionsFixture
Expand Down Expand Up @@ -41,7 +35,6 @@ public void When_host_Nancy_via_IAppBuilder_should_read_X509Certificate2()
// Given
var bootstrapper = new ConfigurableBootstrapper(config => config.Module<TestModule>());


using (var server = TestServer.Create(app => app.UseNancy(opts =>
{
opts.Bootstrapper = bootstrapper;
Expand All @@ -65,38 +58,33 @@ public void When_host_Nancy_via_IAppBuilder_should_read_X509Certificate2()
-----END CERTIFICATE-----
";

byte[] embeddedCert = Encoding.UTF8.GetBytes(cert);
var embeddedCert = Encoding.UTF8.GetBytes(cert);

var env = new Dictionary<string, object>()
{
{ "owin.RequestPath", "/ssl" },
{ "owin.RequestScheme", "http" },
{ "owin.RequestHeaders", new Dictionary<string, string[]>() { { "Host", new[] { "localhost" } } } },
{ "owin.RequestMethod", "GET" },
{"ssl.ClientCertificate", new X509Certificate(embeddedCert) }
{ "owin.ResponseHeaders", new Dictionary<string, string[]>() },
{ "ssl.ClientCertificate", new X509Certificate(embeddedCert) }
};
server.Invoke(env);

var result = server.Invoke(env);
result.Wait();

// Then
Assert.Equal(env["owin.ResponseStatusCode"], 200);
}
}
#endif

public class TestModule : NancyModule
{
public TestModule()
{
Get["/"] = _ =>
{
return HttpStatusCode.OK;
};
Get("/", args => HttpStatusCode.OK);

Get("/ssl", args =>
{
return this.Request.ClientCertificate != null ? 200 : 500;
});
Get("/ssl", args => this.Request.ClientCertificate != null ? 200 : 500);
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions test/Nancy.Owin.Tests/Nancy.Owin.Tests.xproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
7 changes: 5 additions & 2 deletions test/Nancy.Testing.Tests/Nancy.Testing.Tests.xproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
7 changes: 5 additions & 2 deletions test/Nancy.Tests.Functional/Nancy.Tests.Functional.xproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
7 changes: 5 additions & 2 deletions test/Nancy.Tests/Nancy.Tests.xproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
Expand All @@ -16,5 +16,8 @@
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
</Project>
Loading

0 comments on commit 301d1d0

Please sign in to comment.