Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.gradle
/build/
!gradle/wrapper/gradle-wrapper.jar

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr

### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
/bin/*
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ He wants you to build a web app that has similar UI/UX. Similar way to go from t

We have supplied you with a json file (`cards.json`) containing all the Heartstone cards currently available.

Hsiao is especially interested in the app showing `Legendary` cards with the `Deathrattle Mechanic`, below are examples of such a cards :
Hsiao is especially interested in the app showing `Legendary` cards with the `Deathrattle Mechanic`, below are examples of such cards:

```json
{
Expand Down Expand Up @@ -84,7 +84,7 @@ You are free to choose the patterns and architectures to create this web app, th

### Backend

* Create an API using a Java (plain java or Groovy/Cotlin) backend allowing you to get card information for at least legendary deathrattle cards
* Create an API using a Java (plain java or Groovy/Kotlin) backend allowing you to get card information for at least legendary deathrattle cards
* The API should also support filtering based on relevant request parameters. Ideally, the API should enable the following, listed from easy to hard:
* filter by least the following fields: `type`, `rarity`, `classes`, and `mechanics`
* return sorted results (for example, alphabetically sorted), supporting both ascending and descending
Expand Down
45 changes: 45 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
buildscript {
ext {
springBootVersion = '1.5.9.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath 'com.google.cloud.tools:appengine-gradle-plugin:+'
}
}

apply plugin: 'war'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'com.google.cloud.tools.appengine'

group = 'nl.tom'
version = '0.0.2-SNAPSHOT'
sourceCompatibility = 1.8

repositories { // repositories for Jar's you access in your code
mavenCentral()
}

configurations {
providedCompile
// comment for local
//compile.exclude module: "spring-boot-starter-tomcat"
compile.exclude module: "org.slf4j:jul-to-slf4j"
}

dependencies {
compile("org.springframework.boot:spring-boot-starter-web:1.5.9.RELEASE")

providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0'
//FIXME: providedCompile group: 'org.slf4j', name: 'jul-to-slf4j'

//compile('org.springframework.boot:spring-boot-devtools')

testCompile('org.springframework.boot:spring-boot-starter-test')
//TODO: testCompile('org.springframework.restdocs:spring-restdocs-mockmvc')
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-bin.zip
172 changes: 172 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 84 additions & 0 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/main/appengine/app.yaml.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
runtime: java
env: flex

handlers:
- url: /.*
script: this field is required, but ignored

manual_scaling:
instances: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package nl.tom.hstone;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
* Entry point.
*
* @author Tom
*
*/
@SpringBootApplication
public class HeartstoneAssessmentSpringApplication {

public static void main(String[] args) {
SpringApplication.run(HeartstoneAssessmentSpringApplication.class, args);
}
}
Loading