Skip to content

Commit

Permalink
Merge branch 'main' into feature-add-orders
Browse files Browse the repository at this point in the history
  • Loading branch information
pawl1n committed Apr 26, 2023
2 parents fde3248 + 132dbed commit 3071f63
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 45 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
8 changes: 4 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: Build And Test

on:
push:
branches: [ "main" ]
branches:
- main
pull_request:
branches: [ "main" ]
branches:
- main

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/qodana.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Qodana

on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
qodana:
permissions: write-all
Expand All @@ -14,10 +16,13 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Qodana Scan'

- name: Qodana Scan
uses: JetBrains/[email protected]
timeout-minutes: 30
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

- uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.0.5</version>
<version>3.0.6</version>
<relativePath/>
</parent>
<groupId>ua.kishka-strybaie</groupId>
Expand All @@ -16,18 +16,18 @@

<properties>
<java.version>17</java.version>
<postgresql.version>42.5.4</postgresql.version>
<liquibase-core.version>4.20.0</liquibase-core.version>
<postgresql.version>42.6.0</postgresql.version>
<liquibase-core.version>4.21.1</liquibase-core.version>
<lombok.version>1.18.26</lombok.version>
<mapstruct.version>1.5.3.Final</mapstruct.version>
<mapstruct.version>1.5.5.Final</mapstruct.version>
<springdoc-openapi.version>2.1.0</springdoc-openapi.version>
<hibernate-validator.version>8.0.0.Final</hibernate-validator.version>
<cloudinary-http44.version>1.33.0</cloudinary-http44.version>
<mockito-inline.version>5.2.0</mockito-inline.version>
<rest-assured.version>5.3.0</rest-assured.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<asciidoctor-maven-plugin.version>2.2.1</asciidoctor-maven-plugin.version>
<maven-surefire-plugin.version>3.0.0</maven-surefire-plugin.version>
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<asciidoctor-maven-plugin.version>2.2.3</asciidoctor-maven-plugin.version>
<jboss-logging-annotations.version>2.2.1.Final</jboss-logging-annotations.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public TokenDto register(RegisterRequest request) {
.firstName(request.firstName())
.middleName(request.middleName())
.lastName(request.lastName())
.email(request.email())
.email(request.email().toLowerCase())
.password(passwordEncoder.encode(request.password()))
.phoneNumber(request.phoneNumber())
.role(Role.USER)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import ua.kishkastrybaie.variation.option.VariationOptionDto;

@Data
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@Relation(itemRelation = "productItem", collectionRelation = "productItems")
Expand Down

This file was deleted.

4 changes: 0 additions & 4 deletions src/main/java/ua/kishkastrybaie/user/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ public class User implements UserDetails {
@Enumerated(EnumType.STRING)
private Role role;

public void setEmail(String email) {
this.email = email.toLowerCase();
}

@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
return List.of(new SimpleGrantedAuthority(role.withPrefix()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
@AllArgsConstructor
@RequiredArgsConstructor
public class VariationOptionId implements Serializable {
private Variation variation;
private String value;
private Variation variation;
private String value;
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,8 @@ void setUp() throws MalformedURLException {
productItem2.setStock(2);
productItem2.setVariationOptions(new HashSet<>());

productItemDto1 = new ProductItemDto();
productItemDto1.setId(1L);
productItemDto1.setPrice(10.0d);
productItemDto1.setSku("sample");
productItemDto1.setStock(1);
productItemDto1.setVariationOptions(new HashSet<>(List.of(variationOptionDto)));

productItemDto2 = new ProductItemDto();
productItemDto2.setId(2L);
productItemDto2.setPrice(1000.0d);
productItemDto2.setSku("1111");
productItemDto2.setStock(2);
productItemDto2.setVariationOptions(new HashSet<>());
productItemDto1 = new ProductItemDto(1L, "sample", 10.0d, 1, new HashSet<>(List.of(variationOptionDto)));
productItemDto2 = new ProductItemDto(2L, "1111", 1000.0d, 2, new HashSet<>());

productItemRequestDto1 =
new ProductItemRequestDto(
Expand Down

0 comments on commit 3071f63

Please sign in to comment.