From 56ba4798965e5c880608a5fde337cb3e5cb5fd9c Mon Sep 17 00:00:00 2001 From: Chris Cheetham Date: Tue, 15 Feb 2022 13:33:29 -0500 Subject: [PATCH] Rename project to InitializrService --- Dockerfile | 2 +- README.md | 18 ++++++++--------- ...rApi.sln => Steeltoe.InitializrService.sln | 12 +++++------ ...Steeltoe.InitializrService.sln.DotSettings | 0 Version.props | 2 +- azure-pipelines.yaml | 6 +++--- setversion.sh | 3 ++- src/Directory.Build.props | 2 +- .../ReleaseRange.cs | 4 ++-- .../Steeltoe.InitializrService.Config.csproj} | 0 .../UiConfig.cs | 4 ++-- .../Utilities/ReleaseRangeJsonConverter.cs | 2 +- .../Utilities/ReleaseRangeYamlConverter.cs | 2 +- .../Configuration/UiConfigFile.cs | 12 +++++------ .../Configuration/UiConfigService.cs | 8 ++++---- .../Controllers/AboutController.cs | 4 ++-- .../InitializrServiceControllerBase.cs} | 10 +++++----- .../Controllers/ProjectController.cs | 10 +++++----- .../Controllers/RootController.cs | 18 ++++++++--------- .../Controllers/UiConfigController.cs | 6 +++--- .../Generators/NetCoreToolProjectGenerator.cs | 10 +++++----- .../InitializrServiceOptions.cs} | 6 +++--- .../Models/About.cs | 2 +- .../Models/ProjectSpec.cs | 2 +- .../Program.cs | 6 +++--- .../Properties/launchSettings.json | 0 .../Resources/logo.txt | 0 .../Resources/uiconfig.Development.json | 0 .../Services/IProjectGenerator.cs | 4 ++-- .../Services/IUiConfigService.cs | 4 ++-- .../Services/InitializrServiceBase.cs} | 10 +++++----- .../Startup.cs | 18 ++++++++--------- .../Steeltoe.InitializrService.csproj} | 2 +- .../Utilities/Serializer.cs | 4 ++-- .../appsettings.Development.json | 4 ++-- .../appsettings.Docker.json | 2 +- .../appsettings.Staging.json | 2 +- .../appsettings.json | 4 ++-- .../HttpTests.cs | 4 ++-- .../ModelTests.cs | 6 +++--- .../ProgramTests.cs | 6 +++--- ...InitializrService.Test.Integration.csproj} | 4 ++-- .../InitializrConfigServiceTests.cs | 2 +- .../InitializrServiceOptionsTests.cs} | 20 +++++++++---------- .../Controllers/AboutControllerTests.cs | 10 +++++----- .../Controllers/ProjectControllerTests.cs | 10 +++++----- .../Controllers/RootControllerTests.cs | 12 +++++------ .../Controllers/UiConfigControllerTests.cs | 8 ++++---- .../Models/AboutTests.cs | 4 ++-- .../Models/ProjectSpecTests.cs | 4 ++-- .../Models/ReleaseRangeTests.cs | 4 ++-- .../Models/UiConfigTests.cs | 4 ++-- ...eeltoe.InitializrService.Test.Unit.csproj} | 4 ++-- .../Utilities/SerializerTest.cs | 4 ++-- .../MockLoggerExtensions.cs | 2 +- .../MockProjectTemplateWebRequest.cs | 2 +- .../MockProjectTemplateWebResponse.cs | 2 +- .../MockProjectTemplateWebScheme.cs | 2 +- ...eltoe.InitializrService.Test.Utils.csproj} | 0 .../TempFile.cs | 2 +- 60 files changed, 161 insertions(+), 160 deletions(-) rename Steeltoe.InitializrApi.sln => Steeltoe.InitializrService.sln (88%) rename Steeltoe.InitializrApi.sln.DotSettings => Steeltoe.InitializrService.sln.DotSettings (100%) rename src/{InitializrApi.Config => InitializrService.Config}/ReleaseRange.cs (99%) rename src/{InitializrApi.Config/Steeltoe.InitializrApi.Config.csproj => InitializrService.Config/Steeltoe.InitializrService.Config.csproj} (100%) rename src/{InitializrApi.Config => InitializrService.Config}/UiConfig.cs (98%) rename src/{InitializrApi.Config => InitializrService.Config}/Utilities/ReleaseRangeJsonConverter.cs (94%) rename src/{InitializrApi.Config => InitializrService.Config}/Utilities/ReleaseRangeYamlConverter.cs (97%) rename src/{InitializrApi => InitializrService}/Configuration/UiConfigFile.cs (85%) rename src/{InitializrApi => InitializrService}/Configuration/UiConfigService.cs (90%) rename src/{InitializrApi => InitializrService}/Controllers/AboutController.cs (92%) rename src/{InitializrApi/Controllers/InitializrApiControllerBase.cs => InitializrService/Controllers/InitializrServiceControllerBase.cs} (80%) rename src/{InitializrApi => InitializrService}/Controllers/ProjectController.cs (96%) rename src/{InitializrApi => InitializrService}/Controllers/RootController.cs (93%) rename src/{InitializrApi => InitializrService}/Controllers/UiConfigController.cs (96%) rename src/{InitializrApi => InitializrService}/Generators/NetCoreToolProjectGenerator.cs (90%) rename src/{InitializrApi/InitializrApiOptions.cs => InitializrService/InitializrServiceOptions.cs} (89%) rename src/{InitializrApi => InitializrService}/Models/About.cs (96%) rename src/{InitializrApi => InitializrService}/Models/ProjectSpec.cs (98%) rename src/{InitializrApi => InitializrService}/Program.cs (96%) rename src/{InitializrApi => InitializrService}/Properties/launchSettings.json (100%) rename src/{InitializrApi => InitializrService}/Resources/logo.txt (100%) rename src/{InitializrApi => InitializrService}/Resources/uiconfig.Development.json (100%) rename src/{InitializrApi => InitializrService}/Services/IProjectGenerator.cs (95%) rename src/{InitializrApi => InitializrService}/Services/IUiConfigService.cs (85%) rename src/{InitializrApi/Services/InitializrApiServiceBase.cs => InitializrService/Services/InitializrServiceBase.cs} (73%) rename src/{InitializrApi => InitializrService}/Startup.cs (86%) rename src/{InitializrApi/Steeltoe.InitializrApi.csproj => InitializrService/Steeltoe.InitializrService.csproj} (91%) rename src/{InitializrApi => InitializrService}/Utilities/Serializer.cs (95%) rename src/{InitializrApi => InitializrService}/appsettings.Development.json (81%) rename src/{InitializrApi => InitializrService}/appsettings.Docker.json (75%) rename src/{InitializrApi => InitializrService}/appsettings.Staging.json (51%) rename src/{InitializrApi => InitializrService}/appsettings.json (88%) rename test/{InitializrApi.Test.Integration => InitializrService.Test.Integration}/HttpTests.cs (98%) rename test/{InitializrApi.Test.Integration => InitializrService.Test.Integration}/ModelTests.cs (93%) rename test/{InitializrApi.Test.Integration => InitializrService.Test.Integration}/ProgramTests.cs (89%) rename test/{InitializrApi.Test.Integration/Steeltoe.InitializrApi.Test.Integration.csproj => InitializrService.Test.Integration/Steeltoe.InitializrService.Test.Integration.csproj} (50%) rename test/{InitializrApi.Test.Unit => InitializrService.Test.Unit}/Configuration/InitializrConfigServiceTests.cs (92%) rename test/{InitializrApi.Test.Unit/Configuration/InitializrApiOptionsTests.cs => InitializrService.Test.Unit/Configuration/InitializrServiceOptionsTests.cs} (85%) rename test/{InitializrApi.Test.Unit => InitializrService.Test.Unit}/Controllers/AboutControllerTests.cs (87%) rename test/{InitializrApi.Test.Unit => InitializrService.Test.Unit}/Controllers/ProjectControllerTests.cs (98%) rename test/{InitializrApi.Test.Unit => InitializrService.Test.Unit}/Controllers/RootControllerTests.cs (93%) rename test/{InitializrApi.Test.Unit => InitializrService.Test.Unit}/Controllers/UiConfigControllerTests.cs (88%) rename test/{InitializrApi.Test.Unit => InitializrService.Test.Unit}/Models/AboutTests.cs (92%) rename test/{InitializrApi.Test.Unit => InitializrService.Test.Unit}/Models/ProjectSpecTests.cs (94%) rename test/{InitializrApi.Test.Unit => InitializrService.Test.Unit}/Models/ReleaseRangeTests.cs (99%) rename test/{InitializrApi.Test.Unit => InitializrService.Test.Unit}/Models/UiConfigTests.cs (95%) rename test/{InitializrApi.Test.Unit/Steeltoe.InitializrApi.Test.Unit.csproj => InitializrService.Test.Unit/Steeltoe.InitializrService.Test.Unit.csproj} (50%) rename test/{InitializrApi.Test.Unit => InitializrService.Test.Unit}/Utilities/SerializerTest.cs (93%) rename test/{InitializrApi.Test.Utils => InitializrService.Test.Utils}/MockLoggerExtensions.cs (95%) rename test/{InitializrApi.Test.Utils => InitializrService.Test.Utils}/MockProjectTemplateWebRequest.cs (92%) rename test/{InitializrApi.Test.Utils => InitializrService.Test.Utils}/MockProjectTemplateWebResponse.cs (99%) rename test/{InitializrApi.Test.Utils => InitializrService.Test.Utils}/MockProjectTemplateWebScheme.cs (90%) rename test/{InitializrApi.Test.Utils/Steeltoe.InitializrApi.Test.Utils.csproj => InitializrService.Test.Utils/Steeltoe.InitializrService.Test.Utils.csproj} (100%) rename test/{InitializrApi.Test.Utils => InitializrService.Test.Utils}/TempFile.cs (96%) diff --git a/Dockerfile b/Dockerfile index 1d2193d..a5e7186 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,4 +12,4 @@ RUN curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for && chmod +x wait-for-it COPY --from=build /srv . ENV DOTNET_URLS http://0.0.0.0:80 -ENTRYPOINT ["dotnet", "Steeltoe.InitializrApi.dll"] +ENTRYPOINT ["dotnet", "Steeltoe.InitializrService.dll"] diff --git a/README.md b/README.md index 3da3d9e..2184410 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ -# Steeltoe InitializrApi +# Steeltoe InitializrService -Steeltoe Initializr API reference implementation +Steeltoe Initializr Service reference implementation -[![Build Status](https://dev.azure.com/SteeltoeOSS/Steeltoe/_apis/build/status/Initializr/SteeltoeOSS.InitializrApi?branchName=main)](https://dev.azure.com/SteeltoeOSS/Steeltoe/_build/latest?definitionId=31&branchName=main) +[![Build Status](https://dev.azure.com/SteeltoeOSS/Steeltoe/_apis/build/status/Initializr/SteeltoeOSS.InitializrService?branchName=main)](https://dev.azure.com/SteeltoeOSS/Steeltoe/_build/latest?definitionId=31&branchName=main) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=InitializrApi&metric=alert_status)](https://sonarcloud.io/dashboard?id=InitializrApi) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=InitializrService&metric=alert_status)](https://sonarcloud.io/dashboard?id=InitializrService) ## Using the Server -_InitializrApi_ provides 4 REST/HTTP endpoints: +_InitializrService_ provides 4 REST/HTTP endpoints: * `api/` * `api/about` * `api/config` @@ -42,8 +42,8 @@ The URI templates take a set of parameters to customize the result of a request. $ http -p b https://start.steeltoe.io/api/about { "commit": "381bbd2a1e30d621ed6ad4a07790955447ffe468", - "name": "Steeltoe.InitializrApi", - "url": "https://github.com/SteeltoeOSS/InitializrApi/", + "name": "Steeltoe.InitializrService", + "url": "https://github.com/SteeltoeOSS/InitializrService/", "vendor": "SteeltoeOSS/VMware", "version": "0.8.0" } @@ -51,7 +51,7 @@ $ http -p b https://start.steeltoe.io/api/about ### `api/config` -`api/config` accepts GET requests and returns _InitializrApi_ configuration. +`api/config` accepts GET requests and returns _InitializrService_ configuration. The returned document includes _all_ configuration. Sub-endpoints are available allowing for more targeted responses. @@ -131,7 +131,7 @@ The former is recommended for production deployments; the latter is intended pri The Initializr API uses the [Steeltoe Config Server Provider](https://docs.steeltoe.io/api/v3/configuration/config-server-provider.html) to get configuration from a Spring Cloud Config Server. The _InitializrAPI_ running at https://start.steeltoe.io/api/ uses a Spring Cloud Config Server backended at https://github.com/SteeltoeOSS/InitializrConfig. -The following `appsettings.json` sample snippet is part of the _InitializrApi_'s configuration: +The following `appsettings.json` sample snippet is part of the _InitializrService_'s configuration: ```json ..., "spring": { diff --git a/Steeltoe.InitializrApi.sln b/Steeltoe.InitializrService.sln similarity index 88% rename from Steeltoe.InitializrApi.sln rename to Steeltoe.InitializrService.sln index fda426f..5f38547 100644 --- a/Steeltoe.InitializrApi.sln +++ b/Steeltoe.InitializrService.sln @@ -2,15 +2,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30320.27 MinimumVisualStudioVersion = 15.0.26124.0 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steeltoe.InitializrApi", "src\InitializrApi\Steeltoe.InitializrApi.csproj", "{7597F74D-528E-448B-BBE8-994092F04CA4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steeltoe.InitializrService", "src\InitializrService\Steeltoe.InitializrService.csproj", "{7597F74D-528E-448B-BBE8-994092F04CA4}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steeltoe.InitializrApi.Config", "src\InitializrApi.Config\Steeltoe.InitializrApi.Config.csproj", "{ACE6FEE1-9CEA-4A95-9D76-C62A41947C8F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steeltoe.InitializrService.Config", "src\InitializrService.Config\Steeltoe.InitializrService.Config.csproj", "{ACE6FEE1-9CEA-4A95-9D76-C62A41947C8F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Steeltoe.InitializrApi.Test.Utils", "test\InitializrApi.Test.Utils\Steeltoe.InitializrApi.Test.Utils.csproj", "{EC08DC14-11D5-40D3-8908-BDB0D789F48D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Steeltoe.InitializrService.Test.Utils", "test\InitializrService.Test.Utils\Steeltoe.InitializrService.Test.Utils.csproj", "{EC08DC14-11D5-40D3-8908-BDB0D789F48D}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steeltoe.InitializrApi.Test.Unit", "test\InitializrApi.Test.Unit\Steeltoe.InitializrApi.Test.Unit.csproj", "{EA849C8F-7118-45DB-BBF2-D36CE1FD43B4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steeltoe.InitializrService.Test.Unit", "test\InitializrService.Test.Unit\Steeltoe.InitializrService.Test.Unit.csproj", "{EA849C8F-7118-45DB-BBF2-D36CE1FD43B4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Steeltoe.InitializrApi.Test.Integration", "test\InitializrApi.Test.Integration\Steeltoe.InitializrApi.Test.Integration.csproj", "{24A2AB13-F4C4-4C88-B67D-D280610240B8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Steeltoe.InitializrService.Test.Integration", "test\InitializrService.Test.Integration\Steeltoe.InitializrService.Test.Integration.csproj", "{24A2AB13-F4C4-4C88-B67D-D280610240B8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F80B44AC-7383-40DA-B353-16163BF279F1}" ProjectSection(SolutionItems) = preProject @@ -21,7 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Directory.Build.props = Directory.Build.props docker-compose.yaml = docker-compose.yaml Dockerfile = Dockerfile - Steeltoe.InitializrApi.sln.DotSettings = Steeltoe.InitializrApi.sln.DotSettings + Steeltoe.InitializrService.sln.DotSettings = Steeltoe.InitializrService.sln.DotSettings LICENSE = LICENSE README.md = README.md stylecop.json = stylecop.json diff --git a/Steeltoe.InitializrApi.sln.DotSettings b/Steeltoe.InitializrService.sln.DotSettings similarity index 100% rename from Steeltoe.InitializrApi.sln.DotSettings rename to Steeltoe.InitializrService.sln.DotSettings diff --git a/Version.props b/Version.props index efc6524..d86498c 100644 --- a/Version.props +++ b/Version.props @@ -2,7 +2,7 @@ 6.0.7 - 0.0.0 + 0.0.0 3.1.0 8.1.2 diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml index 5922ccd..81c1cbd 100644 --- a/azure-pipelines.yaml +++ b/azure-pipelines.yaml @@ -5,7 +5,7 @@ variables: - name: major value: 0 - name: minor - value: 23 + value: 24 - name: patch value: 0 - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE @@ -40,7 +40,7 @@ stages: inputs: SonarCloud: SonarCloud organization: steeltoeoss - projectKey: InitializrApi + projectKey: InitializrService extraProperties: | sonar.cs.opencover.reportsPaths=$(Build.SourcesDirectory)/**/*.opencover.xml - task: DotNetCoreCLI@2 @@ -72,7 +72,7 @@ stages: displayName: dotnet pack inputs: command: pack - packagesToPack: src/InitializrApi.Config + packagesToPack: src/InitializrService.Config arguments: --no-build - task: Powershell@2 displayName: Sign NuGets diff --git a/setversion.sh b/setversion.sh index dd92710..8b65fe5 100755 --- a/setversion.sh +++ b/setversion.sh @@ -74,4 +74,5 @@ fi echo "Setting version to $major.$minor.$patch" -$sed -i 's:.*:'$major.$minor.$patch':' $base_dir/Version.props +$sed -i +'s:.*:'$major.$minor.$patch':' $base_dir/Version.props diff --git a/src/Directory.Build.props b/src/Directory.Build.props index f64feff..3192f3a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -20,7 +20,7 @@ - $(SteeltoeInitializrApiVersion) + $(SteeltoeInitializrServiceVersion) $(BUILD_BUILDNUMBER) diff --git a/src/InitializrApi.Config/ReleaseRange.cs b/src/InitializrService.Config/ReleaseRange.cs similarity index 99% rename from src/InitializrApi.Config/ReleaseRange.cs rename to src/InitializrService.Config/ReleaseRange.cs index 1764809..c42f8de 100644 --- a/src/InitializrApi.Config/ReleaseRange.cs +++ b/src/InitializrService.Config/ReleaseRange.cs @@ -2,13 +2,13 @@ // The .NET Foundation licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -using Steeltoe.InitializrApi.Config.Utilities; +using Steeltoe.InitializrService.Config.Utilities; using System; using System.Linq; using System.Text; using System.Text.Json.Serialization; -namespace Steeltoe.InitializrApi.Config +namespace Steeltoe.InitializrService.Config { /// /// A model of a release range. diff --git a/src/InitializrApi.Config/Steeltoe.InitializrApi.Config.csproj b/src/InitializrService.Config/Steeltoe.InitializrService.Config.csproj similarity index 100% rename from src/InitializrApi.Config/Steeltoe.InitializrApi.Config.csproj rename to src/InitializrService.Config/Steeltoe.InitializrService.Config.csproj diff --git a/src/InitializrApi.Config/UiConfig.cs b/src/InitializrService.Config/UiConfig.cs similarity index 98% rename from src/InitializrApi.Config/UiConfig.cs rename to src/InitializrService.Config/UiConfig.cs index cb4bea7..8dee0ae 100644 --- a/src/InitializrApi.Config/UiConfig.cs +++ b/src/InitializrService.Config/UiConfig.cs @@ -2,10 +2,10 @@ // The .NET Foundation licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -namespace Steeltoe.InitializrApi.Config +namespace Steeltoe.InitializrService.Config { /// - /// A model of an InitializrApi server configuration. + /// A model of an InitializrService server configuration. /// public sealed class UiConfig { diff --git a/src/InitializrApi.Config/Utilities/ReleaseRangeJsonConverter.cs b/src/InitializrService.Config/Utilities/ReleaseRangeJsonConverter.cs similarity index 94% rename from src/InitializrApi.Config/Utilities/ReleaseRangeJsonConverter.cs rename to src/InitializrService.Config/Utilities/ReleaseRangeJsonConverter.cs index e9ffa45..3c8b1a0 100644 --- a/src/InitializrApi.Config/Utilities/ReleaseRangeJsonConverter.cs +++ b/src/InitializrService.Config/Utilities/ReleaseRangeJsonConverter.cs @@ -6,7 +6,7 @@ using System; using System.Text.Json; using System.Text.Json.Serialization; -namespace Steeltoe.InitializrApi.Config.Utilities +namespace Steeltoe.InitializrService.Config.Utilities { /// /// Deserializes a in JSON expressions. diff --git a/src/InitializrApi.Config/Utilities/ReleaseRangeYamlConverter.cs b/src/InitializrService.Config/Utilities/ReleaseRangeYamlConverter.cs similarity index 97% rename from src/InitializrApi.Config/Utilities/ReleaseRangeYamlConverter.cs rename to src/InitializrService.Config/Utilities/ReleaseRangeYamlConverter.cs index 38d4a19..2214752 100644 --- a/src/InitializrApi.Config/Utilities/ReleaseRangeYamlConverter.cs +++ b/src/InitializrService.Config/Utilities/ReleaseRangeYamlConverter.cs @@ -9,7 +9,7 @@ using YamlDotNet.Core; using YamlDotNet.Core.Events; using YamlDotNet.Serialization; -namespace Steeltoe.InitializrApi.Config.Utilities +namespace Steeltoe.InitializrService.Config.Utilities { /// /// Deserializes a in YAML expressions. diff --git a/src/InitializrApi/Configuration/UiConfigFile.cs b/src/InitializrService/Configuration/UiConfigFile.cs similarity index 85% rename from src/InitializrApi/Configuration/UiConfigFile.cs rename to src/InitializrService/Configuration/UiConfigFile.cs index 6e64308..dd5e0ce 100644 --- a/src/InitializrApi/Configuration/UiConfigFile.cs +++ b/src/InitializrService/Configuration/UiConfigFile.cs @@ -4,18 +4,18 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Steeltoe.InitializrApi.Config; -using Steeltoe.InitializrApi.Services; -using Steeltoe.InitializrApi.Utilities; +using Steeltoe.InitializrService.Config; +using Steeltoe.InitializrService.Services; +using Steeltoe.InitializrService.Utilities; using System; using System.IO; -namespace Steeltoe.InitializrApi.Configuration +namespace Steeltoe.InitializrService.Configuration { /// /// An using a local configuration file backend. /// - public class UiConfigFile : InitializrApiServiceBase, IUiConfigService + public class UiConfigFile : InitializrServiceBase, IUiConfigService { /* ----------------------------------------------------------------- * * constructors * @@ -26,7 +26,7 @@ namespace Steeltoe.InitializrApi.Configuration /// /// Injected options from appsettings. /// Injected logger. - public UiConfigFile(IOptions options, ILogger logger) + public UiConfigFile(IOptions options, ILogger logger) : base(logger) { var apiOptions = options.Value; diff --git a/src/InitializrApi/Configuration/UiConfigService.cs b/src/InitializrService/Configuration/UiConfigService.cs similarity index 90% rename from src/InitializrApi/Configuration/UiConfigService.cs rename to src/InitializrService/Configuration/UiConfigService.cs index 6fc639d..09d08ae 100644 --- a/src/InitializrApi/Configuration/UiConfigService.cs +++ b/src/InitializrService/Configuration/UiConfigService.cs @@ -5,15 +5,15 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Steeltoe.Extensions.Configuration.ConfigServer; -using Steeltoe.InitializrApi.Config; -using Steeltoe.InitializrApi.Services; +using Steeltoe.InitializrService.Config; +using Steeltoe.InitializrService.Services; -namespace Steeltoe.InitializrApi.Configuration +namespace Steeltoe.InitializrService.Configuration { /// /// An using a Spring Cloud Config Server backend. /// - public class UiConfigService : InitializrApiServiceBase, IUiConfigService + public class UiConfigService : InitializrServiceBase, IUiConfigService { /* ----------------------------------------------------------------- * * constructors * diff --git a/src/InitializrApi/Controllers/AboutController.cs b/src/InitializrService/Controllers/AboutController.cs similarity index 92% rename from src/InitializrApi/Controllers/AboutController.cs rename to src/InitializrService/Controllers/AboutController.cs index 61d56c2..0a175c5 100644 --- a/src/InitializrApi/Controllers/AboutController.cs +++ b/src/InitializrService/Controllers/AboutController.cs @@ -5,14 +5,14 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -namespace Steeltoe.InitializrApi.Controllers +namespace Steeltoe.InitializrService.Controllers { /// /// About endpoint. /// [ApiController] [Route("api/[controller]")] - public class AboutController : InitializrApiControllerBase + public class AboutController : InitializrServiceControllerBase { /* ----------------------------------------------------------------- * * constructors * diff --git a/src/InitializrApi/Controllers/InitializrApiControllerBase.cs b/src/InitializrService/Controllers/InitializrServiceControllerBase.cs similarity index 80% rename from src/InitializrApi/Controllers/InitializrApiControllerBase.cs rename to src/InitializrService/Controllers/InitializrServiceControllerBase.cs index 0c44426..ae50419 100644 --- a/src/InitializrApi/Controllers/InitializrApiControllerBase.cs +++ b/src/InitializrService/Controllers/InitializrServiceControllerBase.cs @@ -5,22 +5,22 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -namespace Steeltoe.InitializrApi.Controllers +namespace Steeltoe.InitializrService.Controllers { /// - /// Base class for InitializrApi controllers. + /// Base class for InitializrService controllers. /// - public abstract class InitializrApiControllerBase : ControllerBase + public abstract class InitializrServiceControllerBase : ControllerBase { /* ----------------------------------------------------------------- * * constructors * * ----------------------------------------------------------------- */ /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Injected logger. - protected InitializrApiControllerBase(ILogger logger) + protected InitializrServiceControllerBase(ILogger logger) { Logger = logger; } diff --git a/src/InitializrApi/Controllers/ProjectController.cs b/src/InitializrService/Controllers/ProjectController.cs similarity index 96% rename from src/InitializrApi/Controllers/ProjectController.cs rename to src/InitializrService/Controllers/ProjectController.cs index 7561a52..e83eb0d 100644 --- a/src/InitializrApi/Controllers/ProjectController.cs +++ b/src/InitializrService/Controllers/ProjectController.cs @@ -5,20 +5,20 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -using Steeltoe.InitializrApi.Config; -using Steeltoe.InitializrApi.Models; -using Steeltoe.InitializrApi.Services; +using Steeltoe.InitializrService.Config; +using Steeltoe.InitializrService.Models; +using Steeltoe.InitializrService.Services; using System; using System.Threading.Tasks; -namespace Steeltoe.InitializrApi.Controllers +namespace Steeltoe.InitializrService.Controllers { /// /// Project generation endpoint. /// [ApiController] [Route("api/[controller]")] - public class ProjectController : InitializrApiControllerBase + public class ProjectController : InitializrServiceControllerBase { /* ----------------------------------------------------------------- * * fields * diff --git a/src/InitializrApi/Controllers/RootController.cs b/src/InitializrService/Controllers/RootController.cs similarity index 93% rename from src/InitializrApi/Controllers/RootController.cs rename to src/InitializrService/Controllers/RootController.cs index 5be79db..22d6d3e 100644 --- a/src/InitializrApi/Controllers/RootController.cs +++ b/src/InitializrService/Controllers/RootController.cs @@ -5,27 +5,27 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Steeltoe.InitializrApi.Config; -using Steeltoe.InitializrApi.Services; +using Steeltoe.InitializrService.Config; +using Steeltoe.InitializrService.Services; using System; using System.Collections.Generic; using System.Linq; using System.Text; -namespace Steeltoe.InitializrApi.Controllers +namespace Steeltoe.InitializrService.Controllers { /// /// About endpoint. /// [ApiController] [Route("api")] - public class RootController : InitializrApiControllerBase + public class RootController : InitializrServiceControllerBase { /* ----------------------------------------------------------------- * * fields * * ----------------------------------------------------------------- */ - private readonly InitializrApiOptions _apiOptions; + private readonly InitializrServiceOptions _serviceOptions; private readonly IUiConfigService _uiConfigService; @@ -40,12 +40,12 @@ namespace Steeltoe.InitializrApi.Controllers /// Injected Initializr configuration service. /// Injected logger. public RootController( - IOptions options, + IOptions options, IUiConfigService uiConfigService, ILogger logger) : base(logger) { - _apiOptions = options.Value; + _serviceOptions = options.Value; _uiConfigService = uiConfigService; } @@ -61,12 +61,12 @@ namespace Steeltoe.InitializrApi.Controllers public IActionResult GetHelp() { var help = new List(); - if (_apiOptions?.Logo is not null) + if (_serviceOptions?.Logo is not null) { try { help.Add(string.Empty); - var logoPath = _apiOptions.Logo; + var logoPath = _serviceOptions.Logo; System.IO.File.ReadAllLines(logoPath).ToList().ForEach(l => help.Add(l)); help.Add(string.Empty); } diff --git a/src/InitializrApi/Controllers/UiConfigController.cs b/src/InitializrService/Controllers/UiConfigController.cs similarity index 96% rename from src/InitializrApi/Controllers/UiConfigController.cs rename to src/InitializrService/Controllers/UiConfigController.cs index ebc2ab2..aec648a 100644 --- a/src/InitializrApi/Controllers/UiConfigController.cs +++ b/src/InitializrService/Controllers/UiConfigController.cs @@ -4,16 +4,16 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; -using Steeltoe.InitializrApi.Services; +using Steeltoe.InitializrService.Services; -namespace Steeltoe.InitializrApi.Controllers +namespace Steeltoe.InitializrService.Controllers { /// /// Server configuration endpoint. /// [ApiController] [Route("api/[controller]")] - public class UiConfigController : InitializrApiControllerBase + public class UiConfigController : InitializrServiceControllerBase { /* ----------------------------------------------------------------- * * fields * diff --git a/src/InitializrApi/Generators/NetCoreToolProjectGenerator.cs b/src/InitializrService/Generators/NetCoreToolProjectGenerator.cs similarity index 90% rename from src/InitializrApi/Generators/NetCoreToolProjectGenerator.cs rename to src/InitializrService/Generators/NetCoreToolProjectGenerator.cs index 754d91e..ee1f014 100644 --- a/src/InitializrApi/Generators/NetCoreToolProjectGenerator.cs +++ b/src/InitializrService/Generators/NetCoreToolProjectGenerator.cs @@ -4,20 +4,20 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Steeltoe.InitializrApi.Models; -using Steeltoe.InitializrApi.Services; +using Steeltoe.InitializrService.Models; +using Steeltoe.InitializrService.Services; using System.IO; using System.Net.Http; using System.Text; using System.Threading.Tasks; using System.Web; -namespace Steeltoe.InitializrApi.Generators +namespace Steeltoe.InitializrService.Generators { /// /// a A project generator that uses a NetCoreToolService. /// - public class NetCoreToolProjectGenerator : InitializrApiServiceBase, IProjectGenerator + public class NetCoreToolProjectGenerator : InitializrServiceBase, IProjectGenerator { private static readonly HttpClient Client = new (); @@ -29,7 +29,7 @@ namespace Steeltoe.InitializrApi.Generators /// Injected options. /// Injected logger. public NetCoreToolProjectGenerator( - IOptions options, + IOptions options, ILogger logger) : base(logger) { diff --git a/src/InitializrApi/InitializrApiOptions.cs b/src/InitializrService/InitializrServiceOptions.cs similarity index 89% rename from src/InitializrApi/InitializrApiOptions.cs rename to src/InitializrService/InitializrServiceOptions.cs index 85ba9ad..28625a8 100644 --- a/src/InitializrApi/InitializrApiOptions.cs +++ b/src/InitializrService/InitializrServiceOptions.cs @@ -4,17 +4,17 @@ using System.Collections.Generic; -namespace Steeltoe.InitializrApi +namespace Steeltoe.InitializrService { /// /// Initializr configuration options. /// - public sealed class InitializrApiOptions + public sealed class InitializrServiceOptions { /// /// The value of the appsettings section name. /// - public const string InitializrApi = "InitializrApi"; + public const string InitializrService = "InitializrService"; /// /// Gets or sets the Net Core Tool Service config dictionary. diff --git a/src/InitializrApi/Models/About.cs b/src/InitializrService/Models/About.cs similarity index 96% rename from src/InitializrApi/Models/About.cs rename to src/InitializrService/Models/About.cs index 744364f..e6b24c6 100644 --- a/src/InitializrApi/Models/About.cs +++ b/src/InitializrService/Models/About.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -namespace Steeltoe.InitializrApi.Models +namespace Steeltoe.InitializrService.Models { /// /// Application information, such as version. diff --git a/src/InitializrApi/Models/ProjectSpec.cs b/src/InitializrService/Models/ProjectSpec.cs similarity index 98% rename from src/InitializrApi/Models/ProjectSpec.cs rename to src/InitializrService/Models/ProjectSpec.cs index 5f0ad5d..343922f 100644 --- a/src/InitializrApi/Models/ProjectSpec.cs +++ b/src/InitializrService/Models/ProjectSpec.cs @@ -4,7 +4,7 @@ using System.Text; -namespace Steeltoe.InitializrApi.Models +namespace Steeltoe.InitializrService.Models { /// /// A model of the project generation spec. diff --git a/src/InitializrApi/Program.cs b/src/InitializrService/Program.cs similarity index 96% rename from src/InitializrApi/Program.cs rename to src/InitializrService/Program.cs index cecc7cf..d94340e 100644 --- a/src/InitializrApi/Program.cs +++ b/src/InitializrService/Program.cs @@ -6,11 +6,11 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; using Steeltoe.Extensions.Configuration.ConfigServer; using Steeltoe.Extensions.Logging; -using Steeltoe.InitializrApi.Models; +using Steeltoe.InitializrService.Models; using System.Diagnostics.CodeAnalysis; using System.Reflection; -namespace Steeltoe.InitializrApi +namespace Steeltoe.InitializrService { /// /// The Steeltoe Initializr Api program. @@ -37,7 +37,7 @@ namespace Steeltoe.InitializrApi { Name = typeof(Program).Namespace ?? "unknown", Vendor = "SteeltoeOSS/VMware", - Url = "https://github.com/SteeltoeOSS/InitializrApi/", + Url = "https://github.com/SteeltoeOSS/InitializrService/", Version = fields[0], Commit = fields[1], }; diff --git a/src/InitializrApi/Properties/launchSettings.json b/src/InitializrService/Properties/launchSettings.json similarity index 100% rename from src/InitializrApi/Properties/launchSettings.json rename to src/InitializrService/Properties/launchSettings.json diff --git a/src/InitializrApi/Resources/logo.txt b/src/InitializrService/Resources/logo.txt similarity index 100% rename from src/InitializrApi/Resources/logo.txt rename to src/InitializrService/Resources/logo.txt diff --git a/src/InitializrApi/Resources/uiconfig.Development.json b/src/InitializrService/Resources/uiconfig.Development.json similarity index 100% rename from src/InitializrApi/Resources/uiconfig.Development.json rename to src/InitializrService/Resources/uiconfig.Development.json diff --git a/src/InitializrApi/Services/IProjectGenerator.cs b/src/InitializrService/Services/IProjectGenerator.cs similarity index 95% rename from src/InitializrApi/Services/IProjectGenerator.cs rename to src/InitializrService/Services/IProjectGenerator.cs index 1c50785..a2784f5 100644 --- a/src/InitializrApi/Services/IProjectGenerator.cs +++ b/src/InitializrService/Services/IProjectGenerator.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -using Steeltoe.InitializrApi.Models; +using Steeltoe.InitializrService.Models; using System; using System.Runtime.Serialization; using System.Threading.Tasks; -namespace Steeltoe.InitializrApi.Services +namespace Steeltoe.InitializrService.Services { /// /// Contract for a project generator implementations. diff --git a/src/InitializrApi/Services/IUiConfigService.cs b/src/InitializrService/Services/IUiConfigService.cs similarity index 85% rename from src/InitializrApi/Services/IUiConfigService.cs rename to src/InitializrService/Services/IUiConfigService.cs index e3d09c8..79661e7 100644 --- a/src/InitializrApi/Services/IUiConfigService.cs +++ b/src/InitializrService/Services/IUiConfigService.cs @@ -2,9 +2,9 @@ // The .NET Foundation licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -using Steeltoe.InitializrApi.Config; +using Steeltoe.InitializrService.Config; -namespace Steeltoe.InitializrApi.Services +namespace Steeltoe.InitializrService.Services { /// /// Contract for Initializr configuration service implementations. diff --git a/src/InitializrApi/Services/InitializrApiServiceBase.cs b/src/InitializrService/Services/InitializrServiceBase.cs similarity index 73% rename from src/InitializrApi/Services/InitializrApiServiceBase.cs rename to src/InitializrService/Services/InitializrServiceBase.cs index 82a52ee..da57305 100644 --- a/src/InitializrApi/Services/InitializrApiServiceBase.cs +++ b/src/InitializrService/Services/InitializrServiceBase.cs @@ -4,18 +4,18 @@ using Microsoft.Extensions.Logging; -namespace Steeltoe.InitializrApi.Services +namespace Steeltoe.InitializrService.Services { /// - /// Base class for InitializrApi services. + /// Base class for InitializrService services. /// - public abstract class InitializrApiServiceBase + public abstract class InitializrServiceBase { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// Injected logger. - protected InitializrApiServiceBase(ILogger logger) + protected InitializrServiceBase(ILogger logger) { Logger = logger; } diff --git a/src/InitializrApi/Startup.cs b/src/InitializrService/Startup.cs similarity index 86% rename from src/InitializrApi/Startup.cs rename to src/InitializrService/Startup.cs index dfb39a6..215f755 100644 --- a/src/InitializrApi/Startup.cs +++ b/src/InitializrService/Startup.cs @@ -9,16 +9,16 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Steeltoe.Extensions.Configuration.ConfigServer; -using Steeltoe.InitializrApi.Config; -using Steeltoe.InitializrApi.Configuration; -using Steeltoe.InitializrApi.Generators; -using Steeltoe.InitializrApi.Services; +using Steeltoe.InitializrService.Config; +using Steeltoe.InitializrService.Configuration; +using Steeltoe.InitializrService.Generators; +using Steeltoe.InitializrService.Services; using Steeltoe.Management.Endpoint; using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -namespace Steeltoe.InitializrApi +namespace Steeltoe.InitializrService { /// /// The Steeltoe Initializr Api dependency injection setup. @@ -49,17 +49,17 @@ namespace Steeltoe.InitializrApi public void ConfigureServices(IServiceCollection services) { services.AddOptions(); - services.Configure(Configuration.GetSection(InitializrApiOptions.InitializrApi)); - InitializrApiOptions options; + services.Configure(Configuration.GetSection(InitializrServiceOptions.InitializrService)); + InitializrServiceOptions options; try { - options = Configuration.GetSection(InitializrApiOptions.InitializrApi).Get(); + options = Configuration.GetSection(InitializrServiceOptions.InitializrService).Get(); } catch (Exception e) { if (e.InnerException is KeyNotFoundException) { - throw new ArgumentException("InitializrApi configuration is missing or errant"); + throw new ArgumentException("InitializrService configuration is missing or errant"); } throw; diff --git a/src/InitializrApi/Steeltoe.InitializrApi.csproj b/src/InitializrService/Steeltoe.InitializrService.csproj similarity index 91% rename from src/InitializrApi/Steeltoe.InitializrApi.csproj rename to src/InitializrService/Steeltoe.InitializrService.csproj index 5dcdc86..d170ee5 100644 --- a/src/InitializrApi/Steeltoe.InitializrApi.csproj +++ b/src/InitializrService/Steeltoe.InitializrService.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/InitializrApi/Utilities/Serializer.cs b/src/InitializrService/Utilities/Serializer.cs similarity index 95% rename from src/InitializrApi/Utilities/Serializer.cs rename to src/InitializrService/Utilities/Serializer.cs index 0a0f572..be6fb88 100644 --- a/src/InitializrApi/Utilities/Serializer.cs +++ b/src/InitializrService/Utilities/Serializer.cs @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -using Steeltoe.InitializrApi.Config.Utilities; +using Steeltoe.InitializrService.Config.Utilities; using System.Text.Json; using YamlDotNet.Serialization; using YamlDotNet.Serialization.NamingConventions; -namespace Steeltoe.InitializrApi.Utilities +namespace Steeltoe.InitializrService.Utilities { /// /// A utility wrapper for JSON serialization/deserialization. diff --git a/src/InitializrApi/appsettings.Development.json b/src/InitializrService/appsettings.Development.json similarity index 81% rename from src/InitializrApi/appsettings.Development.json rename to src/InitializrService/appsettings.Development.json index 83c5e04..6326336 100644 --- a/src/InitializrApi/appsettings.Development.json +++ b/src/InitializrService/appsettings.Development.json @@ -1,5 +1,5 @@ { - "InitializrApi": { + "InitializrService": { "NetCoreToolService": { "Uri": "http://localhost:1922/api" }, @@ -16,7 +16,7 @@ }, "Logging": { "LogLevel": { - "Steeltoe.InitializrApi": "Debug" + "Steeltoe.InitializrService": "Debug" } } } diff --git a/src/InitializrApi/appsettings.Docker.json b/src/InitializrService/appsettings.Docker.json similarity index 75% rename from src/InitializrApi/appsettings.Docker.json rename to src/InitializrService/appsettings.Docker.json index d14aaca..a543f0c 100644 --- a/src/InitializrApi/appsettings.Docker.json +++ b/src/InitializrService/appsettings.Docker.json @@ -8,7 +8,7 @@ }, "Logging": { "LogLevel": { - "Steeltoe.InitializrApi": "Debug" + "Steeltoe.InitializrServiceApi": "Debug" } } } diff --git a/src/InitializrApi/appsettings.Staging.json b/src/InitializrService/appsettings.Staging.json similarity index 51% rename from src/InitializrApi/appsettings.Staging.json rename to src/InitializrService/appsettings.Staging.json index 8d1a2e6..cc452df 100644 --- a/src/InitializrApi/appsettings.Staging.json +++ b/src/InitializrService/appsettings.Staging.json @@ -1,7 +1,7 @@ { "Logging": { "LogLevel": { - "Steeltoe.InitializrApi": "Debug" + "Steeltoe.InitializrService": "Debug" } } } diff --git a/src/InitializrApi/appsettings.json b/src/InitializrService/appsettings.json similarity index 88% rename from src/InitializrApi/appsettings.json rename to src/InitializrService/appsettings.json index 6481603..15335e3 100644 --- a/src/InitializrApi/appsettings.json +++ b/src/InitializrService/appsettings.json @@ -1,5 +1,5 @@ { - "InitializrApi": { + "InitializrService": { "Logo": "Resources/logo.txt", "NetCoreToolService": { "Uri": "http://net-core-tool-service/api" @@ -20,7 +20,7 @@ "LogLevel": { "Default": "Warning", "Microsoft.Hosting.Lifetime": "Information", - "Steeltoe.InitializrApi": "Information" + "Steeltoe.InitializrService": "Information" } }, "Management": { diff --git a/test/InitializrApi.Test.Integration/HttpTests.cs b/test/InitializrService.Test.Integration/HttpTests.cs similarity index 98% rename from test/InitializrApi.Test.Integration/HttpTests.cs rename to test/InitializrService.Test.Integration/HttpTests.cs index 80e2128..b121537 100644 --- a/test/InitializrApi.Test.Integration/HttpTests.cs +++ b/test/InitializrService.Test.Integration/HttpTests.cs @@ -4,10 +4,10 @@ using System.Net.Http.Json; using System.Threading.Tasks; using FluentAssertions; using Microsoft.AspNetCore.Mvc.Testing; -using Steeltoe.InitializrApi.Config; +using Steeltoe.InitializrService.Config; using Xunit; -namespace Steeltoe.InitializrApi.Test.Integration +namespace Steeltoe.InitializrService.Test.Integration { public class HttpTests : IClassFixture> { diff --git a/test/InitializrApi.Test.Integration/ModelTests.cs b/test/InitializrService.Test.Integration/ModelTests.cs similarity index 93% rename from test/InitializrApi.Test.Integration/ModelTests.cs rename to test/InitializrService.Test.Integration/ModelTests.cs index 7a4a380..06dc5df 100644 --- a/test/InitializrApi.Test.Integration/ModelTests.cs +++ b/test/InitializrService.Test.Integration/ModelTests.cs @@ -5,11 +5,11 @@ using System; using System.Net; using FluentAssertions; -using Steeltoe.InitializrApi.Config; -using Steeltoe.InitializrApi.Utilities; +using Steeltoe.InitializrService.Config; +using Steeltoe.InitializrService.Utilities; using Xunit; -namespace Steeltoe.InitializrApi.Test.Integration +namespace Steeltoe.InitializrService.Test.Integration { public class ModelTests { diff --git a/test/InitializrApi.Test.Integration/ProgramTests.cs b/test/InitializrService.Test.Integration/ProgramTests.cs similarity index 89% rename from test/InitializrApi.Test.Integration/ProgramTests.cs rename to test/InitializrService.Test.Integration/ProgramTests.cs index e5a78bb..fd76d71 100644 --- a/test/InitializrApi.Test.Integration/ProgramTests.cs +++ b/test/InitializrService.Test.Integration/ProgramTests.cs @@ -5,7 +5,7 @@ using FluentAssertions; using Xunit; -namespace Steeltoe.InitializrApi.Test.Integration +namespace Steeltoe.InitializrService.Test.Integration { public class ProgramTests { @@ -17,9 +17,9 @@ namespace Steeltoe.InitializrApi.Test.Integration public void About_Should_Contain_About_Details() { var about = Program.About; - about.Name.Should().Be("Steeltoe.InitializrApi"); + about.Name.Should().Be("Steeltoe.InitializrService"); about.Vendor.Should().Be("SteeltoeOSS/VMware"); - about.Url.Should().Be("https://github.com/SteeltoeOSS/InitializrApi/"); + about.Url.Should().Be("https://github.com/SteeltoeOSS/InitializrService/"); about.Version.Should().NotBeNull(); /* about.Version.Should().StartWith("0.0.0"); */ about.Commit.Should().NotBeNull(); diff --git a/test/InitializrApi.Test.Integration/Steeltoe.InitializrApi.Test.Integration.csproj b/test/InitializrService.Test.Integration/Steeltoe.InitializrService.Test.Integration.csproj similarity index 50% rename from test/InitializrApi.Test.Integration/Steeltoe.InitializrApi.Test.Integration.csproj rename to test/InitializrService.Test.Integration/Steeltoe.InitializrService.Test.Integration.csproj index c1b9d2b..6247c72 100644 --- a/test/InitializrApi.Test.Integration/Steeltoe.InitializrApi.Test.Integration.csproj +++ b/test/InitializrService.Test.Integration/Steeltoe.InitializrService.Test.Integration.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/test/InitializrApi.Test.Unit/Configuration/InitializrConfigServiceTests.cs b/test/InitializrService.Test.Unit/Configuration/InitializrConfigServiceTests.cs similarity index 92% rename from test/InitializrApi.Test.Unit/Configuration/InitializrConfigServiceTests.cs rename to test/InitializrService.Test.Unit/Configuration/InitializrConfigServiceTests.cs index ec8cf18..4b39379 100644 --- a/test/InitializrApi.Test.Unit/Configuration/InitializrConfigServiceTests.cs +++ b/test/InitializrService.Test.Unit/Configuration/InitializrConfigServiceTests.cs @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. -namespace Steeltoe.InitializrApi.Test.Unit.Configuration +namespace Steeltoe.InitializrService.Test.Unit.Configuration { public class InitializrConfigServiceTests { diff --git a/test/InitializrApi.Test.Unit/Configuration/InitializrApiOptionsTests.cs b/test/InitializrService.Test.Unit/Configuration/InitializrServiceOptionsTests.cs similarity index 85% rename from test/InitializrApi.Test.Unit/Configuration/InitializrApiOptionsTests.cs rename to test/InitializrService.Test.Unit/Configuration/InitializrServiceOptionsTests.cs index cecbe0b..082e2f2 100644 --- a/test/InitializrApi.Test.Unit/Configuration/InitializrApiOptionsTests.cs +++ b/test/InitializrService.Test.Unit/Configuration/InitializrServiceOptionsTests.cs @@ -8,12 +8,12 @@ using FluentAssertions; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Moq; -using Steeltoe.InitializrApi.Configuration; +using Steeltoe.InitializrService.Configuration; using Xunit; -namespace Steeltoe.InitializrApi.Test.Unit.Configuration +namespace Steeltoe.InitializrService.Test.Unit.Configuration { - public class InitializrApiOptionsTests + public class InitializrServiceOptionsTests { /* ----------------------------------------------------------------- * * positive tests * @@ -27,8 +27,8 @@ namespace Steeltoe.InitializrApi.Test.Unit.Configuration public void Non_Existent_UiConfig_Path_Should_Throw_ArgumentException() { // Arrange - var options = new Mock>(); - options.Setup(opts => opts.Value).Returns(new InitializrApiOptions + var options = new Mock>(); + options.Setup(opts => opts.Value).Returns(new InitializrServiceOptions { UiConfig = new Dictionary { { "Path", "no_such_path" } } }); var logger = new NullLogger(); @@ -47,8 +47,8 @@ namespace Steeltoe.InitializrApi.Test.Unit.Configuration public void Directory_UiConfig_Path_Should_Throw_ArgumentException() { // Arrange - var options = new Mock>(); - options.Setup(opts => opts.Value).Returns(new InitializrApiOptions + var options = new Mock>(); + options.Setup(opts => opts.Value).Returns(new InitializrServiceOptions { UiConfig = new Dictionary { { "Path", "." } } }); var logger = new NullLogger(); @@ -67,9 +67,9 @@ namespace Steeltoe.InitializrApi.Test.Unit.Configuration public void Non_Json_UiConfig_Should_Throw_ArgumentException() { // Arrange - var options = new Mock>(); - options.Setup(opts => opts.Value).Returns(new InitializrApiOptions - { UiConfig = new Dictionary { { "Path", "Steeltoe.InitializrApi.dll" } } }); + var options = new Mock>(); + options.Setup(opts => opts.Value).Returns(new InitializrServiceOptions + { UiConfig = new Dictionary { { "Path", "Steeltoe.InitializrService.dll" } } }); var logger = new NullLogger(); // Act diff --git a/test/InitializrApi.Test.Unit/Controllers/AboutControllerTests.cs b/test/InitializrService.Test.Unit/Controllers/AboutControllerTests.cs similarity index 87% rename from test/InitializrApi.Test.Unit/Controllers/AboutControllerTests.cs rename to test/InitializrService.Test.Unit/Controllers/AboutControllerTests.cs index 905db46..2d605eb 100644 --- a/test/InitializrApi.Test.Unit/Controllers/AboutControllerTests.cs +++ b/test/InitializrService.Test.Unit/Controllers/AboutControllerTests.cs @@ -5,11 +5,11 @@ using FluentAssertions; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging.Abstractions; -using Steeltoe.InitializrApi.Controllers; -using Steeltoe.InitializrApi.Models; +using Steeltoe.InitializrService.Controllers; +using Steeltoe.InitializrService.Models; using Xunit; -namespace Steeltoe.InitializrApi.Test.Unit.Controllers +namespace Steeltoe.InitializrService.Test.Unit.Controllers { public class AboutControllerTests { @@ -30,9 +30,9 @@ namespace Steeltoe.InitializrApi.Test.Unit.Controllers var indexResult = Assert.IsType(result); indexResult.Value.Should().BeOfType(); var about = Assert.IsType(indexResult.Value); - about.Name.Should().Be("Steeltoe.InitializrApi"); + about.Name.Should().Be("Steeltoe.InitializrService"); about.Vendor.Should().Be("SteeltoeOSS/VMware"); - about.Url.Should().Be("https://github.com/SteeltoeOSS/InitializrApi/"); + about.Url.Should().Be("https://github.com/SteeltoeOSS/InitializrService/"); /* about.Version.Should().StartWith("0.0.0"); */ about.Commit.Should().NotBeNullOrWhiteSpace(); } diff --git a/test/InitializrApi.Test.Unit/Controllers/ProjectControllerTests.cs b/test/InitializrService.Test.Unit/Controllers/ProjectControllerTests.cs similarity index 98% rename from test/InitializrApi.Test.Unit/Controllers/ProjectControllerTests.cs rename to test/InitializrService.Test.Unit/Controllers/ProjectControllerTests.cs index d7a8610..c20cf77 100644 --- a/test/InitializrApi.Test.Unit/Controllers/ProjectControllerTests.cs +++ b/test/InitializrService.Test.Unit/Controllers/ProjectControllerTests.cs @@ -9,13 +9,13 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging.Abstractions; using Moq; -using Steeltoe.InitializrApi.Config; -using Steeltoe.InitializrApi.Controllers; -using Steeltoe.InitializrApi.Models; -using Steeltoe.InitializrApi.Services; +using Steeltoe.InitializrService.Config; +using Steeltoe.InitializrService.Controllers; +using Steeltoe.InitializrService.Models; +using Steeltoe.InitializrService.Services; using Xunit; -namespace Steeltoe.InitializrApi.Test.Unit.Controllers +namespace Steeltoe.InitializrService.Test.Unit.Controllers { public class ProjectControllerTests { diff --git a/test/InitializrApi.Test.Unit/Controllers/RootControllerTests.cs b/test/InitializrService.Test.Unit/Controllers/RootControllerTests.cs similarity index 93% rename from test/InitializrApi.Test.Unit/Controllers/RootControllerTests.cs rename to test/InitializrService.Test.Unit/Controllers/RootControllerTests.cs index d21e953..ff6ce27 100644 --- a/test/InitializrApi.Test.Unit/Controllers/RootControllerTests.cs +++ b/test/InitializrService.Test.Unit/Controllers/RootControllerTests.cs @@ -7,12 +7,12 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Moq; -using Steeltoe.InitializrApi.Config; -using Steeltoe.InitializrApi.Controllers; -using Steeltoe.InitializrApi.Services; +using Steeltoe.InitializrService.Config; +using Steeltoe.InitializrService.Controllers; +using Steeltoe.InitializrService.Services; using Xunit; -namespace Steeltoe.InitializrApi.Test.Unit.Controllers +namespace Steeltoe.InitializrService.Test.Unit.Controllers { public class RootControllerTests { @@ -24,8 +24,8 @@ namespace Steeltoe.InitializrApi.Test.Unit.Controllers public void Get_Should_Return_Help() { // Arrange - var initializrCfg = new Mock>(); - var initializrOpts = new InitializrApiOptions { Logo = "/no/such/logo" }; + var initializrCfg = new Mock>(); + var initializrOpts = new InitializrServiceOptions { Logo = "/no/such/logo" }; initializrCfg.Setup(cfg => cfg.Value).Returns(initializrOpts); var config = new UiConfig { diff --git a/test/InitializrApi.Test.Unit/Controllers/UiConfigControllerTests.cs b/test/InitializrService.Test.Unit/Controllers/UiConfigControllerTests.cs similarity index 88% rename from test/InitializrApi.Test.Unit/Controllers/UiConfigControllerTests.cs rename to test/InitializrService.Test.Unit/Controllers/UiConfigControllerTests.cs index 4a10b54..c123029 100644 --- a/test/InitializrApi.Test.Unit/Controllers/UiConfigControllerTests.cs +++ b/test/InitializrService.Test.Unit/Controllers/UiConfigControllerTests.cs @@ -6,12 +6,12 @@ using FluentAssertions; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging.Abstractions; using Moq; -using Steeltoe.InitializrApi.Config; -using Steeltoe.InitializrApi.Controllers; -using Steeltoe.InitializrApi.Services; +using Steeltoe.InitializrService.Config; +using Steeltoe.InitializrService.Controllers; +using Steeltoe.InitializrService.Services; using Xunit; -namespace Steeltoe.InitializrApi.Test.Unit.Controllers +namespace Steeltoe.InitializrService.Test.Unit.Controllers { public class UiConfigControllerTests { diff --git a/test/InitializrApi.Test.Unit/Models/AboutTests.cs b/test/InitializrService.Test.Unit/Models/AboutTests.cs similarity index 92% rename from test/InitializrApi.Test.Unit/Models/AboutTests.cs rename to test/InitializrService.Test.Unit/Models/AboutTests.cs index 96c1116..cbdcf5f 100644 --- a/test/InitializrApi.Test.Unit/Models/AboutTests.cs +++ b/test/InitializrService.Test.Unit/Models/AboutTests.cs @@ -3,10 +3,10 @@ // See the LICENSE file in the project root for more information. using FluentAssertions; -using Steeltoe.InitializrApi.Models; +using Steeltoe.InitializrService.Models; using Xunit; -namespace Steeltoe.InitializrApi.Test.Unit.Models +namespace Steeltoe.InitializrService.Test.Unit.Models { public class AboutTests { diff --git a/test/InitializrApi.Test.Unit/Models/ProjectSpecTests.cs b/test/InitializrService.Test.Unit/Models/ProjectSpecTests.cs similarity index 94% rename from test/InitializrApi.Test.Unit/Models/ProjectSpecTests.cs rename to test/InitializrService.Test.Unit/Models/ProjectSpecTests.cs index faa48ea..8a673bf 100644 --- a/test/InitializrApi.Test.Unit/Models/ProjectSpecTests.cs +++ b/test/InitializrService.Test.Unit/Models/ProjectSpecTests.cs @@ -3,10 +3,10 @@ // See the LICENSE file in the project root for more information. using FluentAssertions; -using Steeltoe.InitializrApi.Models; +using Steeltoe.InitializrService.Models; using Xunit; -namespace Steeltoe.InitializrApi.Test.Unit.Models +namespace Steeltoe.InitializrService.Test.Unit.Models { public class ProjectSpecTests { diff --git a/test/InitializrApi.Test.Unit/Models/ReleaseRangeTests.cs b/test/InitializrService.Test.Unit/Models/ReleaseRangeTests.cs similarity index 99% rename from test/InitializrApi.Test.Unit/Models/ReleaseRangeTests.cs rename to test/InitializrService.Test.Unit/Models/ReleaseRangeTests.cs index 2c224c6..12a4e73 100644 --- a/test/InitializrApi.Test.Unit/Models/ReleaseRangeTests.cs +++ b/test/InitializrService.Test.Unit/Models/ReleaseRangeTests.cs @@ -4,10 +4,10 @@ using System; using FluentAssertions; -using Steeltoe.InitializrApi.Config; +using Steeltoe.InitializrService.Config; using Xunit; -namespace Steeltoe.InitializrApi.Test.Unit.Models +namespace Steeltoe.InitializrService.Test.Unit.Models { public class ReleaseRangeTests { diff --git a/test/InitializrApi.Test.Unit/Models/UiConfigTests.cs b/test/InitializrService.Test.Unit/Models/UiConfigTests.cs similarity index 95% rename from test/InitializrApi.Test.Unit/Models/UiConfigTests.cs rename to test/InitializrService.Test.Unit/Models/UiConfigTests.cs index 568c25a..d82347d 100644 --- a/test/InitializrApi.Test.Unit/Models/UiConfigTests.cs +++ b/test/InitializrService.Test.Unit/Models/UiConfigTests.cs @@ -3,10 +3,10 @@ // See the LICENSE file in the project root for more information. using FluentAssertions; -using Steeltoe.InitializrApi.Config; +using Steeltoe.InitializrService.Config; using Xunit; -namespace Steeltoe.InitializrApi.Test.Unit.Models +namespace Steeltoe.InitializrService.Test.Unit.Models { public class UiConfigTests { diff --git a/test/InitializrApi.Test.Unit/Steeltoe.InitializrApi.Test.Unit.csproj b/test/InitializrService.Test.Unit/Steeltoe.InitializrService.Test.Unit.csproj similarity index 50% rename from test/InitializrApi.Test.Unit/Steeltoe.InitializrApi.Test.Unit.csproj rename to test/InitializrService.Test.Unit/Steeltoe.InitializrService.Test.Unit.csproj index c1b9d2b..6247c72 100644 --- a/test/InitializrApi.Test.Unit/Steeltoe.InitializrApi.Test.Unit.csproj +++ b/test/InitializrService.Test.Unit/Steeltoe.InitializrService.Test.Unit.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/test/InitializrApi.Test.Unit/Utilities/SerializerTest.cs b/test/InitializrService.Test.Unit/Utilities/SerializerTest.cs similarity index 93% rename from test/InitializrApi.Test.Unit/Utilities/SerializerTest.cs rename to test/InitializrService.Test.Unit/Utilities/SerializerTest.cs index 5729d8b..ed8ae91 100644 --- a/test/InitializrApi.Test.Unit/Utilities/SerializerTest.cs +++ b/test/InitializrService.Test.Unit/Utilities/SerializerTest.cs @@ -3,10 +3,10 @@ // See the LICENSE file in the project root for more information. using FluentAssertions; -using Steeltoe.InitializrApi.Utilities; +using Steeltoe.InitializrService.Utilities; using Xunit; -namespace Steeltoe.InitializrApi.Test.Unit.Utilities +namespace Steeltoe.InitializrService.Test.Unit.Utilities { public class SerializerTest { diff --git a/test/InitializrApi.Test.Utils/MockLoggerExtensions.cs b/test/InitializrService.Test.Utils/MockLoggerExtensions.cs similarity index 95% rename from test/InitializrApi.Test.Utils/MockLoggerExtensions.cs rename to test/InitializrService.Test.Utils/MockLoggerExtensions.cs index 54c6845..8d16daa 100644 --- a/test/InitializrApi.Test.Utils/MockLoggerExtensions.cs +++ b/test/InitializrService.Test.Utils/MockLoggerExtensions.cs @@ -8,7 +8,7 @@ using System; using Microsoft.Extensions.Logging; using Moq; -namespace Steeltoe.InitializrApi.Test.Utils +namespace Steeltoe.InitializrService.Test.Utils { public static class MockLoggerExtensions { diff --git a/test/InitializrApi.Test.Utils/MockProjectTemplateWebRequest.cs b/test/InitializrService.Test.Utils/MockProjectTemplateWebRequest.cs similarity index 92% rename from test/InitializrApi.Test.Utils/MockProjectTemplateWebRequest.cs rename to test/InitializrService.Test.Utils/MockProjectTemplateWebRequest.cs index 03bc18e..76760e8 100644 --- a/test/InitializrApi.Test.Utils/MockProjectTemplateWebRequest.cs +++ b/test/InitializrService.Test.Utils/MockProjectTemplateWebRequest.cs @@ -5,7 +5,7 @@ using System; using System.Net; -namespace Steeltoe.InitializrApi.Test.Utils +namespace Steeltoe.InitializrService.Test.Utils { public class MockProjectTemplateWebRequest : WebRequest { diff --git a/test/InitializrApi.Test.Utils/MockProjectTemplateWebResponse.cs b/test/InitializrService.Test.Utils/MockProjectTemplateWebResponse.cs similarity index 99% rename from test/InitializrApi.Test.Utils/MockProjectTemplateWebResponse.cs rename to test/InitializrService.Test.Utils/MockProjectTemplateWebResponse.cs index ab862ed..5097abf 100644 --- a/test/InitializrApi.Test.Utils/MockProjectTemplateWebResponse.cs +++ b/test/InitializrService.Test.Utils/MockProjectTemplateWebResponse.cs @@ -9,7 +9,7 @@ using System.IO.Compression; using System.Net; using System.Text; -namespace Steeltoe.InitializrApi.Test.Utils +namespace Steeltoe.InitializrService.Test.Utils { public class MockProjectTemplateWebResponse : WebResponse { diff --git a/test/InitializrApi.Test.Utils/MockProjectTemplateWebScheme.cs b/test/InitializrService.Test.Utils/MockProjectTemplateWebScheme.cs similarity index 90% rename from test/InitializrApi.Test.Utils/MockProjectTemplateWebScheme.cs rename to test/InitializrService.Test.Utils/MockProjectTemplateWebScheme.cs index d8bf74e..0cfd89f 100644 --- a/test/InitializrApi.Test.Utils/MockProjectTemplateWebScheme.cs +++ b/test/InitializrService.Test.Utils/MockProjectTemplateWebScheme.cs @@ -5,7 +5,7 @@ using System; using System.Net; -namespace Steeltoe.InitializrApi.Test.Utils +namespace Steeltoe.InitializrService.Test.Utils { public class MockProjectTemplateWebScheme : IWebRequestCreate { diff --git a/test/InitializrApi.Test.Utils/Steeltoe.InitializrApi.Test.Utils.csproj b/test/InitializrService.Test.Utils/Steeltoe.InitializrService.Test.Utils.csproj similarity index 100% rename from test/InitializrApi.Test.Utils/Steeltoe.InitializrApi.Test.Utils.csproj rename to test/InitializrService.Test.Utils/Steeltoe.InitializrService.Test.Utils.csproj diff --git a/test/InitializrApi.Test.Utils/TempFile.cs b/test/InitializrService.Test.Utils/TempFile.cs similarity index 96% rename from test/InitializrApi.Test.Utils/TempFile.cs rename to test/InitializrService.Test.Utils/TempFile.cs index 42d7027..9fc9ede 100644 --- a/test/InitializrApi.Test.Utils/TempFile.cs +++ b/test/InitializrService.Test.Utils/TempFile.cs @@ -5,7 +5,7 @@ using System; using System.IO; -namespace Steeltoe.InitializrApi.Test.Utils +namespace Steeltoe.InitializrService.Test.Utils { public sealed class TempFile : IDisposable {