From fd3a56e3fe0beff61c08d8a909724c3143bad0f6 Mon Sep 17 00:00:00 2001 From: rikkarth Date: Wed, 6 Dec 2023 23:22:54 +0000 Subject: [PATCH] Implement EnvPathParser, Test, maven.yml Reconfiguration --- .github/workflows/maven.yml | 41 +++++++----------- CHANGELOG.md | 9 +++- README.md | 7 +-- docs/resources/EnvPathParserUseCase.png | Bin 0 -> 37621 bytes .../toolertools/pathfinder/EnvPathParser.java | 16 ++++++- .../pathfinder/EnvPathParserTest.java | 39 ++++++++++++----- .../toolertools/utils/ParametersProvider.java | 21 +++++++++ 7 files changed, 91 insertions(+), 42 deletions(-) create mode 100644 docs/resources/EnvPathParserUseCase.png create mode 100644 src/test/java/pt/codeforge/toolertools/utils/ParametersProvider.java diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 6157708..3c2f912 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -17,11 +17,13 @@ on: jobs: test: - + if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest - + env: + HOME: /path/to/test steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v4 - name: Set up JDK 1.8 uses: actions/setup-java@v3 with: @@ -32,35 +34,22 @@ jobs: run: mvn -B --update-snapshots clean test build: - + if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK 1.8 uses: actions/setup-java@v3 with: java-version: '8' distribution: 'corretto' cache: maven - - name: Build with Maven - run: mvn -B package --file pom.xml - -# create_tag: -# -# runs-on: ubuntu-latest -# -# needs: build -# -# if: github.ref == 'refs/heads/main' -# -# steps: -# - name: Get version from pom.xml -# run: echo "##[set-output name=version]$(xmllint --xpath 'string(/project/version)' pom.xml)" -# id: get_version -# - name: Create tag -# run: | -# echo "Creating tag v${{ steps.get_version.outputs.version }}" -# git tag -a v${{ steps.get_version.outputs.version }} -m "Release v${{ steps.get_version.outputs.version }}" -# git push origin v${{ steps.get_version.outputs.version }} -# + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + - name: Publish package + run: mvn --batch-mode clean deploy + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 639e2fd..65cc41a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - `EnvPathParser` first implementation and JavaDoc -- `EnvPathParser` unit test initialization +- `EnvPathParser` simple unit tests +- `ParametersProvider` in test package to facilitate testing with several, different parameters. + +### Changed + +- Reworked GitHub `maven.yml` to only test in non-production branches and compile, test, package and deploy on + production branches. +- README.md Update ### Changed diff --git a/README.md b/README.md index 430d599..771881a 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,13 @@ simplify your development tasks. ``` -## Featuring +## Tools **XmlHandler** retrieves values from a doc when provided with the target XPath. -Why parse through a whole XML just to retrieve one value? We can use the power of tooler-tools and XPath. There's no -management or error handling. +**EnvPathParser** parses and expands env path variables into file paths. + +![EnvPathParserUseCase.png](docs/resources/EnvPathParserUseCase.png) ### Example - Get String From XPath diff --git a/docs/resources/EnvPathParserUseCase.png b/docs/resources/EnvPathParserUseCase.png new file mode 100644 index 0000000000000000000000000000000000000000..345738693f39d912bccb095acaf018d453f8389b GIT binary patch literal 37621 zcmce-WmKF?*Daa=ArL~aH0~bUH9&$B+#Ldq1b4TP;564B0Q_)KaugJVAK%HzQQ|pY zQb4xSUsAgNw@yekJ>uX0J%93v9|zM|Z^$>AwT`t2*-kchyg)!>X4_>r5 zbdoo1nkrYZ{#c$RY8>j=`4$a%XPC$T8B8WK!WIj}Y#Y~|$EKiQ-)oyoCKOcwE0O*8 z?C+4*SPmxmf)mX@U-`CpHzgT@A}j%(iiO{6iPg`KB_no)(oqv*WG8H8pcKn!|18}{ zU8F&M(30yxC=f*NM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i+A7%q literal 0 HcmV?d00001 diff --git a/src/main/java/pt/codeforge/toolertools/pathfinder/EnvPathParser.java b/src/main/java/pt/codeforge/toolertools/pathfinder/EnvPathParser.java index 419320d..44c5a8b 100644 --- a/src/main/java/pt/codeforge/toolertools/pathfinder/EnvPathParser.java +++ b/src/main/java/pt/codeforge/toolertools/pathfinder/EnvPathParser.java @@ -1,5 +1,7 @@ package pt.codeforge.toolertools.pathfinder; +import java.nio.file.InvalidPathException; +import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; import java.util.List; @@ -26,7 +28,9 @@ private EnvPathParser() { * Parses the input path by replacing environment variable placeholders with their respective values. Environment * variable placeholders are denoted by percent signs ('%') on both ends for Windows and by a dollar sign ('$') at * the beginning for Unix-like systems. The method handles both styles. After parsing, the method returns the - * normalized path as a String. + * normalized path as a String, or if when path string cannot be converted into a {@link Path} because the path + * string contains invalid characters, or the path string is invalid for other file system specific reasons, it + * returns the path as literally converted. * * @param input The input path to be parsed. Must not be null. * @return The parsed and normalized path as a String. @@ -42,7 +46,15 @@ public static String getEnvPath(String input) { parseIfMys(inputCopy, pathComponentsList); parseIfUnix(inputCopy, pathComponentsList); - return Paths.get(inputCopy.get()).toString(); + return getPathOrDefault(inputCopy); + } + + private static String getPathOrDefault(AtomicReference inputCopy) { + try { + return Paths.get(inputCopy.get()).toString(); + } catch (InvalidPathException ipe) { + return inputCopy.get(); + } } private static void parseIfMys(AtomicReference inputCopy, diff --git a/src/test/java/pt/codeforge/toolertools/pathfinder/EnvPathParserTest.java b/src/test/java/pt/codeforge/toolertools/pathfinder/EnvPathParserTest.java index 293f663..532721c 100644 --- a/src/test/java/pt/codeforge/toolertools/pathfinder/EnvPathParserTest.java +++ b/src/test/java/pt/codeforge/toolertools/pathfinder/EnvPathParserTest.java @@ -1,28 +1,47 @@ package pt.codeforge.toolertools.pathfinder; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; class EnvPathParserTest { - @BeforeEach - void setup() { - System.setProperty("$HOME", "test"); + @ParameterizedTest + @ValueSource(strings = "$HOME") + void givenUnixValidEnvVariable_testgetEnvPath_shouldReturnValidPath(String input) { + String result = EnvPathParser.getEnvPath(input); + + assertValidResult(input, result); + } + + @ParameterizedTest + @ValueSource(strings = "$HOME/$TEMP") + void givenUnixMultipleValidEnvVariables_testgetEnvPath_shouldReturnValidPath(String input) { + String result = EnvPathParser.getEnvPath(input); + + assertValidResult(input, result); } @ParameterizedTest - @ValueSource(strings = "$HOMEDRIVE/$HOMEPATH") - void testGetEnvPath(String input) { + @ValueSource(strings = "$HOME/%HOME%") + void givenUnixAndMysMultipleValidEnvVariables_testgetEnvPath_shouldReturnValidPath(String input) { + String result = EnvPathParser.getEnvPath(input); - System.out.println(EnvPathParser.getEnvPath(input)); + assertValidResult(input, result); } @Test - void testBadGetEnvPath() { - Assertions.assertThrows(IllegalArgumentException.class, () -> EnvPathParser.getEnvPath(null)); + void givenNullInput_testGetEnvPath_shouldThrowIllegalArgumentException() { + assertThrows(IllegalArgumentException.class, () -> EnvPathParser.getEnvPath(null), + "EnvPathParser#getEnvPath should throw IllegalArgumentException.class."); } + private static void assertValidResult(String input, String result) { + assertNotEquals(input, result, "Input should not be equal to result."); + assertFalse(result.isEmpty(), "Result should not be empty."); + } } diff --git a/src/test/java/pt/codeforge/toolertools/utils/ParametersProvider.java b/src/test/java/pt/codeforge/toolertools/utils/ParametersProvider.java new file mode 100644 index 0000000..7420b10 --- /dev/null +++ b/src/test/java/pt/codeforge/toolertools/utils/ParametersProvider.java @@ -0,0 +1,21 @@ +package pt.codeforge.toolertools.utils; + +import java.util.stream.Stream; +import org.junit.jupiter.params.provider.Arguments; + +public class ParametersProvider { + + public static final String PARAMETERS_PROVIDER_CLASS = "pt.codeforge.toolertools.utils.ParametersProvider"; + + public static Stream getEnvPaths(){ + return Stream.of( + Arguments.of("$HOMEDRIVE/$HOMEPATH"), + Arguments.of("$TEMP/test"), + Arguments.of("test/$HOMEPATH/"), + Arguments.of("../$HOMEPATH/"), + Arguments.of("./$HOMEPATH/"), + Arguments.of("$HOMEDRIVE/$HOMEPATH/test"), + Arguments.of("") + ); + } +}