Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/reportportal/client-java
Browse files Browse the repository at this point in the history
…into EPMRPP-89703-lib-merge
  • Loading branch information
pbortnik committed Apr 10, 2024
2 parents d7c2826 + 02114ae commit c8da2f9
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ on:
branches:
- '*'
- '!master'
- '!v4-hotfix'
paths-ignore:
- README.md
- README_TEMPLATE.md
Expand All @@ -27,7 +26,6 @@ on:
branches:
- master
- develop
- v4-hotfix

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
version-file-extraction-pattern: ${{ env.VERSION_EXTRACT_PATTERN }}

- name: Setup git credentials
uses: oleksiyrudenko/gha-git-credentials@v2.1.1
uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
name: 'reportportal.io'
email: 'support@reportportal.io'
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

## [5.2.14]
### Added
- `MarkdownUtils.asTwoParts(String, String)` method, by @HardNorth

## [5.2.13]
### Changed
- Return back `ContentType#parse` method for backward compatibility, by @HardNorth
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[![Build with Love](https://img.shields.io/badge/build%20with-❤%EF%B8%8F%E2%80%8D-lightgrey.svg)](http://reportportal.io?style=flat)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

The latest version: 5.2.13. Please use `Maven Central` link above to get the client.
The latest version: 5.2.14. Please use `Maven Central` link above to get the client.

## JVM-based clients configuration

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=5.2.14-SNAPSHOT
version=5.2.15-SNAPSHOT
description=EPAM ReportPortal. Client
retrofit_version=2.9.0
okhttp_version=4.12.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class MarkdownUtils {
public static final int PADDING_SPACES_NUM = 2;
public static final int MAX_TABLE_SIZE = 83;
public static final int MIN_COL_SIZE = 3;
public static final String LOGICAL_SEPARATOR = "---";

/**
* Adds special prefix to make log message being processed as markdown
Expand Down Expand Up @@ -198,4 +199,8 @@ public static String formatDataTable(@Nonnull final Map<String, String> table) {
toFormat.add(keys.stream().map(table::get).collect(Collectors.toList()));
return formatDataTable(toFormat);
}

public static String asTwoParts(@Nonnull String firstPart, @Nonnull String secondPart) {
return firstPart + NEW_LINE + LOGICAL_SEPARATOR + NEW_LINE + secondPart;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ private static Iterable<Object[]> testMediaTypeValid() {
new Object[] { "application/json", true },
new Object[] { "video/vnd.iptvforum.2dparityfec-2005", true },
new Object[] { "application/json; charset=utf-8", false },
new Object[] { "application/json;", false },
new Object[] { "pdf", false },
new Object[] { " ", false },
new Object[] { "; charset=utf-8", false },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,13 @@ public void test_format_data_table_min_size_transpose_pad() {
List<List<String>> table = Arrays.asList(Arrays.asList("var_a", "var_b", "result"), Arrays.asList("2", "2", "4"));
assertThat(formatDataTable(table, 14), equalTo(MIN_ROW_WIDTH_EXPECTED_TABLE_TRANSPOSE_PAD));
}

public static final String TEXT_PART_ONE = "This is a text";
public static final String TEXT_PART_TWO = "This is another text";
public static final String EXPECTED_TWO_PARTS = TEXT_PART_ONE + "\n---\n" + TEXT_PART_TWO;

@Test
public void test_format_two_parts() {
assertThat(asTwoParts(TEXT_PART_ONE, TEXT_PART_TWO), equalTo(EXPECTED_TWO_PARTS));
}
}

0 comments on commit c8da2f9

Please sign in to comment.