Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Make CLI builder as a test-ready component. #64

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ include:
cache:
paths:
- .m2/repository
- target
- cli-builder/target
- maven-plugin/target

stages:
- build
Expand Down Expand Up @@ -49,7 +50,7 @@ spotbugs-sast:
coverage:
stage: verify
script:
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions, "% covered" }' target/site/jacoco/jacoco.csv
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions, "% covered" }' cli-builder/target/site/jacoco/jacoco.csv maven-plugin/target/site/jacoco/jacoco.csv
coverage: '/(\d+\.?\d*) \% covered/'
rules:
- if: $CI_DEFAULT_BRANCH == $CI_COMMIT_BRANCH && $CI_COMMIT_TAG == null
Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- The proxy feature
- The report path
- Split Maven plugin and core module
- Split Maven plugin and CLI builder modules

## 1.0.1 - 2023-11-08
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml → cli-builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<artifactId>ijhttp-core</artifactId>
<artifactId>ijhttp-cli-builder</artifactId>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package uk.bot_by.ijhttp_core.core;
package uk.bot_by.ijhttp_tools.cli_builder;

import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package uk.bot_by.ijhttp_core.core;
package uk.bot_by.ijhttp_tools.cli_builder;

/**
* Logging levels.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package uk.bot_by.ijhttp_core.core;
package uk.bot_by.ijhttp_tools.cli_builder;

import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package uk.bot_by.ijhttp_core.core;
package uk.bot_by.ijhttp_tools.cli_builder;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
Expand Down
2 changes: 1 addition & 1 deletion maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</build>
<dependencies>
<dependency>
<artifactId>ijhttp-core</artifactId>
<artifactId>ijhttp-cli-builder</artifactId>
<groupId>uk.bot-by.ijhttp-tools</groupId>
<version>${revision}${changelist}${sha1}</version>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.jetbrains.annotations.VisibleForTesting;
import uk.bot_by.ijhttp_core.core.CommandLineBuilder;
import uk.bot_by.ijhttp_core.core.LogLevel;
import uk.bot_by.ijhttp_tools.cli_builder.CommandLineBuilder;
import uk.bot_by.ijhttp_tools.cli_builder.LogLevel;

/**
* Run integration tests using IntelliJ HTTP Client.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import org.mockito.Mock;
import org.mockito.Spy;
import org.mockito.junit.jupiter.MockitoExtension;
import uk.bot_by.ijhttp_core.core.LogLevel;
import uk.bot_by.ijhttp_tools.cli_builder.LogLevel;

@ExtendWith(MockitoExtension.class)
@Tag("fast")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.mockito.Mock;
import org.mockito.Spy;
import org.mockito.junit.jupiter.MockitoExtension;
import uk.bot_by.ijhttp_core.core.LogLevel;
import uk.bot_by.ijhttp_tools.cli_builder.LogLevel;

@ExtendWith(MockitoExtension.class)
@Tag("slow")
Expand Down
2 changes: 2 additions & 0 deletions maven-plugin/test-exit-code.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

[ ${1:-0} -gt 0 ] && echo "error output" >&2 || echo "standard output"

exit "${1:-0}"
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
</licenses>
<modelVersion>4.0.0</modelVersion>
<modules>
<module>core</module>
<module>cli-builder</module>
<module>maven-plugin</module>
</modules>
<name>IntelliJ HTTP Client Tools</name>
Expand Down