From f25291910414e5cb2990ad77d115dbc784919092 Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Sat, 4 Mar 2023 12:59:39 +0200 Subject: [PATCH 01/21] ~ --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 72f160a3..9540da57 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Main purpose of this library is to provide a simple way to show spinner in console applications. Spinner could be an indicator of running task. -Also this library provides a way to show progress of running task and messages of some sort, like status messages. +Also, this library provides a way to show progress of running task and messages of some sort, like status messages. For more information see [Features](doc/features.md) and [Examples](example). ### Installation From 13108517d2edf7c88734cde7a1ee9545d9b5d83e Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Sun, 5 Mar 2023 11:54:51 +0200 Subject: [PATCH 02/21] ~ --- .chglog/CHANGELOG.tpl.md | 49 +++++++++++++++ .chglog/config.yml | 27 +++++++++ .gitattributes | 5 +- .gitattributes.keep | 2 +- .make/.bin/gitattributes.sh | 34 +++++++---- CHANGELOG.md | 117 ++++++++++++++++++++++++++++++++++++ 6 files changed, 218 insertions(+), 16 deletions(-) create mode 100644 .chglog/CHANGELOG.tpl.md create mode 100644 .chglog/config.yml create mode 100644 CHANGELOG.md diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md new file mode 100644 index 00000000..c4f9e5c6 --- /dev/null +++ b/.chglog/CHANGELOG.tpl.md @@ -0,0 +1,49 @@ +# Changelog +All notable changes to this project will be documented in this file. + +--- + +{{ if .Versions -}} + +## [Unreleased] + +{{ if .Unreleased.CommitGroups -}} +{{ range .Unreleased.CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{ range .Versions }} + +## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }} +{{ range .CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} + +{{- if .NoteGroups -}} +{{ range .NoteGroups -}} +### {{ .Title }} +{{ range .Notes }} +{{ .Body }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{- if .Versions }} +[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD +{{ range .Versions -}} +{{ if .Tag.Previous -}} +[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }} +{{ end -}} +{{ end -}} +{{ end -}} +- the format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +- this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) diff --git a/.chglog/config.yml b/.chglog/config.yml new file mode 100644 index 00000000..58a2e264 --- /dev/null +++ b/.chglog/config.yml @@ -0,0 +1,27 @@ +style: github +template: CHANGELOG.tpl.md +info: + title: CHANGELOG + repository_url: https://github.com/alecrabbit/php-wcwidth +options: + commits: + # filters: + # Type: + # - feat + # - fix + # - perf + # - refactor + commit_groups: + # title_maps: + # feat: Features + # fix: Bug Fixes + # perf: Performance Improvements + # refactor: Code Refactoring + header: + pattern: "^(\\w*)\\:\\s(.*)$" + pattern_maps: + - Type + - Subject + notes: + keywords: + - BREAKING CHANGE diff --git a/.gitattributes b/.gitattributes index 8acedc4c..d72fd9f2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ +.chglog/ export-ignore composer.lock export-ignore CONTRIBUTING.md export-ignore doc/ export-ignore @@ -5,8 +6,7 @@ docker/ export-ignore docker-compose.dev.yml export-ignore docker-compose.yml export-ignore .dockerignore export-ignore -docker-stack.yml export-ignore -.env export-ignore +.env.dist export-ignore .eval/ export-ignore example/ export-ignore .git/ export-ignore @@ -15,7 +15,6 @@ example/ export-ignore .github/ export-ignore .gitignore export-ignore .idea/ export-ignore -.last_init_time export-ignore .make/ export-ignore Makefile export-ignore phpcs.xml export-ignore diff --git a/.gitattributes.keep b/.gitattributes.keep index 8d9c1aed..5f82a94b 100644 --- a/.gitattributes.keep +++ b/.gitattributes.keep @@ -1,3 +1,3 @@ -src +src/ composer.json LICENSE diff --git a/.make/.bin/gitattributes.sh b/.make/.bin/gitattributes.sh index 0bb814b3..47d45b95 100755 --- a/.make/.bin/gitattributes.sh +++ b/.make/.bin/gitattributes.sh @@ -1,27 +1,37 @@ #!/usr/bin/env bash +function add_entry { + local item="$1" + local file="$2" + if [[ ! "${IGNORES[*]}" =~ ${item} ]] && [[ ! "${EXCLUDES[*]}" =~ ${item} ]]; then + echo "$item export-ignore" >>"$file" + fi +} + DIRECTORY=${1:-$(pwd)} KEEP_FILE=".gitattributes.keep" +IGNORE_FILE=".gitignore" # Get the list of files and directories to exclude EXCLUDES=$(awk '{print $1}' "$KEEP_FILE" | sed 's|^/||') +# Get the list of files and directories to ignore +IGNORES=$(awk '{print $1}' "$IGNORE_FILE" | sed 's|^/||') + # Get the contents of the directory and sort them alphabetically CONTENTS=$(find "$DIRECTORY" -mindepth 1 -maxdepth 1 -exec basename {} \; | sort) # Create an empty .gitattributes file -> "$DIRECTORY/.gitattributes" +>"$DIRECTORY/.gitattributes" # Loop over each file or directory in the contents while read -r item; do - if [[ ! "${EXCLUDES[*]}" =~ "${item#./}" ]]; then - # Check if the item is a directory - if [[ -d "$item" ]]; then - # If the item is a directory, add it to the .gitattributes file with the "export-ignore" attribute - echo "$item/ export-ignore" >> "$DIRECTORY/.gitattributes" - else - # If the item is a file, add it to the .gitattributes file with the "export-ignore" attribute - echo "$item export-ignore" >> "$DIRECTORY/.gitattributes" - fi - fi -done <<< "$CONTENTS" + # Remove leading forward slash from item path + item=${item#/} + if [[ -d "$item" ]]; then + add_entry "$item/" "$DIRECTORY/.gitattributes" + else + add_entry "$item" "$DIRECTORY/.gitattributes" + fi +done <<<"$CONTENTS" + diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..61e1a2da --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,117 @@ +# Changelog +All notable changes to this project will be documented in this file. + +--- + + +## [Unreleased] + + + +## [1.0.0-ALPHA.1+BUILD.1] - 2023-03-03 + + +## 0.55.0 - 2021-11-18 +### Add +- async example + +### Added +- `Dot8BitSpinner::class` +- tree frames set +- new toggle frames set +- monkey frames set +- runner frames set +- extended weather set +- new `Settings::class` method `doNotHideCursor()` +- `php 7.2` build +- `StdErrOutputAdapter::class` +- new method `$spinner->isActive()` +- new frame sets +- Weather frames set `🌀 πŸŒ₯ 🌧 🌨 🌧 🌨 🌧 🌨 🌨 🌧 🌨 πŸŒ₯ 🌀` +- `Defaults::ELLIPSIS` const +- `Colors::class` +- Usage of `Terminal::class` to define color support and terminal window sizes +- `prefix` and `suffix` to all three jugglers` +- `EarthSpinner::class` +- tool to check color sets +- new 256 color style `C256_BG_RAINBOW` +- new 256 color style `C256_BG_YELLOW_WHITE` +- `TimeSpinner::class` +- `BlockSpinner` class +- `advanced_plus.php` example +- color finding tool as example +- `quickstart.php` example +- `simple.php` example + +### Changed +- bumped dependency version +- erasing now done by `\e[X` ANSI code +- internal API +- method `getHideCursor` to `isHideCursor` +- method `setDoNotHideCursor(false)` to `setHideCursor(true)` +- wheather set +- `php-console-colour` version +- Reintroduced `Style::class` +- `Spinner::class` API +- Settings api +- `Symbols` a renamed to `Frames` +- default frames set for `BlockSpinner` + +### Enhanced +- `Strip::controlCodes` test + +### Feature +- pipe and redirect +- final message `$spinner->end('final message')` +- jugglers order can be changed +- 256Color styles now accept bg color +- multibyte fixed message +- changeable message + +### Fixed +- `ProgressSpinner` test +- examples +- mb example +- tests + +### Removed +- unused parameter +- deprecated internal constant +- `EchoOutputAdapter` +- travis `php 7.2` build +- `Style::class`, functionality moved to `Coloring::class` +- `ZodiacSpinner` + +### Rename +- `lastSpinnerString` βž™ `lastOutput` + +### Renamed +- `PaddingStr` βž™ `Spacer` +- `Length` βž™ `Width` +- `StylesInterface` to `Styles` +- `SpinnerSumbols` to `Symbols` + +### Todo +- fix tests + +### Update +- `advanced.php` example + +### Updated +- `alecrabbit/php-console-colour` dependency +- demos +- color sets +- `usage_experiment.php` example +- todo.md +- tests +- README.md +- `demo.php.gif` +- documentation +- `advanced.php` example +- dependencies versions + + +[Unreleased]: https://github.com/alecrabbit/php-wcwidth/compare/1.0.0-ALPHA.1+BUILD.1...HEAD +[1.0.0-ALPHA.1+BUILD.1]: https://github.com/alecrabbit/php-wcwidth/compare/0.55.0...1.0.0-ALPHA.1+BUILD.1 +- the format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +- this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) From e8c604bcbe3bee14fa41beea3a7c886e467be273 Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Sun, 5 Mar 2023 11:59:48 +0200 Subject: [PATCH 03/21] ~ --- .make/.bin/gitattributes.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.make/.bin/gitattributes.sh b/.make/.bin/gitattributes.sh index 47d45b95..962c069b 100755 --- a/.make/.bin/gitattributes.sh +++ b/.make/.bin/gitattributes.sh @@ -13,10 +13,10 @@ KEEP_FILE=".gitattributes.keep" IGNORE_FILE=".gitignore" # Get the list of files and directories to exclude -EXCLUDES=$(awk '{print $1}' "$KEEP_FILE" | sed 's|^/||') +EXCLUDES=$(awk '{print $1}' "$KEEP_FILE" | sed 's|^\.*/\{0,1\}||') # Get the list of files and directories to ignore -IGNORES=$(awk '{print $1}' "$IGNORE_FILE" | sed 's|^/||') +IGNORES=$(awk '{print $1}' "$IGNORE_FILE" | sed 's|^\.*/\{0,1\}||') # Get the contents of the directory and sort them alphabetically CONTENTS=$(find "$DIRECTORY" -mindepth 1 -maxdepth 1 -exec basename {} \; | sort) From 52110b9fb872a0c9a4b1e9676be7d5732fe6ba14 Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Sun, 5 Mar 2023 12:00:07 +0200 Subject: [PATCH 04/21] ~ --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index d72fd9f2..fb71d0f9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ +CHANGELOG.md export-ignore .chglog/ export-ignore composer.lock export-ignore CONTRIBUTING.md export-ignore From cec6a37ce29d4a4eb03049f2234b5706ed180e6a Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Mon, 6 Mar 2023 11:04:09 +0200 Subject: [PATCH 05/21] ~ --- .make/gitattributes.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 .make/gitattributes.sh diff --git a/.make/gitattributes.sh b/.make/gitattributes.sh new file mode 100755 index 00000000..13195f86 --- /dev/null +++ b/.make/gitattributes.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +function add_entry { + local item="$1" + local file="$2" + if [[ ! "${IGNORES[*]}" =~ ${item} ]] && [[ ! "${EXCLUDES[*]}" =~ ${item} ]]; then + echo "$item export-ignore" >>"$file" + fi +} + +DIRECTORY=${1:-$(pwd)} +KEEP_FILE=".gitattributes.keep" +IGNORE_FILE=".gitignore" + +# Get the list of files and directories to exclude +EXCLUDES=$(awk '{print $1}' "$KEEP_FILE" | sed 's|^\.*/\{0,1\}||') + +# Get the list of files and directories to ignore +IGNORES=$(awk '{print $1}' "$IGNORE_FILE" | sed 's|^\.*/\{0,1\}||') + +# Get the contents of the directory and sort them alphabetically +CONTENTS=$(find "$DIRECTORY" -mindepth 1 -maxdepth 1 -exec basename {} \; | sort) + +# Create an empty .gitattributes file +>"$DIRECTORY/.gitattributes" + +# Loop over each file or directory in the contents +while read -r item; do + # Remove leading forward slash from item path + item=${item#/} + if [[ -d "$item" ]]; then + item="$item/" + fi + add_entry "$item" "$DIRECTORY/.gitattributes" +done <<<"$CONTENTS" + From d4e50b01c1aeae6c9525c241d1c185735590e7e8 Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Mon, 6 Mar 2023 11:21:43 +0200 Subject: [PATCH 06/21] ~ --- .make/.bin/gitattributes.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.make/.bin/gitattributes.sh b/.make/.bin/gitattributes.sh index 962c069b..2febf063 100755 --- a/.make/.bin/gitattributes.sh +++ b/.make/.bin/gitattributes.sh @@ -1,9 +1,13 @@ #!/usr/bin/env bash -function add_entry { +function add_export_ignore_entry { local item="$1" local file="$2" - if [[ ! "${IGNORES[*]}" =~ ${item} ]] && [[ ! "${EXCLUDES[*]}" =~ ${item} ]]; then + local ignores="${3:-}" + local excludes="${4:-}" + # Remove leading forward slash from item path + item=${item#/} + if [[ ! "${ignores[*]}" =~ ${item} ]] && [[ ! "${excludes[*]}" =~ ${item} ]]; then echo "$item export-ignore" >>"$file" fi } @@ -11,6 +15,7 @@ function add_entry { DIRECTORY=${1:-$(pwd)} KEEP_FILE=".gitattributes.keep" IGNORE_FILE=".gitignore" +FILE="$DIRECTORY/.gitattributes" # Get the list of files and directories to exclude EXCLUDES=$(awk '{print $1}' "$KEEP_FILE" | sed 's|^\.*/\{0,1\}||') @@ -21,17 +26,13 @@ IGNORES=$(awk '{print $1}' "$IGNORE_FILE" | sed 's|^\.*/\{0,1\}||') # Get the contents of the directory and sort them alphabetically CONTENTS=$(find "$DIRECTORY" -mindepth 1 -maxdepth 1 -exec basename {} \; | sort) -# Create an empty .gitattributes file ->"$DIRECTORY/.gitattributes" +# Create an empty file +> "$FILE" # Loop over each file or directory in the contents while read -r item; do - # Remove leading forward slash from item path - item=${item#/} if [[ -d "$item" ]]; then - add_entry "$item/" "$DIRECTORY/.gitattributes" - else - add_entry "$item" "$DIRECTORY/.gitattributes" + item="$item/" fi + add_export_ignore_entry "$item" "$FILE" "$IGNORES" "$EXCLUDES" done <<<"$CONTENTS" - From 92c88949621f552f4f7ba0684c6835e1001ceaa1 Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Mon, 6 Mar 2023 13:25:11 +0200 Subject: [PATCH 07/21] ~ --- .make/.core/check.env.Makefile | 6 +++--- .make/project/project.install.Makefile | 6 +++--- composer.lock | 24 ++++++++++++------------ var.Makefile | 6 +++++- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/.make/.core/check.env.Makefile b/.make/.core/check.env.Makefile index 5ec7343c..7e201d63 100644 --- a/.make/.core/check.env.Makefile +++ b/.make/.core/check.env.Makefile @@ -1,16 +1,16 @@ _check_env_file: - @${_ECHO} "${_C_COMMENT} \nChecking for file [${_ENV_FILE}]... ${_C_STOP}"; + @${_ECHO} "${_C_COMMENT} \n Checking for file [${_ENV_FILE}]... ${_C_STOP}"; @-if [[ -f "${_ENV_FILE}" ]]; then \ ${_ECHO} "\nFound file [${_ENV_FILE}] \n"; \ ${_ECHO_OK}; \ else \ ${_ECHO} "\n${_C_ERROR} File not found [${_ENV_FILE}] ${_C_STOP}"; \ if [[ -f "${_ENV_DIST_FILE}" ]]; then \ - ${_ECHO} "\n${_C_COMMENT}Copying dist file [${_ENV_DIST_FILE}]... ${_C_STOP}\n"; \ + ${_ECHO} "\n${_C_COMMENT} Copying dist file [${_ENV_DIST_FILE}]... ${_C_STOP}\n"; \ cp ${_ENV_DIST_FILE} ${_ENV_FILE}; \ ${_ECHO_OK}; \ else \ - ${_ECHO} "\n${_C_COMMENT}Creating file [${_ENV_FILE}]... ${_C_STOP}"; \ + ${_ECHO} "\n${_C_COMMENT} Creating file [${_ENV_FILE}]... ${_C_STOP}"; \ ${_ECHO} "${_ENV_FILE_COMMENT}" > ${_ENV_FILE}; \ fi;\ fi; diff --git a/.make/project/project.install.Makefile b/.make/project/project.install.Makefile index ee81dd73..abbb2984 100644 --- a/.make/project/project.install.Makefile +++ b/.make/project/project.install.Makefile @@ -1,4 +1,4 @@ -_do_project_install: - @${_ECHO} "\n${_C_COMMENT} Performing installation...${_C_STOP}\n"; - @${_ECHO_DISABLED}; +_do_project_install: _local_project_install_message _check_env_file +_local_project_install_message: + @${_ECHO} "\n${_C_COMMENT} Performing installation...${_C_STOP}\n"; diff --git a/composer.lock b/composer.lock index c68e0ae4..f8c58cde 100644 --- a/composer.lock +++ b/composer.lock @@ -9,16 +9,16 @@ "packages-dev": [ { "name": "alecrabbit/php-wcwidth", - "version": "1.0.0-ALPHA.2+BUILD.0", + "version": "1.0.0-ALPHA.2+BUILD.1", "source": { "type": "git", "url": "https://github.com/alecrabbit/php-wcwidth.git", - "reference": "a3f35dcb0d77ead30e6d9cc3fe73fc2890659a95" + "reference": "c80fc2f9699a6262282d5c042c61f5094b74a841" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alecrabbit/php-wcwidth/zipball/a3f35dcb0d77ead30e6d9cc3fe73fc2890659a95", - "reference": "a3f35dcb0d77ead30e6d9cc3fe73fc2890659a95", + "url": "https://api.github.com/repos/alecrabbit/php-wcwidth/zipball/c80fc2f9699a6262282d5c042c61f5094b74a841", + "reference": "c80fc2f9699a6262282d5c042c61f5094b74a841", "shasum": "" }, "require": { @@ -66,9 +66,9 @@ ], "support": { "issues": "https://github.com/alecrabbit/php-wcwidth/issues", - "source": "https://github.com/alecrabbit/php-wcwidth/tree/1.0.0-ALPHA.2+BUILD.0" + "source": "https://github.com/alecrabbit/php-wcwidth/tree/1.0.0-ALPHA.2+BUILD.1" }, - "time": "2023-03-03T15:31:38+00:00" + "time": "2023-03-06T09:23:32+00:00" }, { "name": "evenement/evenement", @@ -373,16 +373,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.3", + "version": "v4.15.4", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039" + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/570e980a201d8ed0236b0a62ddf2c9cbb2034039", - "reference": "570e980a201d8ed0236b0a62ddf2c9cbb2034039", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", "shasum": "" }, "require": { @@ -423,9 +423,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.3" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" }, - "time": "2023-01-16T22:05:37+00:00" + "time": "2023-03-05T19:49:14+00:00" }, { "name": "nunomaduro/collision", diff --git a/var.Makefile b/var.Makefile index f0cecf3e..7e6c6470 100644 --- a/var.Makefile +++ b/var.Makefile @@ -1,4 +1,8 @@ -include .env # for environment variables +ifeq ($(wildcard .env),) + # .env file does not exist +else + include .env # to include environment variables +endif # Git related variables WORKING_BRANCH=dev From c3b8c2a0efa6d6697fbe5734bb56c9e889ac76af Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Mon, 6 Mar 2023 13:34:51 +0200 Subject: [PATCH 08/21] ~ --- .github/dependabot.yml | 2 +- .make/.core/check.env.Makefile | 2 +- var.Makefile | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 22ab2df5..3c7663f6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,6 +3,6 @@ updates: - package-ecosystem: composer directory: "/" schedule: - interval: daily + interval: weekly time: "03:00" open-pull-requests-limit: 10 diff --git a/.make/.core/check.env.Makefile b/.make/.core/check.env.Makefile index 7e201d63..979425ed 100644 --- a/.make/.core/check.env.Makefile +++ b/.make/.core/check.env.Makefile @@ -1,7 +1,7 @@ _check_env_file: @${_ECHO} "${_C_COMMENT} \n Checking for file [${_ENV_FILE}]... ${_C_STOP}"; @-if [[ -f "${_ENV_FILE}" ]]; then \ - ${_ECHO} "\nFound file [${_ENV_FILE}] \n"; \ + ${_ECHO} "\n Found file [${_ENV_FILE}] \n"; \ ${_ECHO_OK}; \ else \ ${_ECHO} "\n${_C_ERROR} File not found [${_ENV_FILE}] ${_C_STOP}"; \ diff --git a/var.Makefile b/var.Makefile index 7e6c6470..e5becfc3 100644 --- a/var.Makefile +++ b/var.Makefile @@ -1,7 +1,7 @@ -ifeq ($(wildcard .env),) - # .env file does not exist +ifeq ($(wildcard $(_ENV_FILE)),) + # file does not exist else - include .env # to include environment variables + include $(_ENV_FILE) # to include environment variables endif # Git related variables From eb003ce1c4d3d0881637d4a854a8784f83e58ed5 Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Mon, 6 Mar 2023 13:43:49 +0200 Subject: [PATCH 09/21] ~ --- .gitattributes | 2 -- .gitignore | 6 ++---- .make/gitattributes.sh | 36 ------------------------------- .tools/.gitignore | 2 +- .tools/.report/.build/.gitignore | 1 + .tools/.report/.phploc/.gitignore | 0 6 files changed, 4 insertions(+), 43 deletions(-) delete mode 100755 .make/gitattributes.sh delete mode 100644 .tools/.report/.phploc/.gitignore diff --git a/.gitattributes b/.gitattributes index fb71d0f9..9b411289 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8,7 +8,6 @@ docker-compose.dev.yml export-ignore docker-compose.yml export-ignore .dockerignore export-ignore .env.dist export-ignore -.eval/ export-ignore example/ export-ignore .git/ export-ignore .gitattributes export-ignore @@ -27,4 +26,3 @@ TERMINAL_TITLE export-ignore tests/ export-ignore .tools/ export-ignore var.Makefile export-ignore -vendor/ export-ignore diff --git a/.gitignore b/.gitignore index da755c5d..980fa005 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,5 @@ -/vendor -/.eval -/.phive -/.report/.build/* +vendor/ +.eval/ .ready .last_init_time .start_time diff --git a/.make/gitattributes.sh b/.make/gitattributes.sh deleted file mode 100755 index 13195f86..00000000 --- a/.make/gitattributes.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -function add_entry { - local item="$1" - local file="$2" - if [[ ! "${IGNORES[*]}" =~ ${item} ]] && [[ ! "${EXCLUDES[*]}" =~ ${item} ]]; then - echo "$item export-ignore" >>"$file" - fi -} - -DIRECTORY=${1:-$(pwd)} -KEEP_FILE=".gitattributes.keep" -IGNORE_FILE=".gitignore" - -# Get the list of files and directories to exclude -EXCLUDES=$(awk '{print $1}' "$KEEP_FILE" | sed 's|^\.*/\{0,1\}||') - -# Get the list of files and directories to ignore -IGNORES=$(awk '{print $1}' "$IGNORE_FILE" | sed 's|^\.*/\{0,1\}||') - -# Get the contents of the directory and sort them alphabetically -CONTENTS=$(find "$DIRECTORY" -mindepth 1 -maxdepth 1 -exec basename {} \; | sort) - -# Create an empty .gitattributes file ->"$DIRECTORY/.gitattributes" - -# Loop over each file or directory in the contents -while read -r item; do - # Remove leading forward slash from item path - item=${item#/} - if [[ -d "$item" ]]; then - item="$item/" - fi - add_entry "$item" "$DIRECTORY/.gitattributes" -done <<<"$CONTENTS" - diff --git a/.tools/.gitignore b/.tools/.gitignore index 7dcd5bdc..e9846c60 100644 --- a/.tools/.gitignore +++ b/.tools/.gitignore @@ -1 +1 @@ -/.phpunit.cache +.phpunit.cache/ diff --git a/.tools/.report/.build/.gitignore b/.tools/.report/.build/.gitignore index d6b7ef32..a91312fe 100644 --- a/.tools/.report/.build/.gitignore +++ b/.tools/.report/.build/.gitignore @@ -1,2 +1,3 @@ * +*.* !.gitignore diff --git a/.tools/.report/.phploc/.gitignore b/.tools/.report/.phploc/.gitignore deleted file mode 100644 index e69de29b..00000000 From 3d6da858467b198640610f28e4dd227c8e4884d0 Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Mon, 6 Mar 2023 13:44:11 +0200 Subject: [PATCH 10/21] ~ --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 980fa005..f0d4f297 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,4 @@ vendor/ .last_init_time .start_time docker-stack.yml -.phpunit.result.cache .env From c0ca3276797ae4f981273e7e4196ae4f48a8d1dd Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Wed, 8 Mar 2023 14:49:21 +0200 Subject: [PATCH 11/21] ~ --- .../.make}/.bin/gitattributes.sh | 0 .../.make}/.bin/timed/init_time.sh | 0 .../.make}/.bin/timed/start.sh | 0 .../.make}/.bin/timed/stop.sh | 0 .../.make}/.bin/title/TERMINAL_TITLE | 0 {.make => .deprecated/.make}/.bin/title/title | 0 .../.make}/.core/check.all.Makefile | 0 .../.make}/.core/check.docker.Makefile | 0 .../.make}/.core/check.env.Makefile | 0 .../.make}/.core/check.var.Makefile | 0 .../.make}/.core/colors.Makefile | 0 .../.make}/.core/debug.Makefile | 0 .../.make}/.core/docker.Makefile | 0 .../.make}/.core/echo.Makefile | 0 .../.make}/.core/git.MakeFile | 0 .../.make}/.core/init.Makefile | 0 .../.make}/.core/installation.Makefile | 0 .../.make}/.core/project.Makefile | 0 .../.make}/.core/save.MakeFile | 0 .../.make}/.core/time.Makefile | 0 .../.make}/.core/title.Makefile | 0 .../.make}/.core/uninstall.Makefile | 0 .../.make}/.core/user.Makefile | 0 .../.make}/.core/variables.Makefile | 0 .../.make}/.include/.gitignore | 0 .deprecated/.make/.include/cmd.inc.Makefile | 6 ++ .../.make/.include/composer.inc.Makefile | 3 + .../.make}/.include/dummy.Makefile | 0 .../.make/.include/dumper.inc.Makefile | 4 + .../.make}/.inits/.gitignore | 0 .deprecated/.make/project/app/app.Makefile | 24 +++++ .../.make/project/app/app.init.Makefile | 8 ++ .deprecated/.make/project/project.Makefile | 24 +++++ .../.make/project/project.init.Makefile | 11 +++ .../.make/project/project.install.Makefile | 4 + .gitignore | 2 + .idea/php-console-spinner.iml | 3 +- .make/.include/cmd.inc.Makefile | 4 +- .make/.include/composer.inc.Makefile | 2 +- .make/.include/dumper.inc.Makefile | 2 +- .make/.include/readme.md | 1 + var.Makefile => .make/var.Makefile | 11 ++- LICENSE | 2 +- Makefile | 50 ++-------- README.md | 94 +++---------------- 45 files changed, 125 insertions(+), 130 deletions(-) rename {.make => .deprecated/.make}/.bin/gitattributes.sh (100%) rename {.make => .deprecated/.make}/.bin/timed/init_time.sh (100%) rename {.make => .deprecated/.make}/.bin/timed/start.sh (100%) rename {.make => .deprecated/.make}/.bin/timed/stop.sh (100%) rename {.make => .deprecated/.make}/.bin/title/TERMINAL_TITLE (100%) rename {.make => .deprecated/.make}/.bin/title/title (100%) rename {.make => .deprecated/.make}/.core/check.all.Makefile (100%) rename {.make => .deprecated/.make}/.core/check.docker.Makefile (100%) rename {.make => .deprecated/.make}/.core/check.env.Makefile (100%) rename {.make => .deprecated/.make}/.core/check.var.Makefile (100%) rename {.make => .deprecated/.make}/.core/colors.Makefile (100%) rename {.make => .deprecated/.make}/.core/debug.Makefile (100%) rename {.make => .deprecated/.make}/.core/docker.Makefile (100%) rename {.make => .deprecated/.make}/.core/echo.Makefile (100%) rename {.make => .deprecated/.make}/.core/git.MakeFile (100%) rename {.make => .deprecated/.make}/.core/init.Makefile (100%) rename {.make => .deprecated/.make}/.core/installation.Makefile (100%) rename {.make => .deprecated/.make}/.core/project.Makefile (100%) rename {.make => .deprecated/.make}/.core/save.MakeFile (100%) rename {.make => .deprecated/.make}/.core/time.Makefile (100%) rename {.make => .deprecated/.make}/.core/title.Makefile (100%) rename {.make => .deprecated/.make}/.core/uninstall.Makefile (100%) rename {.make => .deprecated/.make}/.core/user.Makefile (100%) rename {.make => .deprecated/.make}/.core/variables.Makefile (100%) rename {.make => .deprecated/.make}/.include/.gitignore (100%) create mode 100644 .deprecated/.make/.include/cmd.inc.Makefile create mode 100644 .deprecated/.make/.include/composer.inc.Makefile rename {.make => .deprecated/.make}/.include/dummy.Makefile (100%) create mode 100644 .deprecated/.make/.include/dumper.inc.Makefile rename {.make => .deprecated/.make}/.inits/.gitignore (100%) create mode 100644 .deprecated/.make/project/app/app.Makefile create mode 100644 .deprecated/.make/project/app/app.init.Makefile create mode 100644 .deprecated/.make/project/project.Makefile create mode 100644 .deprecated/.make/project/project.init.Makefile create mode 100644 .deprecated/.make/project/project.install.Makefile create mode 100644 .make/.include/readme.md rename var.Makefile => .make/var.Makefile (81%) diff --git a/.make/.bin/gitattributes.sh b/.deprecated/.make/.bin/gitattributes.sh similarity index 100% rename from .make/.bin/gitattributes.sh rename to .deprecated/.make/.bin/gitattributes.sh diff --git a/.make/.bin/timed/init_time.sh b/.deprecated/.make/.bin/timed/init_time.sh similarity index 100% rename from .make/.bin/timed/init_time.sh rename to .deprecated/.make/.bin/timed/init_time.sh diff --git a/.make/.bin/timed/start.sh b/.deprecated/.make/.bin/timed/start.sh similarity index 100% rename from .make/.bin/timed/start.sh rename to .deprecated/.make/.bin/timed/start.sh diff --git a/.make/.bin/timed/stop.sh b/.deprecated/.make/.bin/timed/stop.sh similarity index 100% rename from .make/.bin/timed/stop.sh rename to .deprecated/.make/.bin/timed/stop.sh diff --git a/.make/.bin/title/TERMINAL_TITLE b/.deprecated/.make/.bin/title/TERMINAL_TITLE similarity index 100% rename from .make/.bin/title/TERMINAL_TITLE rename to .deprecated/.make/.bin/title/TERMINAL_TITLE diff --git a/.make/.bin/title/title b/.deprecated/.make/.bin/title/title similarity index 100% rename from .make/.bin/title/title rename to .deprecated/.make/.bin/title/title diff --git a/.make/.core/check.all.Makefile b/.deprecated/.make/.core/check.all.Makefile similarity index 100% rename from .make/.core/check.all.Makefile rename to .deprecated/.make/.core/check.all.Makefile diff --git a/.make/.core/check.docker.Makefile b/.deprecated/.make/.core/check.docker.Makefile similarity index 100% rename from .make/.core/check.docker.Makefile rename to .deprecated/.make/.core/check.docker.Makefile diff --git a/.make/.core/check.env.Makefile b/.deprecated/.make/.core/check.env.Makefile similarity index 100% rename from .make/.core/check.env.Makefile rename to .deprecated/.make/.core/check.env.Makefile diff --git a/.make/.core/check.var.Makefile b/.deprecated/.make/.core/check.var.Makefile similarity index 100% rename from .make/.core/check.var.Makefile rename to .deprecated/.make/.core/check.var.Makefile diff --git a/.make/.core/colors.Makefile b/.deprecated/.make/.core/colors.Makefile similarity index 100% rename from .make/.core/colors.Makefile rename to .deprecated/.make/.core/colors.Makefile diff --git a/.make/.core/debug.Makefile b/.deprecated/.make/.core/debug.Makefile similarity index 100% rename from .make/.core/debug.Makefile rename to .deprecated/.make/.core/debug.Makefile diff --git a/.make/.core/docker.Makefile b/.deprecated/.make/.core/docker.Makefile similarity index 100% rename from .make/.core/docker.Makefile rename to .deprecated/.make/.core/docker.Makefile diff --git a/.make/.core/echo.Makefile b/.deprecated/.make/.core/echo.Makefile similarity index 100% rename from .make/.core/echo.Makefile rename to .deprecated/.make/.core/echo.Makefile diff --git a/.make/.core/git.MakeFile b/.deprecated/.make/.core/git.MakeFile similarity index 100% rename from .make/.core/git.MakeFile rename to .deprecated/.make/.core/git.MakeFile diff --git a/.make/.core/init.Makefile b/.deprecated/.make/.core/init.Makefile similarity index 100% rename from .make/.core/init.Makefile rename to .deprecated/.make/.core/init.Makefile diff --git a/.make/.core/installation.Makefile b/.deprecated/.make/.core/installation.Makefile similarity index 100% rename from .make/.core/installation.Makefile rename to .deprecated/.make/.core/installation.Makefile diff --git a/.make/.core/project.Makefile b/.deprecated/.make/.core/project.Makefile similarity index 100% rename from .make/.core/project.Makefile rename to .deprecated/.make/.core/project.Makefile diff --git a/.make/.core/save.MakeFile b/.deprecated/.make/.core/save.MakeFile similarity index 100% rename from .make/.core/save.MakeFile rename to .deprecated/.make/.core/save.MakeFile diff --git a/.make/.core/time.Makefile b/.deprecated/.make/.core/time.Makefile similarity index 100% rename from .make/.core/time.Makefile rename to .deprecated/.make/.core/time.Makefile diff --git a/.make/.core/title.Makefile b/.deprecated/.make/.core/title.Makefile similarity index 100% rename from .make/.core/title.Makefile rename to .deprecated/.make/.core/title.Makefile diff --git a/.make/.core/uninstall.Makefile b/.deprecated/.make/.core/uninstall.Makefile similarity index 100% rename from .make/.core/uninstall.Makefile rename to .deprecated/.make/.core/uninstall.Makefile diff --git a/.make/.core/user.Makefile b/.deprecated/.make/.core/user.Makefile similarity index 100% rename from .make/.core/user.Makefile rename to .deprecated/.make/.core/user.Makefile diff --git a/.make/.core/variables.Makefile b/.deprecated/.make/.core/variables.Makefile similarity index 100% rename from .make/.core/variables.Makefile rename to .deprecated/.make/.core/variables.Makefile diff --git a/.make/.include/.gitignore b/.deprecated/.make/.include/.gitignore similarity index 100% rename from .make/.include/.gitignore rename to .deprecated/.make/.include/.gitignore diff --git a/.deprecated/.make/.include/cmd.inc.Makefile b/.deprecated/.make/.include/cmd.inc.Makefile new file mode 100644 index 00000000..22aede83 --- /dev/null +++ b/.deprecated/.make/.include/cmd.inc.Makefile @@ -0,0 +1,6 @@ +# # Sets title +cmd: cmd_title + +cmd_title: c="${PROJECT_SHORT_TITLE} πŸ› οΈ Commands" +cmd_title: _title + diff --git a/.deprecated/.make/.include/composer.inc.Makefile b/.deprecated/.make/.include/composer.inc.Makefile new file mode 100644 index 00000000..65fb7033 --- /dev/null +++ b/.deprecated/.make/.include/composer.inc.Makefile @@ -0,0 +1,3 @@ +_app_composer_install: + @${_ECHO} "\n${_C_SELECT} ${APP_PROJECT_NAME} ${_C_STOP} ${_C_INFO}Installing composer dependencies...${_C_STOP}\n"; + @${_DC_EXEC} ${COMPOSER_CONTAINER} composer install --no-interaction diff --git a/.make/.include/dummy.Makefile b/.deprecated/.make/.include/dummy.Makefile similarity index 100% rename from .make/.include/dummy.Makefile rename to .deprecated/.make/.include/dummy.Makefile diff --git a/.deprecated/.make/.include/dumper.inc.Makefile b/.deprecated/.make/.include/dumper.inc.Makefile new file mode 100644 index 00000000..bb02c61c --- /dev/null +++ b/.deprecated/.make/.include/dumper.inc.Makefile @@ -0,0 +1,4 @@ +# # Symfony var-dumper +dumper: c="${PROJECT_SHORT_TITLE} πŸ’‰ VarDumper" +dumper: _title + @${_DC_EXEC} ${DUMPER_CONTAINER} ./vendor/bin/var-dump-server diff --git a/.make/.inits/.gitignore b/.deprecated/.make/.inits/.gitignore similarity index 100% rename from .make/.inits/.gitignore rename to .deprecated/.make/.inits/.gitignore diff --git a/.deprecated/.make/project/app/app.Makefile b/.deprecated/.make/project/app/app.Makefile new file mode 100644 index 00000000..7f7ef5c4 --- /dev/null +++ b/.deprecated/.make/project/app/app.Makefile @@ -0,0 +1,24 @@ +include ${_APP_DIR}/app.init.Makefile + +_tools_run: _run_phploc + +PHPLOC_DIR = /usr/local/bin + +_run_phploc: + @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO}PHPLOC run...${_C_STOP}\n"; + @mkdir -p ${APP_DIR}/.tools/.report/.phploc + @-${_DC_EXEC} ${APP_CONTAINER} ${PHPLOC_DIR}/phploc src > ${APP_DIR}/.tools/.report/.phploc/.phploc_baseline + @-cat ${APP_DIR}/.tools/.report/.phploc/.phploc_baseline + @${_ECHO} "${_C_STOP}\n"; + +test: + @$(eval c ?=) + -${_DC_EXEC} -e XDEBUG_MODE=coverage ${APP_CONTAINER} vendor/bin/phpunit $(c) + +test_coverage: + -${_DC_EXEC} -e XDEBUG_MODE=coverage ${APP_CONTAINER} vendor/bin/phpunit --configuration phpunit.coverage.xml --coverage-text + +test_full: test_coverage test + +# End of file +## diff --git a/.deprecated/.make/project/app/app.init.Makefile b/.deprecated/.make/project/app/app.init.Makefile new file mode 100644 index 00000000..dd29ea4e --- /dev/null +++ b/.deprecated/.make/project/app/app.init.Makefile @@ -0,0 +1,8 @@ +_app_init: _app_init_message _do_app_init + @${_ECHO}; + @${_ECHO_DONE}; + +_app_init_message: + @${_ECHO} "\n${_C_INFO} Applications initialization... ${_C_STOP}\n"; + +_do_app_init: _app_composer_install diff --git a/.deprecated/.make/project/project.Makefile b/.deprecated/.make/project/project.Makefile new file mode 100644 index 00000000..e606e647 --- /dev/null +++ b/.deprecated/.make/project/project.Makefile @@ -0,0 +1,24 @@ +include ${_PROJECT_DIR}/project.init.Makefile +include ${_PROJECT_DIR}/project.install.Makefile +include ${_APP_DIR}/app.Makefile + +project_info: + @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO} Project info...${_C_STOP}\n"; + @${_ECHO_DISABLED}; + @${_ECHO} "${_C_DEBUG} Add project info >>here<<${_C_STOP}\n"; + +release: _release_message _do_release changelog ## Prepare for release + +_release_message: + @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO}Preparing for release...${_C_STOP}\n"; + +_do_release: + @${_BIN_DIR}/gitattributes.sh + +changelog: _changelog_message _do_changelog ## Generate changelog + +_changelog_message: + @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO}Generating changelog...${_C_STOP}\n"; + +_do_changelog: + @git-chglog --output CHANGELOG.md diff --git a/.deprecated/.make/project/project.init.Makefile b/.deprecated/.make/project/project.init.Makefile new file mode 100644 index 00000000..bede504e --- /dev/null +++ b/.deprecated/.make/project/project.init.Makefile @@ -0,0 +1,11 @@ +_do_project_set_flags: + @${_ECHO_DISABLED}; + @#docker run --rm -v ${PWD}/$(SUBMODULE_ONE_DIR):/app --workdir=/app --user=$(shell id -u):$(shell id -g) alpine touch .ready + +_do_project_clear_flags: + @${_ECHO_DISABLED}; + @#docker run --rm -v ${PWD}/$(SUBMODULE_ONE_DIR):/app --workdir=/app alpine rm -f .ready + +_do_project_init: _app_init + @${_ECHO}; + diff --git a/.deprecated/.make/project/project.install.Makefile b/.deprecated/.make/project/project.install.Makefile new file mode 100644 index 00000000..abbb2984 --- /dev/null +++ b/.deprecated/.make/project/project.install.Makefile @@ -0,0 +1,4 @@ +_do_project_install: _local_project_install_message _check_env_file + +_local_project_install_message: + @${_ECHO} "\n${_C_COMMENT} Performing installation...${_C_STOP}\n"; diff --git a/.gitignore b/.gitignore index f0d4f297..40990619 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ vendor/ .start_time docker-stack.yml .env +/.tools/.dam/ +/.deprecated/ diff --git a/.idea/php-console-spinner.iml b/.idea/php-console-spinner.iml index f211ad15..635e5ee5 100644 --- a/.idea/php-console-spinner.iml +++ b/.idea/php-console-spinner.iml @@ -5,7 +5,7 @@ - + @@ -15,6 +15,7 @@ + diff --git a/.make/.include/cmd.inc.Makefile b/.make/.include/cmd.inc.Makefile index 22aede83..37c9c86e 100644 --- a/.make/.include/cmd.inc.Makefile +++ b/.make/.include/cmd.inc.Makefile @@ -1,6 +1,8 @@ # # Sets title -cmd: cmd_title +cmd: cmd_title ## Set cmd title + @${_NO_OP}; cmd_title: c="${PROJECT_SHORT_TITLE} πŸ› οΈ Commands" cmd_title: _title + @${_NO_OP}; diff --git a/.make/.include/composer.inc.Makefile b/.make/.include/composer.inc.Makefile index 65fb7033..5627757e 100644 --- a/.make/.include/composer.inc.Makefile +++ b/.make/.include/composer.inc.Makefile @@ -1,3 +1,3 @@ _app_composer_install: @${_ECHO} "\n${_C_SELECT} ${APP_PROJECT_NAME} ${_C_STOP} ${_C_INFO}Installing composer dependencies...${_C_STOP}\n"; - @${_DC_EXEC} ${COMPOSER_CONTAINER} composer install --no-interaction + @${_DC_EXEC} ${APP_CONTAINER} composer install --no-interaction diff --git a/.make/.include/dumper.inc.Makefile b/.make/.include/dumper.inc.Makefile index bb02c61c..8c80a3f6 100644 --- a/.make/.include/dumper.inc.Makefile +++ b/.make/.include/dumper.inc.Makefile @@ -1,4 +1,4 @@ # # Symfony var-dumper -dumper: c="${PROJECT_SHORT_TITLE} πŸ’‰ VarDumper" +dumper: c="${PROJECT_SHORT_TITLE} πŸ’‰ VarDumper" ## Launch Symfony var-dumper dumper: _title @${_DC_EXEC} ${DUMPER_CONTAINER} ./vendor/bin/var-dump-server diff --git a/.make/.include/readme.md b/.make/.include/readme.md new file mode 100644 index 00000000..62a516f1 --- /dev/null +++ b/.make/.include/readme.md @@ -0,0 +1 @@ +Copy necessary files from .dist/.include directory. \ No newline at end of file diff --git a/var.Makefile b/.make/var.Makefile similarity index 81% rename from var.Makefile rename to .make/var.Makefile index e5becfc3..6c275d70 100644 --- a/var.Makefile +++ b/.make/var.Makefile @@ -4,21 +4,22 @@ else include $(_ENV_FILE) # to include environment variables endif +GLOBAL_DEBUG=0 + # Git related variables WORKING_BRANCH=dev -DEFAULT_COMMIT_MESSAGE=~wp - -# Docker compose files +COMMIT_MESSAGE=~wp -# _FILES = -f ${_DOCKER_COMPOSE_FILE} -f docker-compose.override.${_DC_EXTENSION} +# Docker compose files (uncomment to use dev file) _FILES = \ -f ${_DOCKER_COMPOSE_FILE} \ -f docker-compose.dev.${_DC_EXTENSION} \ -# ------------------------------------------------------------------------------ PROJECT_NAME=php-console-spinner PROJECT_SHORT_TITLE=🏡️ +# ------------------------------------------------------------------------------ +# Your variables here TEST_REPETITION=10 APP_CONTAINER=app COMPOSER_CONTAINER=app diff --git a/LICENSE b/LICENSE index 9718af95..1397c908 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Alec Rabbit +Copyright (c) 2023 Alec Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile index 56a18ebd..d3681ed0 100644 --- a/Makefile +++ b/Makefile @@ -1,44 +1,12 @@ -include ./.make/.core/* -include ./.make/.include/* -include ./.make/project/project.Makefile -include ./var.Makefile +# Root directory +_DN_TOOLS=.tools +# DAM directory +_DN_DAM=.dam -## β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” #️⃣ Makefile #️⃣ β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” -## -help: ## Outputs this help screen - @grep -h -E '(^[a-zA-Z0-9_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "${_C_GREEN}%-30s${_C_STOP} %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/' +# Include core +include ./${_DN_TOOLS}/${_DN_DAM}/core.Makefile -## -## β€”β€” Installation πŸ—οΈ β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”-β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” -install: _install_done ## Perform installation procedure -uninstall: _docker_down _uninstall ## Run uninstall procedure - -## -## β€”β€” Docker 🐳 β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” -up: _docker_up time_current ## Start the docker hub in detached mode - -down: _docker_down time_current ## Stop the docker hub - -reload: _docker_down _docker_generate_stack _docker_up _docker_ps time_current ## Recreate stack file, restart the docker hub and show the current status - -restart: _docker_down _docker_up time_current ## Restart the docker hub - -ps: _docker_ps time_current ## List all running containers - -clear: _docker_down_clear time_current ## Stop the docker hub and remove volumes - -cfg: _docker_config time_current ## Display docker-compose config - -logs: _docker_logs ## Show live logs - -stack: _docker_generate_stack time_current ## Create docker-compose stack file - -build: _docker_pull _docker_build time_current ## Build the docker images - -## -## β€”β€” Project 🚧 β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” -init: _initialize ## Initialize project and start docker hub - -chown: ## Change the owner(user) of the project - sudo chown -R ${USER_ID}:${GROUP_ID} . +# # # +# # !DO NOT EDIT THIS FILE! +# # # \ No newline at end of file diff --git a/README.md b/README.md index 9540da57..ec0fcc40 100644 --- a/README.md +++ b/README.md @@ -1,88 +1,24 @@ -

