Commit e8e8cf09 authored by Colin DAMON's avatar Colin DAMON
Browse files

Merge branch '108-upgrade-prettier' into 'master'

Resolve "Upgrade prettier"

Closes #108

See merge request !81
parents 4a32243d 002d0de3
......@@ -19,6 +19,7 @@ import java.nio.channels.*;
import java.util.Properties;
public class MavenWrapperDownloader {
private static final String WRAPPER_VERSION = "0.5.6";
/**
......@@ -97,7 +98,6 @@ public class MavenWrapperDownloader {
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
Authenticator.setDefault(
new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(username, password);
......
......@@ -22,6 +22,7 @@ import org.springframework.core.env.Environment;
@SpringBootApplication
@EnableConfigurationProperties({ LiquibaseProperties.class, ApplicationProperties.class })
public class BorestopApp {
private static final Logger log = LoggerFactory.getLogger(BorestopApp.class);
private final Environment env;
......
......@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
@Service
public class ActivitesApplicationService {
private final ActivitiesFactory activities;
public ActivitesApplicationService(IdeasRepository ideas, PartnersRepository partners) {
......
package com.ippon.borestop.activity.domain;
public class Activities {
private final IdeasRepository ideas;
private final PartnersRepository partners;
......
package com.ippon.borestop.activity.domain;
public class ActivitiesFactory {
private final IdeasRepository ideas;
private final PartnersRepository partners;
......
......@@ -4,6 +4,7 @@ import com.ippon.borestop.common.domain.error.Assert;
import java.util.Collection;
public class Activity {
private final Idea idea;
private final Partners partners;
......
......@@ -3,5 +3,5 @@ package com.ippon.borestop.activity.domain;
public enum Category {
COOKING,
RELAXATION,
DEFAULT
DEFAULT,
}
......@@ -3,6 +3,7 @@ package com.ippon.borestop.activity.domain;
import com.ippon.borestop.common.domain.error.Assert;
public class Idea {
private final String label;
private final Category category;
......
......@@ -3,6 +3,7 @@ package com.ippon.borestop.activity.domain;
import com.ippon.borestop.common.domain.error.Assert;
public class Partner {
private final String name;
private final String website;
......@@ -27,6 +28,7 @@ public class Partner {
}
public static class PartnerBuilder {
private String name;
private String website;
......
......@@ -6,6 +6,7 @@ import java.util.Collections;
import java.util.List;
public class Partners {
private final Collection<Partner> partners;
private Partners(PartnersBuilder builder) {
......@@ -25,6 +26,7 @@ public class Partners {
}
public static class PartnersBuilder {
private final List<Partner> partners = new ArrayList<>();
public PartnersBuilder add(Partner partner) {
......
......@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
@Api(tags = "Activities")
@RequestMapping("/api/activity")
class ActivitesResource {
private final ActivitesApplicationService activites;
public ActivitesResource(ActivitesApplicationService activites) {
......
......@@ -8,6 +8,7 @@ import java.util.stream.Collectors;
@ApiModel(value = "Activity", description = "An ideal activity for you!")
class RestActivity {
private final String label;
private final Collection<RestPartner> partners;
......
......@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
@ApiModel(value = "Partner", description = "Partner for an idea")
class RestPartner {
private final String name;
private final String website;
......
......@@ -11,6 +11,7 @@ enum BoredApiCategory {
COOKING("cooking"),
RELAXATION("relaxation"),
DEFAULT("default");
private static final Map<String, BoredApiCategory> categories = buildCategories();
private static Map<String, BoredApiCategory> buildCategories() {
......
......@@ -10,6 +10,7 @@ import org.springframework.web.client.RestTemplate;
@Service
class BoredApiIdeasRepository implements IdeasRepository {
private final RestTemplate rest;
private final String url;
......
......@@ -9,6 +9,7 @@ import org.springframework.validation.annotation.Validated;
@Validated
@ConfigurationProperties("bored-api")
class BoredApiProperties {
private String url;
private Duration connectTimeout;
private Duration readTimeout;
......
......@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.ippon.borestop.activity.domain.Idea;
class BoredApiResponse {
private final String activity;
private final String type;
......
......@@ -22,6 +22,7 @@ import org.springframework.core.env.Profiles;
@Aspect
@Generated
public class LoggingAspect {
private final Environment env;
public LoggingAspect(Environment env) {
......
......@@ -58,6 +58,7 @@ import java.util.Map;
* </p>
*/
public class BorestopException extends RuntimeException {
private final Map<String, String> arguments;
private final ErrorStatus status;
private final BorestopMessage borestopMessage;
......@@ -126,6 +127,7 @@ public class BorestopException extends RuntimeException {
}
public static class BorestopExceptionBuilder {
private final Map<String, String> arguments = new HashMap<>();
private String message;
private ErrorStatus status;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment