Skip to content

Commit

Permalink
update version to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tamada committed Sep 13, 2020
1 parent 13eae1d commit b301f1a
Show file tree
Hide file tree
Showing 15 changed files with 77 additions and 59 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apk --no-cache add openjdk11=11.0.4_p4-r1 \

FROM alpine:3.10.1
LABEL maintainer="Haruaki Tamada" \
9rules-version="1.0.0" \
9rules-version="1.1.0" \
description="Checking tool for object oriented exercises by nine rules. "

COPY --from=base /opt/openjdk-11-minimal /opt/openjdk-11-minimal
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The demo was executed the following commands.
```sh
$ tree src/test/resources/hello/src/main/java/
// The result of tree command was printed.
$ java -jar target/9rules-1.0-SNAPSHOT.jar src/test/resources/hello/src/main/java/
$ java -jar target/9rules-1.1.0-SNAPSHOT.jar src/test/resources/hello/src/main/java/
// ... skip
src/test/resources/hello/src/main/java/sample/hello/HelloWorld.java
line: 10, setter method found.
Expand Down Expand Up @@ -120,7 +120,9 @@ If it is hard to obey the rules shown in above, we can lower the validating leve
Container images for Docker of 9rules are:

* [`tamada/9rules`](https://hub.docker.com/r/tamada/9rules)
* `1.0.0-v2`, `latest`
* `1.1.0`, `latest`
* [`tamada/9rules`](https://hub.docker.com/r/tamada/9rules)
* `1.0.0-v2`

To run the 9rules by the docker container:

Expand Down
8 changes: 7 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.github</groupId>
<artifactId>9rules</artifactId>
<version>1.0.1-SNAPSHOT</version>
<version>1.1.0</version>
<packaging>jar</packaging>

<name>9rules</name>
Expand Down Expand Up @@ -67,6 +67,12 @@
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/resources/help.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
9rules version ${project.version}
java -jar 9rules.jar [OPTIONS] <ARGUMENTS...>

OPTIONS:
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/9rules.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh

VERSION=1.0.1-SNAPSHOT
VERSION=1.1.0
CELLAR=.

java -jar $CELLAR/9rules-${VERSION}.jar $@
10 changes: 5 additions & 5 deletions src/site/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ pygmentsStyle = "pygments"

[menu]
[[menu.nav]]
name = "Home"
name = ":house: Home"
url = "/"
weight = 1
[[menu.nav]]
name = "Description"
name = ":page_facing_up: Description"
url = "/description/"
weight = 2
[[menu.nav]]
name = "Install"
name = ":anchor: Install"
url = "/install/"
weight = 3
[[menu.nav]]
name = "Usage"
name = ":running: Usage"
url = "/usage/"
weight = 4
[[menu.nav]]
name = "About"
name = ":smile: About"
url = "/about/"
weight = 5
34 changes: 18 additions & 16 deletions src/site/content/_index.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
---
title: 9rules
title: ":house: 9rules"
---

## Table of Contents

* [Description](description)
* [Installation](install)
* [Homebrew](install#homebrew)
* [Install yourself](install#install-yourself)
* [Requirements](install#requirements)
* [Usage](usage)
* [Usage of 9rules](example#usage-of-9rules)
* [Example](usage#example)
* [Help](usage#help)
* [Demo](usage#demo)
* [About the Project](about)
* [Contribution](about#contribution)
* [Authors](about#authors)
* [Discussion](about#discussion)
* [License](about#license)
* [:page_facing_up: Description](description)
* [:anchor: Installation](install)
* [:beer: Homebrew](install#beer-homebrew)
* [:muscle: Install yourself](install#muscle-install-yourself)
* [:briefcase: Requirements](install#briefcase-requirements)
* [:running: Usage](usage)
* [:fork_and_knife: Usage of 9rules](usage#fork_and_knife-usage-of-9rules)
* [:balloon: Example](usage#balloon=example)
* [:information_source: Help](usage#information_source-help)
* [:confetti_ball: Demo](usage#confetti_ball-demo)
* [:whale: Docker](usage#whale-docker)
* [:smile: About the Project](about)
* [:hammer_and_wrench: How to contribute the project](about#hammer_and_wrench-how-to-contribute-the-project)
* [:man_office_worker: Authors :woman_office_worker:](about#man_office_worker-authors-woman_office_worker)
* [:jack_o_lantern: Icons of 9rules](about#jack_o_lantern-icons-of-9rules)
* [:speech_balloon: Discussion](about#speech_balloon-discussion)
* [:scroll: License](about#scroll-license)


12 changes: 6 additions & 6 deletions src/site/content/about.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
title: About the project
title: ":smile: About the project"
---

[![Gitter](https://badges.gitter.im/9rules/Lobby.svg)](https://gitter.im/9rules/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat)](https://github.com/tamada/9rules/blob/master/LICENSE)


## Contribution
## :hammer_and_wrench: How to contribute the project

1. Fork the project. ([https://github.com/tamada/9rules/fork](https://github.com/tamada/9rules/fork))
2. Create a feature branch. (`git switch -c FEATURE_BRANCH_NAME`)
Expand All @@ -17,21 +17,21 @@ title: About the project
7. Create a new pull request.
8. Confirm all checks pass.

## Authors
## :man_office_worker: Authors :woman_office_worker:

* {{< githubuser tamada >}} [Haruaki Tamada](https://github.com/tamada)

## Icons of 9rules
## :jack_o_lantern: Icons of 9rules

{{< figure src="/9rules/images/logo.svg" alt="9rules logo" width="64" >}}

If you use the logo, please use [logo.svg](https://tamada.github.io/9rules/images/logo.svg) or [logo.png](https://tamada.github.io/9rules/images/logo.png), both images are located on https://tamada.github.io/9rules/images/.

## Discussion
## :speech_balloon: Discussion

[![Gitter](https://badges.gitter.im/9rules/Lobby.svg)](https://gitter.im/9rules/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

## License
## :scroll: License

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat)](https://github.com/tamada/9rules/blob/master/LICENSE)

Expand Down
2 changes: 1 addition & 1 deletion src/site/content/description.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Description
title: ":page_facing_up: Description"
---

## Rules
Expand Down
9 changes: 5 additions & 4 deletions src/site/content/install.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Install
title: ":anchor: Install"
---

## Homebrew
## :beer: Homebrew

Install 9rules via [Homebrew](https://brew.sh), simply run:

Expand All @@ -13,22 +13,23 @@ $ brew install ninerules

`9rules` command (wrapper for shell script) will be installed.

## Install yourself
## :muscle: Install yourself

```sh
$ git clone https://github.com/tamada/9rules.git
$ cd 9rules
$ mvn package
```

## Requirements
## :briefcase: Requirements

* Runtime
* Java 8 or later.
* Development
* Maven 3.x
* Dependencies
* JDT Core 3.10.0
* Vavr 0.10.3
* Dependencies (the Unit Tests)
* JUnit 4.12
* Hamcreset all 1.3
15 changes: 8 additions & 7 deletions src/site/content/usage.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: Usage
title: ":running: Usage"
---

## Usage of 9rules
## :fork_and_knife: Usage of 9rules

9rules is an executable jar, therefore, simply type ```java -jar 9rules-VERSION.jar```,
and specified java source codes and source code directory.

Then, the tool checks each java source code and reports the results of the check.

## Example
## :balloon: Example

We assume that the project was cloned and compiled with [Maven 3](http://maven.apache.org/).

Expand Down Expand Up @@ -50,7 +50,7 @@ src/test/resources/hello/src/main/java/sample/hello/Launcher.java
line: 10, method is too long (over 3 lines).
```

