Skip to content

Commit 23d9288

Browse files
committed
Fixing regex for bluesky username and updating documentation.
1 parent c02583e commit 23d9288

File tree

3 files changed

+49
-27
lines changed

3 files changed

+49
-27
lines changed

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1+
dev:
2+
@./mvnw quarkus:dev
3+
14
build:
2-
@./mvnw package -B --no-transfer-progress package
5+
@./mvnw -B --no-transfer-progress package
36

47
build-uber:
5-
@./mvnw package -B --no-transfer-progress package -Dquarkus.package.jar.type=uber-jar
8+
@./mvnw -B --no-transfer-progress package -Dquarkus.package.jar.type=uber-jar
69

710
native:
8-
@./mvnw package -B --no-transfer-progress -Dnative -Dquarkus.native.container-build=true
11+
@./mvnw -B --no-transfer-progress package -Dnative -Dquarkus.native.container-build=true
912

1013
clean:
11-
@./mvnw clean -B --no-transfer-progress
14+
@./mvnw -B --no-transfer-progress clean
1215

README.md

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,55 @@
1-
# submit the force
1+
# Submit the Force
22

3-
This project uses Quarkus, the Supersonic Subatomic Java Framework.
3+
The latest incarnation of the Submit, the interface provided to potential speakers to submit their talks to the JavaZone conference.
44

5-
If you want to learn more about Quarkus, please visit its website: <https://quarkus.io/>.
65

7-
## Running the application in dev mode
6+
## Starting development environment
87

9-
You can run your application in dev mode that enables live coding using:
8+
### Configuration of Moresleep
109

11-
```shell script
12-
./mvnw quarkus:dev
10+
To run Moresleep locally, it may be configured using a `.env.moresleep` file. The following is an example of file to make it load talks from the official database:
11+
12+
```dotenv
13+
SLEEPINGPILL_AUTH=username:password
14+
LOAD_FROM_SLEEPINGPILL=true
1315
```
1416

15-
> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at <http://localhost:8080/q/dev/>.
17+
To get it up and running:
1618

17-
## Packaging and running the application
19+
```shell
20+
docker compose up -d moresleep
21+
```
1822

19-
The application can be packaged using:
2023

21-
```shell script
22-
./mvnw package
23-
```
24+
### Configuration of Submit
2425

25-
It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory.
26-
Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory.
26+
To configure Submit, use a `.env` file. Content may be similar to the following:
2727

28-
The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`.
28+
```dotenv
29+
# Configuration of the application itself (default values)
30+
APP_URL=http://localhost:8080
31+
APP_SECRET=JavaZoneForever
2932
30-
If you want to build an _über-jar_, execute the following command:
33+
# Configuration of the moresleep service (default values)
34+
TALKS_LOCATION=http://localhost:8082
35+
TALKS_USERNAME=anon
36+
TALKS_PASSWORD=anon
3137
32-
```shell script
33-
./mvnw package -Dquarkus.package.jar.type=uber-jar
38+
# Configuration of OIDC (default values)
39+
QUARKUS_OIDC_AUTH_SERVER_URL=[configure me]
40+
QUARKUS_OIDC_CLIENT_ID=[configure me]
41+
QUARKUS_OIDC_CREDENTIALS_SECRET=[configure me]
3442
```
3543

36-
The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`.
44+
For active development, run the following command to start the application:
45+
46+
```shell
47+
make dev
48+
```
49+
50+
To just get it up and running, run the following command:
51+
52+
```shell
53+
make build
54+
docker compose up -d submit
55+
```

src/main/java/no/java/submit/form/SpeakerForm.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ public class SpeakerForm {
1818
@Email(message = "Valid email address is required")
1919
public String email;
2020

21-
@Pattern(regexp = "^$|^@?(\\w){1,15}$", message = "Must be a valid Twitter username")
21+
@Pattern(regexp = "^$|^@?(\\w\\-_){1,15}$", message = "Must be a valid Twitter username (e.g. '@username')")
2222
public String twitter;
2323

24-
@Pattern(regexp = "^$|^https:\\/\\/[a-z]{2,3}\\.linkedin\\.com\\/.*$", message = "Must be a valid LinkedIn address")
24+
@Pattern(regexp = "^$|^https:\\/\\/[a-z]{2,3}\\.linkedin\\.com\\/.*$", message = "Must be a valid LinkedIn address (e.g. 'https://www.linkedin.com/in/username')")
2525
public String linkedin;
2626

27-
@Pattern(regexp = "^$|^@?[\\w\\.]{1,50}$", message = "Must be a valid Bluesky username")
27+
@Pattern(regexp = "^$|^@?[\\w\\.\\-_]{1,50}$", message = "Must be a valid Bluesky username (e.g. '@username.bsky.social')")
2828
public String bluesky;
2929

3030
public String residence;

0 commit comments

Comments
 (0)