Skip to content

Commit

Permalink
Remove 'Fritz' from the project, namespace, and NuGet package names (#62
Browse files Browse the repository at this point in the history
)

* Sorry Jeff.

* Delete Fritz.InstantAPIs.sln

Not sure why the rename left the original but ok

* Fixes Github workflow

* Adds stashed files skipped during last commit

* Update .gitignore

Adds .idea to .gitignore

* Delete .idea directory
  • Loading branch information
ScottKane authored May 17, 2022
1 parent d3f053e commit 5fb5a53
Show file tree
Hide file tree
Showing 60 changed files with 107 additions and 99 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Rules in this file were initially inferred by Visual Studio IntelliCode from the C:\dev\Fritz.InstantAPIs codebase based on best match to current usage at 2/26/2022
# Rules in this file were initially inferred by Visual Studio IntelliCode from the C:\dev\InstantAPIs codebase based on best match to current usage at 2/26/2022
# You can modify the rules from these initially generated values to suit your own policies
# You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
[*.cs]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: dotnet test

- name: Pack
run: dotnet pack Fritz.InstantAPIs/Fritz.InstantAPIs.csproj --configuration Release -o finalpackage --no-build
run: dotnet pack InstantAPIs/InstantAPIs.csproj --configuration Release -o finalpackage --no-build

- name: Publish artifact
uses: actions/upload-artifact@master
Expand All @@ -70,7 +70,7 @@ jobs:
id: set_proj_version
shell: pwsh
run: |
[xml]$nuspec = Get-Content Fritz.InstantAPIs/Fritz.InstantAPIs.csproj
[xml]$nuspec = Get-Content InstantAPIs/InstantAPIs.csproj
$version=$nuspec.project.propertygroup.version
$relnotes=$nuspec.project.propertygroup.packagereleasenotes
echo "PKG_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/buildAndDeploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: dotnet test

- name: Pack
run: dotnet pack Fritz.InstantAPIs/Fritz.InstantAPIs.csproj --configuration Release -o finalpackage --no-build
run: dotnet pack InstantAPIs/InstantAPIs.csproj --configuration Release -o finalpackage --no-build

- name: Publish artifact
uses: actions/upload-artifact@master
Expand All @@ -61,7 +61,7 @@ jobs:
id: set_proj_version
shell: pwsh
run: |
[xml]$nuspec = Get-Content Fritz.InstantAPIs/Fritz.InstantAPIs.csproj
[xml]$nuspec = Get-Content InstantAPIs/InstantAPIs.csproj
$version=$nuspec.project.propertygroup.version
$relnotes=$nuspec.project.propertygroup.packagereleasenotes
echo "PKG_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ bld/

# Visual Studio 2015/2017 cache/options directory
.vs/
.idea/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The folders are a basic structure which will change as needed to support the pro

```
Fritz.InstantAPIs The project code.
InstantAPIs The project code.
WorkingApi The project to prototype and manually test the functionality being developed.
```
Expand Down
7 changes: 0 additions & 7 deletions Fritz.InstantAPIs.Generators.Helpers/Included.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Xunit;

namespace Fritz.InstantAPIs.Generators.Helpers.Tests;
namespace InstantAPIs.Generators.Helpers.Tests;

public static class InstanceAPIGeneratorConfigBuilderTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Fritz.InstantAPIs.Generators.Helpers\Fritz.InstantAPIs.Generators.Helpers.csproj" />
<ProjectReference Include="..\InstantAPIs.Generators.Helpers\InstantAPIs.Generators.Helpers.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Xunit;

