Change slogan and refactor project info naming
The project's slagon has been updated back to "Privacy is sexy" from "Now you have the choice" for enhanced brand clarity and memorability. This change also reflects the community's preference and aligns with the project's established identity. This commit also refactors naming and structure of project information (metadata) struct to enhance clarity and maintainability in relation to changing the slogan. Key changes include: - Update UI components to display the revised slogan. - Remove period from project slogan in code area for consistency with a explanatory comment for future maintainability. - Refactor header container and class names for clarity. - Standardize project metadata usage in `TheCodeArea.vue` to ensure consistency. - Improve code clarity by renaming `IProjectInformation` to `ProjectDetails` and `ProjectInformation` to `GitHubProjectDetails`. - Organize `ProjectDetails` under a dedicated `Project` directory within the domain layer for better structure. These changes are expected to improve the project's appeal and streamline future maintenance and development efforts.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { CodeSubstituter } from '@/application/Parser/ScriptingDefinition/CodeSubstituter';
|
||||
import { IExpressionsCompiler } from '@/application/Parser/Script/Compiler/Expressions/IExpressionsCompiler';
|
||||
import { ProjectInformationStub } from '@tests/unit/shared/Stubs/ProjectInformationStub';
|
||||
import { ProjectDetailsStub } from '@tests/unit/shared/Stubs/ProjectDetailsStub';
|
||||
import { ExpressionsCompilerStub } from '@tests/unit/shared/Stubs/ExpressionsCompilerStub';
|
||||
import { itEachAbsentStringValue } from '@tests/unit/shared/TestCases/AbsentTests';
|
||||
|
||||
@@ -11,26 +11,26 @@ describe('CodeSubstituter', () => {
|
||||
// arrange
|
||||
const expectedError = 'missing code';
|
||||
const code = emptyCode;
|
||||
const info = new ProjectInformationStub();
|
||||
const projectDetails = new ProjectDetailsStub();
|
||||
const sut = new CodeSubstituterBuilder().build();
|
||||
// act
|
||||
const act = () => sut.substitute(code, info);
|
||||
const act = () => sut.substitute(code, projectDetails);
|
||||
// assert
|
||||
expect(act).to.throw(expectedError);
|
||||
}, { excludeNull: true, excludeUndefined: true });
|
||||
});
|
||||
describe('substitutes parameters as expected values', () => {
|
||||
// arrange
|
||||
const info = new ProjectInformationStub();
|
||||
const projectDetails = new ProjectDetailsStub();
|
||||
const date = new Date();
|
||||
const testCases: Array<{ parameter: string, argument: string }> = [
|
||||
{
|
||||
parameter: 'homepage',
|
||||
argument: info.homepage,
|
||||
argument: projectDetails.homepage,
|
||||
},
|
||||
{
|
||||
parameter: 'version',
|
||||
argument: info.version.toString(),
|
||||
argument: projectDetails.version.toString(),
|
||||
},
|
||||
{
|
||||
parameter: 'date',
|
||||
@@ -45,7 +45,7 @@ describe('CodeSubstituter', () => {
|
||||
.withDate(date)
|
||||
.build();
|
||||
// act
|
||||
sut.substitute('non empty code', info);
|
||||
sut.substitute('non empty code', projectDetails);
|
||||
// assert
|
||||
expect(compilerStub.callHistory).to.have.lengthOf(1);
|
||||
const parameters = compilerStub.callHistory[0].args[1];
|
||||
@@ -63,7 +63,7 @@ describe('CodeSubstituter', () => {
|
||||
.withCompiler(compilerStub)
|
||||
.build();
|
||||
// act
|
||||
sut.substitute(expected, new ProjectInformationStub());
|
||||
sut.substitute(expected, new ProjectDetailsStub());
|
||||
// assert
|
||||
expect(compilerStub.callHistory).to.have.lengthOf(1);
|
||||
expect(compilerStub.callHistory[0].args[0]).to.equal(expected);
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ScriptingDefinitionParser } from '@/application/Parser/ScriptingDefinit
|
||||
import { IEnumParser } from '@/application/Common/Enum';
|
||||
import { ICodeSubstituter } from '@/application/Parser/ScriptingDefinition/ICodeSubstituter';
|
||||
import { IScriptingDefinition } from '@/domain/IScriptingDefinition';
|
||||
import { ProjectInformationStub } from '@tests/unit/shared/Stubs/ProjectInformationStub';
|
||||
import { ProjectDetailsStub } from '@tests/unit/shared/Stubs/ProjectDetailsStub';
|
||||
import { EnumParserStub } from '@tests/unit/shared/Stubs/EnumParserStub';
|
||||
import { ScriptingDefinitionDataStub } from '@tests/unit/shared/Stubs/ScriptingDefinitionDataStub';
|
||||
import { CodeSubstituterStub } from '@tests/unit/shared/Stubs/CodeSubstituterStub';
|
||||
@@ -17,7 +17,7 @@ describe('ScriptingDefinitionParser', () => {
|
||||
const expectedLanguage = ScriptingLanguage.batchfile;
|
||||
const languageText = 'batchfile';
|
||||
const expectedName = 'language';
|
||||
const info = new ProjectInformationStub();
|
||||
const projectDetails = new ProjectDetailsStub();
|
||||
const definition = new ScriptingDefinitionDataStub()
|
||||
.withLanguage(languageText);
|
||||
const parserMock = new EnumParserStub<ScriptingLanguage>()
|
||||
@@ -26,7 +26,7 @@ describe('ScriptingDefinitionParser', () => {
|
||||
.withParser(parserMock)
|
||||
.build();
|
||||
// act
|
||||
const actual = sut.parse(definition, info);
|
||||
const actual = sut.parse(definition, projectDetails);
|
||||
// assert
|
||||
expect(actual.language).to.equal(expectedLanguage);
|
||||
});
|
||||
@@ -51,14 +51,14 @@ describe('ScriptingDefinitionParser', () => {
|
||||
];
|
||||
for (const testCase of testCases) {
|
||||
it(testCase.name, () => {
|
||||
const info = new ProjectInformationStub();
|
||||
const projectDetails = new ProjectDetailsStub();
|
||||
const substituterMock = new CodeSubstituterStub()
|
||||
.setup(code, info, expected);
|
||||
.setup(code, projectDetails, expected);
|
||||
const sut = new ScriptingDefinitionParserBuilder()
|
||||
.withSubstituter(substituterMock)
|
||||
.build();
|
||||
// act
|
||||
const definition = sut.parse(testCase.data, info);
|
||||
const definition = sut.parse(testCase.data, projectDetails);
|
||||
// assert
|
||||
const actual = testCase.getActualValue(definition);
|
||||
expect(actual).to.equal(expected);
|
||||
|
||||
Reference in New Issue
Block a user