Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
needs: [ sonar ]
environment: 'Production'
runs-on: ubuntu-latest
if: github.ref_name == 'dotnet8' && github.event_name == 'push'
if: github.ref_name == 'main' && github.event_name == 'push'

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
needs: [ sonar ]
environment: 'Production Nuget'
runs-on: ubuntu-latest
if: github.ref_name == 'dotnet8' && github.event_name == 'push'
if: github.ref_name == 'main' && github.event_name == 'push'

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>2.3.7</Version>
<Version>2.4.0</Version>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 9 additions & 6 deletions TakasakiStudio.Lina.Common/Extensions/RuleBuilderExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ namespace TakasakiStudio.Lina.Common.Extensions;

public static partial class RuleBuilderExtension
{
public static IRuleBuilder<T, string> ValidCpf<T>(this IRuleBuilder<T, string> ruleBuilder)
public static IRuleBuilderOptions<T, string> IsCnpj<T>(
this IRuleBuilder<T, string> ruleBuilder)
{
return ruleBuilder.Must(BeAValidCpf);
return ruleBuilder.Must(BeAValidCnpj);
}

public static IRuleBuilder<T, string> ValidCnpj<T>(this IRuleBuilder<T, string> ruleBuilder)

public static IRuleBuilderOptions<T, string> IsCpf<T>(
this IRuleBuilder<T, string> ruleBuilder)
{
return ruleBuilder.Must(BeAValidCnpj);
return ruleBuilder.Must(BeAValidCpf);
}

private static bool BeAValidCpf(string input)
public static bool BeAValidCpf(string input)
{
var numbers = ToNumbers(input);
if (numbers.Length != 11 || numbers.Distinct().Count() == 1)
Expand All @@ -40,7 +43,7 @@ private static bool BeAValidCpf(string input)
return numbers[9] == v1 && numbers[10] == v2;
}

private static bool BeAValidCnpj(string input)
public static bool BeAValidCnpj(string input)
{
var numbers = ToNumbers(input);
if (numbers.Length != 14)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions TakasakiStudio.Lina.Test/TakasakiStudio.Lina.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.8.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.8.2" />
<PackageReference Include="MSTest.TestAdapter" Version="3.8.3" />
<PackageReference Include="MSTest.TestFramework" Version="3.8.3" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion TakasakiStudio.Lina.Utils/TakasakiStudio.Lina.Utils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down