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

✨ utilise updated module availability in Chapter 4 #148

Merged
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 .github/workflows/chapter-4-contracts-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
with:
dotnet-version: 8.0.x
- name: Add Evolutionary Architecture Nuget Source
uses: evolutionary-architecture/evolutionary-architecture-by-example/.github@feature/nuget_config
uses: evolutionary-architecture/evolutionary-architecture-by-example/.github@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ github.repository_owner }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/chapter-4-package-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ jobs:
dotnet pack Fitnet.Common.IntegrationTestsToolbox/Fitnet.Common.IntegrationTestsToolbox.csproj -c Release
dotnet pack Fitnet.Common.UnitTesting/Fitnet.Common.UnitTesting.csproj -c Release

- name: Prepare Packages
run: dotnet nuget add source --username $OWNER --password $GITHUB_TOKEN --store-password-in-clear-text --name github "https://nuget.pkg.github.com/$OWNER/index.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
- name: Add Evolutionary Architecture Nuget Source
uses: evolutionary-architecture/evolutionary-architecture-by-example/.github@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ github.repository_owner }}
path: ${{ env.CHAPTER_DIR }}

- name: Publish Packages
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
}
},
"AllowedHosts": "*",
"FeatureManagement": {
"Contracts": true,
"Offers": true,
"Passes": true,
"Reports": true
"Modules": {
"Passes": {
"Enabled": true
},
"Reports": {
"Enabled": true
},
"Offers": {
"Enabled": true
}
},
"ConnectionStrings": {
"Passes": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"Passes": {
"Enabled": false
},
"Contracts": {
"Enabled": false
},
"Reports": {
"Enabled": false
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"Passes": {
"Enabled": true
},
"Contracts": {
"Enabled": false
},
"Reports": {
"Enabled": false
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"Passes": {
"Enabled": true
},
"Contracts": {
"Enabled": false
},
"Reports": {
"Enabled": true
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<ItemGroup>
<PackageReference Include="Bogus" Version="35.5.1" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="xunit.analyzers" Version="1.10.0">
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.analyzers" Version="1.11.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="ErrorOr" Version="2.0.1" />
<PackageReference Include="evolutionaryarchitecture.fitnet.common.api" Version="4.1.2" />
<PackageReference Include="evolutionaryarchitecture.fitnet.common.api" Version="4.1.6" />
<PackageReference Include="evolutionaryarchitecture.fitnet.contracts.integrationevents" Version="1.0.7" />
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="MassTransit.Abstractions" Version="8.2.2" />
<PackageReference Include="MediatR" Version="12.2.0" />
<PackageReference Include="MediatR" Version="12.3.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Fitnet.Contracts.Core\Fitnet.Contracts.Core.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

<ItemGroup>
<PackageReference Include="Bogus" Version="35.5.1" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Core" Version="4.1.2" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.UnitTesting" Version="4.1.5" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Core" Version="4.1.6" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.UnitTesting" Version="4.1.6" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="xunit.analyzers" Version="1.10.0">
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="xunit.analyzers" Version="1.14.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<ItemGroup>
<PackageReference Include="ErrorOr" Version="2.0.1" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Core" Version="4.1.2" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Core" Version="4.1.6" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.DomainDrivenDesign.BuildingBlocks" Version="1.2.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ItemGroup>
<PackageReference Include="MassTransit" Version="8.2.2" />
<PackageReference Include="MassTransit.RabbitMQ" Version="8.2.2" />
<PackageReference Include="MediatR" Version="12.2.0" />
<PackageReference Include="MediatR" Version="12.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<Version>1.0.7</Version>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Infrastructure" Version="4.1.2" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Infrastructure" Version="4.1.6" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="evolutionaryarchitecture.fitnet.common.api" Version="4.1.2" />
<PackageReference Include="evolutionaryarchitecture.fitnet.common.integrationteststoolbox" Version="4.1.2" />
<PackageReference Include="evolutionaryarchitecture.fitnet.common.api" Version="4.1.6" />
<PackageReference Include="evolutionaryarchitecture.fitnet.common.integrationteststoolbox" Version="4.1.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
{
"FeatureManagement": {
"Contracts": true,
"Offers": false,
"Passes": false,
"Reports": false
"Modules": {
"Passes": {
"Enabled": false
},
"Contracts": {
"Enabled": true
},
"Reports": {
"Enabled": false
},
"Offers": {
"Enabled": false
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Api" Version="4.1.2" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Api" Version="4.1.6" />
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Global using directives

global using JetBrains.Annotations;
global using Microsoft.FeatureManagement;
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
builder.Services.AddSingleton(TimeProvider.System);
builder.Services.AddFeatureManagement();
builder.Services.AddClock();

builder.Services.AddContractsApi(builder.Configuration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
}
},
"AllowedHosts": "*",
"FeatureManagement": {
"Contracts": true,
},
"ConnectionStrings": {
"Contracts": ""
},
Expand All @@ -17,4 +14,4 @@
"Username": "guest",
"Password": "guest"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<ItemGroup>
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Global using directives

global using JetBrains.Annotations;
global using Microsoft.FeatureManagement;
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();

builder.Services.AddFeatureManagement();
builder.Services.AddClock();

builder.Services.AddPasses(builder.Configuration, Module.Passes);
builder.Services.AddOffers(builder.Configuration, Module.Offers);
builder.Services.AddReports(Module.Reports);
builder.Services.AddReports(builder.Configuration, Module.Reports);

var app = builder.Build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
}
},
"AllowedHosts": "*",
"FeatureManagement": {
"Contracts": true,
"Offers": true,
"Passes": true,
"Reports": true
"Modules": {
"Passes": {
"Enabled": true
},
"Reports": {
"Enabled": true
},
"Offers": {
"Enabled": true
}
},
"ConnectionStrings": {
"Passes": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="evolutionaryarchitecture.fitnet.common.core" Version="4.1.1" />
<PackageReference Include="evolutionaryarchitecture.fitnet.common.core" Version="4.1.6" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace EvolutionaryArchitecture.Fitnet.Offers.Api;

using Common.Infrastructure.Modules;
using DataAccess;
using Common.Infrastructure.Mediator;
using System.Reflection;
using Common.Infrastructure.Modules;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -12,7 +12,7 @@ public static class OffersModule
{
public static void RegisterOffers(this WebApplication app, string module)
{
if (!app.IsModuleEnabled(module))
if (!app.Configuration.IsModuleEnabled(module))
{
return;
}
Expand All @@ -23,7 +23,7 @@ public static void RegisterOffers(this WebApplication app, string module)
public static IServiceCollection AddOffers(this IServiceCollection services, IConfiguration configuration,
string module)
{
if (!services.IsModuleEnabled(module))
if (!configuration.IsModuleEnabled(module))
{
return services;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="evolutionaryarchitecture.fitnet.common.integrationteststoolbox" Version="4.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="evolutionaryarchitecture.fitnet.common.integrationteststoolbox" Version="4.1.6" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"FeatureManagement": {
"Contracts": false,
"Offers": true,
"Passes": false,
"Reports": false
"Modules": {
"Passes": {
"Enabled": false
},
"Reports": {
"Enabled": false
},
"Offers": {
"Enabled": true
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Api" Version="4.1.1" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Core" Version="4.1.1" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Api" Version="4.1.6" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Common.Core" Version="4.1.6" />
<PackageReference Include="EvolutionaryArchitecture.Fitnet.Contracts.IntegrationEvents" Version="1.0.7" />
<PackageReference Include="MassTransit.EntityFrameworkCore" Version="8.1.3" />
<PackageReference Include="MassTransit.RabbitMQ" Version="8.1.3" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0" />
<PackageReference Include="MassTransit.EntityFrameworkCore" Version="8.2.2" />
<PackageReference Include="MassTransit.RabbitMQ" Version="8.2.2" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.6" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static class PassesModule
{
public static void RegisterPasses(this WebApplication app, string module)
{
if (!app.IsModuleEnabled(module))
if (!app.Configuration.IsModuleEnabled(module))
{
return;
}
Expand All @@ -25,7 +25,7 @@ public static void RegisterPasses(this WebApplication app, string module)
public static IServiceCollection AddPasses(this IServiceCollection services, IConfiguration configuration,
string module)
{
if (!services.IsModuleEnabled(module))
if (!configuration.IsModuleEnabled(module))
{
return services;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="MassTransit.EntityFrameworkCore" Version="8.1.3" />
<PackageReference Include="MassTransit.EntityFrameworkCore" Version="8.2.2" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
</ItemGroup>
</Project>
Loading
Loading