├── .gitignore ├── .dockerignore ├── cache └── fr │ └── hastec │ ├── apash.cache │ └── apash │ ├── lang.cache │ ├── util.cache │ ├── lang │ ├── Long.cache │ ├── Math.cache │ ├── Integer.cache │ └── Math │ │ ├── min.cache │ │ ├── abs.cache │ │ └── max.cache │ ├── util │ ├── Array.cache │ ├── Random.cache │ ├── Log.cache │ ├── Log │ │ ├── message.cache │ │ ├── in.cache │ │ ├── info.cache │ │ ├── out.cache │ │ ├── warn.cache │ │ ├── debug.cache │ │ ├── error.cache │ │ ├── fatal.cache │ │ ├── trace.cache │ │ └── ex.cache │ └── Random │ │ └── nextInt.cache │ ├── commons-lang.cache │ ├── commons-lang │ ├── ApashUtils.cache │ ├── ArrayUtils.cache │ ├── BashUtils.cache │ ├── CsvUtils.cache │ ├── DateUtils.cache │ ├── MapUtils.cache │ ├── MatrixUtils.cache │ ├── NumberUtils.cache │ ├── StringUtils.cache │ ├── VersionUtils.cache │ ├── ShellUtils │ │ ├── isZsh.cache │ │ ├── getFunctionName.cache │ │ ├── getParentFunctionName.cache │ │ ├── isCommandValid.cache │ │ ├── declareArray.cache │ │ ├── isDeclared.cache │ │ ├── isVariableNameValid.cache │ │ └── isVariable.cache │ ├── NumberUtils │ │ ├── isParsable.cache │ │ ├── min.cache │ │ ├── isDigits.cache │ │ ├── isInteger.cache │ │ ├── isLong.cache │ │ ├── max.cache │ │ ├── compare.cache │ │ └── isLongPositive.cache │ ├── ApashUtils │ │ └── doc.cache │ ├── MapUtils │ │ ├── isMap.cache │ │ └── containsKey.cache │ ├── ArrayUtils │ │ ├── isArray.cache │ │ ├── contains.cache │ │ ├── isEmpty.cache │ │ ├── isSorted.cache │ │ ├── isNotEmpty.cache │ │ ├── countMatches.cache │ │ ├── getLastIndex.cache │ │ ├── isSameLength.cache │ │ ├── getNumberOfElements.cache │ │ ├── isArrayIndex.cache │ │ ├── getLength.cache │ │ ├── isSameLastIndex.cache │ │ ├── join.cache │ │ ├── isArrayIndexValid.cache │ │ ├── anythingToEmpty.cache │ │ ├── lastIndexOf.cache │ │ ├── get.cache │ │ ├── nullToEmpty.cache │ │ ├── indexOf.cache │ │ └── add.cache │ ├── StringUtils │ │ ├── equals.cache │ │ ├── remove.cache │ │ ├── trim.cache │ │ ├── contains.cache │ │ ├── endsWith.cache │ │ ├── indexOf.cache │ │ ├── isAlpha.cache │ │ ├── isEmpty.cache │ │ ├── replace.cache │ │ ├── reverse.cache │ │ ├── isAnyEmpty.cache │ │ ├── startsWith.cache │ │ ├── substring.cache │ │ ├── containsOnly.cache │ │ ├── countMatches.cache │ │ ├── removeLeading.cache │ │ ├── isBlank.cache │ │ ├── leftPad.cache │ │ ├── rightPad.cache │ │ ├── rotate.cache │ │ └── abbreviate.cache │ ├── DateUtils │ │ ├── isDate.cache │ │ └── add.cache │ └── MatrixUtils │ │ ├── isMatrix.cache │ │ ├── getIndex.cache │ │ └── getDimOffset.cache │ └── commons-io │ └── FileNameUtils │ └── getExtension.cache ├── assets ├── apash-logo.png └── templates │ └── apashSpecTemplate_spec.sh ├── MAINTENERS ├── AUTHORS ├── doc └── fr │ └── hastec │ ├── apash │ ├── util │ │ ├── Random │ │ │ └── nextInt.md │ │ ├── Random.md │ │ ├── Array.md │ │ ├── Log │ │ │ ├── out.md │ │ │ ├── in.md │ │ │ ├── entry.md │ │ │ └── exit.md │ │ └── Log.md │ ├── commons-lang │ │ ├── DateUtils │ │ │ └── addDays.md │ │ ├── ShellUtils │ │ │ ├── isCommandValid1.md │ │ │ ├── isZsh.md │ │ │ ├── declareArray.md │ │ │ └── isCommandValid.md │ │ ├── BashUtils.md │ │ ├── CsvUtils.md │ │ ├── ApashUtils.md │ │ ├── VersionUtils.md │ │ ├── StringUtils │ │ │ ├── reverse.md │ │ │ ├── repeat.md │ │ │ ├── trim.md │ │ │ ├── isEmpty.md │ │ │ ├── isBlank.md │ │ │ ├── equals.md │ │ │ └── upperCase.md │ │ ├── MatrixUtils │ │ │ └── toString.md │ │ ├── MapUtils │ │ │ └── getKeys.md │ │ ├── ArrayUtils │ │ │ ├── isEmpty.md │ │ │ └── isNotEmpty.md │ │ └── MapUtils.md │ ├── commons-io │ │ └── FileNameUtils │ │ │ └── getExtension.md │ ├── lang │ │ ├── Long.md │ │ ├── Integer.md │ │ └── Math.md │ ├── util.md │ └── lang.md │ └── apash.md ├── utils ├── uninstall.zsh └── uninstall.sh ├── apash.zsh ├── src └── fr │ └── hastec │ ├── apash │ ├── commons-lang │ │ ├── CsvUtils.sh │ │ ├── BashUtils.sh │ │ ├── ApashUtils.sh │ │ ├── NumberUtils.sh │ │ ├── StringUtils.sh │ │ ├── VersionUtils.sh │ │ ├── MapUtils.sh │ │ ├── MatrixUtils.sh │ │ ├── ArrayUtils.sh │ │ ├── DateUtils.sh │ │ ├── StringUtils │ │ │ ├── lowerCase.zsh │ │ │ ├── lowerCase.bash │ │ │ ├── lowerCase.bash_4.2 │ │ │ ├── isEmpty.sh │ │ │ ├── equals.sh │ │ │ ├── trim.sh │ │ │ └── isAlpha.sh │ │ ├── ShellUtils │ │ │ ├── isZsh.sh │ │ │ ├── isCommandValid.sh │ │ │ └── declareArray.sh │ │ └── ArrayUtils │ │ │ ├── isArray.sh │ │ │ └── clone.zsh │ ├── util.sh │ ├── lang.sh │ ├── commons-lang.sh │ ├── util │ │ ├── Array.sh │ │ ├── Random.sh │ │ └── Log.sh │ └── lang │ │ ├── Math.sh │ │ ├── Long.sh │ │ └── Integer.sh │ ├── apash.sh │ └── apash.check ├── spec └── fr │ └── hastec │ └── apash │ ├── util │ └── Log │ │ ├── ex_spec_script.sh │ │ ├── in_spec.sh │ │ ├── out_spec.sh │ │ ├── message_spec.sh │ │ ├── info_spec.sh │ │ ├── warn_spec.sh │ │ ├── debug_spec.sh │ │ ├── error_spec.sh │ │ ├── fatal_spec.sh │ │ └── trace_spec.sh │ ├── commons-lang │ ├── StringUtils │ │ ├── repeat_spec.sh │ │ ├── reverse_spec.sh │ │ ├── upperCase_spec.sh │ │ ├── lowerCase_spec.sh │ │ ├── isBlank_spec.sh │ │ ├── isEmpty_spec.sh │ │ ├── countMatches_spec.sh │ │ └── trim_spec.sh │ └── ShellUtils │ │ ├── getFunctionName_spec.sh │ │ ├── getParentFunctionName_spec.sh │ │ ├── isDeclared_spec.sh │ │ └── isVariable_spec.sh │ └── commons-io │ └── FileNameUtils │ └── getExtension_spec.sh ├── apash.source ├── sonar-project.properties ├── .shellspec ├── .github ├── workflows │ └── build.yml └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md └── docker └── apash-ready.dockerfile /.gitignore: -------------------------------------------------------------------------------- 1 | tmp -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | tmp 3 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/lang.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/util.sh 2 | -------------------------------------------------------------------------------- /assets/apash-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hastec-fr/apash/HEAD/assets/apash-logo.png -------------------------------------------------------------------------------- /cache/fr/hastec/apash/lang/Long.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Long.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/lang/Math.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Array.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Array.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/lang/Integer.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Random.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Random.sh 2 | -------------------------------------------------------------------------------- /MAINTENERS: -------------------------------------------------------------------------------- 1 | # People maintaining apash. 2 | hastec-fr (Benjamin Vargin) 3 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ApashUtils.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ApashUtils.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/BashUtils.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/BashUtils.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/CsvUtils.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/CsvUtils.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/DateUtils.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/DateUtils.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/MapUtils.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MapUtils.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/MatrixUtils.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MatrixUtils.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/NumberUtils.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/VersionUtils.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/VersionUtils.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ShellUtils/isZsh.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isZsh.sh 2 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Log.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 2 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # People who have contributed to apash. 2 | hastec-fr (Benjamin Vargin) 3 | JohnnyGoodfist (Shaughn Morigault) 4 | ncatusse (Nicolas Catusse) 5 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 3 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/util/Random/nextInt.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 |
[ ↑ Back to top ↑ ]
13 | 14 | -------------------------------------------------------------------------------- /utils/uninstall.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | ############################################################################### 4 | # @name uninstall.zsh 5 | # @brief Wrapper to execute the uninstaller with zsh interpreter 6 | # @description 7 | # uninstall.sh is the entry point for executing uninstallation. 8 | # 9 | . "$APASH_HOME_DIR/utils/uninstall.bash" 10 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/DateUtils/addDays.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 |
[ ↑ Back to top ↑ ]
13 | 14 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Log/message.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-io/FileNameUtils/getExtension.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 |
[ ↑ Back to top ↑ ]
13 | 14 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid1.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 |
[ ↑ Back to top ↑ ]
13 | 14 | -------------------------------------------------------------------------------- /apash.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | ############################################################################## 4 | # @name apash.zsh 5 | # @brief Wrapper to execute the main script with zsh interpreter 6 | # @description 7 | # apash is the entry point for executing action related to 8 | # Source the main script to avoid its shebang. 9 | # 10 | . "$APASH_HOME_DIR/apash.bash" "$@" 11 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/CsvUtils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name CsvUtils 6 | # @brief Operations on csv files. 7 | # @description 8 | # Apash utilitary function on csv files. 9 | # 10 | # ## History 11 | # @since 0.2.0 (hastec-fr) 12 | # 13 | # ## Interface 14 | # @apashPackage 15 | # 16 | # @apashSummaryTable 17 | #/ 18 | commons-lang.CsvUtils() { true; } 19 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/util/Log/ex_spec_script.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ "$APASH_TEST_MINIFIED" != "true" ]; then 4 | [ "$APASH_SHELL" = "zsh" ] && . apash source 5 | apash.import "fr.hastec.apash.util.Log.ex" 6 | else 7 | . $APASH_HOME_DIR/bin/apash-$APASH_SHELL-min.sh 8 | fi 9 | 10 | myCaller(){ Log.ex 1 "myCaller-001" "InvalidNumber" ; } 11 | myGrandCaller(){ myCaller; } 12 | 13 | myGrandCaller 14 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Log/in.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 7 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Log/info.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 7 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Log/out.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 7 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Log/warn.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 7 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Log/debug.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Log/error.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 7 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Log/fatal.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 7 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Log/trace.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 7 | -------------------------------------------------------------------------------- /apash.source: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck source=/dev/null 3 | 4 | ############################################################################## 5 | # @name apash.source 6 | # @brief Script preparing global variables and essential functions used by apash. 7 | # @description 8 | # This script must be sourced. 9 | # 10 | source "$APASH_HOME_DIR/src/fr/hastec/apash.sh" 11 | source "$APASH_HOME_DIR/src/fr/hastec/apash.import" 12 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/BashUtils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name StringUtils 6 | # @brief Operations arround Bash languages 7 | # @description 8 | # No corresponding implementation in Apache library 9 | # 10 | # ## History 11 | # @since 0.1.0 (hastec-fr) 12 | # 13 | # ## Interface 14 | # @apashPackage 15 | # 16 | # @apashSummaryTable 17 | #/ 18 | commons-lang.ShellUtils() { true; } 19 | -------------------------------------------------------------------------------- /sonar-project.properties: -------------------------------------------------------------------------------- 1 | sonar.projectKey=hastec-fr_apash 2 | sonar.organization=hastec-fr 3 | 4 | # This is the name and version displayed in the SonarCloud UI. 5 | #sonar.projectName=apash 6 | #sonar.projectVersion=1.0 7 | 8 | 9 | # Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. 10 | #sonar.sources=. 11 | 12 | # Encoding of the source code. Default is default system encoding 13 | #sonar.sourceEncoding=UTF-8 -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/ApashUtils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2034 3 | 4 | ##/ 5 | # 6 | # @name ApashUtils 7 | # @brief Utility functions specific to apash. 8 | # @description 9 | # Currently host a function for the documentation. 10 | # 11 | # ## History 12 | # @since 0.2.0 (hastec-fr) 13 | # 14 | # ## Interface 15 | # @apashPackage 16 | # 17 | # @apashSummaryTable 18 | #/ 19 | commons-lang.ApashUtils() { true; } 20 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/util.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name util 6 | # @brief Provides miscellaneous utility. 7 | # @description 8 | # This implementation do reference to the [java implementation](https://docs.oracle.com/javase/8/docs/api/java/util/package-summary.html). 9 | # 10 | # ## History 11 | # @since 0.1.0 (hastec-fr) 12 | # 13 | # ## Interface 14 | # @apashPackage 15 | # 16 | # @apashSummaryTable 17 | #/ 18 | apash.util() { true; } 19 | -------------------------------------------------------------------------------- /.shellspec: -------------------------------------------------------------------------------- 1 | --require spec_helper 2 | 3 | ## Default kcov (coverage) options 4 | # --kcov-options "--include-path=. --path-strip-level=1" 5 | # --kcov-options "--include-pattern=.sh" 6 | # --kcov-options "--exclude-pattern=/.shellspec,/spec/,/coverage/,/report/" 7 | 8 | ## Example: Include script "myprog" with no extension 9 | # --kcov-options "--include-pattern=.sh,myprog" 10 | 11 | ## Example: Only specified files/directories 12 | # --kcov-options "--include-pattern=myprog,/lib/" 13 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/lang.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name commons-lang 6 | # @brief Provides methods that are fundamental to the design script. 7 | # @description# 8 | # This implementation do reference to the [java documentation](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/package-summary.html). 9 | # 10 | # ## History 11 | # @since 0.1.0 (hastec-fr) 12 | # 13 | # ## Interface 14 | # @apashPackage 15 | # 16 | # @apashSummaryTable 17 | #/ 18 | apash.lang() { true; } 19 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name commons-lang 6 | # @brief Provides highly reusable utility methods. 7 | # @description 8 | # Provides highly reusable utility methods. 9 | # This implementation do reference to the [java apache implementation](http://commons.apache.org/proper/commons-lang/javadocs/api-3.1/). 10 | # 11 | # ## History 12 | # @since 0.1.0 13 | # 14 | # ## Interface 15 | # @apashPackage 16 | # 17 | # @apashSummaryTable 18 | #/ 19 | apash.commons-lang() { true; } 20 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/NumberUtils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name StringUtils 6 | # @brief Operations on Numeric values. 7 | # @description 8 | # This implementation do reference to the [java apache implementation](https://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/math/NumberUtils.html). 9 | # 10 | # ## History 11 | # @since 0.1.0 (hastec-fr) 12 | # 13 | # ## Interface 14 | # @apashPackage 15 | # 16 | # @apashSummaryTable 17 | #/ 18 | commons-lang.NumberUtils() { true; } 19 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/util/Array.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name Array 6 | # @brief Contains methods for performing basic numeric operations. 7 | # @description 8 | # This package contains various methods for manipulating arrays. 9 | # This implementation do reference to the [java implementation](https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html). 10 | # 11 | # ## History 12 | # @since 0.1.0 (hastec-fr) 13 | # 14 | # ## Interface 15 | # @apashPackage 16 | # 17 | # @apashSummaryTable 18 | #/ 19 | util.Array() { true; } 20 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/StringUtils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name StringUtils 6 | # @brief Operations on String considering null as empty string. 7 | # @description 8 | # This implementation do reference to the [java apache implementation](http://commons.apache.org/proper/commons-lang/javadocs/api-3.1/org/apache/commons/lang3/StringUtils.html). 9 | # 10 | # ## History 11 | # @since 0.1.0 (hastec-fr) 12 | # 13 | # ## Interface 14 | # @apashPackage 15 | # 16 | # @apashSummaryTable 17 | #/ 18 | commons-lang.StringUtils() { true; } 19 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/util/Random.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name Random 6 | # @brief Contains methods for generating numbers. 7 | # @description 8 | # This package contains various methods for generating numbers. 9 | # This implementation do reference to the [java implementation](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/random/package-summary.html). 10 | # 11 | # ## History 12 | # @since 0.1.0 (hastec-fr) 13 | # 14 | # ## Interface 15 | # @apashPackage 16 | # 17 | # @apashSummaryTable 18 | #/ 19 | util.Random() { true; } 20 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/VersionUtils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name VersionUtils 6 | # @brief Operations on string version. 7 | # @description 8 | # It considers that versions have part which could be alphanumeric or numeric. 9 | # Each part is separated by a dot "." or a dash "-". 10 | # If it's numeric, the comparison would be numeric, otherwise it's a dictionary comparison. 11 | # 12 | # ## History 13 | # @since 0.2.0 (hastec-fr) 14 | # 15 | # ## Interface 16 | # @apashPackage 17 | # 18 | # @apashSummaryTable 19 | #/ 20 | commons-lang.VersionUtils() { true; } 21 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/lang/Math.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name Math 6 | # @brief Contains methods for performing basic numeric operations 7 | # @description 8 | # Such as the elementary exponential, logarithm, square root, and trigonometric functions. 9 | # This implementation do reference to the [java oracle implementation](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Math.html). 10 | # 11 | # ## History 12 | # @since 0.1.0 (hastec-fr) 13 | # 14 | # ## Interface 15 | # @apashPackage 16 | # 17 | # @apashSummaryTable 18 | #/ 19 | lang.Math() { true; } 20 | -------------------------------------------------------------------------------- /assets/templates/apashSpecTemplate_spec.sh: -------------------------------------------------------------------------------- 1 | Describe '.' 2 | apash.import ".." 3 | 4 | It 'fails when the input is wrong' 5 | When call . 6 | The output should equal "" 7 | The status should be failure 8 | End 9 | 10 | It 'passes when the input is right' 11 | local -a myArray=(a b c) 12 | When call . myArray 13 | The output should equal "" 14 | The status should be success 15 | The value "${#myArray[@]}" should eq 3 16 | The variable 'myArray[APASH_ARRAY_FIRST_INDEX+0]' should eq "a" 17 | End 18 | 19 | End 20 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | push: 4 | branches: 5 | - main 6 | pull_request: 7 | types: [opened, synchronize, reopened] 8 | jobs: 9 | sonarqube: 10 | name: SonarQube 11 | runs-on: ubuntu-latest 12 | environment: PROD 13 | steps: 14 | - uses: actions/checkout@v4 15 | with: 16 | fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis 17 | - name: SonarQube Scan 18 | uses: SonarSource/sonarqube-scan-action@v4 19 | env: 20 | SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} 21 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/lang/Long.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2034 3 | 4 | ##/ 5 | # 6 | # @name Long 7 | # @brief Contains related information about Long int. 8 | # @description 9 | # It refers to a 64 bits integer. 10 | # The maximum positive long int is the maximum index that an array could have. 11 | # Bash uses a long as index for 64 bits systems. 12 | # 13 | # ## History 14 | # @since 0.2.0 (hastec-fr) 15 | # 16 | # ## Interface 17 | # @apashPackage 18 | # 19 | # @apashSummaryTable 20 | #/ 21 | Long_MIN_VALUE=-9223372036854775808 22 | Long_MAX_VALUE=9223372036854775807 23 | lang.Long() { true; } 24 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/lang/Integer.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2034 3 | 4 | ##/ 5 | # 6 | # @name Integer 7 | # @brief Contains related information about Integers. 8 | # @description 9 | # This implementation do reference to the [java oracle implementation](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Integer.html). 10 | # It refers to a 32 bits Integer. 11 | # 12 | # ## History 13 | # @since 0.1.0 (hastec-fr) 14 | # 15 | # ## Interface 16 | # @apashPackage 17 | # 18 | # @apashSummaryTable 19 | #/ 20 | Integer_MIN_VALUE=-2147483648 21 | Integer_MAX_VALUE=2147483647 22 | lang.Integer() { true; } 23 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/MapUtils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name MapUtils 6 | # @brief Operations on maps. 7 | # @description 8 | # This implementation do reference to the [java apache implementation](https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/MapUtils.html)
9 | # ⚠️WARNING: Contrary to Java implementation, apash methods are modifying directly the input map given by reference. 10 | # 11 | # ## History 12 | # @since 0.1.0 (hastec-fr) 13 | # 14 | # ## Interface 15 | # @apashPackage 16 | # 17 | # @apashSummaryTable 18 | #/ 19 | declare -A MaptUtils_EMPTY_MAP=() 20 | commons-lang.MapUtils() { true; } 21 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/MatrixUtils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2034 3 | 4 | ##/ 5 | # 6 | # @name MatrixUtils 7 | # @brief Operations on matrixes. 8 | # @description 9 | # ⚠️WARNING: It is an experimental function. 10 | # Bash does not accept multi-dimensionals arrays. 11 | # The purpose of the MatrixUtil is to simulate it with a one dimensional array 12 | # Negative indexes are not supported for the moment. 13 | # 14 | # ## History 15 | # @since 0.2.0 (hastec-fr) 16 | # 17 | # ## Interface 18 | # @apashPackage 19 | # 20 | # @apashSummaryTable 21 | #/ 22 | MatrixUtils_DIM_ARRAY_PREFIX="_apash_matrix_dim_" 23 | commons-lang.MatrixUtils() { true; } 24 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-lang/StringUtils/repeat_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'StringUtils.repeat' 2 | apash.import "fr.hastec.apash.commons-lang.StringUtils.repeat" 3 | 4 | It 'fails when input is not a valid positive number' 5 | When call StringUtils.repeat a "a" 6 | The output should equal "" 7 | The status should be failure 8 | End 9 | 10 | It 'returns the repeated string' 11 | When call StringUtils.repeat 3 "a" 12 | The output should equal "aaa" 13 | The status should be success 14 | End 15 | 16 | It 'returns the repeated string' 17 | When call StringUtils.repeat 2 "ab" 18 | The output should equal "abab" 19 | The status should be success 20 | End 21 | 22 | End 23 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/ArrayUtils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2034 3 | 4 | ##/ 5 | # 6 | # @name ArrayUtils 7 | # @brief Operations on arrays. 8 | # @description 9 | # This implementation do reference to the [java apache implementation](https://commons.apache.org/proper/commons-lang/javadocs/api-release/index.html)
10 | # ⚠️WARNING: Contrary to Java implementation, apash methods are generally modifying directly the input array given by reference. 11 | # 12 | # ## History 13 | # @since 0.1.0 (hastec-fr) 14 | # 15 | # ## Interface 16 | # @apashPackage 17 | # 18 | # @apashSummaryTable 19 | #/ 20 | ArrayUtils_INDEX_NOT_FOUND="-1" 21 | ArrayUtils_EMPTY_ARRAY=() 22 | commons-lang.ArrayUtils() { true; } 23 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/DateUtils.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2034 3 | 4 | ##/ 5 | # 6 | # @name DateUtils 7 | # @brief Operations on dates. 8 | # @description 9 | # This implementation do reference to the [java apache implementation](https://commons.apache.org/proper/commons-lang/javadocs/api-release/org/apache/commons/lang3/time/DateUtils.html) 10 | # The date should be always a string in UTC format before any manipulations: 11 | # ```bash 12 | # date +"%FT%T.%3N%z" 13 | # ``` 14 | # 15 | # ## History 16 | # @since 0.1.0 (hastec-fr) 17 | # 18 | # ## Interface 19 | # @apashPackage 20 | # 21 | # @apashSummaryTable 22 | #/ 23 | DateUtils_UTC_FORMAT="+%FT%T.%3N%z" 24 | commons-lang.DateUtils() { true; } 25 | -------------------------------------------------------------------------------- /utils/uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | die() { 4 | echo "! $1 " >&2 5 | echo "! -----------------------------" >&2 6 | exit 1 7 | } 8 | 9 | # Get the type of shell (only bash and zsh supported for the moment). Skipped if already defined. 10 | [ -z "$APASH_SHELL" ] && [ -n "$BASH_VERSION" ] && export APASH_SHELL="bash" 11 | [ -z "$APASH_SHELL" ] && [ -n "$ZSH_VERSION" ] && export APASH_SHELL="zsh" 12 | 13 | # Prevent execution if declared APASH_SHELL is not supported. 14 | if [ ! "$APASH_SHELL" = "bash" ] && [ ! "$APASH_SHELL" = "zsh" ];then 15 | die "$(date +"%FT%T.%3N%z") [FATAL] apash ($LINENO): The apash shell '$APASH_SHELL' is not supported" 16 | fi 17 | 18 | # Redirect to the desired interpreter. 19 | "$APASH_HOME_DIR/utils/uninstall.$APASH_SHELL" 20 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/StringUtils/lowerCase.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Dependencies ################################################################# 4 | apash.import fr.hastec.apash.util.Log 5 | 6 | ##/ 7 | # @name StringUtils.lowerCase 8 | # @brief Converts a String to lower case. 9 | # @description 10 | # Demo of the way to include different versions of the method in multiple files. 11 | # 12 | # ## History 13 | # @since 0.2.0 (hastec-fr) 14 | # 15 | # ### Reference: 16 | # For complete documentation, please refer to lowerCase.sh. 17 | #/ 18 | StringUtils.lowerCase() { 19 | Log.in $LINENO "$@" 20 | local inString="${1:-}" 21 | echo "${(L)inString}" || { Log.ex $LINENO; return "$APASH_FAILURE"; } 22 | Log.out $LINENO; return "$APASH_SUCCESS" 23 | } 24 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/util/Log/in_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'Log.in' 2 | apash.import "fr.hastec.apash.util.Log.in" 3 | 4 | It 'passes when inputs are consistents and level autorized' 5 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_TRACE 6 | myCaller(){ Log.in 1 "$@" ; } 7 | When call myCaller "Hello World" 8 | The output should equal "" 9 | The stderr should include "[TRACE] myCaller (1): In myCaller 'Hello World'" 10 | The status should be success 11 | End 12 | 13 | It 'passes when inputs are consistents and level not autorized' 14 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_OFF 15 | myCaller(){ Log.in 1 "$@" ; } 16 | When call myCaller "Hello World" 17 | The output should equal "" 18 | The stderr should include "" 19 | The status should be success 20 | End 21 | End 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: Enhancement 6 | assignees: hastec-fr 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | ```bash 16 | apash.import "my.wonderful.package" 17 | myUtils.myFunnyFunction "1" "two" 18 | ``` 19 | 20 | **Describe alternatives you've considered** 21 | A clear and concise description of any alternative solutions or features you've considered. 22 | 23 | **Additional context** 24 | Add any other context or screenshots about the feature request here. 25 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/util/Log/out_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'Log.out' 2 | apash.import "fr.hastec.apash.util.Log.out" 3 | 4 | It 'passes when inputs are consistents and level autorized' 5 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_TRACE 6 | myCaller(){ Log.out 1 "myCaller-001" "$@" ; } 7 | When call myCaller "Hello World" 8 | The output should equal "" 9 | The stderr should include "[TRACE] myCaller (1): Out { 'myCaller-001' 'Hello World' }" 10 | The status should be success 11 | End 12 | 13 | It 'passes when inputs are consistents and level not autorized' 14 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_OFF 15 | myCaller(){ Log.out 1 "$@" ; } 16 | When call myCaller "Hello World" 17 | The output should equal "" 18 | The stderr should include "" 19 | The status should be success 20 | End 21 | 22 | End 23 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/StringUtils/lowerCase.bash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Dependencies ################################################################# 4 | apash.import fr.hastec.apash.util.Log 5 | apash.import fr.hastec.apash.commons-lang.VersionUtils.isLowerOrEquals 6 | 7 | ##/ 8 | # @name StringUtils.lowerCase 9 | # @brief Converts a String to lower case. 10 | # @description 11 | # Demo of the way to include different versions of the method in multiple files. 12 | # 13 | # ## History 14 | # @since 0.2.0 (hastec-fr) 15 | # 16 | # ### Reference: 17 | # For complete documentation, please refer to lowerCase.sh. 18 | #/ 19 | StringUtils.lowerCase() { 20 | Log.in $LINENO "$@" 21 | local inString="${1:-}" 22 | echo "${inString,,}" || { Log.ex $LINENO; return "$APASH_FAILURE"; } 23 | Log.out $LINENO; return "$APASH_SUCCESS" 24 | } 25 | -------------------------------------------------------------------------------- /src/fr/hastec/apash.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # 5 | # @name apash 6 | # @brief Translation for shell scripts of some apache libraries and more. 7 | # @description 8 | # Provides highly reusable utility methods. 9 | # 10 | # ## History 11 | # @since 0.1.0 (hastec-fr) 12 | # 13 | # ## Interface 14 | # @apashPackage 15 | # 16 | # @apashSummaryTable 17 | #/ 18 | # Declare the function return codes. 19 | export APASH_SUCCESS=0 20 | export APASH_FAILURE=1 21 | 22 | # Declare the bounds of the array indexes. 23 | export APASH_ARRAY_FIRST_INDEX=0 24 | export APASH_ARRAY_LAST_INDEX=9223372036854775807 25 | 26 | # Zsh start index at 1 and truncate values after 18 digits 27 | if [ "$APASH_SHELL" = "zsh" ]; then 28 | [[ ! $(setopt) == *ksharrays* ]] && APASH_ARRAY_FIRST_INDEX=1 29 | APASH_ARRAY_LAST_INDEX=999999999999999999 30 | fi 31 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/StringUtils/lowerCase.bash_4.2: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Dependencies ################################################################# 4 | apash.import fr.hastec.apash.util.Log 5 | apash.import fr.hastec.apash.commons-lang.VersionUtils.isLowerOrEquals 6 | 7 | ##/ 8 | # @name StringUtils.lowerCase 9 | # @brief Converts a String to lower case. 10 | # @description 11 | # Demo of the way to include different versions of the method in multiple files. 12 | # 13 | # ## History 14 | # @since 0.2.0 (hastec-fr) 15 | # 16 | # ### Reference: 17 | # For complete documentation, please refer to lowerCase.sh. 18 | #/ 19 | StringUtils.lowerCase() { 20 | Log.in $LINENO "$@" 21 | local inString="${1:-}" 22 | echo "$inString" | awk '{print tolower($0)}' || { Log.ex $LINENO; return "$APASH_FAILURE"; } 23 | Log.out $LINENO; return "$APASH_SUCCESS" 24 | } 25 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-lang/StringUtils/reverse_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'StringUtils.reverse' 2 | apash.import "fr.hastec.apash.commons-lang.StringUtils.reverse" 3 | 4 | It 'returns empty string input string is empty' 5 | When call StringUtils.reverse 6 | The output should equal "" 7 | The status should be success 8 | End 9 | 10 | It 'returns empty string input string is empty' 11 | When call StringUtils.reverse "" 12 | The output should equal "" 13 | The status should be success 14 | End 15 | 16 | It 'returns the reversed string' 17 | When call StringUtils.reverse "bat" 18 | The output should equal "tab" 19 | The status should be success 20 | End 21 | 22 | It 'returns the reversed string' 23 | When call StringUtils.reverse "bat man" 24 | The output should equal "nam tab" 25 | The status should be success 26 | End 27 | 28 | End 29 | -------------------------------------------------------------------------------- /docker/apash-ready.dockerfile: -------------------------------------------------------------------------------- 1 | # @name: apash-bash-ready 2 | # @description 3 | # Based on apash-bash.dockerfile, it preloads the minified script 4 | # 5 | # @example 6 | # docker build --build-arg APASH_SHELL=${APASH_SHELL} -t docker.io/hastec/apash:0.2.0-${APASH_SHELL}-ready -f ./docker/apash-ready.dockerfile . 7 | # docker run --rm -it --name apash-ready hastec/apash:0.2.0-ready 8 | # docker push docker.io/hastec/apash:0.2.0-ready 9 | # 10 | # Bash is the default tag: 11 | # docker tag docker.io/hastec/apash:0.2.0-bash-ready docker.io/hastec/apash:0.2.0-ready 12 | ARG APASH_SHELL="bash" 13 | FROM docker.io/hastec/apash:0.2.0-${APASH_SHELL} 14 | 15 | LABEL maintainer="Benjamin Vargin" 16 | 17 | RUN startup_script="$HOME/.bashrc"; \ 18 | [ "$APASH_SHELL" = "zsh" ] && startup_script="$HOME/.zshenv"; \ 19 | echo '. "$APASH_HOME_DIR/bin/apash-${APASH_SHELL}-min.sh" ##apashInstallTag' >> "$startup_script" 20 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'ShellUtils.getFunctionName' 2 | apash.import "fr.hastec.apash.commons-lang.ShellUtils.getFunctionName" 3 | 4 | It 'passes when the input depth is valid' 5 | When call ShellUtils.getFunctionName $((APASH_ARRAY_FIRST_INDEX+0)) 6 | The output should equal "ShellUtils.getFunctionName" 7 | The status should be success 8 | End 9 | 10 | It 'passes when the input depth is not defined' 11 | myCaller(){ ShellUtils.getFunctionName ; } 12 | When call myCaller 13 | The output should equal "myCaller" 14 | The status should be success 15 | End 16 | 17 | It 'passes when the input depth is defined' 18 | myCaller(){ ShellUtils.getFunctionName $((APASH_ARRAY_FIRST_INDEX+1)) ; } 19 | When call myCaller 20 | The output should equal "myCaller" 21 | The status should be success 22 | End 23 | End 24 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'ShellUtils.getParentFunctionName' 2 | apash.import "fr.hastec.apash.commons-lang.ShellUtils.getParentFunctionName" 3 | 4 | # Can't evaluate due to shellspec functions 5 | # It 'fails when no current function exists' 6 | # When call ShellUtils.getParentFunctionName 7 | # The output should equal "" 8 | # The status should be failure 9 | # End 10 | 11 | # It 'fails when parent function exists' 12 | # myCaller(){ ShellUtils.getParentFunctionName ; } 13 | # When call myCaller 14 | # The output should equal "myCaller" 15 | # The status should be failure 16 | # End 17 | 18 | It 'passes when the input depth is defined' 19 | myCaller(){ ShellUtils.getParentFunctionName ; } 20 | myGrandCaller() { myCaller ;} 21 | When call myGrandCaller 22 | The output should equal "myGrandCaller" 23 | The status should be success 24 | End 25 | End 26 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/BashUtils.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # StringUtils 13 | Operations arround Bash languages 14 | ## Description 15 | No corresponding implementation in Apache library 16 | 17 | ## History 18 | ### Since 19 | * 0.1.0 (hastec-fr) 20 | 21 | ## Interface 22 | ### Package 23 | 24 | [apash](../../apash.md) / [commons-lang](../commons-lang.md) / 25 | 26 | 27 | ### Method Summary 28 | 29 | | Methods | Brief | 30 | |--------------------------|---------------------------------------| 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/CsvUtils.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # CsvUtils 13 | Operations on csv files. 14 | ## Description 15 | Apash utilitary function on csv files. 16 | 17 | ## History 18 | ### Since 19 | * 0.2.0 (hastec-fr) 20 | 21 | ## Interface 22 | ### Package 23 | 24 | [apash](../../apash.md) / [commons-lang](../commons-lang.md) / 25 | 26 | 27 | ### Method Summary 28 | 29 | | Methods | Brief | 30 | |--------------------------|---------------------------------------| 31 | |[merge](CsvUtils/merge.md)|Merge two csv files according to their columns keys.| 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/ShellUtils/isZsh.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ##/ 4 | # @name ShellUtils.isCommandValid 5 | # @brief Determine if current APASH_SHELL is zsh. 6 | # 7 | # ## History 8 | # @since 0.2.0 (hastec-fr) 9 | # 10 | # ## Interface 11 | # @apashPackage 12 | # 13 | # ### Arguments 14 | # | # | varName | Type | in/out | Default | Description | 15 | # |--------|----------------|---------------|----------|------------|---------------------------------------| 16 | # 17 | # ### Example 18 | # ```bash 19 | # # From bash 20 | # ShellUtils.isZsh "" # false 21 | # 22 | # # From zsh 23 | # ShellUtils.isZsh "" # true 24 | # ``` 25 | # 26 | # @stdout None. 27 | # @stderr None. 28 | # 29 | # @exitcode 0 When the command name is correct. 30 | # @exitcode 1 Otherwise. 31 | #/ 32 | ShellUtils.isZsh() { 33 | Log.in $LINENO "$@" 34 | [[ "$APASH_SHELL" == "zsh" ]] || { Log.out $LINENO; return "$APASH_FAILURE"; } 35 | Log.out $LINENO; return "$APASH_SUCCESS" 36 | } 37 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/lang/Long.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # Long 13 | Contains related information about Long int. 14 | ## Description 15 | It refers to a 64 bits integer. 16 | The maximum positive long int is the maximum index that an array could have. 17 | Bash uses a long as index for 64 bits systems. 18 | 19 | ## History 20 | ### Since 21 | * 0.2.0 (hastec-fr) 22 | 23 | ## Interface 24 | ### Package 25 | 26 | [apash](../../apash.md) / [lang](../lang.md) / 27 | 28 | 29 | ### Method Summary 30 | 31 | | Methods | Brief | 32 | |--------------------------|---------------------------------------| 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/ApashUtils.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # ApashUtils 13 | Utility functions specific to apash. 14 | ## Description 15 | Currently host a function for the documentation. 16 | 17 | ## History 18 | ### Since 19 | * 0.2.0 (hastec-fr) 20 | 21 | ## Interface 22 | ### Package 23 | 24 | [apash](../../apash.md) / [commons-lang](../commons-lang.md) / 25 | 26 | 27 | ### Method Summary 28 | 29 | | Methods | Brief | 30 | |--------------------------|---------------------------------------| 31 | |[doc](ApashUtils/doc.md)|Generate a markdown file(.md) according to comments of the input file.| 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Log/ex.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/lang/Math/min.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 18 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/lang/Integer.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # Integer 13 | Contains related information about Integers. 14 | ## Description 15 | This implementation do reference to the [java oracle implementation](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Integer.html). 16 | It refers to a 32 bits Integer. 17 | 18 | ## History 19 | ### Since 20 | * 0.1.0 (hastec-fr) 21 | 22 | ## Interface 23 | ### Package 24 | 25 | [apash](../../apash.md) / [lang](../lang.md) / 26 | 27 | 28 | ### Method Summary 29 | 30 | | Methods | Brief | 31 | |--------------------------|---------------------------------------| 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/NumberUtils/isParsable.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 18 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 18 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/lang/Math/abs.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/abs.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/lang/Math/max.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/max.sh 19 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # apash 13 | Translation for shell scripts of some apache libraries and more. 14 | ## Description 15 | Provides highly reusable utility methods. 16 | 17 | ## History 18 | ### Since 19 | * 0.1.0 (hastec-fr) 20 | 21 | ## Interface 22 | ### Package 23 | 24 | None. 25 | 26 | 27 | ### Method Summary 28 | 29 | | Methods | Brief | 30 | |--------------------------|---------------------------------------| 31 | |[commons-lang](apash/commons-lang.md)|Provides highly reusable utility methods.| 32 | |[lang](apash/lang.md)|Provides methods that are fundamental to the design script. | 33 | |[util](apash/util.md)|Provides miscellaneous utility.| 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-lang/StringUtils/upperCase_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'StringUtils.upperCase' 2 | apash.import "fr.hastec.apash.commons-lang.StringUtils.upperCase" 3 | 4 | It 'returns the converted string to upper cases' 5 | When call StringUtils.upperCase "abc" 6 | The output should equal "ABC" 7 | The status should be success 8 | End 9 | 10 | It 'returns the converted string to upper cases' 11 | When call StringUtils.upperCase "aBc" 12 | The output should equal "ABC" 13 | The status should be success 14 | End 15 | 16 | It 'returns the converted string to upper cases' 17 | When call StringUtils.upperCase "a123b" 18 | The output should equal "A123B" 19 | The status should be success 20 | End 21 | 22 | It 'returns the converted string to upper cases' 23 | When call StringUtils.upperCase "ABC" 24 | The output should equal "ABC" 25 | The status should be success 26 | End 27 | 28 | It 'returns the converted string to upper cases' 29 | When call StringUtils.upperCase "crème brûlée" 30 | The output should equal "CRÈME BRÛLÉE" 31 | The status should be success 32 | End 33 | 34 | End 35 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ApashUtils/doc.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ApashUtils/doc.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/MapUtils/isMap.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MapUtils/isMap.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/NumberUtils/min.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/min.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/isArray.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/equals.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/equals.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/remove.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/remove.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/trim.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/trim.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/NumberUtils/isDigits.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isDigits.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/contains.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/contains.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/endsWith.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/endsWith.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/indexOf.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/indexOf.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/isAlpha.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/isAlpha.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/isEmpty.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/isEmpty.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/replace.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/replace.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/reverse.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/reverse.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/NumberUtils/isInteger.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isInteger.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ShellUtils/declareArray.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/declareArray.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ShellUtils/isDeclared.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isDeclared.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/isAnyEmpty.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/isAnyEmpty.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/startsWith.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/startsWith.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/substring.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/substring.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/containsOnly.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/containsOnly.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/countMatches.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/countMatches.sh 19 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/removeLeading.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/removeLeading.sh 19 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/util/Log/message_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'Log.message' 2 | apash.import "fr.hastec.apash.util.Log.message" 3 | 4 | It 'passes when inputs are consistents and level autorized' 5 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_INFO 6 | When call Log.message $APASH_LOG_LEVEL_INFO apash 1 "Hello World" 7 | The output should equal "" 8 | The stderr should include "[INFO] apash (1): Hello World" 9 | The status should be success 10 | End 11 | 12 | It 'passes when inputs are consistents and level not autorized' 13 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_INFO 14 | When call Log.message $APASH_LOG_LEVEL_DEBUG apash 2 "Hello World" 15 | The output should equal "" 16 | The stderr should equal "" 17 | The status should be success 18 | End 19 | 20 | It 'passes when inputs are consistents and level autorized and redirected to standard output' 21 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_INFO 22 | When call Log.message $APASH_LOG_LEVEL_INFO apash 3 "Hello World" $APASH_LOG_CHANNEL_STDOUT 23 | The output should include "[INFO] apash (3): Hello World" 24 | The stderr should equal "" 25 | The status should be success 26 | End 27 | End 28 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ShellUtils/isVariableNameValid.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isVariableNameValid.sh 19 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/util/Random.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # Random 13 | Contains methods for generating numbers. 14 | ## Description 15 | This package contains various methods for generating numbers. 16 | This implementation do reference to the [java implementation](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/random/package-summary.html). 17 | 18 | ## History 19 | ### Since 20 | * 0.1.0 (hastec-fr) 21 | 22 | ## Interface 23 | ### Package 24 | 25 | [apash](../../apash.md) / [util](../util.md) / 26 | 27 | 28 | ### Method Summary 29 | 30 | | Methods | Brief | 31 | |--------------------------|---------------------------------------| 32 | |[nextInt](Random/nextInt.md)|Returns a pseudorandomly chosen int value.| 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/util.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # util 13 | Provides miscellaneous utility. 14 | ## Description 15 | This implementation do reference to the [java implementation](https://docs.oracle.com/javase/8/docs/api/java/util/package-summary.html). 16 | 17 | ## History 18 | ### Since 19 | * 0.1.0 (hastec-fr) 20 | 21 | ## Interface 22 | ### Package 23 | 24 | [apash](../apash.md) / 25 | 26 | 27 | ### Method Summary 28 | 29 | | Methods | Brief | 30 | |--------------------------|---------------------------------------| 31 | |[Array](util/Array.md)|Contains methods for performing basic numeric operations.| 32 | |[Log](util/Log.md)|Log a message with all provided informations.| 33 | |[Random](util/Random.md)|Contains methods for generating numbers.| 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: NeedsTriage 6 | assignees: hastec-fr 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Import the packages : 16 | ```bash 17 | apash.import "fr.hastec.apash.commons-lang.StringUtils" 18 | ``` 19 | 2. Execute the command with the following arguments : 20 | ```bash 21 | $ StringUtils.rightPad "It's not a bug, it's a feature " 35 "!" 22 | # Ouputs 23 | # It's not a bug, it's a feature !!!! 24 | ``` 25 | 26 | **Expected behavior** 27 | A clear and concise description of what you expected to happen. 28 | 29 | **Environment (please complete the following information):** 30 | - Apash version: apash --version 31 | - Operating system (including version/distribution) 32 | - Shell type: [bash,zsh] 33 | - Shell version: echo $BASH_VERSION, echo $ZSH_VERSION 34 | - Install method: [by script, basher, raw] 35 | 36 | **Screenshots** 37 | If applicable, add screenshots to help explain your problem. 38 | 39 | **Additional context** 40 | Add any other context about the problem here. 41 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/NumberUtils/isLong.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Long.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isLong.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/NumberUtils/max.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/max.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/max.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/util/Random/nextInt.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isInteger.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Random/nextInt.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/DateUtils/isDate.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/DateUtils.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/DateUtils/isDate.sh 20 | -------------------------------------------------------------------------------- /src/fr/hastec/apash.check: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Dependencies ################################################################# 4 | apash.import fr.hastec.apash.util.Log 5 | apash.import fr.hastec.apash.commons-lang.ShellUtils.isCommandValid 6 | 7 | ##/ 8 | # @name apash.check 9 | # @brief Tool to check if some degraded mode are used. 10 | # @description 11 | # It checks that necessary commands are presents or if 12 | # a workaround code is used. 13 | # 14 | # ## History 15 | # @since 0.2.0 (hastec-fr) 16 | # 17 | # ## Interface 18 | # @apashPackage 19 | # 20 | # ### Arguments 21 | # | # | varName | Type | in/out | Default | Description | 22 | # |--------|----------------|---------------|----------|-----------------|--------------------------------------| 23 | # 24 | # ### Example 25 | # ```bash 26 | # apash.sanity # Minify using the current APASH_SHELL. 27 | # ``` 28 | # 29 | # @stdout None. 30 | # @stderr Warning if a condition is not respected. 31 | # 32 | #/ 33 | apash.check(){ 34 | ShellUtils.isCommandValid "bc" || Log.warn $LINENO "**DEGRADED MODE** bc command not found." 35 | ShellUtils.isCommandValid "rev" || Log.warn $LINENO "**DEGRADED MODE** rev command not found." 36 | } 37 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/contains.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/contains.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/isEmpty.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isEmpty.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/isSorted.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isSorted.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/MapUtils/containsKey.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MapUtils/isMap.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MapUtils/containsKey.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/isBlank.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/trim.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/isBlank.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/leftPad.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isDigits.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/leftPad.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/isNotEmpty.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isNotEmpty.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/rightPad.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isDigits.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/rightPad.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-io/FileNameUtils/getExtension.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/contains.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-io/FileNameUtils/getExtension.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/countMatches.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/countMatches.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/getLastIndex.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/getLastIndex.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/isSameLength.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isSameLength.sh 20 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/getNumberOfElements.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/getNumberOfElements.sh 20 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/lang.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # commons-lang 13 | Provides methods that are fundamental to the design script. 14 | @description# 15 | This implementation do reference to the [java documentation](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/package-summary.html). 16 | 17 | ## History 18 | ### Since 19 | * 0.1.0 (hastec-fr) 20 | 21 | ## Interface 22 | ### Package 23 | 24 | [apash](../apash.md) / 25 | 26 | 27 | ### Method Summary 28 | 29 | | Methods | Brief | 30 | |--------------------------|---------------------------------------| 31 | |[Integer](lang/Integer.md)|Contains related information about Integers.| 32 | |[Long](lang/Long.md)|Contains related information about Long int.| 33 | |[Math](lang/Math.md)|Contains methods for performing basic numeric operations| 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/NumberUtils/compare.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Long.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isLong.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/compare.sh 21 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/ShellUtils/isZsh.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # ShellUtils.isCommandValid 12 | Determine if current APASH_SHELL is zsh. 13 | 14 | ## History 15 | ### Since 16 | * 0.2.0 (hastec-fr) 17 | 18 | ## Interface 19 | ### Package 20 | 21 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [ShellUtils](../ShellUtils.md) / 22 | 23 | 24 | ### Arguments 25 | | # | varName | Type | in/out | Default | Description | 26 | |--------|----------------|---------------|----------|------------|---------------------------------------| 27 | 28 | ### Example 29 | ```bash 30 | # From bash 31 | ShellUtils.isZsh "" # false 32 | 33 | # From zsh 34 | ShellUtils.isZsh "" # true 35 | ``` 36 | 37 | ### Stdout 38 | * None. 39 | ### Stderr 40 | * None. 41 | 42 | ### Exit codes 43 | * **0**: When the command name is correct. 44 | * **1**: Otherwise. 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/isArrayIndex.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Long.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isLong.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArrayIndex.sh 21 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/rotate.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isInteger.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/abs.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/rotate.sh 21 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/util/Array.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # Array 13 | Contains methods for performing basic numeric operations. 14 | ## Description 15 | This package contains various methods for manipulating arrays. 16 | This implementation do reference to the [java implementation](https://docs.oracle.com/javase/8/docs/api/java/util/Arrays.html). 17 | 18 | ## History 19 | ### Since 20 | * 0.1.0 (hastec-fr) 21 | 22 | ## Interface 23 | ### Package 24 | 25 | [apash](../../apash.md) / [util](../util.md) / 26 | 27 | 28 | ### Method Summary 29 | 30 | | Methods | Brief | 31 | |--------------------------|---------------------------------------| 32 | |[bubbleSort](Array/bubbleSort.md)|Sorts the specified array into alphanumerical order with the bubble sort style.| 33 | |[sort](Array/sort.md)|Sorts the specified array into ascending natural order.| 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/NumberUtils/isLongPositive.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Long.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isLong.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isLongPositive.sh 21 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-lang/StringUtils/lowerCase_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'StringUtils.lowerCase' 2 | apash.import "fr.hastec.apash.commons-lang.StringUtils.lowerCase" 3 | 4 | It 'returns an empty string when input string is empty' 5 | When call StringUtils.lowerCase "" 6 | The output should equal "" 7 | The status should be success 8 | End 9 | 10 | It 'returns converted string to lower cases' 11 | When call StringUtils.lowerCase "ABC" 12 | The output should equal "abc" 13 | The status should be success 14 | End 15 | 16 | It 'returns converted string to lower cases' 17 | When call StringUtils.lowerCase "AbC" 18 | The output should equal "abc" 19 | The status should be success 20 | End 21 | 22 | It 'returns converted string to lower cases' 23 | When call StringUtils.lowerCase "A123B" 24 | The output should equal "a123b" 25 | The status should be success 26 | End 27 | 28 | It 'returns converted string to lower cases' 29 | When call StringUtils.lowerCase "abc" 30 | The output should equal "abc" 31 | The status should be success 32 | End 33 | 34 | It 'returns converted string to lower cases' 35 | When call StringUtils.lowerCase "CRÈME BRÛLÉE" 36 | The output should equal "crème brûlée" 37 | The status should be success 38 | End 39 | 40 | End 41 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/getLength.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/getLastIndex.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/getLength.sh 21 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/isSameLastIndex.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/getLastIndex.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isSameLastIndex.sh 21 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-io/FileNameUtils/getExtension_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'FileNameUtils.getExtension' 2 | apash.import "fr.hastec.apash.commons-io.FileNameUtils.getExtension" 3 | 4 | It 'passes when the input is empty' 5 | When call FileNameUtils.getExtension 6 | The output should equal "" 7 | The status should be success 8 | End 9 | 10 | It 'passes when the input has an extension' 11 | When call FileNameUtils.getExtension "foo.txt" 12 | The output should equal "txt" 13 | The status should be success 14 | End 15 | 16 | It 'passes when the input refer to a full path' 17 | When call FileNameUtils.getExtension "a/b/c.jpg" 18 | The output should equal "jpg" 19 | The status should be success 20 | End 21 | 22 | It 'passes and output is empty when there is no extension' 23 | When call FileNameUtils.getExtension "a/b.txt/c" 24 | The output should equal "" 25 | The status should be success 26 | End 27 | 28 | It 'passes and output is empty when there is no extension' 29 | When call FileNameUtils.getExtension "a/b/c" 30 | The output should equal "" 31 | The status should be success 32 | End 33 | 34 | It 'passes and output is empty when there is no extension' 35 | When call FileNameUtils.getExtension "a/b/c.txt.tmp" 36 | The output should equal "tmp" 37 | The status should be success 38 | End 39 | 40 | End 41 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/StringUtils/isEmpty.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Dependencies ################################################################# 4 | apash.import fr.hastec.apash.util.Log 5 | 6 | ##/ 7 | # @name StringUtils.isEmpty 8 | # @brief Checks if a string is empty ("") or not existing. 9 | # @description 10 | # 11 | # ## History 12 | # @since 0.1.0 (hastec-fr) 13 | # 14 | # ## Interface 15 | # @apashPackage 16 | # 17 | # ### Arguments 18 | # | # | varName | Type | in/out | Default | Description | 19 | # |--------|----------------|---------------|----------|------------|---------------------------------------| 20 | # | $1 | inString | string | in | | The string to check. | 21 | # 22 | # ### Example 23 | # ```bash 24 | # StringUtils.isEmpty "" # true 25 | # StringUtils.isEmpty " " # false 26 | # StringUtils.isEmpty "Hello World" # false 27 | # ``` 28 | # 29 | # @stdout None. 30 | # @stderr None. 31 | # 32 | # @exitcode 0 If no argument or an agurment of length 0 is passed. 33 | # @exitcode 1 If the argument with at lead one character (even space) is passed. 34 | #/ 35 | StringUtils.isEmpty() { 36 | Log.in $LINENO "$@" 37 | [ -z "${1:-}" ] && { Log.out $LINENO; return "$APASH_SUCCESS"; } 38 | Log.out $LINENO; return "$APASH_FAILURE" 39 | } 40 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/join.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/getLastIndex.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/getLength.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/join.sh 22 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ShellUtils/isVariable.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isDeclared.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MapUtils/isMap.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isVariable.sh 22 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/VersionUtils.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # VersionUtils 13 | Operations on string version. 14 | ## Description 15 | It considers that versions have part which could be alphanumeric or numeric. 16 | Each part is separated by a dot "." or a dash "-". 17 | If it's numeric, the comparison would be numeric, otherwise it's a dictionary comparison. 18 | 19 | ## History 20 | ### Since 21 | * 0.2.0 (hastec-fr) 22 | 23 | ## Interface 24 | ### Package 25 | 26 | [apash](../../apash.md) / [commons-lang](../commons-lang.md) / 27 | 28 | 29 | ### Method Summary 30 | 31 | | Methods | Brief | 32 | |--------------------------|---------------------------------------| 33 | |[compare](VersionUtils/compare.md)|Compare two versions and determine if the first one is lower than the second one.| 34 | |[isLowerOrEquals](VersionUtils/isLowerOrEquals.md)|Compare two versions and determine if the first one is lower than the second one| 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/lang/Math.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # Math 13 | Contains methods for performing basic numeric operations 14 | ## Description 15 | Such as the elementary exponential, logarithm, square root, and trigonometric functions. 16 | This implementation do reference to the [java oracle implementation](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Math.html). 17 | 18 | ## History 19 | ### Since 20 | * 0.1.0 (hastec-fr) 21 | 22 | ## Interface 23 | ### Package 24 | 25 | [apash](../../apash.md) / [lang](../lang.md) / 26 | 27 | 28 | ### Method Summary 29 | 30 | | Methods | Brief | 31 | |--------------------------|---------------------------------------| 32 | |[abs](Math/abs.md)|Checks whether the given String is a parsable number, then return without minus sign (absolute value).| 33 | |[max](Math/max.md)|Returns the greater of two number values.| 34 | |[min](Math/min.md)|Returns the smaller of two number values.| 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-lang/StringUtils/isBlank_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'StringUtils.isBlank' 2 | apash.import "fr.hastec.apash.commons-lang.StringUtils.isBlank" 3 | 4 | It 'passes without argument' 5 | When call StringUtils.isBlank 6 | The output should equal "" 7 | The status should be success 8 | End 9 | 10 | It 'passes with an empty argument' 11 | When call StringUtils.isBlank "" 12 | The output should equal "" 13 | The status should be success 14 | End 15 | 16 | It 'passes with a blank argument' 17 | When call StringUtils.isBlank " " 18 | The output should equal "" 19 | The status should be success 20 | End 21 | 22 | It 'passes with multiple spaces argument' 23 | When call StringUtils.isBlank " " 24 | The output should equal "" 25 | The status should be success 26 | End 27 | 28 | It 'passes with a tab argument' 29 | When call StringUtils.isBlank " " 30 | The output should equal "" 31 | The status should be success 32 | End 33 | 34 | It 'fails with a non empty argument' 35 | When call StringUtils.isBlank "Hello World" 36 | The output should equal "" 37 | The status should be failure 38 | End 39 | 40 | It 'fails with a non empty argument starting and finising by spaces' 41 | When call StringUtils.isBlank " Hello World " 42 | The output should equal "" 43 | The status should be failure 44 | End 45 | 46 | End 47 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-lang/StringUtils/isEmpty_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'StringUtils.isEmpty' 2 | apash.import "fr.hastec.apash.commons-lang.StringUtils.isEmpty" 3 | 4 | It 'passes without argument' 5 | When call StringUtils.isEmpty 6 | The output should equal "" 7 | The status should be success 8 | End 9 | 10 | It 'passes with an empty argument' 11 | When call StringUtils.isEmpty "" 12 | The output should equal "" 13 | The status should be success 14 | End 15 | 16 | It 'fails with a blank argument' 17 | When call StringUtils.isEmpty " " 18 | The output should equal "" 19 | The status should be failure 20 | End 21 | 22 | It 'fails with multiple spaces argument' 23 | When call StringUtils.isEmpty " " 24 | The output should equal "" 25 | The status should be failure 26 | End 27 | 28 | It 'fails with a tab argument' 29 | When call StringUtils.isEmpty " " 30 | The output should equal "" 31 | The status should be failure 32 | End 33 | 34 | It 'fails with a non empty argument' 35 | When call StringUtils.isEmpty "Hello World" 36 | The output should equal "" 37 | The status should be failure 38 | End 39 | 40 | It 'fails with a non empty argument starting and finising by spaces' 41 | When call StringUtils.isEmpty " Hello World " 42 | The output should equal "" 43 | The status should be failure 44 | End 45 | 46 | End 47 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/isArrayIndexValid.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isDigits.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/getLastIndex.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArrayIndexValid.sh 22 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-lang/StringUtils/countMatches_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'StringUtils.countMatches' 2 | apash.import "fr.hastec.apash.commons-lang.StringUtils.countMatches" 3 | 4 | It 'returns 0 if string or substring are empty' 5 | When call StringUtils.countMatches "" "" 6 | The output should equal '0' 7 | The status should be success 8 | End 9 | 10 | It 'returns 0 if string or substring are empty' 11 | When call StringUtils.countMatches "" "a" 12 | The output should equal '0' 13 | The status should be success 14 | End 15 | 16 | It 'returns 0 if string or substring are empty' 17 | When call StringUtils.countMatches "abba" "" 18 | The output should equal '0' 19 | The status should be success 20 | End 21 | 22 | It 'returns the number of occurence of the substring within the string' 23 | When call StringUtils.countMatches "abba" "a" 24 | The output should equal '2' 25 | The status should be success 26 | End 27 | 28 | It 'returns the number of occurence of the substring within the string' 29 | When call StringUtils.countMatches "abba" "ab" 30 | The output should equal '1' 31 | The status should be success 32 | End 33 | 34 | It 'returns the number of occurence of the substring within the string' 35 | When call StringUtils.countMatches "abba" "xxx" 36 | The output should equal '0' 37 | The status should be success 38 | End 39 | 40 | End 41 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/anythingToEmpty.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isVariableNameValid.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/declareArray.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/anythingToEmpty.sh 22 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-lang/ShellUtils/isDeclared_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'ShellUtils.isDeclared' 2 | apash.import "fr.hastec.apash.commons-lang.ShellUtils.isDeclared" 3 | 4 | It 'fails when the input name is not a valid variable name' 5 | When call ShellUtils.isDeclared 6 | The output should equal "" 7 | The status should be failure 8 | End 9 | 10 | It 'fails when the input name is not a valid variable name' 11 | When call ShellUtils.isDeclared "" 12 | The output should equal "" 13 | The status should be failure 14 | End 15 | 16 | It 'fails when the input name has not been declared' 17 | unset myVar 18 | When call ShellUtils.isDeclared "myVar" 19 | The output should equal "" 20 | The status should be failure 21 | End 22 | 23 | It 'passes when the variable has been declared' 24 | local myVar="test" 25 | When call ShellUtils.isDeclared "myVar" 26 | The output should equal "" 27 | The status should be success 28 | End 29 | 30 | It 'passes when the variable has been declared' 31 | declare -a myArray=() 32 | When call ShellUtils.isDeclared "myArray" 33 | The output should equal "" 34 | The status should be success 35 | End 36 | 37 | It 'passes when the variable has been declared' 38 | declare -a myMap=() 39 | When call ShellUtils.isDeclared "myMap" 40 | The output should equal "" 41 | The status should be success 42 | End 43 | 44 | End 45 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/StringUtils/reverse.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # StringUtils.reverse 12 | Reverses a string. 13 | 14 | ## History 15 | ### Since 16 | * 0.1.0 (hastec-fr) 17 | 18 | ## Interface 19 | ### Package 20 | 21 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [StringUtils](../StringUtils.md) / 22 | 23 | 24 | ### Arguments 25 | | # | varName | Type | in/out | Default | Description | 26 | |--------|----------------|---------------|----------|------------|---------------------------------------| 27 | | $1 | inString | string | in | | The string to reverse. | 28 | 29 | ### Example 30 | ```bash 31 | StringUtils.reverse # "" 32 | StringUtils.reverse "" # "" 33 | StringUtils.reverse "bat" # "tab" 34 | StringUtils.reverse "bat man" # "nam tab" 35 | ``` 36 | 37 | ### Stdout 38 | * The reversed string. 39 | ### Stderr 40 | * None. 41 | 42 | ### Exit codes 43 | * **0**: When result is displayed. 44 | * **1**: Otherwise. 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Dependencies ################################################################# 4 | apash.import fr.hastec.apash.util.Log 5 | 6 | ##/ 7 | # @name ShellUtils.isCommandValid 8 | # @brief Defensive programming technique to check that a variable name is valid 9 | # @description 10 | # 11 | # ## History 12 | # @since 0.1.0 (hastec-fr) 13 | # 14 | # ## Interface 15 | # @apashPackage 16 | # 17 | # ### Arguments 18 | # | # | varName | Type | in/out | Default | Description | 19 | # |--------|----------------|---------------|----------|------------|---------------------------------------| 20 | # | $1 | commandName | string | in | | Command to analyse | 21 | # 22 | # ### Example 23 | # ```bash 24 | # ShellUtils.isCommandValid "" # false 25 | # ShellUtils.isCommandValid "apashnotexist" # false 26 | # ShellUtils.isCommandValid "command" # true 27 | # ``` 28 | # 29 | # @stdout None. 30 | # @stderr None. 31 | # 32 | # @exitcode 0 When the command name is correct. 33 | # @exitcode 1 Otherwise. 34 | #/ 35 | ShellUtils.isCommandValid() { 36 | Log.in $LINENO "$@" 37 | local commandName="${1:-}" 38 | command -v "$commandName" >/dev/null 2>&1 || { Log.out $LINENO; return "$APASH_FAILURE"; } 39 | Log.out $LINENO; return "$APASH_SUCCESS"; 40 | } 41 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/util/Log/out.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # Log.out 12 | Log message before exiting from the calling function. 13 | ## Description 14 | The message is mandatory pushed to error channel. 15 | 16 | ## History 17 | ### Since 18 | * 0.2.0 (hastec-fr) 19 | 20 | ## Interface 21 | ### Package 22 | 23 | [apash](../../../apash.md) / [util](../../util.md) / [Log](../Log.md) / 24 | 25 | 26 | ### Arguments 27 | | # | varName | Type | in/out | Default | Description | 28 | |--------|----------------|---------------|----------|-----------|---------------------------------------| 29 | | $1 | inLineNumber | number | in | | The line number of the log. | 30 | 31 | ### Example 32 | ```bash 33 | Log.out $LINENO "StringUtils.leftPad-002" # &2: 2024-11-06T08:27:11.213+0000 [TRACE] StringUtils.leftPad (7): Out StringUtils.leftPad-002 34 | ``` 35 | 36 | ### Stdout 37 | * None. 38 | ### Stderr 39 | * The message to log. 40 | 41 | ### Exit codes 42 | * **0**: When the message has been logged. 43 | * **1**: Otherwise. 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/lastIndexOf.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Long.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isLong.sh 22 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/lastIndexOf.sh 23 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/ShellUtils/declareArray.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # ShellUtils.declareArray 12 | Declare an array at global level with dynamic name. 13 | ## Description 14 | In bash (4.3), the parentheses are required to ensure that array is initialized. 15 | 16 | ## History 17 | ### Since 18 | * 0.2.0 (hastec-fr) 19 | 20 | ## Interface 21 | ### Package 22 | 23 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [ShellUtils](../ShellUtils.md) / 24 | 25 | 26 | ### Arguments 27 | | # | varName | Type | in/out | Default | Description | 28 | |--------|----------------|---------------|----------|------------|---------------------------------------| 29 | | $1 | varName | string | in | | Variable name to check. | 30 | 31 | ### Example 32 | ```bash 33 | ShellUtils.declareArray "myArray" # myArray=() 34 | ``` 35 | 36 | ### Stdout 37 | * None. 38 | ### Stderr 39 | * None. 40 | 41 | ### Exit codes 42 | * **0**: When the variable is declared. 43 | * **1**: Otherwise. 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/StringUtils/repeat.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # StringUtils.repeat 12 | repeats a string. 13 | 14 | ## History 15 | ### Since 16 | * 0.2.0 (hastec-fr) 17 | 18 | ## Interface 19 | ### Package 20 | 21 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [StringUtils](../StringUtils.md) / 22 | 23 | 24 | ### Arguments 25 | | # | varName | Type | in/out | Default | Description | 26 | |--------|----------------|---------------|----------|------------|---------------------------------------| 27 | | $1 | inNumber | number | in | | The number of time string is repeated.| 28 | | $2 | inString | string | in | | The string to repeat. | 29 | 30 | ### Example 31 | ```bash 32 | StringUtils.repeat 3 "a" # "aaa" 33 | StringUtils.repeat 2 "ab" # "abab" 34 | ``` 35 | 36 | ### Stdout 37 | * The repeated string. 38 | ### Stderr 39 | * None. 40 | 41 | ### Exit codes 42 | * **0**: When result is displayed. 43 | * **1**: Otherwise. 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/StringUtils/trim.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # StringUtils.trim 12 | Remove whitespaces characters from both ends of the input string. 13 | 14 | ## History 15 | ### Since 16 | * 0.1.0 (hastec-fr) 17 | 18 | ## Interface 19 | ### Package 20 | 21 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [StringUtils](../StringUtils.md) / 22 | 23 | 24 | ### Arguments 25 | | # | varName | Type | in/out | Default | Description | 26 | |--------|----------------|---------------|----------|------------|---------------------------------------| 27 | | $1 | inString | string | in | | The string to trim. | 28 | 29 | ### Example 30 | ```bash 31 | StringUtils.trim "" # "" 32 | StringUtils.trim " " # "" 33 | StringUtils.trim " Hello World " # "Hello World" 34 | ``` 35 | 36 | ### Stdout 37 | * the trimmed string. 38 | ### Stderr 39 | * None. 40 | 41 | ### Exit codes 42 | * **0**: If the string can be displayed. 43 | * **1**: Otherwise. 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/util/Log/info_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'Log.info' 2 | apash.import "fr.hastec.apash.util.Log.info" 3 | 4 | It 'passes when inputs are consistents and level autorized' 5 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_INFO 6 | When call Log.info 1 "Hello World" "apash" 7 | The output should equal "" 8 | The stderr should include "[INFO] apash (1): Hello World" 9 | The status should be success 10 | End 11 | 12 | It 'passes when inputs are consistents and level not autorized' 13 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_ERROR 14 | When call Log.info 2 "Hello World" 15 | The output should equal "" 16 | The stderr should equal "" 17 | The status should be success 18 | End 19 | 20 | It 'passes when inputs are consistents and level autorized and redirected to standard output' 21 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_INFO 22 | When call Log.info 3 "Hello World" "apash" $APASH_LOG_CHANNEL_STDOUT 23 | The output should include "[INFO] apash (3): Hello World" 24 | The stderr should equal "" 25 | The status should be success 26 | End 27 | 28 | It 'passes when inputs are consistents and called from a function' 29 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_INFO 30 | myCaller(){ Log.info 1 "Hello World" ; } 31 | When call myCaller 32 | The output should equal "" 33 | The stderr should include "[INFO] myCaller (1): Hello World" 34 | The status should be success 35 | End 36 | 37 | End 38 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/util/Log/warn_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'Log.warn' 2 | apash.import "fr.hastec.apash.util.Log.warn" 3 | 4 | It 'passes when inputs are consistents and level autorized' 5 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_WARN 6 | When call Log.warn 1 "Hello World" "apash" 7 | The output should equal "" 8 | The stderr should include "[WARN] apash (1): Hello World" 9 | The status should be success 10 | End 11 | 12 | It 'passes when inputs are consistents and level not autorized' 13 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_OFF 14 | When call Log.warn 2 "Hello World" 15 | The output should equal "" 16 | The stderr should equal "" 17 | The status should be success 18 | End 19 | 20 | It 'passes when inputs are consistents and level autorized and redirected to standard output' 21 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_WARN 22 | When call Log.warn 3 "Hello World" "apash" $APASH_LOG_CHANNEL_STDOUT 23 | The output should include "[WARN] apash (3): Hello World" 24 | The stderr should equal "" 25 | The status should be success 26 | End 27 | 28 | It 'passes when inputs are consistents and called from a function' 29 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_WARN 30 | myCaller(){ Log.warn 1 "Hello World" ; } 31 | When call myCaller 32 | The output should equal "" 33 | The stderr should include "[WARN] myCaller (1): Hello World" 34 | The status should be success 35 | End 36 | 37 | End 38 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/StringUtils/equals.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Dependencies ################################################################# 4 | apash.import fr.hastec.apash.util.Log 5 | 6 | ##/ 7 | # @name StringUtils.equals 8 | # @brief Compares two string, returning true if they represent equal sequences of characters. 9 | # 10 | # ## History 11 | # @since 0.1.0 (hastec-fr) 12 | # 13 | # ## Interface 14 | # @apashPackage 15 | # 16 | # ### Arguments 17 | # | # | varName | Type | in/out | Default | Description | 18 | # |--------|----------------|---------------|----------|------------|---------------------------------------| 19 | # | $1 | inString1 | string | in | | First string to compare. | 20 | # | $2 | inString2 | string | in | | Second string to compare. | 21 | # 22 | # ### Example 23 | # ```bash 24 | # StringUtils.equals "" "" # true 25 | # StringUtils.equals "abc" "abc" # true 26 | # StringUtils.equals "abc" "abcd" # false 27 | # ``` 28 | # 29 | # @stdout None. 30 | # @stderr None 31 | # 32 | # @exitcode 0 If the string are equal (case-sensitive), or both empty. 33 | # @exitcode 1 Otherwise. 34 | #/ 35 | StringUtils.equals() { 36 | Log.in $LINENO "$@" 37 | [[ "${1:-}" == "${2:-}" ]] && { Log.out $LINENO; return "$APASH_SUCCESS"; } 38 | { Log.out $LINENO; return "$APASH_FAILURE"; } 39 | } 40 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/get.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isDigits.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/getLastIndex.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArrayIndexValid.sh 22 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/get.sh 23 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-lang/ShellUtils/isVariable_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'ShellUtils.isVariable' 2 | apash.import "fr.hastec.apash.commons-lang.ShellUtils.isVariable" 3 | 4 | It 'fails when the input name is not a valid variable name' 5 | When call ShellUtils.isVariable 6 | The output should equal "" 7 | The status should be failure 8 | End 9 | 10 | It 'fails when the input name is not a valid variable name' 11 | When call ShellUtils.isVariable "" 12 | The output should equal "" 13 | The status should be failure 14 | End 15 | 16 | It 'fails when the input name has not been declared' 17 | unset myVar 18 | When call ShellUtils.isVariable "myVar" 19 | The output should equal "" 20 | The status should be failure 21 | End 22 | 23 | It 'passes when the variable has been declared' 24 | local myVar="test" 25 | When call ShellUtils.isVariable "myVar" 26 | The output should equal "" 27 | The status should be success 28 | End 29 | 30 | It 'fails when the variable has been declared but as an array' 31 | declare -a myArray=() 32 | When call ShellUtils.isVariable "myArray" 33 | The output should equal "" 34 | The status should be failure 35 | End 36 | 37 | It 'passes when the variable has been declared but as an associative array' 38 | declare -a myMap=() 39 | When call ShellUtils.isVariable "myMap" 40 | The output should equal "" 41 | The status should be failure 42 | End 43 | 44 | End 45 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/util/Log/debug_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'Log.debug' 2 | apash.import "fr.hastec.apash.util.Log.debug" 3 | 4 | It 'passes when inputs are consistents and level autorized' 5 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_DEBUG 6 | When call Log.debug 1 "Hello World" "apash" 7 | The output should equal "" 8 | The stderr should include "[DEBUG] apash (1): Hello World" 9 | The status should be success 10 | End 11 | 12 | It 'passes when inputs are consistents and level not autorized' 13 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_ERROR 14 | When call Log.debug 2 "Hello World" 15 | The output should equal "" 16 | The stderr should equal "" 17 | The status should be success 18 | End 19 | 20 | It 'passes when inputs are consistents and level autorized and redirected to standard output' 21 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_DEBUG 22 | When call Log.debug 3 "Hello World" "apash" $APASH_LOG_CHANNEL_STDOUT 23 | The output should include "[DEBUG] apash (3): Hello World" 24 | The stderr should equal "" 25 | The status should be success 26 | End 27 | 28 | It 'passes when inputs are consistents and called from a function' 29 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_DEBUG 30 | myCaller(){ Log.debug 1 "Hello World" ; } 31 | When call myCaller 32 | The output should equal "" 33 | The stderr should include "[DEBUG] myCaller (1): Hello World" 34 | The status should be success 35 | End 36 | 37 | End 38 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/util/Log/error_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'Log.error' 2 | apash.import "fr.hastec.apash.util.Log.error" 3 | 4 | It 'passes when inputs are consistents and level autorized' 5 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_ERROR 6 | When call Log.error 1 "Hello World" "apash" 7 | The output should equal "" 8 | The stderr should include "[ERROR] apash (1): Hello World" 9 | The status should be success 10 | End 11 | 12 | It 'passes when inputs are consistents and level not autorized' 13 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_OFF 14 | When call Log.error 2 "Hello World" 15 | The output should equal "" 16 | The stderr should equal "" 17 | The status should be success 18 | End 19 | 20 | It 'passes when inputs are consistents and level autorized and redirected to standard output' 21 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_ERROR 22 | When call Log.error 3 "Hello World" "apash" $APASH_LOG_CHANNEL_STDOUT 23 | The output should include "[ERROR] apash (3): Hello World" 24 | The stderr should equal "" 25 | The status should be success 26 | End 27 | 28 | It 'passes when inputs are consistents and called from a function' 29 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_ERROR 30 | myCaller(){ Log.error 1 "Hello World" ; } 31 | When call myCaller 32 | The output should equal "" 33 | The stderr should include "[ERROR] myCaller (1): Hello World" 34 | The status should be success 35 | End 36 | 37 | End 38 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/util/Log/fatal_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'Log.fatal' 2 | apash.import "fr.hastec.apash.util.Log.fatal" 3 | 4 | It 'passes when inputs are consistents and level autorized' 5 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_FATAL 6 | When call Log.fatal 1 "Hello World" "apash" 7 | The output should equal "" 8 | The stderr should include "[FATAL] apash (1): Hello World" 9 | The status should be success 10 | End 11 | 12 | It 'passes when inputs are consistents and level not autorized' 13 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_OFF 14 | When call Log.fatal 2 "Hello World" 15 | The output should equal "" 16 | The stderr should equal "" 17 | The status should be success 18 | End 19 | 20 | It 'passes when inputs are consistents and level autorized and redirected to standard output' 21 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_FATAL 22 | When call Log.fatal 3 "Hello World" "apash" $APASH_LOG_CHANNEL_STDOUT 23 | The output should include "[FATAL] apash (3): Hello World" 24 | The stderr should equal "" 25 | The status should be success 26 | End 27 | 28 | It 'passes when inputs are consistents and called from a function' 29 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_FATAL 30 | myCaller(){ Log.fatal 1 "Hello World" ; } 31 | When call myCaller 32 | The output should equal "" 33 | The stderr should include "[FATAL] myCaller (1): Hello World" 34 | The status should be success 35 | End 36 | 37 | End 38 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/util/Log/trace_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'Log.trace' 2 | apash.import "fr.hastec.apash.util.Log.trace" 3 | 4 | It 'passes when inputs are consistents and level autorized' 5 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_TRACE 6 | When call Log.trace 1 "Hello World" "apash" 7 | The output should equal "" 8 | The stderr should include "[TRACE] apash (1): Hello World" 9 | The status should be success 10 | End 11 | 12 | It 'passes when inputs are consistents and level not autorized' 13 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_OFF 14 | When call Log.trace 2 "Hello World" 15 | The output should equal "" 16 | The stderr should equal "" 17 | The status should be success 18 | End 19 | 20 | It 'passes when inputs are consistents and level autorized and redirected to standard output' 21 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_TRACE 22 | When call Log.trace 3 "Hello World" "apash" $APASH_LOG_CHANNEL_STDOUT 23 | The output should include "[TRACE] apash (3): Hello World" 24 | The stderr should equal "" 25 | The status should be success 26 | End 27 | 28 | It 'passes when inputs are consistents and called from a function' 29 | export APASH_LOG_LEVEL=$APASH_LOG_LEVEL_TRACE 30 | myCaller(){ Log.trace 1 "Hello World" ; } 31 | When call myCaller 32 | The output should equal "" 33 | The stderr should include "[TRACE] myCaller (1): Hello World" 34 | The status should be success 35 | End 36 | 37 | End 38 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/StringUtils/trim.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Dependencies ################################################################# 4 | apash.import fr.hastec.apash.util.Log 5 | 6 | ##/ 7 | # @name StringUtils.trim 8 | # @brief Remove whitespaces characters from both ends of the input string. 9 | # 10 | # ## History 11 | # @since 0.1.0 (hastec-fr) 12 | # 13 | # ## Interface 14 | # @apashPackage 15 | # 16 | # ### Arguments 17 | # | # | varName | Type | in/out | Default | Description | 18 | # |--------|----------------|---------------|----------|------------|---------------------------------------| 19 | # | $1 | inString | string | in | | The string to trim. | 20 | # 21 | # ### Example 22 | # ```bash 23 | # StringUtils.trim "" # "" 24 | # StringUtils.trim " " # "" 25 | # StringUtils.trim " Hello World " # "Hello World" 26 | # ``` 27 | # 28 | # @stdout the trimmed string. 29 | # @stderr None. 30 | # 31 | # @exitcode 0 If the string can be displayed. 32 | # @exitcode 1 Otherwise. 33 | #/ 34 | StringUtils.trim() { 35 | Log.in $LINENO "$@" 36 | local inString="${1:-}" 37 | local trimmedString="" 38 | 39 | trimmedString="$(echo "$inString" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')" 40 | echo "$trimmedString" || { Log.ex $LINENO; return "$APASH_FAILURE"; } 41 | Log.out $LINENO; return "$APASH_SUCCESS" 42 | } 43 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/nullToEmpty.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isVariableNameValid.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isDeclared.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/declareArray.sh 22 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/nullToEmpty.sh 23 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/MatrixUtils/toString.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # MatrixUtils.create 12 | Display each virtual indexes of the matrix. 13 | ## Description 14 | ⚠️ It is an experimental function. 15 | 16 | ## History 17 | ### Since 18 | * 0.2.0 (hastec-fr) 19 | 20 | ## Interface 21 | ### Package 22 | 23 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [MatrixUtils](../MatrixUtils.md) / 24 | 25 | 26 | ### Arguments 27 | | # | varName | Type | in/out | Default | Description | 28 | |--------|------------------|---------------|----------|-----------------|--------------------------------------| 29 | | $1 | apash_matrixName | ref(string[]) | out | | Name of the apash_matrix. | 30 | 31 | ### Example 32 | ```bash 33 | MatrixUtils.create "myMatrix" 3 # myMatrix=(); apash_dim_myMatrix=(3) 34 | MatrixUtils.create "myMatrix" 3 4 # myMatrix=(); apash_dim_myMatrix=(3 4) 35 | ``` 36 | 37 | ### Stdout 38 | * None 39 | ### Stderr 40 | * None. 41 | 42 | ### Exit codes 43 | * **0**: When the array is created. 44 | * **1**: Otherwise. 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # ShellUtils.isCommandValid 12 | Defensive programming technique to check that a variable name is valid 13 | ## Description 14 | 15 | ## History 16 | ### Since 17 | * 0.1.0 (hastec-fr) 18 | 19 | ## Interface 20 | ### Package 21 | 22 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [ShellUtils](../ShellUtils.md) / 23 | 24 | 25 | ### Arguments 26 | | # | varName | Type | in/out | Default | Description | 27 | |--------|----------------|---------------|----------|------------|---------------------------------------| 28 | | $1 | commandName | string | in | | Command to analyse | 29 | 30 | ### Example 31 | ```bash 32 | ShellUtils.isCommandValid "" # false 33 | ShellUtils.isCommandValid "apashnotexist" # false 34 | ShellUtils.isCommandValid "command" # true 35 | ``` 36 | 37 | ### Stdout 38 | * None. 39 | ### Stderr 40 | * None. 41 | 42 | ### Exit codes 43 | * **0**: When the command name is correct. 44 | * **1**: Otherwise. 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/util/Log/in.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # Log.in 12 | Log the parent function call with its arguments. 13 | ## Description 14 | The message is mandatory pushed to error channel. 15 | 16 | ## History 17 | ### Since 18 | * 0.2.0 (hastec-fr) 19 | 20 | ## Interface 21 | ### Package 22 | 23 | [apash](../../../apash.md) / [util](../../util.md) / [Log](../Log.md) / 24 | 25 | 26 | ### Arguments 27 | | # | varName | Type | in/out | Default | Description | 28 | |--------|----------------|---------------|----------|-----------|---------------------------------------| 29 | | $1 | inLineNumber | number | in | | The line number of the log. | 30 | | $2 | inMessage | string | in | | The message to log. | 31 | 32 | ### Example 33 | ```bash 34 | Log.debug $LINENO "Hello World" # &2: 2024-11-06T08:27:11.213+0000 [DEBUG] apash (1): Hello World 35 | ``` 36 | 37 | ### Stdout 38 | * None. 39 | ### Stderr 40 | * The message to log. 41 | 42 | ### Exit codes 43 | * **0**: When the message has been logged. 44 | * **1**: Otherwise. 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/ShellUtils/declareArray.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Dependencies ################################################################# 4 | apash.import fr.hastec.apash.util.Log 5 | 6 | ##/ 7 | # @name ShellUtils.declareArray 8 | # @brief Declare an array at global level with dynamic name. 9 | # @description 10 | # In bash (4.3), the parentheses are required to ensure that array is initialized. 11 | # 12 | # ## History 13 | # @since 0.2.0 (hastec-fr) 14 | # 15 | # ## Interface 16 | # @apashPackage 17 | # 18 | # ### Arguments 19 | # | # | varName | Type | in/out | Default | Description | 20 | # |--------|----------------|---------------|----------|------------|---------------------------------------| 21 | # | $1 | varName | string | in | | Variable name to check. | 22 | # 23 | # ### Example 24 | # ```bash 25 | # ShellUtils.declareArray "myArray" # myArray=() 26 | # ``` 27 | # 28 | # @stdout None. 29 | # @stderr None. 30 | # 31 | # @exitcode 0 When the variable is declared. 32 | # @exitcode 1 Otherwise. 33 | #/ 34 | ShellUtils.declareArray() { 35 | Log.in $LINENO "$@" 36 | local varName="${1:-}" 37 | if [ "$APASH_SHELL" = "zsh" ]; then 38 | declare -g -a "$varName" || { Log.ex $LINENO; return "$APASH_FAILURE"; } 39 | else # bash 40 | declare -g -a "$varName=()" || { Log.ex $LINENO; return "$APASH_FAILURE"; } 41 | fi 42 | Log.out $LINENO; return "$APASH_SUCCESS" 43 | } 44 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/indexOf.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/getLastIndex.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Long.sh 22 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isLong.sh 23 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/indexOf.sh 24 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/StringUtils/isEmpty.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # StringUtils.isEmpty 12 | Checks if a string is empty ("") or not existing. 13 | ## Description 14 | 15 | ## History 16 | ### Since 17 | * 0.1.0 (hastec-fr) 18 | 19 | ## Interface 20 | ### Package 21 | 22 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [StringUtils](../StringUtils.md) / 23 | 24 | 25 | ### Arguments 26 | | # | varName | Type | in/out | Default | Description | 27 | |--------|----------------|---------------|----------|------------|---------------------------------------| 28 | | $1 | inString | string | in | | The string to check. | 29 | 30 | ### Example 31 | ```bash 32 | StringUtils.isEmpty "" # true 33 | StringUtils.isEmpty " " # false 34 | StringUtils.isEmpty "Hello World" # false 35 | ``` 36 | 37 | ### Stdout 38 | * None. 39 | ### Stderr 40 | * None. 41 | 42 | ### Exit codes 43 | * **0**: If no argument or an agurment of length 0 is passed. 44 | * **1**: If the argument with at lead one character (even space) is passed. 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/util/Log/entry.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # Log.entry 12 | Log the parent function call with its arguments. 13 | ## Description 14 | The message is mandatory pushed to error channel. 15 | 16 | ## History 17 | ### Since 18 | * 0.2.0 (hastec-fr) 19 | 20 | ## Interface 21 | ### Package 22 | 23 | [apash](../../../apash.md) / [util](../../util.md) / [Log](../Log.md) / 24 | 25 | 26 | ### Arguments 27 | | # | varName | Type | in/out | Default | Description | 28 | |--------|----------------|---------------|----------|-----------|---------------------------------------| 29 | | $1 | inLineNumber | number | in | | The line number of the log. | 30 | | $2 | inMessage | string | in | | The message to log. | 31 | 32 | ### Example 33 | ```bash 34 | Log.debug $LINENO "Hello World" # &2: 2024-11-06T08:27:11.213+0000 [DEBUG] apash (1): Hello World 35 | ``` 36 | 37 | ### Stdout 38 | * None. 39 | ### Stderr 40 | * The message to log. 41 | 42 | ### Exit codes 43 | * **0**: When the message has been logged. 44 | * **1**: Otherwise. 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/MatrixUtils/isMatrix.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Long.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isLong.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArrayIndex.sh 22 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MatrixUtils.sh 23 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MatrixUtils/isMatrix.sh 24 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/MapUtils/getKeys.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # MapUtils.getKeys 12 | Return an array containing all keys of a map. 13 | 14 | ## History 15 | ### Since 16 | * 0.2.0 (hastec-fr) 17 | 18 | ## Interface 19 | ### Package 20 | 21 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [MapUtils](../MapUtils.md) / 22 | 23 | 24 | ### Arguments 25 | | # | varName | Type | in/out | Default | Description | 26 | |--------|----------------|---------------|----------|------------|---------------------------------------| 27 | | $1 | apash_outArrayName | ref(string[]) | out | | Name of the array containing keys. | 28 | | $2 | apash_inMapName | ref(string{}) | in | | Name of the hashmap to check. | 29 | 30 | ### Example 31 | ```bash 32 | declare -A myMap=(["foo"]="bar" ["key"]="value") 33 | MapUtils.getKeys "myArray" "myMap" # myArray=(foo bar) 34 | ``` 35 | 36 | ### Stdout 37 | * None. 38 | ### Stderr 39 | * None. 40 | 41 | ### Exit codes 42 | * **0**: When output array is filled up with the keys. 43 | * **1**: Otherwise. 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/StringUtils/isBlank.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # StringUtils.isBlank 12 | Checks if a string contains only whitespaces characters or is empty or not existing. 13 | 14 | ## History 15 | ### Since 16 | * 0.1.0 (hastec-fr) 17 | 18 | ## Interface 19 | ### Package 20 | 21 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [StringUtils](../StringUtils.md) / 22 | 23 | 24 | ### Arguments 25 | | # | varName | Type | in/out | Default | Description | 26 | |--------|----------------|---------------|----------|------------|---------------------------------------| 27 | | $1 | inString | string | in | | The string to check. | 28 | 29 | ### Example 30 | ```bash 31 | StringUtils.isBlank "" # true 32 | StringUtils.isBlank " " # true 33 | StringUtils.isBlank "Hello World" # false 34 | ``` 35 | 36 | ### Stdout 37 | * None. 38 | ### Stderr 39 | * None. 40 | 41 | ### Exit codes 42 | * **0**: If no argument or an agurment of length 0 is passed. 43 | * **1**: If the argument with at lead one character (even space) is passed. 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/StringUtils/abbreviate.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Long.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isLong.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/substring.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/isEmpty.sh 22 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/isAnyEmpty.sh 23 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/StringUtils/abbreviate.sh 24 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/ArrayUtils/isEmpty.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # ArrayUtils.isEmpty 12 | Checks if an array exist and is empty. 13 | 14 | ## History 15 | ### Since 16 | * 0.1.0 (hastec-fr) 17 | 18 | ## Interface 19 | ### Package 20 | 21 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [ArrayUtils](../ArrayUtils.md) / 22 | 23 | 24 | ### Arguments 25 | | # | varName | Type | in/out | Default | Description | 26 | |--------|----------------|---------------|----------|------------|--------------------------------------| 27 | | $1 | apash_inArrayName | ref(string[]) | in | | The array to check. | 28 | 29 | ### Example 30 | ```bash 31 | ArrayUtils.isEmpty "myArray" # false 32 | 33 | myArray=() 34 | ArrayUtils.isEmpty "myArray" # true 35 | 36 | myArray=("a") 37 | ArrayUtils.isEmpty "myArray" # false 38 | 39 | myArray=("") 40 | ArrayUtils.isEmpty "myArray" # false 41 | ``` 42 | 43 | ### Stdout 44 | * None. 45 | ### Stderr 46 | * None. 47 | 48 | ### Exit codes 49 | * **0**: Whether the given array has no element. 50 | * **1**: Otherwise. 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/ArrayUtils/add.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isVariableNameValid.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isDeclared.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/declareArray.sh 22 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/nullToEmpty.sh 23 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/add.sh 24 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/util/Log/exit.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # Log.exit 12 | Log message before exiting from the calling function. 13 | ## Description 14 | The message is mandatory pushed to error channel. 15 | 16 | ## History 17 | ### Since 18 | * 0.2.0 (hastec-fr) 19 | 20 | ## Interface 21 | ### Package 22 | 23 | [apash](../../../apash.md) / [util](../../util.md) / [Log](../Log.md) / 24 | 25 | 26 | ### Arguments 27 | | # | varName | Type | in/out | Default | Description | 28 | |--------|----------------|---------------|----------|-----------|---------------------------------------| 29 | | $1 | inLineNumber | number | in | | The line number of the log. | 30 | | $2 | inLabel | string | in | | The corresponding exit label. | 31 | 32 | ### Example 33 | ```bash 34 | Log.exit "$LINENO" "StringUtils.leftPad-002" # &2: 2024-11-06T08:27:11.213+0000 [TRACE] StringUtils.leftPad (7): Out StringUtils.leftPad-002 35 | ``` 36 | 37 | ### Stdout 38 | * None. 39 | ### Stderr 40 | * The message to log. 41 | 42 | ### Exit codes 43 | * **0**: When the message has been logged. 44 | * **1**: Otherwise. 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/DateUtils/add.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/DateUtils.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/DateUtils/isDate.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Long.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isLong.sh 22 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 23 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/contains.sh 24 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/DateUtils/add.sh 25 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | apash.import fr.hastec.apash.util.Log 4 | 5 | ##/ 6 | # @name ArrayUtils.isArray 7 | # @brief Check if the input name is an array or not. 8 | # 9 | # ## History 10 | # @since 0.1.0 (hastec-fr) 11 | # 12 | # ## Interface 13 | # @apashPackage 14 | # 15 | # ### Arguments 16 | # | # | varName | Type | in/out | Default | Description | 17 | # |--------|----------------|---------------|----------|------------|--------------------------------------| 18 | # | $1 | inVarName | string | in | | Name of the array. | 19 | # 20 | # ### Example 21 | # ```bash 22 | # ArrayUtils.isArray "" # false 23 | # ArrayUtils.isArray "myVar" # false 24 | # 25 | # declare -a myArray 26 | # ArrayUtils.isArray "myArray" # true 27 | # 28 | # myArray=() 29 | # ArrayUtils.isArray "myArray" # true 30 | # 31 | # declare -A myMap 32 | # ArrayUtils.isArray "myMap" # false 33 | # 34 | # myMap=(["foo"]="bar") 35 | # ArrayUtils.isArray "myMap" # false 36 | # ``` 37 | # 38 | # @stdout None. 39 | # @stderr None. 40 | # 41 | # @exitcode 0 Whe the corresponding variable is an array. 42 | # @exitcode 1 Otherwise. 43 | #/ 44 | ArrayUtils.isArray() { 45 | Log.in $LINENO "$@" 46 | local inVarName="${1:-}" 47 | declare -p "$inVarName" 2> /dev/null | grep -q "^\(declare\|typeset\).* -a " && { Log.out $LINENO; return "$APASH_SUCCESS"; } 48 | Log.out $LINENO; return "$APASH_FAILURE" 49 | } 50 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/StringUtils/equals.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # StringUtils.equals 12 | Compares two string, returning true if they represent equal sequences of characters. 13 | 14 | ## History 15 | ### Since 16 | * 0.1.0 (hastec-fr) 17 | 18 | ## Interface 19 | ### Package 20 | 21 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [StringUtils](../StringUtils.md) / 22 | 23 | 24 | ### Arguments 25 | | # | varName | Type | in/out | Default | Description | 26 | |--------|----------------|---------------|----------|------------|---------------------------------------| 27 | | $1 | inString1 | string | in | | First string to compare. | 28 | | $2 | inString2 | string | in | | Second string to compare. | 29 | 30 | ### Example 31 | ```bash 32 | StringUtils.equals "" "" # true 33 | StringUtils.equals "abc" "abc" # true 34 | StringUtils.equals "abc" "abcd" # false 35 | ``` 36 | 37 | ### Stdout 38 | * None. 39 | ### Stderr 40 | * None 41 | 42 | ### Exit codes 43 | * **0**: If the string are equal (case-sensitive), or both empty. 44 | * **1**: Otherwise. 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /spec/fr/hastec/apash/commons-lang/StringUtils/trim_spec.sh: -------------------------------------------------------------------------------- 1 | Describe 'StringUtils.trim' 2 | apash.import "fr.hastec.apash.commons-lang.StringUtils.trim" 3 | 4 | It 'returns string without leading and tailing whitespaces but preserve middle spaces' 5 | When call StringUtils.trim " Hello World " 6 | The output should equal "Hello World" 7 | The status should be success 8 | End 9 | 10 | It 'returns empty string no characters are present' 11 | When call StringUtils.trim "" 12 | The output should equal "" 13 | The status should be success 14 | End 15 | 16 | It 'returns empty string no argument is present' 17 | When call StringUtils.trim 18 | The output should equal "" 19 | The status should be success 20 | End 21 | 22 | It 'returns empty string when only whitespaces are present (including tabs)' 23 | When call StringUtils.trim " " 24 | The output should equal "" 25 | The status should be success 26 | End 27 | 28 | It 'returns string without leading spaces' 29 | When call StringUtils.trim " Hello World" 30 | The output should equal "Hello World" 31 | The status should be success 32 | End 33 | 34 | It 'returns string without tailing spaces' 35 | When call StringUtils.trim "Hello World " 36 | The output should equal "Hello World" 37 | The status should be success 38 | End 39 | 40 | It 'returns the current value if no space to trim' 41 | When call StringUtils.trim "Hello World" 42 | The output should equal "Hello World" 43 | The status should be success 44 | End 45 | End 46 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/util/Log.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2034 3 | 4 | # Dependencies ################################################################# 5 | apash.import fr.hastec.apash.lang.Integer.sh 6 | 7 | ##/ 8 | # 9 | # @name Log 10 | # @brief Log a message with all provided informations. 11 | # @description 12 | # By default the message is pushed to the error channel. 13 | # 14 | # ## History 15 | # @since 0.2.0 (hastec-fr) 16 | # 17 | # ## Interface 18 | # @apashPackage 19 | # 20 | # @apashSummaryTable 21 | #/ 22 | APASH_LOG_LEVEL_OFF=0 23 | APASH_LOG_LEVEL_FATAL=100 24 | APASH_LOG_LEVEL_ERROR=200 25 | APASH_LOG_LEVEL_WARN=300 26 | APASH_LOG_LEVEL_INFO=400 27 | APASH_LOG_LEVEL_DEBUG=500 28 | APASH_LOG_LEVEL_TRACE=600 29 | APASH_LOG_LEVEL_ALL="$Integer_MAX_VALUE" 30 | APASH_LOG_LEVEL="${APASH_LOG_LEVEL:-$APASH_LOG_LEVEL_WARN}" 31 | 32 | APASH_LOG_STACK_TRACE="${APASH_LOG_STACK_TRACE:-false}" 33 | 34 | APASH_LOG_CHANNEL_STDOUT=1 35 | APASH_LOG_CHANNEL_STDERR=2 36 | 37 | # Declare a global readonly associative array for log levels 38 | declare -Ag APASH_LOG_LEVEL_STR 39 | APASH_LOG_LEVEL_STR[$APASH_LOG_LEVEL_OFF]="OFF" 40 | APASH_LOG_LEVEL_STR[$APASH_LOG_LEVEL_FATAL]="FATAL" 41 | APASH_LOG_LEVEL_STR[$APASH_LOG_LEVEL_ERROR]="ERROR" 42 | APASH_LOG_LEVEL_STR[$APASH_LOG_LEVEL_WARN]="WARN" 43 | APASH_LOG_LEVEL_STR[$APASH_LOG_LEVEL_INFO]="INFO" 44 | APASH_LOG_LEVEL_STR[$APASH_LOG_LEVEL_DEBUG]="DEBUG" 45 | APASH_LOG_LEVEL_STR[$APASH_LOG_LEVEL_TRACE]="TRACE" 46 | APASH_LOG_LEVEL_STR[$APASH_LOG_LEVEL_ALL]="ALL" 47 | 48 | # Package declaration 49 | util.Log() { true; } 50 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/ArrayUtils/isNotEmpty.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # ArrayUtils.isNotEmpty 12 | Checks if an array exist and has at least one element. 13 | 14 | ## History 15 | ### Since 16 | * 0.1.0 (hastec-fr) 17 | 18 | ## Interface 19 | ### Package 20 | 21 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [ArrayUtils](../ArrayUtils.md) / 22 | 23 | 24 | ### Arguments 25 | | # | varName | Type | in/out | Default | Description | 26 | |--------|----------------|---------------|----------|------------|--------------------------------------| 27 | | $1 | apash_inArrayName | ref(string[]) | in | | The array to check. | 28 | 29 | ### Example 30 | ```bash 31 | ArrayUtils.isNotEmpty "myArray" # false 32 | 33 | myArray=() 34 | ArrayUtils.isNotEmpty "myArray" # false 35 | 36 | myArray=("a") 37 | ArrayUtils.isNotEmpty "myArray" # true 38 | 39 | myArray=("") 40 | ArrayUtils.isNotEmpty "myArray" # true 41 | ``` 42 | 43 | ### Stdout 44 | * None. 45 | ### Stderr 46 | * None. 47 | 48 | ### Exit codes 49 | * **0**: Whether the given array has at least one element. 50 | * **1**: Otherwise. 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/StringUtils/isAlpha.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Dependencies ################################################################# 4 | apash.import fr.hastec.apash.util.Log 5 | 6 | ##/ 7 | # @name StringUtils.isAlpha 8 | # @brief Checks if the input string contains only Unicode letters. 9 | # @description 10 | # An empty string will return false. 11 | # 12 | # ## History 13 | # @since 0.1.0 (hastec-fr) 14 | # 15 | # ## Interface 16 | # @apashPackage 17 | # 18 | # ### Arguments 19 | # | # | varName | Type | in/out | Default | Description | 20 | # |--------|----------------|---------------|----------|------------|---------------------------------------| 21 | # | $1 | inString | string | in | | The string to check. | 22 | # 23 | # ### Example 24 | # ```bash 25 | # StringUtils.isAlpha "" # false 26 | # StringUtils.isAlpha " " # false 27 | # StringUtils.isAlpha "abc" # true 28 | # StringUtils.isAlpha "ab2c" # false 29 | # StringUtils.isAlpha "ab-c" # false 30 | # StringUtils.isAlpha "abéc" # true 31 | # ``` 32 | # 33 | # @stdout None. 34 | # @stderr None 35 | # 36 | # @exitcode 0 If the input string contains only unicode letters 37 | # @exitcode 1 contains other things than letters. 38 | #/ 39 | StringUtils.isAlpha() { 40 | Log.in $LINENO "$@" 41 | local pattern="^[[:alpha:]]+$" 42 | [[ ${1:-} =~ $pattern ]] && { Log.out $LINENO; return "$APASH_SUCCESS"; } 43 | Log.out $LINENO; return "$APASH_FAILURE" 44 | } 45 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/MatrixUtils/getIndex.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Long.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isLong.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArrayIndex.sh 22 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MatrixUtils.sh 23 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MatrixUtils/isMatrix.sh 24 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MatrixUtils/getIndex.sh 25 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/StringUtils/upperCase.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | # StringUtils.upperCase 12 | Converts a String to upper case. 13 | 14 | ## History 15 | ### Since 16 | * 0.1.0 (hastec-fr) 17 | 18 | ## Interface 19 | ### Package 20 | 21 | [apash](../../../apash.md) / [commons-lang](../../commons-lang.md) / [StringUtils](../StringUtils.md) / 22 | 23 | 24 | ### Arguments 25 | | # | varName | Type | in/out | Default | Description | 26 | |--------|----------------|---------------|----------|------------|---------------------------------------| 27 | | $1 | inString | string | in | | The string to upper case. | 28 | 29 | ### Example 30 | ```bash 31 | StringUtils.upperCase "" # "" 32 | StringUtils.upperCase "abc" # "ABC" 33 | StringUtils.upperCase "aBc" # "ABC" 34 | StringUtils.upperCase "a123b" # "A123B" 35 | StringUtils.upperCase "ABC" # "ABC" 36 | StringUtils.upperCase "crème brûlée" # "CRÈME BRÛLÉE" 37 | ``` 38 | 39 | ### Stdout 40 | * The upper cased string 41 | ### Stderr 42 | * None. 43 | 44 | ### Exit codes 45 | * **0**: When result is displayed. 46 | * **1**: Otherwise. 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /cache/fr/hastec/apash/commons-lang/MatrixUtils/getDimOffset.cache: -------------------------------------------------------------------------------- 1 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Integer.sh 2 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log.sh 3 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getFunctionName.sh 4 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/getParentFunctionName.sh 5 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/message.sh 6 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/debug.sh 7 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/error.sh 8 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/fatal.sh 9 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/in.sh 10 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/info.sh 11 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/out.sh 12 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/trace.sh 13 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/warn.sh 14 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isParsable.sh 15 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ShellUtils/isCommandValid.sh 16 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Math/min.sh 17 | $APASH_HOME_DIR/src/fr/hastec/apash/util/Log/ex.sh 18 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArray.sh 19 | $APASH_HOME_DIR/src/fr/hastec/apash/lang/Long.sh 20 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/NumberUtils/isLong.sh 21 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/ArrayUtils/isArrayIndex.sh 22 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MatrixUtils.sh 23 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MatrixUtils/isMatrix.sh 24 | $APASH_HOME_DIR/src/fr/hastec/apash/commons-lang/MatrixUtils/getDimOffset.sh 25 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/commons-lang/MapUtils.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # MapUtils 13 | Operations on maps. 14 | ## Description 15 | This implementation do reference to the [java apache implementation](https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/MapUtils.html)
16 | ⚠️WARNING: Contrary to Java implementation, apash methods are modifying directly the input map given by reference. 17 | 18 | ## History 19 | ### Since 20 | * 0.1.0 (hastec-fr) 21 | 22 | ## Interface 23 | ### Package 24 | 25 | [apash](../../apash.md) / [commons-lang](../commons-lang.md) / 26 | 27 | 28 | ### Method Summary 29 | 30 | | Methods | Brief | 31 | |--------------------------|---------------------------------------| 32 | |[clone](MapUtils/clone.md)|Copy a map into another map using references.| 33 | |[containsKey](MapUtils/containsKey.md)|Check if the input value is present in the input map.| 34 | |[getKeys](MapUtils/getKeys.md)|Return an array containing all keys of a map.| 35 | |[init](MapUtils/init.md)|Defensive programming technique initialize a map.| 36 | |[isMap](MapUtils/isMap.md)|Check if the input name is an map or not.| 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/fr/hastec/apash/commons-lang/ArrayUtils/clone.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Dependencies ################################################################# 4 | apash.import fr.hastec.apash.util.Log 5 | apash.import fr.hastec.apash.commons-lang.ArrayUtils.isArray 6 | apash.import fr.hastec.apash.commons-lang.ArrayUtils.init 7 | 8 | ##/ 9 | # @name ArrayUtils.clone 10 | # @brief Copy an array into another array using references. 11 | # @description 12 | # Values and indexes are preserved. 13 | # Derived version from .sh to zsh. 14 | # 15 | # ## History 16 | # @since 0.2.0 (hastec-fr) 17 | # 18 | # @see [clone](./clone.md). 19 | #/ 20 | ArrayUtils.clone() { 21 | Log.in $LINENO "$@" 22 | local apash_ArrayUtils_clone_inArrayName="${1:-}" 23 | local apash_ArrayUtils_clone_outArrayName="${2:-}" 24 | 25 | # Check input and output arrays (initilize this last). 26 | ArrayUtils.isArray "$apash_ArrayUtils_clone_inArrayName" || { Log.ex $LINENO; return "$APASH_FAILURE"; } 27 | ArrayUtils.init "$apash_ArrayUtils_clone_outArrayName" || { Log.ex $LINENO; return "$APASH_FAILURE"; } 28 | 29 | # Add special case when only a single empty element is present in the array 30 | if [[ ${#${(P)1}[@]} == 1 && ${${(P)1}[@]} == "" ]]; then 31 | : ${(PA)apash_ArrayUtils_clone_outArrayName::=""} || { Log.ex $LINENO; return "$APASH_FAILURE"; } 32 | Log.out $LINENO; return "$APASH_SUCCESS" 33 | fi 34 | 35 | # Copy the array when it contains elements. 36 | : ${(PA)apash_ArrayUtils_clone_outArrayName::="${(PA)1[@]}"} || { Log.ex $LINENO; return "$APASH_FAILURE"; } 37 | Log.out $LINENO; return "$APASH_SUCCESS" 38 | } 39 | -------------------------------------------------------------------------------- /doc/fr/hastec/apash/util/Log.md: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | apash-logo 5 | 6 | 7 | # Apash 8 |
9 | 10 | 11 | 12 | # Log 13 | Log a message with all provided informations. 14 | ## Description 15 | By default the message is pushed to the error channel. 16 | 17 | ## History 18 | ### Since 19 | * 0.2.0 (hastec-fr) 20 | 21 | ## Interface 22 | ### Package 23 | 24 | [apash](../../apash.md) / [util](../util.md) / 25 | 26 | 27 | ### Method Summary 28 | 29 | | Methods | Brief | 30 | |--------------------------|---------------------------------------| 31 | |[debug](Log/debug.md)|Log a message with debug level.| 32 | |[error](Log/error.md)|Log a message with error level| 33 | |[ex](Log/ex.md)|Log an error message due to an unexpected behavior and print the stack.| 34 | |[fatal](Log/fatal.md)|Log a message with fatal level.| 35 | |[in](Log/in.md)|Log the parent function call with its arguments.| 36 | |[info](Log/info.md)|Log a message with info level.| 37 | |[message](Log/message.md)|Log a message with all provided informations.| 38 | |[out](Log/out.md)|Log message before exiting from the calling function.| 39 | |[trace](Log/trace.md)|Log a message with trace level.| 40 | |[warn](Log/warn.md)|Log a message with warn level.| 41 | 42 | 43 | 44 | 45 | --------------------------------------------------------------------------------