Skip to content

Commit

Permalink
Prepare v1.0.0-SNAPSHOT
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmemarioss committed Oct 10, 2021
1 parent c84e9ce commit 1ac76cf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ Add in VMArguments to run in an IDE

-Dspring.profiles.active=local

### Development data

You can use the file [data.sql](src/test/resources/db/data/data.sql) to insert data to your local db.

### Cleaning DB

All data volume is mapped to directory `tmp`. You can delete this folder to get rid of development data.

## How to run

You can run with maven
Expand All @@ -44,7 +52,7 @@ tip: --rm parameter will exclude container image after execution and it cause da

### Writing Tests

If you wanna use db connection on your test you must extend the class `AbstractIntegrationTest`. This class will run the docker container and configure the spring datasource.
If you want to use db connection on your test you must extend the class `AbstractIntegrationTest`. This class will run the docker container and configure the spring datasource.

## How to contribute

Expand Down
4 changes: 2 additions & 2 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ paths:
- Author
/cordels/summaries:
get:
summary: "Retrieve all cordels by pages"
summary: "Retrieve all summaries by pages"
parameters:
- name: page
in: query
Expand Down Expand Up @@ -95,7 +95,7 @@ paths:
- Cordel
/cordels/{id}:
get:
summary: "Get a specific cordel with all content"
summary: "Get a cordel with full content"
parameters:
- name: "id"
in: "path"
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<groupId>br.com.itsmemario</groupId>
<artifactId>ecordel</artifactId>
<version>0.7.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
<name>e-cordel</name>
<description>e-reader for cordels</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ public XilogravuraService(FileManager fileManager) {

public String createXilogravuraWithFile(MultipartFile file){
try {
// todo move this code to file manager?
String fileName = generateRandomFileName();
var fileName = generateRandomFileName();
return fileManager.saveFile(file.getBytes(), fileName);
} catch (IOException e) {
e.printStackTrace();
throw new FileProcessException("Error while saving file", e);
}
}

private String generateRandomFileName() {
return UUID.randomUUID().toString() + JPG;
return UUID.randomUUID() + JPG;
}

}

0 comments on commit 1ac76cf

Please sign in to comment.