namespace Fritz.InstantAPIs.Generators.Helpers.Tests
namespace InstantAPIs.Generators.Helpers.Tests
{
public static class TableConfigTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Fritz.InstantAPIs.Generators.Helpers
namespace InstantAPIs.Generators.Helpers
{
[Flags]
public enum ApisToGenerate
Expand Down
7 changes: 7 additions & 0 deletions InstantAPIs.Generators.Helpers/Included.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace InstantAPIs.Generators.Helpers
{
public enum Included
{
Yes, No
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Immutable;

namespace Fritz.InstantAPIs.Generators.Helpers
namespace InstantAPIs.Generators.Helpers
{
public class InstanceAPIGeneratorConfig<T>
where T : struct, Enum
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Immutable;

namespace Fritz.InstantAPIs.Generators.Helpers
namespace InstantAPIs.Generators.Helpers
{
public sealed class InstanceAPIGeneratorConfigBuilder<T>
where T : struct, Enum
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Fritz.InstantAPIs.Generators.Helpers
namespace InstantAPIs.Generators.Helpers
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class InstantAPIsForDbContextAttribute
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Fritz.InstantAPIs.Generators.Helpers
namespace InstantAPIs.Generators.Helpers
{
public sealed class TableConfig<T>
where T : struct, Enum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System;
using System.Collections.Generic;

namespace Fritz.InstantAPIs.Generators.Tests;
namespace InstantAPIs.Generators.Tests;

// All of this code was grabbed from Refit
// (https://github.com/reactiveui/refit/pull/1216/files)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Fritz.InstantAPIs.Generators.Diagnostics;
using InstantAPIs.Generators.Diagnostics;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Testing;
using System;
using System.Linq;
using System.Threading.Tasks;
using Xunit;

namespace Fritz.InstantAPIs.Generators.Tests;
namespace InstantAPIs.Generators.Tests;

public static class DbContextAPIGeneratorTests
{
Expand All @@ -18,7 +18,7 @@ public static class DbContextAPIGeneratorTests
public static async Task GenerateWhenDbContextExists(string idType, string idParseMethod)
{
var code =
$@"using Fritz.InstantAPIs.Generators.Helpers;
$@"using InstantAPIs.Generators.Helpers;
using Microsoft.EntityFrameworkCore;
using MyApplication;
using System;
Expand All @@ -39,7 +39,7 @@ public class Contact
}}
}}";
var generatedCode =
$@"using Fritz.InstantAPIs.Generators.Helpers;
$@"using InstantAPIs.Generators.Helpers;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
Expand Down Expand Up @@ -162,7 +162,7 @@ await TestAssistants.RunAsync(code,
public static async Task GenerateWhenMultipleDbContextsExists()
{
var code =
@"using Fritz.InstantAPIs.Generators.Helpers;
@"using InstantAPIs.Generators.Helpers;
using Microsoft.EntityFrameworkCore;
using MyApplication;
using System;
Expand All @@ -188,7 +188,7 @@ public class Contact
}
}";
var customerGeneratedCode =
@"using Fritz.InstantAPIs.Generators.Helpers;
@"using InstantAPIs.Generators.Helpers;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
Expand Down Expand Up @@ -259,7 +259,7 @@ public static IEndpointRouteBuilder MapCustomerContextToAPIs(this IEndpointRoute
";

var personGeneratedCode =
@"using Fritz.InstantAPIs.Generators.Helpers;
@"using InstantAPIs.Generators.Helpers;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
Expand Down Expand Up @@ -342,7 +342,7 @@ await TestAssistants.RunAsync(code,
public static async Task GenerateWhenIdentifierUsesKeyAttribute()
{
var code =
@"using Fritz.InstantAPIs.Generators.Helpers;
@"using InstantAPIs.Generators.Helpers;
using Microsoft.EntityFrameworkCore;
using MyApplication;
using System;
Expand All @@ -365,7 +365,7 @@ public class Contact
}
}";
var generatedCode =
@"using Fritz.InstantAPIs.Generators.Helpers;
@"using InstantAPIs.Generators.Helpers;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
Expand Down Expand Up @@ -488,7 +488,7 @@ await TestAssistants.RunAsync(code,
public static async Task GenerateWhenTableTypeNamespaceIsDifferentThanDbContextNamespace()
{
var code =
@"using Fritz.InstantAPIs.Generators.Helpers;
@"using InstantAPIs.Generators.Helpers;
using Microsoft.EntityFrameworkCore;
using MyApplication;
using MyTableTypes;
Expand All @@ -512,7 +512,7 @@ public class Contact
}
}";
var generatedCode =
@"using Fritz.InstantAPIs.Generators.Helpers;
@"using InstantAPIs.Generators.Helpers;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
Expand Down Expand Up @@ -616,7 +616,7 @@ await TestAssistants.RunAsync(code,
public static async Task GenerateWhenTypeGivenInAttributeIsNotDbContext()
{
var code =
@"using Fritz.InstantAPIs.Generators.Helpers;
@"using InstantAPIs.Generators.Helpers;
[assembly: InstantAPIsForDbContext(typeof(string))]";

Expand All @@ -632,7 +632,7 @@ await TestAssistants.RunAsync(code,
public static async Task GenerateWhenDbContextExistsAndDoesNotHaveIdProperty()
{
var code =
@"using Fritz.InstantAPIs.Generators.Helpers;
@"using InstantAPIs.Generators.Helpers;
using Microsoft.EntityFrameworkCore;
using MyApplication;
Expand All @@ -651,7 +651,7 @@ public class Contact
}
}";
var generatedCode =
@"using Fritz.InstantAPIs.Generators.Helpers;
@"using InstantAPIs.Generators.Helpers;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
Expand Down Expand Up @@ -730,7 +730,7 @@ await TestAssistants.RunAsync(code,
public static async Task GenerateWhenMultipleAttributeDefinitionsExist()
{
var code =
@"using Fritz.InstantAPIs.Generators.Helpers;
@"using InstantAPIs.Generators.Helpers;
using Microsoft.EntityFrameworkCore;
using MyApplication;
Expand All @@ -750,7 +750,7 @@ public class Contact
}
}";
var generatedCode =
@"using Fritz.InstantAPIs.Generators.Helpers;
@"using InstantAPIs.Generators.Helpers;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Fritz.InstantAPIs.Generators.Diagnostics;
using InstantAPIs.Generators.Diagnostics;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Xunit;

namespace Fritz.InstantAPIs.Generators.Tests.Diagnostics;
namespace InstantAPIs.Generators.Tests.Diagnostics;

public static class DuplicateDefinitionDiagnosticTests
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using Fritz.InstantAPIs.Generators.Diagnostics;
using InstantAPIs.Generators.Diagnostics;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis;
using System;
using Xunit;
using System.Linq;

namespace Fritz.InstantAPIs.Generators.Tests.Diagnostics;
namespace InstantAPIs.Generators.Tests.Diagnostics;

public static class NotADbContextDiagnosticTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Fritz.InstantAPIs.Generators.Helpers\Fritz.InstantAPIs.Generators.Helpers.csproj" />
<ProjectReference Include="..\Fritz.InstantAPIs.Generators\Fritz.InstantAPIs.Generators.csproj" />
<ProjectReference Include="..\InstantAPIs.Generators.Helpers\InstantAPIs.Generators.Helpers.csproj" />
<ProjectReference Include="..\InstantAPIs.Generators\InstantAPIs.Generators.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Fritz.InstantAPIs.Generators.Helpers;
using InstantAPIs.Generators.Helpers;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
Expand All @@ -15,7 +15,7 @@
using System.Reflection;
using System.Threading.Tasks;

namespace Fritz.InstantAPIs.Generators.Tests;
namespace InstantAPIs.Generators.Tests;

using GeneratorTest = CSharpIncrementalSourceGeneratorVerifier<DbContextAPIGenerator>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Linq;
using System.Text;

namespace Fritz.InstantAPIs.Generators.Builders
namespace InstantAPIs.Generators.Builders
{
public static class DbContextAPIBuilder
{
Expand Down Expand Up @@ -43,7 +43,7 @@ public static class DbContextAPIBuilder
var namespaces = new NamespaceGatherer();
namespaces.Add("System");
namespaces.Add("System.Collections.Generic");
namespaces.Add("Fritz.InstantAPIs.Generators.Helpers");
namespaces.Add("InstantAPIs.Generators.Helpers");
namespaces.Add("Microsoft.EntityFrameworkCore");
namespaces.Add("Microsoft.Extensions.Logging");
namespaces.Add("Microsoft.Extensions.Logging.Abstractions");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.CodeDom.Compiler;
using System.Collections.Generic;

namespace Fritz.InstantAPIs.Generators.Builders
namespace InstantAPIs.Generators.Builders
{
internal static class IEndpointRouteBuilderExtensionsBuilder
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;

namespace Fritz.InstantAPIs.Generators.Builders
namespace InstantAPIs.Generators.Builders
{
internal sealed class TablesEnumBuilder
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using Fritz.InstantAPIs.Generators.Builders;
using Fritz.InstantAPIs.Generators.Diagnostics;
using InstantAPIs.Generators.Builders;
using InstantAPIs.Generators.Diagnostics;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Threading;

namespace Fritz.InstantAPIs.Generators;
namespace InstantAPIs.Generators;

[Generator]
public sealed class DbContextAPIGenerator
Expand All @@ -33,7 +33,7 @@ node is AttributeSyntax attributeNode &&
{
// Let's do a best guess that it's the attribute we're looking for.
if(symbol.ContainingType.Name == "InstantAPIsForDbContextAttribute" &&
symbol.ContainingNamespace.ToDisplayString() == "Fritz.InstantAPIs.Generators.Helpers")
symbol.ContainingNamespace.ToDisplayString() == "InstantAPIs.Generators.Helpers")
{
// Find the attribute data for the node.
var attributeData = model.Compilation.Assembly.GetAttributes().SingleOrDefault(
Expand Down
Loading

0 comments on commit 5fb5a53

Please sign in to comment.