Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to ASP.NET Core 1.1 RTM #53

Merged
merged 7 commits into from
Jan 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ build:
verbosity: normal
test_script:
- nunit-console.exe bin\ReleaseTests\RouteJs\RouteJs.Tests.dll bin\ReleaseTests\RouteJs.Mvc5\RouteJs.Tests.Mvc5.dll bin\ReleaseTests\RouteJs.Mvc4\RouteJs.Tests.Mvc4.dll bin\ReleaseTests\RouteJs.Mvc3\RouteJs.Tests.Mvc3.dll bin\ReleaseTests\RouteJs.Mvc2\RouteJs.Tests.Mvc2.dll
- dotnet test src\RouteJs.Tests.AspNet
- dotnet test -c Release src\RouteJs.Tests.AspNet
artifacts:
- path: output\*.nupkg
4 changes: 2 additions & 2 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<!-- NuGet packages for ASP.NET Core projects -->
<Exec
WorkingDirectory="$(MSBuildProjectDirectory)"
Command="dotnet restore --quiet"
Command="dotnet restore --verbosity minimal"
/>
<!-- npm packages -->
<Exec
Expand All @@ -93,7 +93,7 @@
<Target Name="Test" DependsOnTargets="Build">
<Exec
WorkingDirectory="src/RouteJs.Tests.AspNet"
Command="dotnet test"
Command="dotnet test -c Release"
/>
<NUnit
ToolPath="src\packages\NUnit.Runners.2.6.1\tools"
Expand Down
Binary file modified src/.nuget/NuGet.exe
Binary file not shown.
12 changes: 5 additions & 7 deletions src/RouteJs.AspNet/AttributeRouteFetcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ public IEnumerable<RouteInfo> GetRoutes(RouteData routeData)
/// <returns>Route information</returns>
private AttributeRouteInfo ProcessAttributeRoute(ControllerActionDescriptor action)
{
var constraint = action.RouteConstraints
.FirstOrDefault(c => c.RouteKey == TreeRouter.RouteGroupKey);
if (constraint == null ||
constraint.KeyHandling != RouteKeyHandling.RequireKey ||
constraint.RouteValue == null)
string constraint;
action.RouteValues.TryGetValue(TreeRouter.RouteGroupKey, out constraint);
if (string.IsNullOrEmpty(constraint))
{
// This can happen if an ActionDescriptor has a route template, but doesn't have one of our
// special route group constraints. This is a good indication that the user is using a 3rd party
Expand All @@ -96,7 +94,7 @@ private AttributeRouteInfo ProcessAttributeRoute(ControllerActionDescriptor acti
Defaults = GetDefaults(action, template),
Optional = new List<string>(),
Order = action.AttributeRouteInfo.Order,
Precedence = RoutePrecedence.ComputeGenerated(template),
Precedence = RoutePrecedence.ComputeOutbound(template),
};
_parser.Parse(template, info);

Expand Down Expand Up @@ -149,7 +147,7 @@ private IDictionary<string, object> GetDefaults(ControllerActionDescriptor actio
);

defaults.Add("controller", action.ControllerName);
defaults.Add("action", action.Name);
defaults.Add("action", action.ActionName);
return defaults;
}

Expand Down
1 change: 1 addition & 0 deletions src/RouteJs.AspNet/IRouteJsHelper.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Rendering;

namespace RouteJs
Expand Down
2 changes: 1 addition & 1 deletion src/RouteJs.AspNet/RouteJsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Html;

namespace RouteJs
{
Expand Down
14 changes: 7 additions & 7 deletions src/RouteJs.AspNet/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"description": "JavaScript URL routing for ASP.NET Core (vNext) and MVC 6. Allows you to use your ASP.NET MVC routes from JavaScript. Please refer to project site (http://dan.cx/projects/routejs) for more details, usage examples and sample code.",

"dependencies": {
"Microsoft.AspNetCore.Http": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Http.Abstractions": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Routing": "1.0.0-rc2-final"
"Microsoft.AspNetCore.Html.Abstractions": "1.1.0",
"Microsoft.AspNetCore.Http": "1.1.0",
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.Routing": "1.1.0"
},
"frameworks": {
"net451": {
Expand All @@ -18,13 +18,13 @@
"pdb": "../../bin/RouteJs.AspNet/bin/{configuration}/net451/RouteJs.AspNet.pdb"
}
},
"netstandard1.5": {
"netstandard1.6": {
"imports": [
"dnxcore50"
],
"bin": {
"assembly": "../../bin/RouteJs.AspNet/bin/{configuration}/netstandard1.5/RouteJs.AspNet.dll",
"pdb": "../../bin/RouteJs.AspNet/bin/{configuration}/netstandard1.5/RouteJs.AspNet.pdb"
"assembly": "../../bin/RouteJs.AspNet/bin/{configuration}/netstandard1.6/RouteJs.AspNet.dll",
"pdb": "../../bin/RouteJs.AspNet/bin/{configuration}/netstandard1.6/RouteJs.AspNet.pdb"
}
}
},
Expand Down
14 changes: 7 additions & 7 deletions src/RouteJs.Samples.Mvc6/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"version": "1.0.0-*",

"dependencies": {
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
"RouteJs.AspNet": {
"target": "project"
},
"Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
"Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-final"
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.StaticFiles": "1.1.0",
"Microsoft.Extensions.Logging.Console": "1.1.0",
"Microsoft.Extensions.Logging.Debug": "1.1.0",
"Microsoft.AspNetCore.Diagnostics": "1.1.0"
},

"tools": {
Expand Down
3 changes: 2 additions & 1 deletion src/RouteJs.Tests.AspNet/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"authors": [ "Daniel Lo Nigro" ],

"dependencies": {
"Microsoft.AspNetCore.Routing": "1.0.0-rc2-final",
"Microsoft.DotNet.InternalAbstractions": "1.0.0",
"Microsoft.AspNetCore.Routing": "1.1.0",
"Moq": "4.2.1510.2205",
"RouteJs.AspNet": {
"target": "project"
Expand Down
Loading