Skip to content

Commit

Permalink
Deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
williamniemiec committed Aug 12, 2021
0 parents commit 42cc5a4
Show file tree
Hide file tree
Showing 15 changed files with 1,010 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: MacOS

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven
run: mvn install
20 changes: 20 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Ubuntu

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven
run: mvn install
27 changes: 27 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Windows

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven and generate coverage report
env:
GITHUB_USERNAME: williamniemiec
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn --file pom.xml jacoco:prepare-agent install jacoco:report
- uses: codecov/codecov-action@v1
with:
file: ./**/target/site/jacoco/jacoco.xml
name: codecov
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Project
.settings/

# Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 William Niemiec

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
91 changes: 91 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
![](https://github.com/wniemiec-util-java/parser-balance/blob/master/docs/img/logo/logo.jpg)

<h1 align='center'>Parser Balance</h1>
<p align='center'>Performs the count of how many times a given open symbol has in a text subtracted from how many closed symbols that text has.</p>
<p align="center">
<a href="https://github.com/wniemiec-util-java/parser-balance/actions/workflows/windows.yml"><img src="https://github.com/wniemiec-util-java/parser-balance/actions/workflows/windows.yml/badge.svg" alt=""></a>
<a href="https://github.com/wniemiec-util-java/parser-balance/actions/workflows/macos.yml"><img src="https://github.com/wniemiec-util-java/parser-balance/actions/workflows/macos.yml/badge.svg" alt=""></a>
<a href="https://github.com/wniemiec-util-java/parser-balance/actions/workflows/ubuntu.yml"><img src="https://github.com/wniemiec-util-java/parser-balance/actions/workflows/ubuntu.yml/badge.svg" alt=""></a>
<a href="https://codecov.io/gh/wniemiec-util-java/parser-balance"><img src="https://codecov.io/gh/wniemiec-util-java/parser-balance/branch/master/graph/badge.svg?token=R2SFS4SP86" alt="Coverage status"></a>
<a href="http://java.oracle.com"><img src="https://img.shields.io/badge/java-11+-D0008F.svg" alt="Java compatibility"></a>
<a href="https://mvnrepository.com/artifact/io.github.wniemiec-util-java/parser-balance"><img src="https://img.shields.io/maven-central/v/io.github.wniemiec-util-java/parser-balance" alt="Maven Central release"></a>
<a href="https://github.com/wniemiec-util-java/parser-balance/blob/master/LICENSE"><img src="https://img.shields.io/github/license/wniemiec-util-java/parser-balance" alt="License"></a>
</p>
<hr />

## ❇ Introduction
Parser Balance is a symbol counter, counting how many times a given open symbol has in a text subtracted from how many closed symbols that text has.

## ❓ How to use
1. Add one of the options below to the pom.xml file:

#### Using Maven Central (recomended):
```
<dependency>
<groupId>io.github.wniemiec-util-java</groupId>
<artifactId>parser-balance</artifactId>
<version>LATEST</version>
</dependency>
```

#### Using GitHub Packages:
```
<dependency>
<groupId>wniemiec.io.java</groupId>
<artifactId>parser-balance</artifactId>
<version>LATEST</version>
</dependency>
```

2. Run
```
$ mvn install
```

3. Use it
```
[...]
import wniemiec.io.java.Balance;
[...]
Balance cbBalance = new CurlyBracketBalance();
Balance rbBalance = new RoundBracketBalance();
String example = "{Hello (World{";
cbBalance.parse(example);
rbBalance.parse(example);
System.out.println( cbBalance.getBalance() );
System.out.println( rbBalance.getBalance() );
[...]
```


## 📖 Documentation
| Property |Parameter type|Return type|Description|Default parameter value|
|----------------|-------------------------------|-----|------------------------|--------|
|parse |`void`|`void`|Analyzes a text and updates the balance | - |
|increaseBalance |`void`|`void`|Increases the balance| - |
|decreaseBalance |`void`|`boolean`|Decreases the balance| - |
|getBalance |`void`|`boolean`|Gets balance value| - |
|isBalanceEmpty | `void`|`void`|Checks whether the balance is empty| - |
|alreadyIncreased | `void`|`boolean`|Checks whether the balance has already been increased at any time| - |

## 🚩 Changelog
Details about each version are documented in the [releases section](https://github.com/williamniemiec/wniemiec-util-java/parser-balance/releases).

## 🤝 Contribute!
See the documentation on how you can contribute to the project [here](https://github.com/wniemiec-util-java/parser-balance/blob/master/CONTRIBUTING.md).

## 📁 Files

### /
| Name |Type|Description|
|----------------|-------------------------------|-----------------------------|
|dist |`Directory`|Released versions|
|docs |`Directory`|Documentation files|
|src |`Directory`| Source files|
Binary file added dist/1.x/parser-balance-1.0.0.jar
Binary file not shown.
Loading

0 comments on commit 42cc5a4

Please sign in to comment.