Shields4J client

Lightweight java HTTP-client for the shields.io service

Лицензия

Лицензия

Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

org.touchbit.shields4j
Идентификатор

Идентификатор

client
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Shields4J client
Lightweight java HTTP-client for the shields.io service
Организация-разработчик

Организация-разработчик

TouchBIT

Скачать client

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.touchbit.shields4j/client/ -->
<dependency>
    <groupId>org.touchbit.shields4j</groupId>
    <artifactId>client</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.touchbit.shields4j/client/
implementation 'org.touchbit.shields4j:client:1.0.1'
// https://jarcasting.com/artifacts/org.touchbit.shields4j/client/
implementation ("org.touchbit.shields4j:client:1.0.1")
'org.touchbit.shields4j:client:jar:1.0.1'
<dependency org="org.touchbit.shields4j" name="client" rev="1.0.1">
  <artifact name="client" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.touchbit.shields4j', module='client', version='1.0.1')
)
libraryDependencies += "org.touchbit.shields4j" % "client" % "1.0.1"
[org.touchbit.shields4j/client "1.0.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.slf4j : slf4j-api jar 1.7.25

test (1)

Идентификатор библиотеки Тип Версия
org.touchbit.shields4j » test-core jar 1.0.1

Модули Проекта

Данный проект не имеет модулей.

Shields4j Master MavenCentral DocumentationStatus AlertStatus Coverage

Lightweight java HTTP-client for the shields.io service.

Full documentation is available on the shields4j.readthedocs.io

Briefly

Java client

Add dependency

<dependency>
    <groupId>org.touchbit.shields4j</groupId>
    <artifactId>client</artifactId>
    <version>${shields4j.version}</version>
</dependency>

If you need to get Shields4j versions that are not uploaded to maven central (snapshot/staging), add the Sonatype repository to your pom.xml

<repositories>
    <repository>
        <id>SonatypeNexus</id>
        <url>https://oss.sonatype.org/content/groups/staging/</url>
    </repository>
</repositories>

Minimal minimal

class Example {
    public static void main (String[] arg) {
        new ShieldsIO()
            .withLabel("Shields4J")
            .withMessage("1.0")
            .writeShieldToFile("minimal.svg");
    }
}

With logo and color background withlogo

class Example {
    public static void main (String[] arg) {
        new ShieldsIO()
            .withLabel("Shields4J")
            .withLabelColor(Color.BLUE)
            .withMessage("with Raspberry PI logo")
            .withMessageColor(Color.GREEN)
            .withStyle(Style.POPOUT)
            .withLogo(Logo.RASPBERRY_PI)
            .withLogoColor(Color.RED)
            .withLogoWidth(30)
            .writeShieldToFile("with-logo.svg");
    }
}

With custom logo and color background withcustomlogo

class Example {
    public static void main (String[] arg) {
         new ShieldsIO()
            .withLabel("Shields4J")
            .withLabelColor(Color.BLUE)
            .withMessage("with custom logo")
            .withMessageColor(Color.GREEN)
            .withStyle(Style.POPOUT)
            .withBase64Logo(new File("docs/img/status_success.svg"))
            .writeShieldToFile("with-custom-logo.svg");
    }
}

TestNG listener

Add dependency

<dependency>
    <groupId>org.touchbit.shields4j</groupId>
    <artifactId>testng</artifactId>
    <version>${shields4j.version}</version>
</dependency>

Add IShieldsListener to testNG iteststotal itestssuccesspercent

class Example {
    public static void main (String[] arg) {
         TestNG testNG = new TestNG();
         testNG.addListener(new IShieldsListener());
    }
}

or add IShieldsListener in your testng.xml file

<suite>
  <listeners>
    <listener class-name="org.touchbit.shields4j.testng.IShieldsListener" />
  </listeners>
</suite>

To customize the prefixes, create your own listener inherited from IShieldsListener integrationtesttotal integrationtestsuccesspercent

public class ShieldsListener extends IShieldsListener {
    public ShieldsListener() {
        withLabelPefix("Integration test");
        withFilePefix("testng");
    }
}
org.touchbit.shields4j

TouchBIT

Projects are mirrored from https://gitlab.com/TouchBIT

Версии библиотеки

Версия
1.0.1
1.0.0