- Logo -

+# DAM 🦫 aka dev-app-makefile +The set of Makefiles spiced with shell scripts to make development easier -

-Spinner - your task is running -
-

+> WIP -# πŸ‡ΊπŸ‡¦ 🏡️ PHP Console Spinner - -[![PHP Version](https://img.shields.io/packagist/php-v/alecrabbit/php-console-spinner/dev-master.svg)](https://php.net) -[![Build Status](https://github.com/alecrabbit/php-console-spinner/workflows/build/badge.svg)](https://github.com/alecrabbit/php-console-spinner/actions) - -[![Build Status](https://scrutinizer-ci.com/g/alecrabbit/php-console-spinner/badges/build.png?b=master)](https://scrutinizer-ci.com/g/alecrabbit/php-console-spinner/build-status/master) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/alecrabbit/php-console-spinner/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/alecrabbit/php-console-spinner/?branch=master) -[![Code Coverage](https://scrutinizer-ci.com/g/alecrabbit/php-console-spinner/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/alecrabbit/php-console-spinner/?branch=master) - -[![Latest Stable Version](https://poser.pugx.org/alecrabbit/php-console-spinner/v/stable)](https://packagist.org/packages/alecrabbit/php-console-spinner) -[![Packagist Pre Release Version](https://img.shields.io/packagist/vpre/alecrabbit/php-console-spinner)](https://packagist.org/packages/alecrabbit/php-console-spinner) -[![Latest Unstable Version](https://poser.pugx.org/alecrabbit/php-console-spinner/v/unstable)](https://packagist.org/packages/alecrabbit/php-console-spinner) - -[![License](https://poser.pugx.org/alecrabbit/php-console-spinner/license)](https://packagist.org/packages/alecrabbit/php-console-spinner) - -### New version 1.0.0 - -> - WIP -> - ‼️ API is subject to change until `1.0.0-BETA.0` -> - is intended to be used with event loop (see [limitations](doc/limitations.md)) - -> Old version `0.55.0` is available in branch [0.55.x](https://github.com/alecrabbit/php-console-spinner/tree/0.55.x) - -![demo](doc/image/demo/fpdemo.svg) - -+ [Why?](#why) -+ [How does it work?](doc/how_does_it_work.md) -+ [Installation](#installation) -+ [Quick start](#quickstart) -+ [Usage](doc/usage.md) -+ [Features](#features) -+ [Known issues](doc/known_issues.md) -+ [Links](#links) - -### Why? - -Main purpose of this library is to provide a simple way to show spinner in console applications. -Spinner could be an indicator of running task. -Also, this library provides a way to show progress of running task and messages of some sort, like status messages. -For more information see [Features](doc/features.md) and [Examples](example). - -### Installation ```bash -composer require alecrabbit/php-console-spinner +wget -qO- "https://github.com/alecrabbit/dev-app-makefile/archive/refs/tags/0.0.11.tar.gz" \ +| tar -xz && shopt -s dotglob && cp -rv dev-app-makefile-0.0.11/* . \ +&& shopt -u dotglob && rm -r dev-app-makefile-0.0.11 && ./install ``` -### Quick start (asynchronous) - -```php -use AlecRabbit\Spinner\Factory; - -$spinner = Factory::createSpinner(); - -// that's basically it :) +```bash +wget -qO- "https://github.com/alecrabbit/dev-app-makefile/archive/refs/heads/main.tar.gz" \ +| tar -xz && shopt -s dotglob && cp -rv dev-app-makefile-main/* . \ +&& shopt -u dotglob && rm -r dev-app-makefile-main && ./install && make upgrade c=main ``` -> Examples can be found in [example](example) directory - -> For more information see [Usage](doc/usage.md) - -### Features - -> See [Features](doc/features.md) and [limitations](doc/limitations.md) for more details - -| Feature | | -|-------------------------|:---------------------------:| -| Extremely flexible | 🟒️ ️ | -| Zero dependencies ️ | 🟒️ [*](doc/limitations.md) | -| Asynchronous | 🟒️ ️ | -| Synchronous | 🟒️ ️ | -| AutoStart (async) | 🟒️ ️ | -| Signal handling (async) | 🟒️ ️ | -| Cursor auto hide/show | 🟒️ ️ | - - -### Links +```bash +wget -qO- "https://github.com/alecrabbit/dev-app-makefile/archive/refs/heads/dev.tar.gz" \ +| tar -xz && shopt -s dotglob && cp -rv dev-app-makefile-dev/* . \ +&& shopt -u dotglob && rm -r dev-app-makefile-dev && ./install && make upgrade c=dev +``` -- Inspired by [sindresorhus/cli-spinners](https://github.com/sindresorhus/cli-spinners) From 3d5a51aed3429339df31f9f4ba42539d7bffd81d Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Wed, 8 Mar 2023 14:56:09 +0200 Subject: [PATCH 12/21] ~ --- .make/project/app/app.Makefile | 2 -- .make/project/app/app.init.Makefile | 9 ++++++++- .make/project/project.Makefile | 27 +++++++++++--------------- .make/project/project.init.Makefile | 13 +++++-------- .make/project/project.install.Makefile | 2 ++ 5 files changed, 26 insertions(+), 27 deletions(-) diff --git a/.make/project/app/app.Makefile b/.make/project/app/app.Makefile index 7f7ef5c4..b1e505b3 100644 --- a/.make/project/app/app.Makefile +++ b/.make/project/app/app.Makefile @@ -20,5 +20,3 @@ test_coverage: test_full: test_coverage test -# End of file -## diff --git a/.make/project/app/app.init.Makefile b/.make/project/app/app.init.Makefile index dd29ea4e..2d6049f9 100644 --- a/.make/project/app/app.init.Makefile +++ b/.make/project/app/app.init.Makefile @@ -5,4 +5,11 @@ _app_init: _app_init_message _do_app_init _app_init_message: @${_ECHO} "\n${_C_INFO} Applications initialization... ${_C_STOP}\n"; -_do_app_init: _app_composer_install +_do_app_init: + @${_ECHO_DISABLED}; + +_do_app_clear_flags: + @${_ECHO_DISABLED}; + +_do_app_set_flags: + @${_ECHO_DISABLED}; diff --git a/.make/project/project.Makefile b/.make/project/project.Makefile index e606e647..114b89fd 100644 --- a/.make/project/project.Makefile +++ b/.make/project/project.Makefile @@ -2,23 +2,18 @@ include ${_PROJECT_DIR}/project.init.Makefile include ${_PROJECT_DIR}/project.install.Makefile include ${_APP_DIR}/app.Makefile -project_info: - @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO} Project info...${_C_STOP}\n"; +PROJECT_SEL=${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} + +info: ## Outputs project information + @${_ECHO} "\n${PROJECT_SEL} ${_C_INFO} Project info...${_C_STOP}\n"; @${_ECHO_DISABLED}; @${_ECHO} "${_C_DEBUG} Add project info >>here<<${_C_STOP}\n"; -release: _release_message _do_release changelog ## Prepare for release - -_release_message: - @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO}Preparing for release...${_C_STOP}\n"; - -_do_release: - @${_BIN_DIR}/gitattributes.sh - -changelog: _changelog_message _do_changelog ## Generate changelog - -_changelog_message: - @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO}Generating changelog...${_C_STOP}\n"; +reset: _env_reset ## Resets project + @${_NO_OP} -_do_changelog: - @git-chglog --output CHANGELOG.md +_env_reset: + @${_ECHO} "\n${PROJECT_SEL} ${_C_INFO} Resetting environment file...${_C_STOP}\n"; + @cp -v ${_ENV_DIST_FILE} ${_ENV_FILE}; + @${_ECHO}; + @${_ECHO_OK}; diff --git a/.make/project/project.init.Makefile b/.make/project/project.init.Makefile index bede504e..42fc5cfd 100644 --- a/.make/project/project.init.Makefile +++ b/.make/project/project.init.Makefile @@ -1,11 +1,8 @@ -_do_project_set_flags: - @${_ECHO_DISABLED}; - @#docker run --rm -v ${PWD}/$(SUBMODULE_ONE_DIR):/app --workdir=/app --user=$(shell id -u):$(shell id -g) alpine touch .ready +_do_project_set_flags: _do_app_set_flags + @${_NO_OP}; -_do_project_clear_flags: - @${_ECHO_DISABLED}; - @#docker run --rm -v ${PWD}/$(SUBMODULE_ONE_DIR):/app --workdir=/app alpine rm -f .ready +_do_project_clear_flags: _do_app_clear_flags + @${_NO_OP}; _do_project_init: _app_init - @${_ECHO}; - + @${_NO_OP}; diff --git a/.make/project/project.install.Makefile b/.make/project/project.install.Makefile index abbb2984..d6005ecf 100644 --- a/.make/project/project.install.Makefile +++ b/.make/project/project.install.Makefile @@ -1,4 +1,6 @@ _do_project_install: _local_project_install_message _check_env_file + @${_NO_OP} _local_project_install_message: @${_ECHO} "\n${_C_COMMENT} Performing installation...${_C_STOP}\n"; + @${_ECHO_DISABLED}; From b8cc0ac95c24f262e37cc325686f682b6ef4de06 Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Wed, 8 Mar 2023 15:10:29 +0200 Subject: [PATCH 13/21] ~ --- .deprecated/.make/.bin/gitattributes.sh | 38 --------- .deprecated/.make/.bin/timed/init_time.sh | 12 --- .deprecated/.make/.bin/timed/start.sh | 4 - .deprecated/.make/.bin/timed/stop.sh | 9 -- .deprecated/.make/.bin/title/TERMINAL_TITLE | 1 - .deprecated/.make/.bin/title/title | 25 ------ .deprecated/.make/.core/check.all.Makefile | 4 - .deprecated/.make/.core/check.docker.Makefile | 23 ----- .deprecated/.make/.core/check.env.Makefile | 17 ---- .deprecated/.make/.core/check.var.Makefile | 26 ------ .deprecated/.make/.core/colors.Makefile | 14 ---- .deprecated/.make/.core/debug.Makefile | 7 -- .deprecated/.make/.core/docker.Makefile | 53 ------------ .deprecated/.make/.core/echo.Makefile | 6 -- .deprecated/.make/.core/git.MakeFile | 26 ------ .deprecated/.make/.core/init.Makefile | 17 ---- .deprecated/.make/.core/installation.Makefile | 26 ------ .deprecated/.make/.core/project.Makefile | 21 ----- .deprecated/.make/.core/save.MakeFile | 4 - .deprecated/.make/.core/time.Makefile | 13 --- .deprecated/.make/.core/title.Makefile | 9 -- .deprecated/.make/.core/uninstall.Makefile | 39 --------- .deprecated/.make/.core/user.Makefile | 11 --- .deprecated/.make/.core/variables.Makefile | 83 ------------------- .deprecated/.make/.include/.gitignore | 0 .deprecated/.make/.include/cmd.inc.Makefile | 6 -- .../.make/.include/composer.inc.Makefile | 3 - .deprecated/.make/.include/dummy.Makefile | 1 - .../.make/.include/dumper.inc.Makefile | 4 - .deprecated/.make/.inits/.gitignore | 2 - .deprecated/.make/project/app/app.Makefile | 24 ------ .../.make/project/app/app.init.Makefile | 8 -- .deprecated/.make/project/project.Makefile | 24 ------ .../.make/project/project.init.Makefile | 11 --- .../.make/project/project.install.Makefile | 4 - 35 files changed, 575 deletions(-) delete mode 100755 .deprecated/.make/.bin/gitattributes.sh delete mode 100755 .deprecated/.make/.bin/timed/init_time.sh delete mode 100755 .deprecated/.make/.bin/timed/start.sh delete mode 100755 .deprecated/.make/.bin/timed/stop.sh delete mode 100644 .deprecated/.make/.bin/title/TERMINAL_TITLE delete mode 100755 .deprecated/.make/.bin/title/title delete mode 100644 .deprecated/.make/.core/check.all.Makefile delete mode 100644 .deprecated/.make/.core/check.docker.Makefile delete mode 100644 .deprecated/.make/.core/check.env.Makefile delete mode 100644 .deprecated/.make/.core/check.var.Makefile delete mode 100644 .deprecated/.make/.core/colors.Makefile delete mode 100644 .deprecated/.make/.core/debug.Makefile delete mode 100644 .deprecated/.make/.core/docker.Makefile delete mode 100644 .deprecated/.make/.core/echo.Makefile delete mode 100644 .deprecated/.make/.core/git.MakeFile delete mode 100644 .deprecated/.make/.core/init.Makefile delete mode 100644 .deprecated/.make/.core/installation.Makefile delete mode 100644 .deprecated/.make/.core/project.Makefile delete mode 100644 .deprecated/.make/.core/save.MakeFile delete mode 100644 .deprecated/.make/.core/time.Makefile delete mode 100644 .deprecated/.make/.core/title.Makefile delete mode 100644 .deprecated/.make/.core/uninstall.Makefile delete mode 100644 .deprecated/.make/.core/user.Makefile delete mode 100644 .deprecated/.make/.core/variables.Makefile delete mode 100644 .deprecated/.make/.include/.gitignore delete mode 100644 .deprecated/.make/.include/cmd.inc.Makefile delete mode 100644 .deprecated/.make/.include/composer.inc.Makefile delete mode 100644 .deprecated/.make/.include/dummy.Makefile delete mode 100644 .deprecated/.make/.include/dumper.inc.Makefile delete mode 100644 .deprecated/.make/.inits/.gitignore delete mode 100644 .deprecated/.make/project/app/app.Makefile delete mode 100644 .deprecated/.make/project/app/app.init.Makefile delete mode 100644 .deprecated/.make/project/project.Makefile delete mode 100644 .deprecated/.make/project/project.init.Makefile delete mode 100644 .deprecated/.make/project/project.install.Makefile diff --git a/.deprecated/.make/.bin/gitattributes.sh b/.deprecated/.make/.bin/gitattributes.sh deleted file mode 100755 index 2febf063..00000000 --- a/.deprecated/.make/.bin/gitattributes.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -function add_export_ignore_entry { - local item="$1" - local file="$2" - local ignores="${3:-}" - local excludes="${4:-}" - # Remove leading forward slash from item path - item=${item#/} - if [[ ! "${ignores[*]}" =~ ${item} ]] && [[ ! "${excludes[*]}" =~ ${item} ]]; then - echo "$item export-ignore" >>"$file" - fi -} - -DIRECTORY=${1:-$(pwd)} -KEEP_FILE=".gitattributes.keep" -IGNORE_FILE=".gitignore" -FILE="$DIRECTORY/.gitattributes" - -# Get the list of files and directories to exclude -EXCLUDES=$(awk '{print $1}' "$KEEP_FILE" | sed 's|^\.*/\{0,1\}||') - -# Get the list of files and directories to ignore -IGNORES=$(awk '{print $1}' "$IGNORE_FILE" | sed 's|^\.*/\{0,1\}||') - -# Get the contents of the directory and sort them alphabetically -CONTENTS=$(find "$DIRECTORY" -mindepth 1 -maxdepth 1 -exec basename {} \; | sort) - -# Create an empty file -> "$FILE" - -# Loop over each file or directory in the contents -while read -r item; do - if [[ -d "$item" ]]; then - item="$item/" - fi - add_export_ignore_entry "$item" "$FILE" "$IGNORES" "$EXCLUDES" -done <<<"$CONTENTS" diff --git a/.deprecated/.make/.bin/timed/init_time.sh b/.deprecated/.make/.bin/timed/init_time.sh deleted file mode 100755 index 08b3b62d..00000000 --- a/.deprecated/.make/.bin/timed/init_time.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -__NOW=$(date +"%Y-%m-%dT%H%M%S") -__INIT=$(date) -__FILE=".last_init_time" -_INITS_DIR=$1 - -mkdir -p $_INITS_DIR - -if [ -f "$__FILE" ]; then - mv "$__FILE" ${_INITS_DIR}/"${__NOW}".init -fi -echo "${__INIT}" > ${__FILE} diff --git a/.deprecated/.make/.bin/timed/start.sh b/.deprecated/.make/.bin/timed/start.sh deleted file mode 100755 index 4c7e2481..00000000 --- a/.deprecated/.make/.bin/timed/start.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -FILE=".start_time" -START=$(date +"%s") -echo "${START}" > $FILE diff --git a/.deprecated/.make/.bin/timed/stop.sh b/.deprecated/.make/.bin/timed/stop.sh deleted file mode 100755 index 4aa9092b..00000000 --- a/.deprecated/.make/.bin/timed/stop.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -FILE=".start_time" -if [ -f "$FILE" ]; then - START=$(cat $FILE) - STOP=$(date +"%s") - DIFF=$(($STOP-$START)) - printf 'Time elapsed %dh:%dm:%ds\n' $(($DIFF/3600)) $(($DIFF%3600/60)) $(($DIFF%60)) - rm $FILE -fi diff --git a/.deprecated/.make/.bin/title/TERMINAL_TITLE b/.deprecated/.make/.bin/title/TERMINAL_TITLE deleted file mode 100644 index 12f643b2..00000000 --- a/.deprecated/.make/.bin/title/TERMINAL_TITLE +++ /dev/null @@ -1 +0,0 @@ -πŸͺœ Title Example diff --git a/.deprecated/.make/.bin/title/title b/.deprecated/.make/.bin/title/title deleted file mode 100755 index f8498afa..00000000 --- a/.deprecated/.make/.bin/title/title +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env sh -WORK_DIR="${PWD}" -_TERMINAL_TITLE_FILE=TERMINAL_TITLE - -core_get_title_from_file () { - if [ -e "${1}" ]; then - title="$(cat "${1}")" - else - title="${2:-Terminal}" - fi - echo "${title}" -} - -if [ -z "${1}" ] -then - TERM_TITLE="$(core_get_title_from_file "${WORK_DIR}/${_TERMINAL_TITLE_FILE}" "${WORK_DIR}")" -else - TERM_TITLE="${1}" -fi - -core_set_terminal_title () { - printf "\033]0;${1}\007" -} - -core_set_terminal_title "${TERM_TITLE}" diff --git a/.deprecated/.make/.core/check.all.Makefile b/.deprecated/.make/.core/check.all.Makefile deleted file mode 100644 index 3c744a56..00000000 --- a/.deprecated/.make/.core/check.all.Makefile +++ /dev/null @@ -1,4 +0,0 @@ -_perform_checks: _check_message _docker_check _docker_compose_check _check_var_file _check_env_file - -_check_message: - @${_ECHO} "\n${_C_INFO} Performing checks... ${_C_STOP}" diff --git a/.deprecated/.make/.core/check.docker.Makefile b/.deprecated/.make/.core/check.docker.Makefile deleted file mode 100644 index d4310853..00000000 --- a/.deprecated/.make/.core/check.docker.Makefile +++ /dev/null @@ -1,23 +0,0 @@ -# Docker checks -_DOCKER_EXECUTABLE = $(shell command -v docker 2> /dev/null) -_DOCKER_COMPOSE_EXECUTABLE = $(shell command -v docker-compose 2> /dev/null) - -_docker_check: - @${_ECHO} "${_C_COMMENT} \nChecking if 'docker' is installed... ${_C_STOP}" -ifndef _DOCKER_EXECUTABLE - $(error "${red}Docker not found... Please install 'docker' first...${reset}") -endif - @${_ECHO} ""; - @$(_DOCKER) --version - @${_ECHO} ""; - @${_ECHO_OK} - -_docker_compose_check: - @${_ECHO} "${_C_COMMENT} \nChecking if 'docker-compose' is installed... ${_C_STOP}" -ifndef _DOCKER_COMPOSE_EXECUTABLE - $(error "${red}Docker-compose not found... Please install 'docker-compose' first...${reset}") -endif - @${_ECHO} ""; - @${_DOCKER_COMP} --version - @${_ECHO} ""; - @${_ECHO_OK} diff --git a/.deprecated/.make/.core/check.env.Makefile b/.deprecated/.make/.core/check.env.Makefile deleted file mode 100644 index 979425ed..00000000 --- a/.deprecated/.make/.core/check.env.Makefile +++ /dev/null @@ -1,17 +0,0 @@ -_check_env_file: - @${_ECHO} "${_C_COMMENT} \n Checking for file [${_ENV_FILE}]... ${_C_STOP}"; - @-if [[ -f "${_ENV_FILE}" ]]; then \ - ${_ECHO} "\n Found file [${_ENV_FILE}] \n"; \ - ${_ECHO_OK}; \ - else \ - ${_ECHO} "\n${_C_ERROR} File not found [${_ENV_FILE}] ${_C_STOP}"; \ - if [[ -f "${_ENV_DIST_FILE}" ]]; then \ - ${_ECHO} "\n${_C_COMMENT} Copying dist file [${_ENV_DIST_FILE}]... ${_C_STOP}\n"; \ - cp ${_ENV_DIST_FILE} ${_ENV_FILE}; \ - ${_ECHO_OK}; \ - else \ - ${_ECHO} "\n${_C_COMMENT} Creating file [${_ENV_FILE}]... ${_C_STOP}"; \ - ${_ECHO} "${_ENV_FILE_COMMENT}" > ${_ENV_FILE}; \ - fi;\ - fi; - diff --git a/.deprecated/.make/.core/check.var.Makefile b/.deprecated/.make/.core/check.var.Makefile deleted file mode 100644 index 59e2931c..00000000 --- a/.deprecated/.make/.core/check.var.Makefile +++ /dev/null @@ -1,26 +0,0 @@ -_check_var_file: - @${_ECHO} "${_C_COMMENT} \nChecking for var file [${_VAR_FILE}]... ${_C_STOP}"; - @-if [[ -f "${_VAR_FILE}" ]]; then \ - ${_ECHO} "\nVar file ${_VAR_FILE}\n"; \ - ${_ECHO_OK}; \ - else \ - ${_ECHO} "\n${_C_ERROR} ${_VAR_FILE} Not found ${_C_STOP}"; \ - fi; - @-if [[ -f "${_VAR_DIST_FILE}" ]]; then \ - ${_ECHO} "${_C_COMMENT}Present${_VAR_DIST_FILE}...${_C_STOP}"; \ - if [[ -f "${_VAR_FILE}" ]]; then \ - ${_ECHO} "\n${_VAR_FILE}\n"; \ - ${_ECHO_OK}; \ - else \ - ${_ECHO} "${_C_COMMENT}Copying ${_VAR_DIST_FILE} to ${_VAR_FILE}${_C_STOP}"; \ - ${_ECHO} "${_C_DEBUG}";\ - cp -v ${_VAR_DIST_FILE} ${_VAR_FILE}; \ - ${_ECHO} "${_C_STOP}"; \ - ${_ECHO_OK}; \ - fi; \ - ${_ECHO} "${_C_DEBUG}";\ - mv -fv ${_VAR_DIST_FILE} ${_VAR_DIST_CP_FILE} ; \ - ${_ECHO} "${_C_STOP}"; \ - ${_ECHO_OK}; \ - fi; - diff --git a/.deprecated/.make/.core/colors.Makefile b/.deprecated/.make/.core/colors.Makefile deleted file mode 100644 index 65c4e18d..00000000 --- a/.deprecated/.make/.core/colors.Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# Color variables -_C_ERROR=\033[01;38;05;15;48;05;196m -_C_WARNING=\033[01;38;05;226m -_C_YELLOW=\033[33m -_C_COMMENT=${_C_YELLOW} -_C_GREEN=\033[32m -_C_RED=\033[31m -_C_INFO=\033[01;38;05;70m -_C_SELECT=\033[01;04;38;05;19;48;05;227m -_C_STOP=\033[0m -_C_DEBUG=\033[90m - -export red := $(shell tput -Txterm setaf 1) -export reset := $(shell tput -Txterm sgr0) diff --git a/.deprecated/.make/.core/debug.Makefile b/.deprecated/.make/.core/debug.Makefile deleted file mode 100644 index 682db3d8..00000000 --- a/.deprecated/.make/.core/debug.Makefile +++ /dev/null @@ -1,7 +0,0 @@ -_db_makefile_list: - @${_ECHO} "MAKEFILE_LIST: $(MAKEFILE_LIST)"; - @${_ECHO} - -_db_help: _db_makefile_list -# @grep -h -E '^[a-zA-Z_0-9%-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "${TARGET_COLOR}%-30s${RESET} %s\n", $$1, $$2}' - @grep -h -E '(^[a-zA-Z0-9_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "${_C_GREEN}%-30s${_C_STOP} %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/' diff --git a/.deprecated/.make/.core/docker.Makefile b/.deprecated/.make/.core/docker.Makefile deleted file mode 100644 index bb835c23..00000000 --- a/.deprecated/.make/.core/docker.Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# Docker related targets -_docker_init: _docker_down_clear _docker_generate_stack _docker_pull _docker_build - -_docker_down: - @${_ECHO} "\n${_C_WARNING} Stopping containers...${_C_STOP}\n"; - @-${_DC_STACK} down --remove-orphans - @$(_ECHO_EXIT) - -_docker_down_clear: - @${_ECHO} "\n${_C_WARNING} Stopping containers...${_C_STOP}\n"; - @-${_DC_STACK} down -v --remove-orphans - -_docker_pull: - @${_ECHO} "\n${_C_INFO} Pulling images...${_C_STOP}\n"; - @${_DC_STACK} pull - -_docker_build: - @${_ECHO} "\n${_C_INFO} Building containers...${_C_STOP}\n"; - @${_DC_STACK} build - -_docker_build_no_cache: - @${_ECHO} "\n${_C_INFO} Building containers...${_C_STOP}\n"; - @${_ECHO} "${_C_COMMENT} No cache...${_C_STOP}\n"; - @${_ECHO} "${_C_COMMENT} Pulling images...${_C_STOP}\n"; - @${_DC_STACK} build --pull --no-cache - -_docker_up: _title - @${_ECHO} "\n${_C_INFO} Starting containers...${_C_STOP}\n"; - @${_DC_STACK} up --detach - @${_ECHO_OK} - -_docker_up_attached: _title - @${_ECHO} "\n${_C_INFO} Starting containers...${_C_STOP}\n"; - @${_DC_STACK} up - -_docker_logs: c="${PROJECT_SHORT_TITLE} πŸ“” Logs" -_docker_logs: _title - @-${_DC_STACK} logs --tail=0 --follow - @${_ECHO} "\n${_C_WARNING} Logs exited...${_C_STOP}\n"; - -_docker_ps: - @${_ECHO} "\n${_C_INFO} Containers...${_C_STOP}\n"; - @${_DC_STACK} ps - @${_ECHO} "\n"; - -_docker_config: - @${_ECHO} "\n${_C_INFO} Docker-compose config...${_C_STOP}\n"; - @${_DOCKER_COMP} ${_FILES} config - -_docker_generate_stack: - @${_ECHO} "\n${_C_INFO} Generating stack file...${_C_STOP}\n"; - @${_DOCKER_COMP} ${_FILES} config > ${_DC_STACK_FILE} - @${_ECHO_OK} diff --git a/.deprecated/.make/.core/echo.Makefile b/.deprecated/.make/.core/echo.Makefile deleted file mode 100644 index 061f36a8..00000000 --- a/.deprecated/.make/.core/echo.Makefile +++ /dev/null @@ -1,6 +0,0 @@ -_ECHO = echo -e -_ECHO_OK = ${_ECHO} "[${_C_GREEN} OK ${_C_STOP}]" -_ECHO_EXIT = ${_ECHO} "[$(_C_RED) -- ${_C_STOP}]" -_ECHO_DONE = ${_ECHO} "[${_C_GREEN} DONE ${_C_STOP}]" -_ECHO_DISABLED = ${_ECHO} " ${_C_ERROR} DISABLED ${_C_STOP}\n" - diff --git a/.deprecated/.make/.core/git.MakeFile b/.deprecated/.make/.core/git.MakeFile deleted file mode 100644 index 4742db34..00000000 --- a/.deprecated/.make/.core/git.MakeFile +++ /dev/null @@ -1,26 +0,0 @@ -git_ignore_fix: - git rm -r --cached . - git add . - git commit -m ".gitignore fix" - -git_add_all: - git add -A - -git_stash_pop: - git stash pop - -git_stash: - git stash - -git_add_all_n_commit: - git add -A - git commit -m "$(or $(DEFAULT_COMMIT_MESSAGE),WP)" - -git_push: - git push - -git_checkout: - git checkout $(or $(WORKING_BRANCH),dev) - -git_pull: - git pull diff --git a/.deprecated/.make/.core/init.Makefile b/.deprecated/.make/.core/init.Makefile deleted file mode 100644 index b1bc70d6..00000000 --- a/.deprecated/.make/.core/init.Makefile +++ /dev/null @@ -1,17 +0,0 @@ -_initialize: _timer_start _message_initialize _full_init _timer_stop _time_init time_current project_info - @${_ECHO}; - @${_ECHO_DONE}; - @${_ECHO}; - -_message_initialize: - @${_ECHO} ""; - @${_ECHO} "${_C_INFO} Initializing... ${_C_STOP}" - @${_ECHO} ""; - @${_ECHO} "${_C_INFO} Initialize... ${_C_STOP} ${_C_SELECT} ${PROJECT_NAME} ${_C_STOP}" - - -_full_init: _title_from_file _project_clear_flags _project_install _docker_init _docker_up _project_init _project_set_flags _docker_ps _title_from_file - -_init_not_possible: - @${_ECHO} "\n ${_C_ERROR} Initialization is not possible... ${_C_STOP}\n"; - @${_ECHO} "${_C_COMMENT} Please 'make install' first...${_C_STOP}\n"; diff --git a/.deprecated/.make/.core/installation.Makefile b/.deprecated/.make/.core/installation.Makefile deleted file mode 100644 index e827646e..00000000 --- a/.deprecated/.make/.core/installation.Makefile +++ /dev/null @@ -1,26 +0,0 @@ -_install: _installation_message _do_install - @${_ECHO}; - @${_ECHO_DONE}; - -_install_done: - @${_ECHO} "\n${_C_COMMENT} Installation completed...${_C_STOP}\n"; - -_do_install: _terminal_title _perform_checks _install_makefile - -_install_makefile: - @${_ECHO} "\n${_C_COMMENT}Makefile installation...${_C_STOP}\n"; - @mv -f ${_MAKEFILE} ${_DIST_CP_DIR}/${_INSTALL_MAKEFILE} - @mv -f ${_DIST_CP_DIR}/${_MAIN_MAKEFILE} ${_MAKEFILE} - @${_ECHO_OK} - -_terminal_title: _create_terminal_title _title - -_create_terminal_title: - @${_ECHO} "${_C_COMMENT}Creating terminal title file...${_C_STOP}\n"; - @echo "🚧 Project" > ${_TERMINAL_TITLE_FILE} - -_installation_message: - @${_ECHO} "\n${_C_INFO} Installation...${_C_STOP}\n"; - -done: - @${_ECHO} "${_C_GREEN}Done! ${_C_STOP}\n"; diff --git a/.deprecated/.make/.core/project.Makefile b/.deprecated/.make/.core/project.Makefile deleted file mode 100644 index 2b01871b..00000000 --- a/.deprecated/.make/.core/project.Makefile +++ /dev/null @@ -1,21 +0,0 @@ -_project_init: _project_init_message _do_project_init - -_project_init_message: - @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO} Project initialization...${_C_STOP}\n"; - -_project_clear_flags: _project_clear_flags_message _do_project_clear_flags - -_project_clear_flags_message: - @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO} Clearing flags...${_C_STOP}\n"; - -_project_set_flags: _project_set_flags_message _do_project_set_flags - -_project_set_flags_message: - @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO} Setting flags...${_C_STOP}\n"; - -_project_install: _project_install_message _do_project_install - @${_ECHO_DONE}; - -_project_install_message: - @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO} Project installation...${_C_STOP}\n"; - diff --git a/.deprecated/.make/.core/save.MakeFile b/.deprecated/.make/.core/save.MakeFile deleted file mode 100644 index 9196a9f1..00000000 --- a/.deprecated/.make/.core/save.MakeFile +++ /dev/null @@ -1,4 +0,0 @@ -save: save_branch_echo git_add_all git_stash git_checkout git_pull git_stash_pop git_add_all_n_commit git_push - -save_branch_echo: - @${_ECHO} "Saving to branch: '$(or ${WORKING_BRANCH},dev)'" diff --git a/.deprecated/.make/.core/time.Makefile b/.deprecated/.make/.core/time.Makefile deleted file mode 100644 index 7b34d56b..00000000 --- a/.deprecated/.make/.core/time.Makefile +++ /dev/null @@ -1,13 +0,0 @@ -_CURRENT_DATE_LC=$(shell date) - -time_current: - @${_ECHO} "\n${_C_COMMENT} ${_CURRENT_DATE_LC} ${_C_STOP}\n"; - -_timer_start: - @${_TIMED_DIR}/start.sh; - -_time_init: - @${_TIMED_DIR}/init_time.sh ${_INITS_DIR}; - -_timer_stop: - @${_ECHO} "${_C_INFO} $(shell ${_TIMED_DIR}/stop.sh) ${_C_STOP}"; diff --git a/.deprecated/.make/.core/title.Makefile b/.deprecated/.make/.core/title.Makefile deleted file mode 100644 index e6f43823..00000000 --- a/.deprecated/.make/.core/title.Makefile +++ /dev/null @@ -1,9 +0,0 @@ -_title: - @$(eval c ?=) - @${_TITLE_DIR}/title $(c) - -_title_from_file: - @${_TITLE_DIR}/title - - - diff --git a/.deprecated/.make/.core/uninstall.Makefile b/.deprecated/.make/.core/uninstall.Makefile deleted file mode 100644 index c2536b39..00000000 --- a/.deprecated/.make/.core/uninstall.Makefile +++ /dev/null @@ -1,39 +0,0 @@ -_uninstall: _uninstall_message _do_uninstall - @${_ECHO}; - @${_ECHO_DONE}; - -_do_uninstall: _create_dir _uninstall_files - -_uninstall_files: _uninstall_makefile _uninstall_var_file _uninstall_env_file _uninstall_title_file - -_uninstall_title_file: - @${_ECHO} "\n${_C_COMMENT}Title file uninstallation...${_C_STOP}\n"; - @mv -f ${_TERMINAL_TITLE_FILE} ${_UNINSTALL_DIR}/${_TERMINAL_TITLE_FILE} - @${_ECHO_OK} - -_uninstall_env_file: - @${_ECHO} "\n${_C_COMMENT}Environment file uninstallation...${_C_STOP}\n"; - @mv -f ${_ENV_FILE} ${_UNINSTALL_DIR}/${_ENV_FILE} - @${_ECHO_OK} - -_uninstall_makefile: - @${_ECHO} "\n${_C_COMMENT}Makefile uninstallation...${_C_STOP}\n"; - @mv -f ${_MAKEFILE} ${_DIST_CP_DIR}/${_MAIN_MAKEFILE} - @mv -f ${_DIST_CP_DIR}/${_INSTALL_MAKEFILE} ${_MAKEFILE} - @${_ECHO_OK} - -_uninstall_var_file: - @${_ECHO} "\n${_C_COMMENT}Variables file uninstallation...${_C_STOP}\n"; - @mv -f ${_VAR_FILE} ${_VAR_UNINSTALL_FILE} - @mv -f ${_VAR_DIST_CP_FILE} ${_VAR_DIST_FILE} - @${_ECHO_OK} - -_create_dir: - @mkdir -p "${_UNINSTALL_DIR}" - -_uninstall_message: - @${_ECHO} "\n${_C_INFO} Uninstall...${_C_STOP}\n"; - -_uninstall_not_possible: - @${_ECHO} "\n ${_C_ERROR} Uninstall is not possible... ${_C_STOP}\n"; - @${_ECHO} "${_C_COMMENT} Please 'make install' first...${_C_STOP}\n"; diff --git a/.deprecated/.make/.core/user.Makefile b/.deprecated/.make/.core/user.Makefile deleted file mode 100644 index 436d2677..00000000 --- a/.deprecated/.make/.core/user.Makefile +++ /dev/null @@ -1,11 +0,0 @@ -USER_ID=$(shell id -u) -GROUP_ID=$(shell id -g) -USER_NAME=$(shell id -un) -GROUP_NAME=$(shell id -gn) - -_dt_user: - @${_ECHO} "\n${_C_COMMENT}User: ${_C_STOP}"; - @${_ECHO} "USER_ID = ${USER_ID}" - @${_ECHO} "GROUP_ID = ${GROUP_ID}" - @${_ECHO} "USER_NAME = ${USER_NAME}" - @${_ECHO} "GROUP_NAME = ${GROUP_NAME}" diff --git a/.deprecated/.make/.core/variables.Makefile b/.deprecated/.make/.core/variables.Makefile deleted file mode 100644 index b146e290..00000000 --- a/.deprecated/.make/.core/variables.Makefile +++ /dev/null @@ -1,83 +0,0 @@ -# Core -.DEFAULT_GOAL = help -SHELL=/bin/bash - -NOW=$(shell date +"%Y-%m-%dT%H%M%S") -_PWD_DIR=$(shell pwd) - -# Directories, DO NOT EDIT! -_DN_INCLUDE=.include -_DN_DIST=.dist -_DN_MAKE=.make -_DN_CORE=.core -_DN_BIN=.bin -_DN_INITS=.inits -_DN_TIMED=timed -_DN_TITLE=title -_DN_DEPRECATED=.deprecated -_DN_CP=.cp -_DN_APP=app -_DN_PROJECT=project -_DN_TEST=.test - -_MAKE_ROOT=${_PWD_DIR}/${_DN_MAKE} -_BIN_DIR=${_MAKE_ROOT}/${_DN_BIN} -_TIMED_DIR=${_BIN_DIR}/${_DN_TIMED} -_TITLE_DIR=${_BIN_DIR}/${_DN_TITLE} -_DIST_DIR=${_MAKE_ROOT}/${_DN_DIST} -_CORE_DIR=${_MAKE_ROOT}/${_DN_CORE} -_PROJECT_DIR=${_MAKE_ROOT}/${_DN_PROJECT} -_APP_DIR=${_PROJECT_DIR}/${_DN_APP} -_TEST_DIR=${_CORE_DIR}/${_DN_TEST} -_DIST_CP_DIR=${_DIST_DIR}/${_DN_CP} -_INCLUDE_DIR=${_MAKE_ROOT}/${_DN_INCLUDE} -_UNINSTALL_DIR=${_DEPRECATED_DIR}/uninstall.${NOW} -_INITS_DIR=${_MAKE_ROOT}/${_DN_INITS} -_DEPRECATED_DIR=${_INITS_DIR}/${_DN_DEPRECATED} -_VAR_FILE_DIR=. - -# Executables (local) -_DOCKER = $(shell command -v docker 2> /dev/null) -_DOCKER_COMP = $(shell command -v docker-compose 2> /dev/null) - -_TERMINAL_TITLE_FILE=TERMINAL_TITLE - -# Makefile to use for help output -_MAKEFILE = Makefile - -_VAR_FILE_NAME=var.Makefile -_VAR_DIST_FILE_NAME=var.dist.Makefile - -# File to contain all variables -_VAR_FILE=${_VAR_FILE_DIR}/${_VAR_FILE_NAME} -# Dist variables file -_VAR_DIST_FILE=${_DIST_DIR}/${_VAR_DIST_FILE_NAME} - -_VAR_DIST_CP_FILE=${_DIST_CP_DIR}/${_VAR_DIST_FILE_NAME} - -_VAR_UNINSTALL_FILE=${_UNINSTALL_DIR}/${_VAR_FILE_NAME} - -_MAIN_MAKEFILE=main.${_MAKEFILE} -_INSTALL_MAKEFILE=dist.install.${_MAKEFILE} -_MAIN_DIST_MAKEFILE=${_DIST_CP_DIR}/${_MAIN_MAKEFILE} - -# Docker compose files -_DC_EXTENSION = yml - -_DOCKER_COMPOSE_FILE=docker-compose.${_DC_EXTENSION} - -_DC_STACK_FILE = docker-stack.${_DC_EXTENSION} - -_STACK_FILE = -f ${_DC_STACK_FILE} - -_DC_STACK = ${_DOCKER_COMP} ${_STACK_FILE} - -_DC_EXEC = ${_DC_STACK} exec - -_ENV_FILE=.env -_ENV_DIST_FILE=.env.dist -_ENV_FILE_COMMENT=\# Project-specific environment variables - -# Project variables overridable in other files -PROJECT_NAME=project.name -PROJECT_SHORT_TITLE=πŸš€ diff --git a/.deprecated/.make/.include/.gitignore b/.deprecated/.make/.include/.gitignore deleted file mode 100644 index e69de29b..00000000 diff --git a/.deprecated/.make/.include/cmd.inc.Makefile b/.deprecated/.make/.include/cmd.inc.Makefile deleted file mode 100644 index 22aede83..00000000 --- a/.deprecated/.make/.include/cmd.inc.Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# # Sets title -cmd: cmd_title - -cmd_title: c="${PROJECT_SHORT_TITLE} πŸ› οΈ Commands" -cmd_title: _title - diff --git a/.deprecated/.make/.include/composer.inc.Makefile b/.deprecated/.make/.include/composer.inc.Makefile deleted file mode 100644 index 65fb7033..00000000 --- a/.deprecated/.make/.include/composer.inc.Makefile +++ /dev/null @@ -1,3 +0,0 @@ -_app_composer_install: - @${_ECHO} "\n${_C_SELECT} ${APP_PROJECT_NAME} ${_C_STOP} ${_C_INFO}Installing composer dependencies...${_C_STOP}\n"; - @${_DC_EXEC} ${COMPOSER_CONTAINER} composer install --no-interaction diff --git a/.deprecated/.make/.include/dummy.Makefile b/.deprecated/.make/.include/dummy.Makefile deleted file mode 100644 index e484f8b8..00000000 --- a/.deprecated/.make/.include/dummy.Makefile +++ /dev/null @@ -1 +0,0 @@ -# Intentionally left blank diff --git a/.deprecated/.make/.include/dumper.inc.Makefile b/.deprecated/.make/.include/dumper.inc.Makefile deleted file mode 100644 index bb02c61c..00000000 --- a/.deprecated/.make/.include/dumper.inc.Makefile +++ /dev/null @@ -1,4 +0,0 @@ -# # Symfony var-dumper -dumper: c="${PROJECT_SHORT_TITLE} πŸ’‰ VarDumper" -dumper: _title - @${_DC_EXEC} ${DUMPER_CONTAINER} ./vendor/bin/var-dump-server diff --git a/.deprecated/.make/.inits/.gitignore b/.deprecated/.make/.inits/.gitignore deleted file mode 100644 index 67c04e47..00000000 --- a/.deprecated/.make/.inits/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.* -!.gitignore diff --git a/.deprecated/.make/project/app/app.Makefile b/.deprecated/.make/project/app/app.Makefile deleted file mode 100644 index 7f7ef5c4..00000000 --- a/.deprecated/.make/project/app/app.Makefile +++ /dev/null @@ -1,24 +0,0 @@ -include ${_APP_DIR}/app.init.Makefile - -_tools_run: _run_phploc - -PHPLOC_DIR = /usr/local/bin - -_run_phploc: - @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO}PHPLOC run...${_C_STOP}\n"; - @mkdir -p ${APP_DIR}/.tools/.report/.phploc - @-${_DC_EXEC} ${APP_CONTAINER} ${PHPLOC_DIR}/phploc src > ${APP_DIR}/.tools/.report/.phploc/.phploc_baseline - @-cat ${APP_DIR}/.tools/.report/.phploc/.phploc_baseline - @${_ECHO} "${_C_STOP}\n"; - -test: - @$(eval c ?=) - -${_DC_EXEC} -e XDEBUG_MODE=coverage ${APP_CONTAINER} vendor/bin/phpunit $(c) - -test_coverage: - -${_DC_EXEC} -e XDEBUG_MODE=coverage ${APP_CONTAINER} vendor/bin/phpunit --configuration phpunit.coverage.xml --coverage-text - -test_full: test_coverage test - -# End of file -## diff --git a/.deprecated/.make/project/app/app.init.Makefile b/.deprecated/.make/project/app/app.init.Makefile deleted file mode 100644 index dd29ea4e..00000000 --- a/.deprecated/.make/project/app/app.init.Makefile +++ /dev/null @@ -1,8 +0,0 @@ -_app_init: _app_init_message _do_app_init - @${_ECHO}; - @${_ECHO_DONE}; - -_app_init_message: - @${_ECHO} "\n${_C_INFO} Applications initialization... ${_C_STOP}\n"; - -_do_app_init: _app_composer_install diff --git a/.deprecated/.make/project/project.Makefile b/.deprecated/.make/project/project.Makefile deleted file mode 100644 index e606e647..00000000 --- a/.deprecated/.make/project/project.Makefile +++ /dev/null @@ -1,24 +0,0 @@ -include ${_PROJECT_DIR}/project.init.Makefile -include ${_PROJECT_DIR}/project.install.Makefile -include ${_APP_DIR}/app.Makefile - -project_info: - @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO} Project info...${_C_STOP}\n"; - @${_ECHO_DISABLED}; - @${_ECHO} "${_C_DEBUG} Add project info >>here<<${_C_STOP}\n"; - -release: _release_message _do_release changelog ## Prepare for release - -_release_message: - @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO}Preparing for release...${_C_STOP}\n"; - -_do_release: - @${_BIN_DIR}/gitattributes.sh - -changelog: _changelog_message _do_changelog ## Generate changelog - -_changelog_message: - @${_ECHO} "\n${_C_SELECT} ${PROJECT_NAME} ${_C_STOP} ${_C_INFO}Generating changelog...${_C_STOP}\n"; - -_do_changelog: - @git-chglog --output CHANGELOG.md diff --git a/.deprecated/.make/project/project.init.Makefile b/.deprecated/.make/project/project.init.Makefile deleted file mode 100644 index bede504e..00000000 --- a/.deprecated/.make/project/project.init.Makefile +++ /dev/null @@ -1,11 +0,0 @@ -_do_project_set_flags: - @${_ECHO_DISABLED}; - @#docker run --rm -v ${PWD}/$(SUBMODULE_ONE_DIR):/app --workdir=/app --user=$(shell id -u):$(shell id -g) alpine touch .ready - -_do_project_clear_flags: - @${_ECHO_DISABLED}; - @#docker run --rm -v ${PWD}/$(SUBMODULE_ONE_DIR):/app --workdir=/app alpine rm -f .ready - -_do_project_init: _app_init - @${_ECHO}; - diff --git a/.deprecated/.make/project/project.install.Makefile b/.deprecated/.make/project/project.install.Makefile deleted file mode 100644 index abbb2984..00000000 --- a/.deprecated/.make/project/project.install.Makefile +++ /dev/null @@ -1,4 +0,0 @@ -_do_project_install: _local_project_install_message _check_env_file - -_local_project_install_message: - @${_ECHO} "\n${_C_COMMENT} Performing installation...${_C_STOP}\n"; From 01340a180cc1c2f0bfd3d6ad86365201e137b86e Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Wed, 8 Mar 2023 15:13:01 +0200 Subject: [PATCH 14/21] ~wp --- .make/project/app/app.Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.make/project/app/app.Makefile b/.make/project/app/app.Makefile index b1e505b3..d24fbbe2 100644 --- a/.make/project/app/app.Makefile +++ b/.make/project/app/app.Makefile @@ -19,4 +19,4 @@ test_coverage: -${_DC_EXEC} -e XDEBUG_MODE=coverage ${APP_CONTAINER} vendor/bin/phpunit --configuration phpunit.coverage.xml --coverage-text test_full: test_coverage test - + @${_NO_OP}; From 1bcf2ffb3b4242283136d6889123129945a48efa Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Wed, 8 Mar 2023 15:31:06 +0200 Subject: [PATCH 15/21] ~wp --- src/Spinner/Extras/A/AFractionBarSprite.php | 45 --- src/Spinner/Extras/A/AFractionValue.php | 125 -------- .../Extras/A/AProgressWidgetFactory.php | 95 ------ .../Extras/Contract/IFractionBarSprite.php | 18 -- .../Extras/Contract/IFractionValue.php | 29 -- .../Contract/IProgressWidgetFactory.php | 19 -- src/Spinner/Extras/FractionBarSprite.php | 12 - src/Spinner/Extras/FractionValue.php | 12 - .../Extras/Procedure/A/AFractionProcedure.php | 19 -- .../Extras/Procedure/FractionBarProcedure.php | 83 ----- .../Procedure/FractionFrameProcedure.php | 55 ---- .../Procedure/FractionValueProcedure.php | 40 --- .../Extras/Procedure/StepsProcedure.php | 40 --- src/Spinner/Extras/ProgressWidgetFactory.php | 12 - .../Spinner/Core/A/AFractionValueTest.php | 296 ------------------ .../Procedure/A/AFractionBarSpriteTest.php | 39 --- .../A/Override/FractionBarSprite.php | 12 - 17 files changed, 951 deletions(-) delete mode 100644 src/Spinner/Extras/A/AFractionBarSprite.php delete mode 100644 src/Spinner/Extras/A/AFractionValue.php delete mode 100644 src/Spinner/Extras/A/AProgressWidgetFactory.php delete mode 100644 src/Spinner/Extras/Contract/IFractionBarSprite.php delete mode 100644 src/Spinner/Extras/Contract/IFractionValue.php delete mode 100644 src/Spinner/Extras/Contract/IProgressWidgetFactory.php delete mode 100644 src/Spinner/Extras/FractionBarSprite.php delete mode 100644 src/Spinner/Extras/FractionValue.php delete mode 100644 src/Spinner/Extras/Procedure/A/AFractionProcedure.php delete mode 100644 src/Spinner/Extras/Procedure/FractionBarProcedure.php delete mode 100644 src/Spinner/Extras/Procedure/FractionFrameProcedure.php delete mode 100644 src/Spinner/Extras/Procedure/FractionValueProcedure.php delete mode 100644 src/Spinner/Extras/Procedure/StepsProcedure.php delete mode 100644 src/Spinner/Extras/ProgressWidgetFactory.php delete mode 100644 tests/Unit/Spinner/Core/A/AFractionValueTest.php delete mode 100644 tests/Unit/Spinner/Core/Procedure/A/AFractionBarSpriteTest.php delete mode 100644 tests/Unit/Spinner/Core/Procedure/A/Override/FractionBarSprite.php diff --git a/src/Spinner/Extras/A/AFractionBarSprite.php b/src/Spinner/Extras/A/AFractionBarSprite.php deleted file mode 100644 index c9df63df..00000000 --- a/src/Spinner/Extras/A/AFractionBarSprite.php +++ /dev/null @@ -1,45 +0,0 @@ -empty; - } - - public function getDone(): string - { - return $this->done; - } - - public function getCursor(): string - { - return $this->cursor; - } - - public function getOpen(): string - { - return $this->open; - } - - public function getClose(): string - { - return $this->close; - } - -} diff --git a/src/Spinner/Extras/A/AFractionValue.php b/src/Spinner/Extras/A/AFractionValue.php deleted file mode 100644 index 58986301..00000000 --- a/src/Spinner/Extras/A/AFractionValue.php +++ /dev/null @@ -1,125 +0,0 @@ -stepValue = ($this->max - $this->min) / $this->steps; - $this->setValue($startValue); - } - - /** - * @throws InvalidArgumentException - */ - protected static function assert(AFractionValue $value): void - { - match (true) { - $value->min > $value->max => - throw new InvalidArgumentException( - sprintf( - 'Max value should be greater than min value. Min: "%s", Max: "%s".', - $value->min, - $value->max, - ) - ), - $value->min === $value->max => - throw new InvalidArgumentException( - 'Min and Max values cannot be equal.' - ), - 0 > $value->steps || 0 === $value->steps => - throw new InvalidArgumentException( - sprintf( - 'Steps should be greater than 0. Steps: "%s".', - $value->steps, - ) - ), - default => null, - }; - } - - public function getValue(): float - { - return $this->value; - } - - public function setValue(float $value): void - { - $this->value = $value; - $this->checkBounds(); - } - - public function getMin(): float - { - return $this->min; - } - - public function getMax(): float - { - return $this->max; - } - - /** @inheritdoc */ - public function advance(int $steps = 1): void - { - if ($this->finished) { - return; - } - - $this->value += $steps * $this->stepValue; - $this->checkBounds(); - $this->autoFinish(); - } - - protected function checkBounds(): void - { - if ($this->value > $this->max) { - $this->value = $this->max; - } - if ($this->value < $this->min) { - $this->value = $this->min; - } - } - - protected function autoFinish(): void - { - if ($this->autoFinish && $this->value === $this->max) { - $this->finish(); - } - } - - public function finish(): void - { - $this->finished = true; - $this->value = $this->max; - } - - public function getSteps(): int - { - return $this->steps; - } - - public function isFinished(): bool - { - return $this->finished; - } -} diff --git a/src/Spinner/Extras/A/AProgressWidgetFactory.php b/src/Spinner/Extras/A/AProgressWidgetFactory.php deleted file mode 100644 index 0d48e3b4..00000000 --- a/src/Spinner/Extras/A/AProgressWidgetFactory.php +++ /dev/null @@ -1,95 +0,0 @@ -withCharRevolver( - new ProceduralRevolver( - new StepsProcedure( - $progressValue, - ), - $updateInterval - ) - ) - ->build(); - - return - static::create( - $revolver, - $leadingSpacer, - $trailingSpacer - ); - } - - public static function createProgressBar( - IFractionValue $progressValue, - ?IFractionBarSprite $sprite = null, - ?IInterval $updateInterval = null, - ?IFrame $leadingSpacer = null, - ?IFrame $trailingSpacer = null, - ): IWidgetComposite { - $sprite ??= new FractionBarSprite(); - - $procedure = - new FractionBarProcedure( - $progressValue, - $sprite, - ); - - return - static::createProcedureWidget( - $procedure, - $updateInterval, - $leadingSpacer, - $trailingSpacer - ); - } - - public static function createProgressValue( - IFractionValue $progressValue, - ?string $format = null, - ?IInterval $updateInterval = null, - ?IFrame $leadingSpacer = null, - ?IFrame $trailingSpacer = null, - ): IWidgetComposite { - $procedure = - new FractionValueProcedure( - $progressValue, - $format - ); - - return - static::createProcedureWidget( - $procedure, - $updateInterval, - $leadingSpacer, - $trailingSpacer - ); - } -} \ No newline at end of file diff --git a/src/Spinner/Extras/Contract/IFractionBarSprite.php b/src/Spinner/Extras/Contract/IFractionBarSprite.php deleted file mode 100644 index 68208192..00000000 --- a/src/Spinner/Extras/Contract/IFractionBarSprite.php +++ /dev/null @@ -1,18 +0,0 @@ -init(); - } - - protected function init(): void - { - $this->cursorThreshold = $this->fractionValue->getMax(); - $this->units = $this->withCursor ? $this->units - 1 : $this->units; - $this->open = $this->sprite ? $this->sprite->getOpen() : '['; - $this->close = $this->sprite ? $this->sprite->getClose() : ']'; - $this->empty = $this->sprite ? $this->sprite->getEmpty() : '-'; - $this->done = $this->sprite ? $this->sprite->getDone() : '='; - $this->cursor = $this->sprite ? $this->sprite->getCursor() : '>'; - } - - private function getCursor(float $fraction): string - { - return - $fraction >= $this->cursorThreshold - ? $this->done - : $this->cursor; - } - - public function update(float $dt = null): IFrame - { - if ($this->fractionValue->isFinished()) { - if ($this->finishedDelay < 0) { - return Frame::createEmpty(); - } - $this->finishedDelay -= $dt; - } - $v = $this->createBar($this->fractionValue->getValue()); - return - new Frame($v); - } - - private function createBar(float $progress): string - { - $p = (int)($progress * $this->units); - - $cursor = - $this->withCursor - ? $this->getCursor($progress) - : ''; - - return - $this->open . - str_repeat($this->done, $p) . - $cursor . - str_repeat($this->empty, $this->units - $p) . - $this->close; - } -} diff --git a/src/Spinner/Extras/Procedure/FractionFrameProcedure.php b/src/Spinner/Extras/Procedure/FractionFrameProcedure.php deleted file mode 100644 index 1f549b61..00000000 --- a/src/Spinner/Extras/Procedure/FractionFrameProcedure.php +++ /dev/null @@ -1,55 +0,0 @@ - use smth like "IFramesCollection" - ) - { - parent::__construct($fractionValue); - $this->steps = count($frames) - 1; - } - - public function update(float $dt = null): IFrame - { - if ($this->fractionValue->isFinished()) { - if ($this->finishedDelay < 0) { - return Frame::createEmpty(); - } - $this->finishedDelay -= $dt; - } - $v = $this->createColumn($this->fractionValue->getValue()); - return - new Frame($v); - } - - private function createColumn(float $progress): string - { - $p = (int)($progress * $this->steps); - return - $this->frames[$p]; // TODO (2023-01-26 14:45) [Alec Rabbit]: return IFrame from "IFramesCollection" - } -} diff --git a/src/Spinner/Extras/Procedure/FractionValueProcedure.php b/src/Spinner/Extras/Procedure/FractionValueProcedure.php deleted file mode 100644 index 61d1b35f..00000000 --- a/src/Spinner/Extras/Procedure/FractionValueProcedure.php +++ /dev/null @@ -1,40 +0,0 @@ -format = $format ?? self::FORMAT; - parent::__construct($fractionValue); - } - - public function update(float $dt = null): IFrame - { - if ($this->fractionValue->isFinished()) { - if ($this->finishedDelay < 0) { - return Frame::createEmpty(); - } - $this->finishedDelay -= $dt; - } - $v = sprintf( - $this->format, - $this->fractionValue->getValue() * 100 - ); - return - new Frame($v); - } -} diff --git a/src/Spinner/Extras/Procedure/StepsProcedure.php b/src/Spinner/Extras/Procedure/StepsProcedure.php deleted file mode 100644 index 52d8a583..00000000 --- a/src/Spinner/Extras/Procedure/StepsProcedure.php +++ /dev/null @@ -1,40 +0,0 @@ -stepValue = ($fractionValue->getMax() - $fractionValue->getMin()) / $fractionValue->getSteps(); - } - - public function update(float $dt = null): IFrame - { - if ($this->fractionValue->isFinished()) { - if ($this->finishedDelay < 0) { - return Frame::createEmpty(); - } - $this->finishedDelay -= $dt; - } - $v = $this->createSteps($this->fractionValue); - return - new Frame($v); - } - - private function createSteps(IFractionValue $fractionValue): string - { - return - sprintf('%s/%s', (int)($fractionValue->getValue() / $this->stepValue), $fractionValue->getSteps()); - } -} diff --git a/src/Spinner/Extras/ProgressWidgetFactory.php b/src/Spinner/Extras/ProgressWidgetFactory.php deleted file mode 100644 index cc173156..00000000 --- a/src/Spinner/Extras/ProgressWidgetFactory.php +++ /dev/null @@ -1,12 +0,0 @@ - false, - self::VALUE => 0.0, - self::MIN => 0.0, - self::MAX => 1.0, - self::STEPS => 100, - ], - [ - self::ARGUMENTS => [ - self::START => 0, - self::MIN => 0, - self::MAX => 1, - self::STEPS => 100, - ], - ], - ]; - yield [ - [ - self::FINISHED => false, - self::VALUE => $startValue = 0.34, - self::STEPS => 100, - self::MIN => 0.0, - self::MAX => 1.0, - ], - [ - self::ARGUMENTS => [ - self::START => $startValue, - ], - ], - ]; - yield [ - [ - self::FINISHED => false, - self::VALUE => 0.69, - self::STEPS => 100, - self::MIN => 0.0, - self::MAX => 1.0, - ], - [ - self::ARGUMENTS => [ - self::START => 0.35, - ], - self::STEPS => 34, - ], - ]; - yield [ - [ - self::FINISHED => false, - self::VALUE => 0.52, - self::STEPS => 200, - self::MIN => 0.0, - self::MAX => 1.0, - ], - [ - self::ARGUMENTS => [ - self::START => 0.35, - self::STEPS => 200 - ], - self::STEPS => 34, - ], - ]; - yield [ - [ - self::FINISHED => false, - self::VALUE => -0.9, - self::STEPS => 200, - self::MIN => -1.0, - self::MAX => 1.0, - ], - [ - self::ARGUMENTS => [ - self::START => -1.0, - self::STEPS => 200, - self::MIN => -1.0, - self::MAX => 1.0 - ], - self::STEPS => 10, - ], - ]; - yield [ - [ - self::FINISHED => false, - self::VALUE => 1.0, - self::STEPS => 100, - self::MIN => 0.0, - self::MAX => 1.0, - ], - [ - self::ARGUMENTS => [], - self::STEPS => 110, - ], - ]; - yield [ - [ - self::FINISHED => false, - self::VALUE => 0.0, - self::STEPS => 100, - self::MIN => 0.0, - self::MAX => 1.0, - ], - [ - self::ARGUMENTS => [], - self::STEPS => -10, - ], - ]; - yield [ - [ - self::FINISHED => true, - self::VALUE => 1.0, - self::STEPS => 100, - self::MIN => 0.0, - self::MAX => 1.0, - ], - [ - self::ARGUMENTS => [ - self::START => 0.95, - self::AUTO_FINISH => true, - ], - self::STEPS => 20, - ], - ]; - } - - public static function createExceptionData(): iterable - { - // [$expected, $incoming] - yield [ - [ - self::EXCEPTION => [ - self::CLASS_ => InvalidArgumentException::class, - self::MESSAGE => - sprintf( - 'Steps should be greater than 0. Steps: "%s".', - $steps = -2 - ), - ], - ], - [ - self::ARGUMENTS => [ - self::STEPS => $steps, - ], - ], - ]; - yield [ - [ - self::EXCEPTION => [ - self::CLASS_ => InvalidArgumentException::class, - self::MESSAGE => - sprintf( - 'Steps should be greater than 0. Steps: "%s".', - $steps = 0 - ), - ], - ], - [ - self::ARGUMENTS => [ - self::STEPS => $steps, - ], - ], - ]; - yield [ - [ - self::EXCEPTION => [ - self::CLASS_ => InvalidArgumentException::class, - self::MESSAGE => - sprintf( - 'Max value should be greater than min value. Min: "%s", Max: "%s".', - $min = 1, - $max = 0 - ), - ], - ], - [ - self::ARGUMENTS => [ - self::MIN => $min, - self::MAX => $max, - ], - ], - ]; - yield [ - [ - self::EXCEPTION => [ - self::CLASS_ => InvalidArgumentException::class, - self::MESSAGE => - 'Min and Max values cannot be equal.', - ], - ], - [ - self::ARGUMENTS => [ - self::MIN => 1, - self::MAX => 1, - ], - ], - ]; - } - - /** - * @test - * @dataProvider createDataProvider - */ - public function create(array $expected, array $incoming): void - { - $this->setExpectException($expected); - - $fractionValue = self::getInstance($incoming[self::ARGUMENTS] ?? []); - - if (isset($incoming[self::STEPS])) { - $steps = abs($incoming[self::STEPS]); - $step = $incoming[self::STEPS] < 0 ? -1 : 1; - for ($i = 0; $i < $steps; $i++) { - $fractionValue->advance($step); - } - } - - self::assertEqualsWithDelta( - $expected[self::VALUE], - $fractionValue->getValue(), - self::FLOAT_EQUALITY_DELTA - ); - - self::assertSame($expected[self::FINISHED], $fractionValue->isFinished()); - self::assertSame($expected[self::MIN], $fractionValue->getMin()); - self::assertSame($expected[self::MAX], $fractionValue->getMax()); - self::assertSame($expected[self::STEPS], $fractionValue->getSteps()); - } - - public static function getInstance(array $args = []): IFractionValue - { - return new class( - startValue: $args[self::START] ?? 0.0, - steps: $args[self::STEPS] ?? 100, - min: $args[self::MIN] ?? 0.0, - max: $args[self::MAX] ?? 1.0, - autoFinish: $args[self::AUTO_FINISH] ?? false, - ) extends AFractionValue { - }; - } - - /** - * @test - * @dataProvider createDataProvider - */ - public function canBeFinished(array $expected, array $incoming): void - { - $this->setExpectException($expected); - - $fractionValue = self::getInstance($incoming[self::ARGUMENTS] ?? []); - - if (isset($incoming[self::STEPS])) { - $steps = abs($incoming[self::STEPS]); - $step = $incoming[self::STEPS] < 0 ? -1 : 1; - for ($i = 0; $i < $steps; $i++) { - $fractionValue->advance($step); - } - } - - self::assertEqualsWithDelta( - $expected[self::VALUE], - $fractionValue->getValue(), - self::FLOAT_EQUALITY_DELTA - ); - - self::assertSame($expected[self::FINISHED], $fractionValue->isFinished()); - self::assertSame($expected[self::MIN], $fractionValue->getMin()); - self::assertSame($expected[self::MAX], $fractionValue->getMax()); - self::assertSame($expected[self::STEPS], $fractionValue->getSteps()); - - $fractionValue->finish(); - - self::assertTrue($fractionValue->isFinished()); - } - -} diff --git a/tests/Unit/Spinner/Core/Procedure/A/AFractionBarSpriteTest.php b/tests/Unit/Spinner/Core/Procedure/A/AFractionBarSpriteTest.php deleted file mode 100644 index 17b0da8e..00000000 --- a/tests/Unit/Spinner/Core/Procedure/A/AFractionBarSpriteTest.php +++ /dev/null @@ -1,39 +0,0 @@ -getOpen()); - self::assertSame('', $instance->getClose()); - self::assertSame('β–ˆ', $instance->getDone()); - self::assertSame('β–“', $instance->getCursor()); - self::assertSame('β–‘', $instance->getEmpty()); - } - - /** @test */ - public function canCreate(): void - { - $instance = new FractionBarSprite( - empty: 'e', - done: 'd', - cursor: 'c', - open: 'o', - close: 'f', - ); - self::assertSame('e', $instance->getEmpty()); - self::assertSame('d', $instance->getDone()); - self::assertSame('c', $instance->getCursor()); - self::assertSame('o', $instance->getOpen()); - self::assertSame('f', $instance->getClose()); - } -} diff --git a/tests/Unit/Spinner/Core/Procedure/A/Override/FractionBarSprite.php b/tests/Unit/Spinner/Core/Procedure/A/Override/FractionBarSprite.php deleted file mode 100644 index a4e865ca..00000000 --- a/tests/Unit/Spinner/Core/Procedure/A/Override/FractionBarSprite.php +++ /dev/null @@ -1,12 +0,0 @@ - Date: Wed, 8 Mar 2023 15:45:09 +0200 Subject: [PATCH 16/21] ~ --- .idea/php.xml | 1 + composer.json | 1 + composer.lock | 94 ++++++++++++++++++++++++++-------- example/async/progress/app.php | 2 +- 4 files changed, 76 insertions(+), 22 deletions(-) diff --git a/.idea/php.xml b/.idea/php.xml index 5174744f..ce40a9c8 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -69,6 +69,7 @@ + diff --git a/composer.json b/composer.json index d4fa166d..4d93b545 100644 --- a/composer.json +++ b/composer.json @@ -34,6 +34,7 @@ "revolt/event-loop": "^1.0", "nunomaduro/collision": "^7.0", "react/http": "*", + "alecrabbit/php-console-spinner-extras": "dev-main", "alecrabbit/php-wcwidth": "^1.0.0-ALPHA.0" }, "autoload": { diff --git a/composer.lock b/composer.lock index f8c58cde..07a8af35 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,60 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4a6b41f9cb798169d707a6c3f77b2d6e", + "content-hash": "411f68a8fb721fb515ddef94fe69dbc6", "packages": [], "packages-dev": [ + { + "name": "alecrabbit/php-console-spinner-extras", + "version": "1.0.0-ALPHA.1", + "source": { + "type": "git", + "url": "https://github.com/alecrabbit/php-console-spinner-extras.git", + "reference": "752d519bca29be0677f29266e9964040d5c185cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alecrabbit/php-console-spinner-extras/zipball/752d519bca29be0677f29266e9964040d5c185cc", + "reference": "752d519bca29be0677f29266e9964040d5c185cc", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "require-dev": { + "alecrabbit/php-console-spinner": "dev-develop", + "fakerphp/faker": "*", + "nunomaduro/collision": "^7.0", + "phpunit/php-code-coverage": "*", + "phpunit/phpunit": "^10.0", + "symfony/console": "^6.2", + "symfony/var-dumper": "*" + }, + "suggest": { + "ext-mbstring": "For multibyte Unicode string functionality." + }, + "type": "library", + "autoload": { + "psr-4": { + "AlecRabbit\\Spinner\\": "src\\Spinner\\" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Add-ons for alecrabbit/php-console-spinner", + "keywords": [ + "Extras", + "php", + "spinner" + ], + "support": { + "issues": "https://github.com/alecrabbit/php-console-spinner-extras/issues", + "source": "https://github.com/alecrabbit/php-console-spinner-extras/tree/1.0.0-ALPHA.1" + }, + "time": "2023-03-08T13:40:00+00:00" + }, { "name": "alecrabbit/php-wcwidth", "version": "1.0.0-ALPHA.2+BUILD.1", @@ -243,16 +294,16 @@ }, { "name": "filp/whoops", - "version": "2.15.0", + "version": "2.15.1", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "3e8aebbca9f0ae6f618962c4ad514077fd365ab3" + "reference": "e864ac957acd66e1565f25efda61e37791a5db0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/3e8aebbca9f0ae6f618962c4ad514077fd365ab3", - "reference": "3e8aebbca9f0ae6f618962c4ad514077fd365ab3", + "url": "https://api.github.com/repos/filp/whoops/zipball/e864ac957acd66e1565f25efda61e37791a5db0b", + "reference": "e864ac957acd66e1565f25efda61e37791a5db0b", "shasum": "" }, "require": { @@ -302,7 +353,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.15.0" + "source": "https://github.com/filp/whoops/tree/2.15.1" }, "funding": [ { @@ -310,20 +361,20 @@ "type": "github" } ], - "time": "2023-03-03T12:00:00+00:00" + "time": "2023-03-06T18:09:13+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.11.0", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { @@ -361,7 +412,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -369,7 +420,7 @@ "type": "tidelift" } ], - "time": "2022-03-03T13:19:32+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "nikic/php-parser", @@ -719,16 +770,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.0.1", + "version": "10.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "b9c21a93dd8c8eed79879374884ee733259475cc" + "reference": "20800e84296ea4732f9a125e08ce86b4004ae3e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b9c21a93dd8c8eed79879374884ee733259475cc", - "reference": "b9c21a93dd8c8eed79879374884ee733259475cc", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/20800e84296ea4732f9a125e08ce86b4004ae3e4", + "reference": "20800e84296ea4732f9a125e08ce86b4004ae3e4", "shasum": "" }, "require": { @@ -750,8 +801,8 @@ "phpunit/phpunit": "^10.0" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { @@ -784,7 +835,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.0.1" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.0.2" }, "funding": [ { @@ -792,7 +843,7 @@ "type": "github" } ], - "time": "2023-02-25T05:35:03+00:00" + "time": "2023-03-06T13:00:19+00:00" }, { "name": "phpunit/php-file-iterator", @@ -3872,6 +3923,7 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { + "alecrabbit/php-console-spinner-extras": 15, "alecrabbit/php-wcwidth": 15 }, "prefer-stable": false, diff --git a/example/async/progress/app.php b/example/async/progress/app.php index 10dbb943..222b922a 100644 --- a/example/async/progress/app.php +++ b/example/async/progress/app.php @@ -4,7 +4,7 @@ use AlecRabbit\Spinner\Core\Interval; use AlecRabbit\Spinner\Core\Loop\ReactLoopProbe; -use AlecRabbit\Spinner\Extras\FractionValue; +//use AlecRabbit\Spinner\Extras\FractionValue; use AlecRabbit\Spinner\Factory; use AlecRabbit\Spinner\Factory\DefaultsFactory; From 3142c48b55867970c6357299fb7c10144f08289b Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Wed, 8 Mar 2023 15:46:54 +0200 Subject: [PATCH 17/21] ~ --- composer.lock | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/composer.lock b/composer.lock index 07a8af35..0a381997 100644 --- a/composer.lock +++ b/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "411f68a8fb721fb515ddef94fe69dbc6", + "content-hash": "5d1f0211e7c06c264daf5321c82344ac", "packages": [], "packages-dev": [ { "name": "alecrabbit/php-console-spinner-extras", - "version": "1.0.0-ALPHA.1", + "version": "dev-main", "source": { "type": "git", "url": "https://github.com/alecrabbit/php-console-spinner-extras.git", - "reference": "752d519bca29be0677f29266e9964040d5c185cc" + "reference": "6b493079548de1a66578f8da6628505e61416300" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alecrabbit/php-console-spinner-extras/zipball/752d519bca29be0677f29266e9964040d5c185cc", - "reference": "752d519bca29be0677f29266e9964040d5c185cc", + "url": "https://api.github.com/repos/alecrabbit/php-console-spinner-extras/zipball/6b493079548de1a66578f8da6628505e61416300", + "reference": "6b493079548de1a66578f8da6628505e61416300", "shasum": "" }, "require": { @@ -36,6 +36,7 @@ "suggest": { "ext-mbstring": "For multibyte Unicode string functionality." }, + "default-branch": true, "type": "library", "autoload": { "psr-4": { @@ -54,9 +55,9 @@ ], "support": { "issues": "https://github.com/alecrabbit/php-console-spinner-extras/issues", - "source": "https://github.com/alecrabbit/php-console-spinner-extras/tree/1.0.0-ALPHA.1" + "source": "https://github.com/alecrabbit/php-console-spinner-extras/tree/main" }, - "time": "2023-03-08T13:40:00+00:00" + "time": "2023-03-08T13:44:29+00:00" }, { "name": "alecrabbit/php-wcwidth", @@ -3923,7 +3924,7 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "alecrabbit/php-console-spinner-extras": 15, + "alecrabbit/php-console-spinner-extras": 20, "alecrabbit/php-wcwidth": 15 }, "prefer-stable": false, From d22f31cbd2dc7f0879e37ff011c308d232292661 Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Wed, 8 Mar 2023 15:52:47 +0200 Subject: [PATCH 18/21] ~wp --- .gitattributes | 2 -- .gitignore | 2 +- .tools/.dam/.gitignore | 4 ++++ composer.lock | 8 ++++---- 4 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 .tools/.dam/.gitignore diff --git a/.gitattributes b/.gitattributes index 9b411289..a61547cf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,7 +9,6 @@ docker-compose.yml export-ignore .dockerignore export-ignore .env.dist export-ignore example/ export-ignore -.git/ export-ignore .gitattributes export-ignore .gitattributes.keep export-ignore .github/ export-ignore @@ -25,4 +24,3 @@ README.md export-ignore TERMINAL_TITLE export-ignore tests/ export-ignore .tools/ export-ignore -var.Makefile export-ignore diff --git a/.gitignore b/.gitignore index 40990619..fe47514a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,5 @@ vendor/ .start_time docker-stack.yml .env -/.tools/.dam/ + /.deprecated/ diff --git a/.tools/.dam/.gitignore b/.tools/.dam/.gitignore new file mode 100644 index 00000000..84fab361 --- /dev/null +++ b/.tools/.dam/.gitignore @@ -0,0 +1,4 @@ +* +*.* +!.gitignore + diff --git a/composer.lock b/composer.lock index 0a381997..f787ed5b 100644 --- a/composer.lock +++ b/composer.lock @@ -13,12 +13,12 @@ "source": { "type": "git", "url": "https://github.com/alecrabbit/php-console-spinner-extras.git", - "reference": "6b493079548de1a66578f8da6628505e61416300" + "reference": "e76aa11e432fa87d24776e9dd8a0dc3a1a3bf9d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alecrabbit/php-console-spinner-extras/zipball/6b493079548de1a66578f8da6628505e61416300", - "reference": "6b493079548de1a66578f8da6628505e61416300", + "url": "https://api.github.com/repos/alecrabbit/php-console-spinner-extras/zipball/e76aa11e432fa87d24776e9dd8a0dc3a1a3bf9d2", + "reference": "e76aa11e432fa87d24776e9dd8a0dc3a1a3bf9d2", "shasum": "" }, "require": { @@ -57,7 +57,7 @@ "issues": "https://github.com/alecrabbit/php-console-spinner-extras/issues", "source": "https://github.com/alecrabbit/php-console-spinner-extras/tree/main" }, - "time": "2023-03-08T13:44:29+00:00" + "time": "2023-03-08T13:49:36+00:00" }, { "name": "alecrabbit/php-wcwidth", From 304967472f011e463cbf986f00de64f87ccc1a4e Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Wed, 8 Mar 2023 15:53:04 +0200 Subject: [PATCH 19/21] ~wp --- .tools/.dam/.gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.tools/.dam/.gitignore b/.tools/.dam/.gitignore index 84fab361..a91312fe 100644 --- a/.tools/.dam/.gitignore +++ b/.tools/.dam/.gitignore @@ -1,4 +1,3 @@ * *.* !.gitignore - From a1bbcd0a794f4b173e1ae887bb01f39ad1c044fb Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Wed, 8 Mar 2023 16:05:28 +0200 Subject: [PATCH 20/21] ~wp --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index fe47514a..3becbf68 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,3 @@ vendor/ docker-stack.yml .env -/.deprecated/ From d228295afe2645eb10d9f27c852597a30a912fc8 Mon Sep 17 00:00:00 2001 From: Alec Rabbit Date: Wed, 8 Mar 2023 16:07:39 +0200 Subject: [PATCH 21/21] ~ --- composer.lock | 8 ++++---- example/async/progress/app.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.lock b/composer.lock index f787ed5b..c2e0a408 100644 --- a/composer.lock +++ b/composer.lock @@ -13,12 +13,12 @@ "source": { "type": "git", "url": "https://github.com/alecrabbit/php-console-spinner-extras.git", - "reference": "e76aa11e432fa87d24776e9dd8a0dc3a1a3bf9d2" + "reference": "9e0ac70503b8525e7a9ceb0f777c6e3b0054bbc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alecrabbit/php-console-spinner-extras/zipball/e76aa11e432fa87d24776e9dd8a0dc3a1a3bf9d2", - "reference": "e76aa11e432fa87d24776e9dd8a0dc3a1a3bf9d2", + "url": "https://api.github.com/repos/alecrabbit/php-console-spinner-extras/zipball/9e0ac70503b8525e7a9ceb0f777c6e3b0054bbc1", + "reference": "9e0ac70503b8525e7a9ceb0f777c6e3b0054bbc1", "shasum": "" }, "require": { @@ -57,7 +57,7 @@ "issues": "https://github.com/alecrabbit/php-console-spinner-extras/issues", "source": "https://github.com/alecrabbit/php-console-spinner-extras/tree/main" }, - "time": "2023-03-08T13:49:36+00:00" + "time": "2023-03-08T14:04:51+00:00" }, { "name": "alecrabbit/php-wcwidth", diff --git a/example/async/progress/app.php b/example/async/progress/app.php index 222b922a..10dbb943 100644 --- a/example/async/progress/app.php +++ b/example/async/progress/app.php @@ -4,7 +4,7 @@ use AlecRabbit\Spinner\Core\Interval; use AlecRabbit\Spinner\Core\Loop\ReactLoopProbe; -//use AlecRabbit\Spinner\Extras\FractionValue; +use AlecRabbit\Spinner\Extras\FractionValue; use AlecRabbit\Spinner\Factory; use AlecRabbit\Spinner\Factory\DefaultsFactory;