Skip to content

Commit

Permalink
Merge pull request #10 from ordercloud-api/dev
Browse files Browse the repository at this point in the history
0.4.0
  • Loading branch information
tmenier authored Nov 7, 2018
2 parents 15d1052 + 273304b commit f304c51
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 37 deletions.
18 changes: 9 additions & 9 deletions src/OrderCloud.AzureApp/OrderCloud.AzureApp.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>0.3.0</Version>
<Version>0.4.0</Version>

<PackageId>OrderCloud.AzureApp</PackageId>
<Title>OrderCloud SDK Extensions for Azure App Services</Title>
Expand All @@ -23,13 +23,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="2.0.3" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.0.2" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.0.1" />
<PackageReference Include="OrderCloud.SDK" Version="0.6.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.2.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.1.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="2.1.2" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.1.1" />
<PackageReference Include="OrderCloud.SDK" Version="0.6.9" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.3.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/OrderCloud.AzureApp/WebhookActionSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ from a in candidates
return false; // none of our ambiguous candidates are specific webhook handlers

if (ReadWebhookPayload(context, out var verb, out var route)) {
var matchingHandlers = webhookHandlers.Where(h => h.SentOn.Verb == verb && h.SentOn.Route == route).ToList();
var matchingHandlers = webhookHandlers.Where(h => h.SentOn.Verb.Equals(verb, StringComparison.OrdinalIgnoreCase) && h.SentOn.Route == route).ToList();
if (matchingHandlers.Count == 1) {
// found exactly 1 matching webhook handler. woo!
result = matchingHandlers[0].Action;
Expand Down
8 changes: 4 additions & 4 deletions tests/OrderCloud.TestWebApi/OrderCloud.TestWebApi.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" />
<PackageReference Include="OrderCloud.SDK" Version="0.6.1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.5" />
<PackageReference Include="OrderCloud.SDK" Version="0.6.9" />
</ItemGroup>

<ItemGroup>
Expand Down
17 changes: 1 addition & 16 deletions tests/OrderCloud.Tests/AzureApp/IntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,6 @@ public override void ConfigureServices(IServiceCollection services) {

public static class TestServerExtensions
{
public static IFlurlClient CreateFlurlClient(this TestServer server) {
var fc = new FlurlClient(server.BaseAddress.AbsoluteUri);
fc.Settings.HttpClientFactory = new TestServerHttpClientFactory(server);
return fc;
}

private class TestServerHttpClientFactory : DefaultHttpClientFactory
{
private readonly TestServer _server;

public TestServerHttpClientFactory(TestServer server) {
_server = server;
}

public override HttpClient CreateHttpClient(HttpMessageHandler handler) => _server.CreateClient();
}
public static IFlurlClient CreateFlurlClient(this TestServer server) => new FlurlClient(server.CreateClient());
}
}
14 changes: 7 additions & 7 deletions tests/OrderCloud.Tests/OrderCloud.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<PackageReference Include="FluentAssertions" Version="5.4.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="NSubstitute" Version="3.1.0" />
<PackageReference Include="NUnit" Version="3.10.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.11.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit f304c51

Please sign in to comment.