This repository has been archived by the owner on Jul 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
126 changed files
with
5,280 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.gradle | ||
build | ||
.idea | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.DS_Store | ||
.env | ||
ci/variables.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apply from: "$projectDir/../server.gradle" | ||
|
||
dependencies { | ||
compile project(":components:allocations") | ||
} |
29 changes: 29 additions & 0 deletions
29
applications/allocations-server/src/main/java/io/pivotal/pal/tracker/allocations/App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package io.pivotal.pal.tracker.allocations; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.web.client.RestOperations; | ||
|
||
import java.util.TimeZone; | ||
|
||
|
||
@SpringBootApplication | ||
@ComponentScan({"io.pivotal.pal.tracker.allocations", "io.pivotal.pal.tracker.restsupport"}) | ||
public class App { | ||
|
||
public static void main(String[] args) { | ||
TimeZone.setDefault(TimeZone.getTimeZone("UTC")); | ||
SpringApplication.run(App.class, args); | ||
} | ||
|
||
@Bean | ||
ProjectClient projectClient( | ||
RestOperations restOperations, | ||
@Value("${registration.server.endpoint}") String registrationEndpoint | ||
) { | ||
return new ProjectClient(restOperations, registrationEndpoint); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
applications/allocations-server/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
spring.application.name=allocations-server | ||
|
||
server.port=8081 | ||
spring.datasource.username=tracker | ||
spring.datasource.url=jdbc:mysql://localhost:3306/tracker_allocations_dev?useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false | ||
registration.server.endpoint=http://localhost:8083 |
19 changes: 19 additions & 0 deletions
19
...cations-server/src/test/java/test/pivotal/pal/tracker/allocations/AllocationsAppTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package test.pivotal.pal.tracker.allocations; | ||
|
||
import io.pivotal.pal.tracker.allocations.App; | ||
import org.junit.Test; | ||
import org.springframework.web.client.RestTemplate; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
public class AllocationsAppTest { | ||
|
||
@Test | ||
public void embedded() { | ||
App.main(new String[]{}); | ||
|
||
String response = new RestTemplate().getForObject("http://localhost:8181/allocations?projectId=0", String.class); | ||
|
||
assertThat(response).isEqualTo("[]"); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
applications/allocations-server/src/test/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
spring.application.name=allocations-server | ||
|
||
server.port=8181 | ||
spring.datasource.username=tracker | ||
spring.datasource.url=jdbc:mysql://localhost:3306/tracker_allocations_test?useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false | ||
registration.server.endpoint=http://localhost:8883 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apply from: "$projectDir/../server.gradle" | ||
|
||
dependencies { | ||
compile project(":components:backlog") | ||
} |
29 changes: 29 additions & 0 deletions
29
applications/backlog-server/src/main/java/io/pivotal/pal/tracker/backlog/App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package io.pivotal.pal.tracker.backlog; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.web.client.RestOperations; | ||
|
||
import java.util.TimeZone; | ||
|
||
|
||
@SpringBootApplication | ||
@ComponentScan({"io.pivotal.pal.tracker.backlog", "io.pivotal.pal.tracker.restsupport"}) | ||
public class App { | ||
|
||
public static void main(String[] args) { | ||
TimeZone.setDefault(TimeZone.getTimeZone("UTC")); | ||
SpringApplication.run(App.class, args); | ||
} | ||
|
||
@Bean | ||
ProjectClient projectClient( | ||
RestOperations restOperations, | ||
@Value("${registration.server.endpoint}") String registrationEndpoint | ||
) { | ||
return new ProjectClient(restOperations, registrationEndpoint); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
applications/backlog-server/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
spring.application.name=backlog-server | ||
|
||
server.port=8082 | ||
spring.datasource.username=tracker | ||
spring.datasource.url=jdbc:mysql://localhost:3306/tracker_backlog_dev?useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false | ||
registration.server.endpoint=http://localhost:8083 |
19 changes: 19 additions & 0 deletions
19
...cations/backlog-server/src/test/java/test/pivotal/pal/tracker/backlog/BacklogAppTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package test.pivotal.pal.tracker.backlog; | ||
|
||
import io.pivotal.pal.tracker.backlog.App; | ||
import org.junit.Test; | ||
import org.springframework.web.client.RestTemplate; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
public class BacklogAppTest { | ||
|
||
@Test | ||
public void embedded() { | ||
App.main(new String[]{}); | ||
|
||
String response = new RestTemplate().getForObject("http://localhost:8181/stories?projectId=0", String.class); | ||
|
||
assertThat(response).isEqualTo("[]"); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
applications/backlog-server/src/test/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
spring.application.name=backlog-server | ||
|
||
server.port=8181 | ||
spring.datasource.username=tracker | ||
spring.datasource.url=jdbc:mysql://localhost:3306/tracker_backlog_test?useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false | ||
registration.server.endpoint=http://localhost:8883 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apply from: "$projectDir/../server.gradle" | ||
|
||
dependencies { | ||
compile project(":components:accounts") | ||
compile project(":components:projects") | ||
compile project(":components:users") | ||
} |
23 changes: 23 additions & 0 deletions
23
applications/registration-server/src/main/java/io/pivotal/pal/tracker/registration/App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package io.pivotal.pal.tracker.registration; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.context.annotation.ComponentScan; | ||
|
||
import java.util.TimeZone; | ||
|
||
|
||
@SpringBootApplication | ||
@ComponentScan({ | ||
"io.pivotal.pal.tracker.accounts", | ||
"io.pivotal.pal.tracker.restsupport", | ||
"io.pivotal.pal.tracker.projects", | ||
"io.pivotal.pal.tracker.users", | ||
"io.pivotal.pal.tracker.registration" | ||
}) | ||
public class App { | ||
public static void main(String[] args) { | ||
TimeZone.setDefault(TimeZone.getTimeZone("UTC")); | ||
SpringApplication.run(App.class, args); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
applications/registration-server/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
spring.application.name=registration-server | ||
|
||
server.port=8083 | ||
spring.datasource.username=tracker | ||
spring.datasource.url=jdbc:mysql://localhost:3306/tracker_registration_dev?useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false | ||
registration.server.endpoint=http://localhost:8083 |
22 changes: 22 additions & 0 deletions
22
...ation-server/src/test/java/test/pivotal/pal/tracker/registration/RegistrationAppTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package test.pivotal.pal.tracker.registration; | ||
|
||
import io.pivotal.pal.tracker.registration.App; | ||
import org.junit.Test; | ||
import org.springframework.web.client.RestTemplate; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
public class RegistrationAppTest { | ||
|
||
@Test | ||
public void embedded() { | ||
App.main(new String[]{}); | ||
|
||
RestTemplate restTemplate = new RestTemplate(); | ||
|
||
assertThat(restTemplate.getForObject("http://localhost:8181/accounts?ownerId=0", String.class)).isEqualTo("[]"); | ||
assertThat(restTemplate.getForObject("http://localhost:8181/projects?accountId=0", String.class)).isEqualTo("[]"); | ||
assertThat(restTemplate.getForObject("http://localhost:8181/projects/0", String.class)).isEqualTo(null); | ||
assertThat(restTemplate.getForObject("http://localhost:8181/users/0", String.class)).isEqualTo(null); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
applications/registration-server/src/test/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
spring.application.name=registration-server | ||
|
||
server.port=8181 | ||
spring.datasource.username=tracker | ||
spring.datasource.url=jdbc:mysql://localhost:3306/tracker_registration_test?useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false | ||
registration.server.endpoint=http://localhost:8883 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apply plugin: "org.springframework.boot" | ||
apply plugin: "io.spring.dependency-management" | ||
|
||
dependencies { | ||
compile project(":components:rest-support") | ||
|
||
compile "org.springframework.boot:spring-boot-starter-web" | ||
|
||
compile "com.zaxxer:HikariCP:$hikariVersion" | ||
compile "mysql:mysql-connector-java:$mysqlVersion" | ||
compile "ch.qos.logback:logback-classic:$logbackVersion" | ||
|
||
testCompile project(":components:test-support") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apply from: "$projectDir/../server.gradle" | ||
|
||
dependencies { | ||
compile project(":components:timesheets") | ||
} |
29 changes: 29 additions & 0 deletions
29
applications/timesheets-server/src/main/java/io/pivotal/pal/tracker/timesheets/App.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package io.pivotal.pal.tracker.timesheets; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.web.client.RestOperations; | ||
|
||
import java.util.TimeZone; | ||
|
||
|
||
@SpringBootApplication | ||
@ComponentScan({"io.pivotal.pal.tracker.timesheets", "io.pivotal.pal.tracker.restsupport"}) | ||
public class App { | ||
|
||
public static void main(String[] args) { | ||
TimeZone.setDefault(TimeZone.getTimeZone("UTC")); | ||
SpringApplication.run(App.class, args); | ||
} | ||
|
||
@Bean | ||
ProjectClient projectClient( | ||
RestOperations restOperations, | ||
@Value("${registration.server.endpoint}") String registrationEndpoint | ||
) { | ||
return new ProjectClient(restOperations, registrationEndpoint); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
applications/timesheets-server/src/main/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
spring.application.name=timesheets-server | ||
|
||
server.port=8084 | ||
spring.datasource.username=tracker | ||
spring.datasource.url=jdbc:mysql://localhost:3306/tracker_timesheets_dev?useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false | ||
registration.server.endpoint=http://localhost:8083 |
19 changes: 19 additions & 0 deletions
19
...imesheets-server/src/test/java/test/pivotal/pal/tracker/timesheets/TimesheetsAppTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package test.pivotal.pal.tracker.timesheets; | ||
|
||
import io.pivotal.pal.tracker.timesheets.App; | ||
import org.junit.Test; | ||
import org.springframework.web.client.RestTemplate; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
public class TimesheetsAppTest { | ||
|
||
@Test | ||
public void embedded() { | ||
App.main(new String[]{}); | ||
|
||
String response = new RestTemplate().getForObject("http://localhost:8181/time-entries?userId=0", String.class); | ||
|
||
assertThat(response).isEqualTo("[]"); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
applications/timesheets-server/src/test/resources/application.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
spring.application.name=timesheets-server | ||
|
||
server.port=8181 | ||
spring.datasource.username=tracker | ||
spring.datasource.url=jdbc:mysql://localhost:3306/tracker_timesheets_test?useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false | ||
registration.server.endpoint=http://localhost:8883 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import io.pivotal.pal.tracker.gradlebuild.DependenciesGraphPlugin | ||
|
||
buildscript { | ||
ext { | ||
springBootVersion = "2.1.13.RELEASE" | ||
springVersion = "5.1.14.RELEASE" | ||
mysqlVersion = "8.0.13" | ||
jacksonVersion = "2.9.7" | ||
slf4jVersion = "1.7.25" | ||
mockitoVersion = "2.23.0" | ||
assertJVersion = "3.11.1" | ||
hikariVersion = "3.1.0" | ||
logbackVersion = "1.2.3" | ||
junitVersion = "4.12" | ||
okhttpVersion = "3.12.0" | ||
jsonPathVersion = "2.4.0" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion" | ||
classpath "mysql:mysql-connector-java:$mysqlVersion" | ||
} | ||
} | ||
|
||
apply plugin: DependenciesGraphPlugin | ||
|
||
subprojects { | ||
group "io.pivotal.pal.tracker" | ||
|
||
apply plugin: "java" | ||
defaultTasks "clean", "build" | ||
|
||
repositories { | ||
mavenCentral() | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
compile "com.fasterxml.jackson.core:jackson-core:$jacksonVersion" | ||
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion" | ||
compile "com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion" | ||
compile "org.slf4j:slf4j-api:$slf4jVersion" | ||
|
||
testCompile "junit:junit:$junitVersion" | ||
testCompile "org.mockito:mockito-core:$mockitoVersion" | ||
testCompile "org.assertj:assertj-core:$assertJVersion" | ||
} | ||
|
||
test { | ||
testLogging { | ||
exceptionFormat = 'full' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
compile "org.flywaydb:flyway-gradle-plugin:5.2.1" | ||
} |
Oops, something went wrong.