Skip to content

Commit 18e1f1e

Browse files
committed
Add changelog
Provide a fast and standard way for users to fin out about changes in System Lambda.
1 parent a5b7f46 commit 18e1f1e

File tree

3 files changed

+134
-2
lines changed

3 files changed

+134
-2
lines changed

CHANGELOG.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
This project adheres to
6+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
9+
## 1.2.1 – 2021-12-28
10+
11+
Replace `assertThrownBy` with `assertThrows` in documentation.
12+
13+
`assertThrows` is the correct method name of JUnit Jupiter's assertion for
14+
exceptions. All examples use JUnit Jupiter for assertions.
15+
16+
17+
## 1.2.0 – 2021-01-17
18+
19+
Add methods for tapping `System.err` and `System.out` simultaneously.
20+
21+
The output of command-line applications is usually the output to the standard
22+
output stream and the error output stream intermixed. The new methods allow
23+
capturing the intermixed output.
24+
25+
@Test
26+
void application_writes_text_to_System_err_and_out(
27+
) throws Exception {
28+
String text = tapSystemErrAndOut(() -> {
29+
System.err.print("text from err");
30+
System.out.print("text from out");
31+
});
32+
assertEquals("text from errtext from out", text);
33+
}
34+
35+
@Test
36+
void application_writes_mutliple_lines_to_System_err_and_out(
37+
) throws Exception {
38+
String text = tapSystemErrAndOutNormalized(() -> {
39+
System.err.println("text from err");
40+
System.out.println("text from out");
41+
});
42+
assertEquals("text from err\ntext from out\n", text);
43+
}
44+
45+
46+
## 1.1.1 – 2020-10-12
47+
48+
Fix examples for tapping `System.err` and `System.out`.
49+
50+
51+
## 1.1.0 – 2020-08-17
52+
53+
Support Callable for `withEnvironmentVariable`.
54+
55+
This allows to write more precise and readable tests. The assertion can be
56+
outside the `withEnvironmentVariable` statement and `execute` can be called with
57+
a one-line Lambda expression. E.g.
58+
59+
@Test
60+
void execute_code_with_environment_variables(
61+
) throws Exception {
62+
String value = withEnvironmentVariable("key", "the value")
63+
.execute(() -> System.getenv("key"));
64+
assertEquals("the value", value);
65+
}
66+
67+
68+
## 1.0.0 – 2020-05-17
69+
70+
Initial release with the methods
71+
72+
- assertNothingWrittenToSystemErr
73+
- assertNothingWrittenToSystemOut
74+
- catchSystemExit
75+
- muteSystemErr
76+
- muteSystemOut
77+
- restoreSystemProperties
78+
- tapSystemErr
79+
- tapSystemErrNormalized
80+
- tapSystemOut
81+
- tapSystemOutNormalized
82+
- withEnvironmentVariable
83+
- withSecurityManager
84+
- withTextFromSystemIn

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ System Lambda is available from
2525
```
2626

2727
Please don't forget to add the scope `test` if you're using System Lambda for
28-
tests only.
28+
tests only. The [changelog](CHANGELOG.md) lists all the changes of System
29+
Lambda.
2930

3031

3132
## Usage
@@ -359,6 +360,11 @@ integration. Each pull request is automatically built by both CI servers.
359360
GitHub Actions tests with several Java versions (see Enhanced Testing) while
360361
AppVeyor tests with Java 8 only.
361362

363+
### Project Decisions
364+
365+
There are decision records for some decisions that had been made for System
366+
Lambda. They are stored in the folder
367+
[doc/Decision Records](doc/Decision%20Records)
362368

363369
### Build with Docker
364370

@@ -386,8 +392,9 @@ The script uses Docker for running the tests.
386392

387393
* Select a new version according to the
388394
[Semantic Versioning 2.0.0 Standard](http://semver.org/).
395+
* Update `Changelog.md`.
389396
* Set the new version in `pom.xml` and in the `Installation` section of
390397
this readme.
391-
* Commit the modified `pom.xml` and `README.md`.
398+
* Commit the modified `Changelog.md`, `pom.xml` and `README.md`.
392399
* Run `mvnw clean deploy` with JDK 8.
393400
* Add a tag for the release: `git tag system-lambda-X.X.X`
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Changelog
2+
3+
Status: Accepted
4+
5+
6+
## Context
7+
8+
Sometimes I (Stefan) publish a new release of System Lambda.
9+
10+
Users find out about new releases, e.g. because I tweet about it or their
11+
dependency management tool tells them about a new version. They want to know
12+
what changed in the new version (or maybe several versions). Some are curious
13+
about new features or bugfixes. Others need this information in order to decide
14+
whether they change their software to use a newer version of System Lambda or
15+
not.
16+
17+
18+
## Decision
19+
20+
I provide a changelog that is stored in the file CHANGELOG.md.
21+
22+
A curated list of the changes is the fastest way for users to find out about
23+
changes in System Lambda.
24+
25+
CHANGELOG.md is a common filename for changelogs. Users who are used to this
26+
convention may look at this file without further guideline. For other users
27+
there is a link to the changelog in the readme file.
28+
29+
The file is a text file that uses Markdown, because it provides lightweight text
30+
formatting that is nicely rendered by some viewers (e.g. GitHub which hosts
31+
this project) while it still can be viewed and edited by standard text editors.
32+
33+
34+
## Consequences
35+
36+
Developers and project stakeholders can see the changes without viewing the git
37+
log.
38+
39+
The changelog must be updated before a new release is published.
40+
41+
Information may be duplicated between docs, changelog and git log.

0 commit comments

Comments
 (0)