Skip to content

Commit 2ddafa5

Browse files
committed
update readme
1 parent cf6cea1 commit 2ddafa5

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
1+
# <img src="zonky.jpg" height="100"> Embedded Postgres Binaries
2+
13
## Introduction
24

35
This project provides lightweight bundles of PostgreSQL binaries with reduced size that are intended for testing purposes.
46
It is a supporting project for the primary [io.zonky.test:embedded-database-spring-test](https://github.com/zonkyio/embedded-database-spring-test) and [io.zonky.test:embedded-postgres](https://github.com/zonkyio/embedded-postgres) projects.
5-
But with a little help it can be also applicable with [com.opentable:otj-pg-embedded](https://github.com/opentable/otj-pg-embedded) and maybe some other projects.
7+
However, with a little effort it can be also applicable with [com.opentable:otj-pg-embedded](https://github.com/opentable/otj-pg-embedded) and maybe some other projects.
8+
9+
## Provides
10+
11+
* Lightweight bundles of PostgreSQL binaries with reduced size (~10MB)
12+
* Embedded PostgreSQL 11+ binaries even for Linux platform
13+
* Configurable version of PostgreSQL binaries
614

7-
## Use with [embedded-database-spring-test](https://github.com/zonkyio/embedded-database-spring-test) or [embedded-postgres](https://github.com/zonkyio/embedded-postgres) projects
15+
## Use with [embedded-database-spring-test](https://github.com/zonkyio/embedded-database-spring-test) or [embedded-postgres](https://github.com/zonkyio/embedded-postgres) project
816

917
All necessary dependencies are already included in these projects, so no further action is required.
10-
But you can change the version of the binaries by following the instructions described in [Postgres version](#postgres-version).
18+
However, you can change the version of the postgres binaries by following the instructions described in [Postgres version](#postgres-version).
1119

1220
## Use with [com.opentable:otj-pg-embedded](https://github.com/opentable/otj-pg-embedded) project
1321

14-
Add some of the [available dependencies](https://mvnrepository.com/artifact/io.zonky.test.postgres) to your Maven configuration:
22+
First, you have to add any of the [available dependencies](https://mvnrepository.com/artifact/io.zonky.test.postgres) to your Maven configuration:
1523

1624
```xml
1725
<dependency>
1826
<groupId>io.zonky.test.postgres</groupId>
1927
<artifactId>embedded-postgres-binaries-linux-amd64</artifactId>
20-
<version>11.1.0</version>
28+
<version>11.4.0</version>
2129
<scope>test</scope>
2230
</dependency>
2331
```
2432

25-
Further, you need to implement a custom [PgBinaryResolver](https://github.com/opentable/otj-pg-embedded/blob/master/src/main/java/com/opentable/db/postgres/embedded/PgBinaryResolver.java):
33+
Then you need to implement a custom [PgBinaryResolver](https://github.com/opentable/otj-pg-embedded/blob/master/src/main/java/com/opentable/db/postgres/embedded/PgBinaryResolver.java):
2634
```java
2735
public class CustomPostgresBinaryResolver implements PgBinaryResolver {
2836
public InputStream getPgBinary(String system, String architecture) throws IOException {
@@ -46,7 +54,7 @@ public class CustomPostgresBinaryResolver implements PgBinaryResolver {
4654

4755
</details><br/>
4856

49-
And register it:
57+
And finally register it to the junit rule.
5058

5159
```java
5260
@Rule
@@ -56,7 +64,7 @@ public SingleInstancePostgresRule pg = EmbeddedPostgresRules.singleInstance()
5664

5765
## Postgres version
5866

59-
The version of the binaries can be managed by importing `embedded-postgres-binaries-bom` in a required version into your dependency management section.
67+
The version of the postgres binaries can be managed by importing `embedded-postgres-binaries-bom` in a required version into your dependency management section.
6068

6169
```xml
6270
<dependencyManagement>

zonky.jpg

27.4 KB
Loading

0 commit comments

Comments
 (0)