Skip to content

Commit

Permalink
♻️ : moves settings feature to its own package
Browse files Browse the repository at this point in the history
  • Loading branch information
juwit committed Aug 12, 2019
1 parent d0237ec commit 909fb51
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.codeka.gaia.runner;

import com.github.mustachejava.Mustache;
import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.settings.bo.Settings;
import io.codeka.gaia.stacks.bo.Stack;
import io.codeka.gaia.modules.bo.TerraformModule;
import io.codeka.gaia.stacks.bo.mustache.TerraformScript;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/codeka/gaia/runner/StackRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.spotify.docker.client.DockerClient;
import com.spotify.docker.client.exceptions.DockerException;
import com.spotify.docker.client.messages.ContainerConfig;
import io.codeka.gaia.bo.*;
import io.codeka.gaia.modules.bo.TerraformModule;
import io.codeka.gaia.settings.bo.Settings;
import io.codeka.gaia.stacks.repository.JobRepository;
import io.codeka.gaia.stacks.repository.StackRepository;
import io.codeka.gaia.stacks.bo.Job;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.spotify.docker.client.DockerClient;
import com.spotify.docker.client.messages.ContainerConfig;
import com.spotify.docker.client.messages.HostConfig;
import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.settings.bo.Settings;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.codeka.gaia.bo;
package io.codeka.gaia.settings.bo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.codeka.gaia.controller;
package io.codeka.gaia.settings.controller;

import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.repository.SettingsRepository;
import io.codeka.gaia.settings.bo.Settings;
import io.codeka.gaia.settings.repository.SettingsRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.annotation.Secured;
import org.springframework.stereotype.Controller;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.codeka.gaia.repository;
package io.codeka.gaia.settings.repository;

import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.settings.bo.Settings;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Repository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.github.mustachejava.DefaultMustacheFactory;
import com.github.mustachejava.Mustache;
import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.settings.bo.Settings;
import io.codeka.gaia.stacks.bo.Stack;
import io.codeka.gaia.modules.bo.TerraformModule;
import io.codeka.gaia.modules.bo.TerraformVariable;
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/codeka/gaia/runner/StackRunnerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import com.spotify.docker.client.messages.ContainerConfig;
import com.spotify.docker.client.messages.ContainerCreation;
import com.spotify.docker.client.messages.ContainerExit;
import io.codeka.gaia.bo.*;
import io.codeka.gaia.modules.bo.TerraformModule;
import io.codeka.gaia.settings.bo.Settings;
import io.codeka.gaia.stacks.repository.JobRepository;
import io.codeka.gaia.stacks.repository.StackRepository;
import io.codeka.gaia.stacks.bo.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package io.codeka.gaia.runner.config;


import com.spotify.docker.client.DockerClient;
import com.spotify.docker.client.exceptions.DockerException;
import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.settings.bo.Settings;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.codeka.gaia.bo;
package io.codeka.gaia.settings.bo;

import io.codeka.gaia.settings.bo.Settings;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.codeka.gaia.controller;
package io.codeka.gaia.settings.controller;

import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.repository.SettingsRepository;
import io.codeka.gaia.settings.bo.Settings;
import io.codeka.gaia.settings.repository.SettingsRepository;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
Expand All @@ -10,10 +10,8 @@

import java.util.List;

import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.ArgumentMatchers.anyList;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;

@ExtendWith(MockitoExtension.class)
class SettingsControllerTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package io.codeka.gaia.repository;
package io.codeka.gaia.settings.repository;

import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.settings.bo.Settings;
import io.codeka.gaia.test.MongoContainer;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.data.mongo.DataMongoTest;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.test.annotation.DirtiesContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.codeka.gaia.repository;
package io.codeka.gaia.settings.repository;

import io.codeka.gaia.bo.Settings;
import io.codeka.gaia.settings.bo.Settings;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand Down

0 comments on commit 909fb51

Please sign in to comment.