Version 1.1.1

This commit is contained in:
Erik C. Thauvin 2024-06-07 17:34:21 -07:00
parent 1c4b20e11c
commit 71467db442
Signed by: erik
GPG key ID: 776702A6A2DA330E
6 changed files with 26 additions and 17 deletions

View file

@ -1 +1 @@
future-release=1.1.0
future-release=1.1.2

View file

@ -1,5 +1,14 @@
# Changelog
## [1.1.1](https://github.com/ethauvin/httpstatus/tree/1.1.1) (2024-06-07)
[Full Changelog](https://github.com/ethauvin/httpstatus/compare/1.1.0...1.1.1)
**Implemented enhancements:**
- Sort command line output [\#10](https://github.com/ethauvin/HttpStatus/issues/10)
- Update reasons properties status codes [\#9](https://github.com/ethauvin/HttpStatus/issues/9)
## [1.1.0](https://github.com/ethauvin/httpstatus/tree/1.1.0) (2023-09-29)
[Full Changelog](https://github.com/ethauvin/httpstatus/compare/1.0.5...1.1.0)

View file

@ -72,7 +72,7 @@ repositories {
}
dependencies {
implementation 'net.thauvin.erik.httpstatus:httpstatus:1.1.0'
implementation 'net.thauvin.erik.httpstatus:httpstatus:1.1.1'
}
```
@ -94,7 +94,7 @@ As a `Maven` artifact:
<dependency>
<groupId>net.thauvin.erik.httpstatus</groupId>
<artifactId>httpstatus</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
</dependency>
```
@ -315,7 +315,7 @@ The reasons are defined in a [ResourceBundle](https://docs.oracle.com/en/java/ja
You can query the reason phrase for status codes as follows:
```console
$ java -jar httpstatus-1.1.0.jar 404 500
$ java -jar httpstatus-1.1.1.jar 404 500
404: Not Found
500: Internal Server Error
```
@ -323,7 +323,7 @@ $ java -jar httpstatus-1.1.0.jar 404 500
If no status code is specified, all will be printed:
```console
$ java -jar httpstatus-1.1.0.jar
$ java -jar httpstatus-1.1.1.jar
100: Continue
101: Switching Protocols
102: Processing
@ -343,7 +343,7 @@ $ java -jar httpstatus-1.1.0.jar
You can also print status codes by [response classes](https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes):
```console
$ java -jar httpstatus-1.1.0.jar 2xx
$ java -jar httpstatus-1.1.1.jar 2xx
200: OK
201: Created
202: Accepted

View file

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.thauvin.erik.httpstatus</groupId>
<artifactId>httpstatus</artifactId>
<version>1.1.1-SNAPSHOT</version>
<version>1.1.1</version>
<name>HttpStatus</name>
<description>Tag library to display the code, reason, cause and/or message for HTTP status codes in JSP error pages</description>
<url>https://github.com/ethauvin/HttpStatus</url>

View file

@ -58,7 +58,7 @@ public class HttpStatusBuild extends Project {
public HttpStatusBuild() {
pkg = "net.thauvin.erik.httpstatus";
name = "HttpStatus";
version = version(1, 1, 1, "SNAPSHOT");
version = version(1, 1, 1);
var description = "Tag library to display the code, reason, cause and/or message for HTTP status codes in JSP error pages";
var url = "https://github.com/ethauvin/HttpStatus";

View file

@ -99,23 +99,23 @@ public final class Reasons {
public static void main(String... args) {
var keys = new TreeSet<>(REASON_PHRASES.keySet());
if (args.length >= 1) {
for (var key : args) {
if (key.endsWith("xx")) {
var responseClass = key.charAt(0);
keys.forEach((k) -> {
for (var arg : args) {
if (arg.endsWith("xx")) { // e.g.: 2xx
var responseClass = arg.charAt(0);
keys.forEach(k -> {
if (k.charAt(0) == responseClass) {
System.out.println(k + ": " + REASON_PHRASES.get(k));
}
});
} else {
var value = REASON_PHRASES.get(key);
} else { // e.g.: 404
var value = REASON_PHRASES.get(arg);
if (value != null) {
System.out.println(key + ": " + value);
System.out.println(arg + ": " + value);
}
}
}
} else {
keys.forEach((k) -> System.out.println(k + ": " + REASON_PHRASES.get(k)));
} else { // Print all
keys.forEach(k -> System.out.println(k + ": " + REASON_PHRASES.get(k)));
System.out.println("Total: " + REASON_PHRASES.size());
}
}