-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support grouping guides into categories
Closes gh-1
- Loading branch information
Showing
9 changed files
with
259 additions
and
46 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
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
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
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
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
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,106 @@ | ||
renderer: | ||
category: | ||
batch: | ||
display-name: Batch Processing | ||
guide: | ||
- gs-batch-processing | ||
- gs-spring-cloud-task | ||
caching: | ||
display-name: Caching | ||
guide: | ||
- gs-caching | ||
cloud-platform: | ||
display-name: Cloud Platform | ||
guide: | ||
- gs-spring-boot-for-azure | ||
- gs-spring-boot-kubernetes | ||
data: | ||
display-name: Data Access | ||
guide: | ||
- gs-accessing-data-mysql | ||
- gs-accessing-data-jpa | ||
- gs-accessing-data-mongodb | ||
- gs-relational-data-access | ||
- gs-accessing-data-rest | ||
- gs-managing-transactions | ||
- gs-accessing-data-r2dbc | ||
- gs-accessing-mongodb-data-rest | ||
- gs-accessing-data-cassandra | ||
- gs-spring-data-reactive-redis | ||
- gs-accessing-data-neo4j | ||
- gs-accessing-data-gemfire | ||
io: | ||
display-name: IO | ||
guide: | ||
- gs-uploading-files | ||
- gs-async-method | ||
- gs-validating-form-input | ||
- gs-handling-form-submission | ||
- gs-scheduling-tasks | ||
messaging: | ||
display-name: Messaging | ||
guide: | ||
- gs-messaging-stomp-websocket | ||
- gs-messaging-rabbitmq | ||
- gs-messaging-jms | ||
- gs-messaging-gcp-pubsub | ||
- gs-messaging-gcp-pubsub | ||
- gs-integration | ||
- gs-spring-cloud-stream | ||
microservices: | ||
display-name: Microservices | ||
guide: | ||
- gs-gateway | ||
- gs-service-registration-and-discovery | ||
- gs-spring-cloud-loadbalancer | ||
- gs-cloud-circuit-breaker | ||
- gs-centralized-configuration | ||
rest: | ||
display-name: REST APIs | ||
guide: | ||
- gs-accessing-neo4j-data-rest | ||
- gs-accessing-gemfire-data-rest | ||
- gs-rest-hateoas | ||
- gs-reactive-rest-service | ||
- gs-consuming-rest | ||
- gs-rest-service | ||
- gs-spring-boot | ||
security: | ||
display-name: Security | ||
guide: | ||
- gs-accessing-vault | ||
- gs-vault-config | ||
- gs-authenticating-ldap | ||
- gs-rest-service-cors | ||
- gs-securing-web | ||
testing: | ||
display-name: Testing | ||
guide: | ||
- gs-contract-rest | ||
- gs-testing-web | ||
documentation: | ||
display-name: Documentation | ||
guide: | ||
- gs-testing-restdocs | ||
web: | ||
display-name: Web | ||
guide: | ||
- gs-serving-web-content | ||
- gs-producing-web-service | ||
- gs-consuming-web-service | ||
packaging: | ||
display-name: Packaging | ||
guide: | ||
ops: | ||
display-name: Ops | ||
guide: | ||
- gs-actuator-service | ||
streaming: | ||
display-name: Streaming | ||
guide: | ||
- gs-spring-cloud-dataflow | ||
graphql: | ||
display-name: GraphQL | ||
guide: | ||
- gs-graphql-server | ||
|
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
package io.spring.renderer.guides; | ||
|
||
import java.util.Arrays; | ||
import java.util.Collections; | ||
|
||
import io.spring.renderer.github.Repository; | ||
import org.junit.jupiter.api.Test; | ||
|
@@ -35,7 +36,7 @@ public void nullRepositoryDescription() { | |
"git://example.org/spring-guides/gs-sample-guide.git", | ||
"[email protected]:spring-guides/gs-sample-guide.git", | ||
"https://example.org/spring-guides/gs-sample-guide.git", null); | ||
GuideMetadata guideMetadata = new GuideMetadata(repository, null); | ||
GuideMetadata guideMetadata = new GuideMetadata(repository, null, Collections.singleton("test")); | ||
GuideModel guideModel = new GuideModel(guideMetadata); | ||
assertThat(guideModel.getName()).isEqualTo("sample-guide"); | ||
assertThat(guideModel.getRepositoryName()).isEqualTo("spring-guides/gs-sample-guide"); | ||
|
@@ -47,6 +48,7 @@ public void nullRepositoryDescription() { | |
assertThat(guideModel.getGitUrl()).isEqualTo("git://example.org/spring-guides/gs-sample-guide.git"); | ||
assertThat(guideModel.getSshUrl()).isEqualTo("[email protected]:spring-guides/gs-sample-guide.git"); | ||
assertThat(guideModel.getProjects()).isEmpty(); | ||
assertThat(guideModel.getCategory()).containsExactly("test"); | ||
} | ||
|
||
@Test | ||
|
@@ -56,7 +58,7 @@ public void noGuideProjects() { | |
"git://example.org/spring-guides/tut-sample-guide.git", | ||
"[email protected]:spring-guides/tut-sample-guide.git", | ||
"https://example.org/spring-guides/tut-sample-guide.git", null); | ||
GuideMetadata guideMetadata = new GuideMetadata(repository, "http://test.academy"); | ||
GuideMetadata guideMetadata = new GuideMetadata(repository, "http://test.academy", Collections.emptySet()); | ||
GuideModel guideModel = new GuideModel(guideMetadata); | ||
assertThat(guideModel.getName()).isEqualTo("sample-guide"); | ||
assertThat(guideModel.getRepositoryName()).isEqualTo("spring-guides/tut-sample-guide"); | ||
|
@@ -75,7 +77,7 @@ public void withGuideProjects() { | |
"[email protected]:spring-guides/top-sample-guide.git", | ||
"https://example.org/spring-guides/top-sample-guide.git", | ||
Arrays.asList("spring-framework", "spring-boot")); | ||
GuideMetadata guideMetadata = new GuideMetadata(repository, null); | ||
GuideMetadata guideMetadata = new GuideMetadata(repository, null, Collections.emptySet()); | ||
GuideModel guideModel = new GuideModel(guideMetadata); | ||
assertThat(guideModel.getName()).isEqualTo("sample-guide"); | ||
assertThat(guideModel.getRepositoryName()).isEqualTo("spring-guides/top-sample-guide"); | ||
|
@@ -94,7 +96,7 @@ public void deprecatedGuide() { | |
"[email protected]:spring-guides/deprecated-gs-sample-guide.git", | ||
"https://example.org/spring-guides/deprecated-gs-sample-guide.git", | ||
Arrays.asList("spring-framework", "spring-boot")); | ||
GuideMetadata guideMetadata = new GuideMetadata(repository, null); | ||
GuideMetadata guideMetadata = new GuideMetadata(repository, null, Collections.emptySet()); | ||
GuideModel guideModel = new GuideModel(guideMetadata); | ||
assertThat(guideModel.getName()).isEqualTo("deprecated-gs-sample-guide"); | ||
assertThat(guideModel.getTitle()).isEqualTo("Title"); | ||
|
Oops, something went wrong.