Added travisyml

pull/13/head
tidusjar 9 years ago
parent 55a5ad57ba
commit 2752a14407

@ -0,0 +1,10 @@
language: csharp
solution: PlexRequests.sln
install:
- nuget restore PlexRequests.sln
- nuget install NUnit.Runners -OutputDirectory testrunner
script:
- xbuild /p:Configuration=Release PlexRequests.sln
notifications:
email:
- jamierees@outlook.com

@ -60,7 +60,7 @@ namespace PlexRequests.Store
public T Get(string id)
{
throw new NotImplementedException();
throw new NotSupportedException("Get(string) is not supported. Use Get(int)");
}
public T Get(int id)

@ -72,7 +72,7 @@ namespace PlexRequests.Store
public T Get(int id)
{
throw new NotImplementedException();
throw new NotSupportedException("Get(int) is not supported. Use Get(string)");
}
public void Delete(T entity)

@ -25,7 +25,10 @@
// ************************************************************************/
#endregion
using Nancy;
using Nancy.Responses.Negotiation;
using PlexRequests.Core;
using PlexRequests.Core.SettingModels;
using PlexRequests.UI.Models;
namespace PlexRequests.UI.Modules
@ -37,12 +40,20 @@ namespace PlexRequests.UI.Modules
// TODO: Allow the user of a username only or a Username and password
public class UserLoginModule : NancyModule
{
public UserLoginModule() : base("userlogin")
public UserLoginModule(ISettingsService<AuthenticationSettings> auth) : base("userlogin")
{
Get["/"] = _ => View["Index"];
AuthService = auth;
Get["/"] = _ => Index();
Post["/"] = x => LoginUser();
}
public Negotiator Index()
{
var settings = AuthService.GetSettings();
return View["Index", settings];
}
private ISettingsService<AuthenticationSettings> AuthService { get; set; }
private Response LoginUser()
{
var username = Request.Form.username;

@ -15,6 +15,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Store", "PlexR
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F4BC839C-B8FF-48BE-B22E-536A0A0A81A5}"
ProjectSection(SolutionItems) = preProject
.travis.yml = .travis.yml
LICENSE = LICENSE
README.md = README.md
EndProjectSection

Loading…
Cancel
Save