Skip to content

Commit

Permalink
Rename Namespace and root class.
Browse files Browse the repository at this point in the history
  • Loading branch information
bijij committed Jan 22, 2021
1 parent cdb2c83 commit 37843a6
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 38 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- name: Build Projects
run: dotnet build
- name: Publish Windows CLI tool
run: dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true --self-contained true -o build ./src/Bottom_NET.CLI
run: dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true --self-contained true -o build ./src/Bottom.CLI
- name: Publish Linux CLI tool
run: dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --self-contained true -o build ./src/Bottom_NET.CLI
run: dotnet publish -c Release -r linux-x64 -p:PublishSingleFile=true --self-contained true -o build ./src/Bottom.CLI
- name: Create release
id: create_release
uses: actions/create-release@v1
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Publish NuGet Package
uses: brandedoutcast/[email protected]
with:
PROJECT_FILE_PATH: ./src/Bottom_NET/Bottom_NET.csproj
PROJECT_FILE_PATH: ./src/Bottom/Bottom.csproj
TAG_COMMIT: false
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}

8 changes: 4 additions & 4 deletions Bottom.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30804.86
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bottom_NET", "src\Bottom_NET\Bottom_NET.csproj", "{9B492510-BB86-4A94-B3E1-8E3FFCFAE282}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bottom", "src\Bottom\Bottom.csproj", "{9B492510-BB86-4A94-B3E1-8E3FFCFAE282}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bottom_NET.CLI", "src\Bottom_NET.CLI\Bottom_NET.CLI.csproj", "{AE84B329-8D06-42F7-8C00-A98F4509552A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bottom.CLI", "src\Bottom.CLI\Bottom.CLI.csproj", "{AE84B329-8D06-42F7-8C00-A98F4509552A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bottom_NET.UnitTest", "src\Bottom_NET.UnitTest\Bottom_NET.UnitTest.csproj", "{7329DA25-3FBA-495F-B31E-C1ADD852DA09}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bottom.UnitTest", "src\Bottom.UnitTest\Bottom.UnitTest.csproj", "{7329DA25-3FBA-495F-B31E-C1ADD852DA09}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bottom_NET.Bench", "src\Bottom_NET.Bench\Bottom_NET.Bench.csproj", "{0814B595-304D-4DA8-B8EE-AB838B9289B2}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bottom.Bench", "src\Bottom.Bench\Bottom.Bench.csproj", "{0814B595-304D-4DA8-B8EE-AB838B9289B2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;

namespace Bottom_NET.Bench
namespace Bottom.Bench
{
public static class BenchmarkData
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Bottom_NET\Bottom_NET.csproj" />
<ProjectReference Include="..\Bottom\Bottom.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Running;

namespace Bottom_NET.Bench
namespace Bottom.Bench
{

[WarmupCount(5)]
Expand All @@ -23,14 +23,14 @@ public BottomBenchmark()
_encode_data = BenchmarkData.ENCODE_INPUT[N];
_decode_data = BenchmarkData.DECODE_INPUT[N];

Bottom.encode_byte(0); // preload cache
Bottomify.encode_byte(0); // preload cache
}

[Benchmark]
public string Encode() => Bottom.encode_string(_encode_data);
public string Encode() => Bottomify.encode_string(_encode_data);

[Benchmark]
public string Decode() => Bottom.decode_string(_decode_data);
public string Decode() => Bottomify.decode_string(_decode_data);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>Bottom_NET.CLI</RootNamespace>
<StartupObject>Bottom_NET.CLI.Program</StartupObject>
<RootNamespace>Bottom.CLI</RootNamespace>
<StartupObject>Bottom.CLI.Program</StartupObject>
<Version>1.1.0</Version>
<AssemblyName>bottom</AssemblyName>
</PropertyGroup>
Expand All @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Bottom_NET\Bottom_NET.csproj" />
<ProjectReference Include="..\Bottom\Bottom.csproj" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions src/Bottom_NET.CLI/Program.cs → src/Bottom.CLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.IO;
using System.Text;

namespace Bottom_NET.CLI
namespace Bottom.CLI
{
class Program
{
Expand Down Expand Up @@ -67,11 +67,11 @@ static int Main(string[] args)
string result;
if (bottomify)
{
result = Bottom.encode_string(text);
result = Bottomify.encode_string(text);
}
else
{
result = Bottom.decode_string(text);
result = Bottomify.decode_string(text);
}
if (!(output is null))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
Expand All @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Bottom_NET\Bottom_NET.csproj" />
<ProjectReference Include="..\Bottom\Bottom.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Bottom_NET;

namespace Bottom_NET.UnitTest
namespace Bottom.UnitTest
{
[TestClass]
public class UnitTests
Expand All @@ -10,7 +9,7 @@ public class UnitTests
public void TestStringEncode()
{
Assert.AreEqual(
Bottom.encode_string("Test"),
Bottomify.encode_string("Test"),
"💖✨✨✨,,,,👉👈💖💖,👉👈💖💖✨🥺👉👈💖💖✨🥺,👉👈"
);
}
Expand All @@ -19,7 +18,7 @@ public void TestStringEncode()
public void TestByteEncode()
{
Assert.AreEqual(
Bottom.encode_byte((byte)'h'),
Bottomify.encode_byte((byte)'h'),
"💖💖,,,,👉👈"
);
}
Expand All @@ -28,7 +27,7 @@ public void TestByteEncode()
public void TestByteDecode()
{
Assert.AreEqual(
Bottom.decode_byte("💖💖,,,,"),
Bottomify.decode_byte("💖💖,,,,"),
(byte)'h'
);
}
Expand All @@ -37,11 +36,11 @@ public void TestByteDecode()
public void TestStringDecode()
{
Assert.AreEqual(
Bottom.decode_string("💖✨✨✨,,,,\u200B💖💖,\u200B💖💖✨🥺\u200B💖💖✨🥺,\u200B"),
Bottomify.decode_string("💖✨✨✨,,,,\u200B💖💖,\u200B💖💖✨🥺\u200B💖💖✨🥺,\u200B"),
"Test"
);
Assert.AreEqual(
Bottom.decode_string("💖✨✨✨,,,,👉👈💖💖,👉👈💖💖✨🥺👉👈💖💖✨🥺,👉👈"),
Bottomify.decode_string("💖✨✨✨,,,,👉👈💖💖,👉👈💖💖✨🥺👉👈💖💖✨🥺,👉👈"),
"Test"
);
}
Expand All @@ -50,11 +49,11 @@ public void TestStringDecode()
public void TestUnicodeStringEncode()
{
Assert.AreEqual(
Bottom.encode_string("🥺"),
Bottomify.encode_string("🥺"),
"🫂✨✨✨✨👉👈💖💖💖🥺,,,,👉👈💖💖💖✨🥺👉👈💖💖💖✨✨✨🥺,👉👈"
);
Assert.AreEqual(
Bottom.encode_string("がんばれ"),
Bottomify.encode_string("がんばれ"),
"🫂✨✨🥺,,👉👈💖💖✨✨🥺,,,,👉👈💖💖✨✨✨✨👉👈🫂✨✨🥺,,👉👈" +
"💖💖✨✨✨👉👈💖💖✨✨✨✨🥺,,👉👈🫂✨✨🥺,,👉👈💖💖✨✨🥺,,,,👉👈" +
"💖💖💖✨✨🥺,👉👈🫂✨✨🥺,,👉👈💖💖✨✨✨👉👈💖💖✨✨✨✨👉👈"
Expand All @@ -65,11 +64,11 @@ public void TestUnicodeStringEncode()
public void TestUnicodeStringDecode()
{
Assert.AreEqual(
Bottom.decode_string("🫂✨✨✨✨👉👈💖💖💖🥺,,,,👉👈💖💖💖✨🥺👉👈💖💖💖✨✨✨🥺,👉👈"),
Bottomify.decode_string("🫂✨✨✨✨👉👈💖💖💖🥺,,,,👉👈💖💖💖✨🥺👉👈💖💖💖✨✨✨🥺,👉👈"),
"🥺"
);
Assert.AreEqual(
Bottom.decode_string(
Bottomify.decode_string(
"🫂✨✨🥺,,👉👈💖💖✨✨🥺,,,,👉👈💖💖✨✨✨✨👉👈🫂✨✨🥺,,👉👈" +
"💖💖✨✨✨👉👈💖💖✨✨✨✨🥺,,👉👈🫂✨✨🥺,,👉👈💖💖✨✨🥺,,,,👉👈" +
"💖💖💖✨✨🥺,👉👈🫂✨✨🥺,,👉👈💖💖✨✨✨👉👈💖💖✨✨✨✨👉👈"
Expand Down
4 changes: 2 additions & 2 deletions src/Bottom_NET/Bottom.cs → src/Bottom/Bottom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
using System.Linq;
using System.Text;

namespace Bottom_NET
namespace Bottom
{
public static class Bottom
public static class Bottomify
{
private const string LINE_ENDING = "👉👈";

Expand Down
8 changes: 4 additions & 4 deletions src/Bottom_NET/Bottom_NET.csproj → src/Bottom/Bottom.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>Bottom_NET</AssemblyName>
<RootNamespace>Bottom_NET</RootNamespace>
<Version>1.1.1</Version>
<AssemblyName>Bottom</AssemblyName>
<RootNamespace>Bottom</RootNamespace>
<Version>2.0.0</Version>
<PackageId>Bottom.NET</PackageId>
<Authors>Bottom Software Foundation</Authors>
<Product>Bottom.NET</Product>
<Description>Bottom encoding utility functions for .NET</Description>
<Copyright>2021</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<AssemblyVersion>1.1.1.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<PackageProjectUrl>https://github.com/bottom-software-foundation/bottom-dotnet/</PackageProjectUrl>
<PackageIcon>logo.png</PackageIcon>
<RepositoryUrl>https://github.com/bottom-software-foundation/bottom-dotnet/</RepositoryUrl>
Expand Down

0 comments on commit 37843a6

Please sign in to comment.