## Help
## :information_source: Help

```sh
java -jar 9rules.jar [OPTIONS] <TARGETS...>
Expand Down Expand Up @@ -106,16 +106,17 @@ the tool ignore all rules by specifying the annotation, and checks all rules wit
In the future version, the tool will arrange the annotations for ignoring each rule.


## Demo
## :confetti_ball: Demo

![demo](/9rules/images/demo.gif)

## Docker
## :whale: Docker

The docker container images are provided at DockerHub as the following repository.

* [tamada/9rules](https://hub.docker.com/r/tamada/9rules) (tamada/9rules)
* `1.0.0-v2`, `latest`
* `1.1.0`, `latest`
* `1.0.0-v2`

To run the 9rules by docker.

Expand Down
4 changes: 4 additions & 0 deletions src/site/layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ define "main" }}
<h1>{{ .Title | emojify }}</h1>
{{ .Content | emojify }}
{{ end }}
6 changes: 3 additions & 3 deletions src/site/layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
<h1>{{ .Title | emojify }}</h1>

{{ .Content }}
{{ .Content | emojify }}

<ul>
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
Expand All @@ -10,7 +10,7 @@ <h1>{{ .Title }}</h1>
{{ $dateFormat := $.Site.Params.dateFormat | default "Jan 2, 2006" }}
{{ .PublishDate.Format $dateFormat }}
<a href="{{ .Permalink }}">
{{ .Title }}
{{ .Title | emojify }}
</a>
</li>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion src/site/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
<link rel="icon" type="image/png" sizes="32x32" href="/images/harry.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/harry.png">
{{ partial "katex.html" . }}
<title>{{ .Title }} | {{ $.Site.Title }}</title>
<title>{{ .Title | emojify }} | {{ $.Site.Title | emojify }}</title>
</head>
23 changes: 12 additions & 11 deletions src/test/java/com/github/ninerules/MainTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,17 @@ public void testHelpMessage() throws Exception{
String output = new String(out.toByteArray());
String[] lines = output.split(System.getProperty("line.separator"));

assertThat(lines.length, is(10));
assertThat(lines[0], is("java -jar 9rules.jar [OPTIONS] <ARGUMENTS...>"));
assertThat(lines[1], is(""));
assertThat(lines[2], is("OPTIONS:"));
assertThat(lines[3], is(" --strict: Strictly level check (Default)."));
assertThat(lines[4], is(" --general: General level check."));
assertThat(lines[5], is(" --rough: Rough level check."));
assertThat(lines[6], is(" --help: Print this message and exit."));
assertThat(lines[7], is(""));
assertThat(lines[8], is("ARGUMENTS:"));
assertThat(lines[9], is(" Directories include Java source files, and Java source files."));
assertThat(lines.length, is(11));
assertThat(lines[0], is("9rules version 1.1.0"));
assertThat(lines[1], is("java -jar 9rules.jar [OPTIONS] <ARGUMENTS...>"));
assertThat(lines[2], is(""));
assertThat(lines[3], is("OPTIONS:"));
assertThat(lines[4], is(" --strict: Strictly level check (Default)."));
assertThat(lines[5], is(" --general: General level check."));
assertThat(lines[6], is(" --rough: Rough level check."));
assertThat(lines[7], is(" --help: Print this message and exit."));
assertThat(lines[8], is(""));
assertThat(lines[9], is("ARGUMENTS:"));
assertThat(lines[10], is(" Directories include Java source files, and Java source files."));
}
}

0 comments on commit b301f1a

Please sign in to comment.