v 1.0.5-rc20-alpha5

in order to build 1.0.5-rc20-alpha5

* fixing dep graph, while moving as must as possible code from Yavsc to
Yavsc.Server
* impoved topmost Makefile
* cleaned the badly desined, ans system redondant "Action" definiton
This commit is contained in:
2018-06-11 14:43:18 +02:00
parent 7412abdf0d
commit 59ff57546b
21 changed files with 24 additions and 8664 deletions

View File

@ -10,43 +10,36 @@ Yavsc.Abstract:
Yavsc.Server: Yavsc.Abstract
$(MAKE) -C Yavsc.Server VERSION=$(VERSION)
Yavsc:
make -C Yavsc restore
Yavsc: Yavsc.Server
make -C Yavsc VERSION=$(VERSION)
Yavsc-deploy-pkg:
Yavsc-deploy-pkg: Yavsc
make -C Yavsc deploy-pkg
Yavsc.Server-deploy-pkg:
Yavsc.Server-deploy-pkg: Yavsc.Server
make -C Yavsc.Server deploy-pkg
Yavsc.Abstract-deploy-pkg: Yavsc
Yavsc.Abstract-deploy-pkg: Yavsc.Abstract
make -C Yavsc.Abstract deploy-pkg
cli-deploy-pkg:
cli-deploy-pkg: cli
make -C cli deploy-pkg
Yavsc.Abstract-deploy-pkg: Yavsc.Abstract
Yavsc-Server: Yavsc.Abstract-deploy-pkg
Yavsc.Server-deploy-pkg: Yavsc-Server
cli: Yavsc.Abstract-deploy-pkg Yavsc.Server-deploy-pkg
make -C cli restore
make -C cli
cli-deploy-pkg: cli
undoLocalYavscNugetDeploy:
rm -rf ~/.dnx/packages/Yavsc.Abstract/$(VERSION)
rm -rf ~/.dnx/packages/Yavsc.Server/$(VERSION)
deploy-pkgs: Yavsc-deploy-pkg cli-deploy-pkg
memo:
vim ~/TODO.md
rc-num:
@echo echo 1-alpha1 < $< ^ $^ @ $@
.PHONY: all $(SUBDIRS)

View File

@ -1,9 +0,0 @@
namespace Yavsc.Server.Helpers
{
public static class DbHelpers
{
// FIXME BUG [fr] DependencyInjection Pourquoi ce champ ne pourrait pas devenir une propriété ?
// : casse à l'execution d'un controlleur, se plaignant d'une valeur nule
public static string ConnectionString = "Server=Your-Server-Adress;Port=5432;Database=YourDadabaseName;Username=YourDatabaseUserName;Password=YourPassword;";
}
}

View File

@ -1,9 +0,0 @@
using System.Threading.Tasks;
namespace Yavsc.Models.Process
{
public abstract class Action<TResult,TInput>
{
public abstract Task<TResult> GetTask(TInput data);
}
}

View File

@ -1,3 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Process
@ -5,7 +6,7 @@ namespace Yavsc.Models.Process
/// <summary>
/// An abstract, identified rule
/// </summary>
public class Rule<TResult,TInput>
public abstract class Rule<TResult,TInput>
{
[Key]
public string Id { get; set; }
@ -28,7 +29,7 @@ namespace Yavsc.Models.Process
public string Description { get; set; }
public Action<TResult,TInput> Execution { get; set; }
public abstract TResult Execute(TInput inputData);
}
}

View File

@ -77,9 +77,9 @@ namespace Yavsc
var auth = Configuration["Site:Authority"];
var cxstr = Configuration["Data:DefaultConnection:ConnectionString"];
DbHelpers.ConnectionString = cxstr;
ConnectionString = cxstr;
}
public static string ConnectionString { get; set; }
public static GoogleAuthSettings GoogleSettings { get; set; }
public IConfigurationRoot Configuration { get; set; }
@ -158,7 +158,7 @@ namespace Yavsc
services.AddEntityFramework()
.AddNpgsql()
.AddDbContext<ApplicationDbContext>(
db => db.UseNpgsql(DbHelpers.ConnectionString)
db => db.UseNpgsql(ConnectionString)
);
ConfigureOAuthServices(services);

View File

@ -26,6 +26,7 @@ using Yavsc.Models;
using Yavsc.Server.Helpers;
using Yavsc.Services;
using Yavsc.Templates;
using Microsoft.Data.Entity;
namespace cli
{
@ -33,8 +34,7 @@ namespace cli
{
public string ConnectionString
{
get { return DbHelpers.ConnectionString; }
private set { DbHelpers.ConnectionString = value; }
get ; set;
}
public static SiteSettings SiteSetup { get; private set; }
@ -79,6 +79,13 @@ namespace cli
{
options.ResourcesPath = "Resources";
});
ConnectionString = Configuration["Data:DefaultConnection:ConnectionString"];
services.AddEntityFramework()
.AddNpgsql()
.AddDbContext<ApplicationDbContext>(
db => db.UseNpgsql(ConnectionString)
);
}
public void Configure (IApplicationBuilder app, IHostingEnvironment env,
@ -88,8 +95,6 @@ namespace cli
loggerFactory.AddDebug();
logger = loggerFactory.CreateLogger<Startup>();
logger.LogInformation(env.EnvironmentName);
var cxstr = Configuration["Data:DefaultConnection:ConnectionString"];
DbHelpers.ConnectionString = cxstr;
}

View File

@ -45,8 +45,7 @@
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
"Newtonsoft.Json": "9.0.1",
"Yavsc.Abstract": { "version": "1.0.5-rc20-alpha5", "target": "package" },
"Yavsc.Server": { "version": "1.0.5-rc20-alpha5", "target": "package" },
"Yavsc": { "version": "1.0.5-rc20-alpha5", "target": "package" }
"Yavsc.Server": { "version": "1.0.5-rc20-alpha5", "target": "package" }
},
"frameworks": {
"dnx451": {}

File diff suppressed because it is too large Load Diff

View File

@ -9,5 +9,3 @@ MAKE=make
NUGETSOURCE=$(HOME)/Nupkgs
VERSION=1.0.5-rc$(rc_num)
CONFIGURATION=Release