├── .gitattributes ├── src ├── main │ ├── resources │ │ └── version.txt │ └── java │ │ ├── auth │ │ ├── AuthenticationException.java │ │ ├── Authenticator.java │ │ ├── FakeAuthenticator.java │ │ ├── User.java │ │ └── TwitterAuthenticator.java │ │ ├── templating │ │ ├── Layout.java │ │ ├── ContentWithVariables.java │ │ ├── YamlFrontMatter.java │ │ └── Template.java │ │ ├── PlanningServerModule.java │ │ ├── resources │ │ ├── AuthenticationResource.java │ │ ├── PlanningResource.java │ │ ├── StaticResource.java │ │ └── AbstractResource.java │ │ ├── PlanningServer.java │ │ └── planning │ │ └── Planning.java └── test │ └── java │ ├── templating │ ├── LayoutTest.java │ ├── TemplateTest.java │ └── YamlFrontMatterTest.java │ ├── resources │ ├── PlanningResourceTest.java │ └── AuthenticationResourceTest.java │ ├── AbstractPageTest.java │ ├── misc │ ├── PhantomJsTest.java │ └── PhantomJsDownloader.java │ ├── auth │ └── TwitterAuthenticatorTest.java │ ├── HomePageTest.java │ └── planning │ └── PlanningTest.java ├── Procfile ├── web ├── favicon.ico ├── img │ ├── arrow.png │ ├── david.png │ ├── eric.png │ ├── fight.jpg │ ├── fight2.jpg │ ├── iphone.png │ ├── laptop.png │ ├── favicon.png │ ├── sprites.png │ ├── devoxx-logo.png │ ├── sebastian.png │ └── jean-laurent.png ├── layouts │ └── default.html ├── js │ ├── jquery.cookie.js │ ├── jquery.scrollTo.min.js │ ├── planning.js │ ├── hogan.js │ ├── purl.js │ ├── underscore.js │ └── jquery.js ├── planning.html └── css │ └── planning.less ├── .gitignore ├── README.md ├── etc ├── install_node_module.sh └── buildjson.coffee └── pom.xml /.gitattributes: -------------------------------------------------------------------------------- 1 | version.txt export-subst 2 | -------------------------------------------------------------------------------- /src/main/resources/version.txt: -------------------------------------------------------------------------------- 1 | 2febb630616989dc8b226e94ba7a0eadf8419abb -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: java -Xmx512M -cp target/classes:target/dependency/* PlanningServer 2 | -------------------------------------------------------------------------------- /web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/favicon.ico -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | codestory.iml 2 | target/ 3 | .idea/ 4 | .DS_Store 5 | prod.log 6 | data/ 7 | snapshot/ 8 | -------------------------------------------------------------------------------- /web/img/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/img/arrow.png -------------------------------------------------------------------------------- /web/img/david.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/img/david.png -------------------------------------------------------------------------------- /web/img/eric.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/img/eric.png -------------------------------------------------------------------------------- /web/img/fight.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/img/fight.jpg -------------------------------------------------------------------------------- /web/img/fight2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/img/fight2.jpg -------------------------------------------------------------------------------- /web/img/iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/img/iphone.png -------------------------------------------------------------------------------- /web/img/laptop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/img/laptop.png -------------------------------------------------------------------------------- /web/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/img/favicon.png -------------------------------------------------------------------------------- /web/img/sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/img/sprites.png -------------------------------------------------------------------------------- /web/img/devoxx-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/img/devoxx-logo.png -------------------------------------------------------------------------------- /web/img/sebastian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/img/sebastian.png -------------------------------------------------------------------------------- /web/img/jean-laurent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeStory/code-story-planning/master/web/img/jean-laurent.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is the preparation project for CodeStory session that will take place at Devoxx World on November 14th&15th. -------------------------------------------------------------------------------- /etc/install_node_module.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | npm uninstall -g zombie mocha chai underscore promised-io expect.js coffee-script 3 | npm install -g zombie@1.4.1 mocha chai underscore promised-io expect.js coffee-script 4 | -------------------------------------------------------------------------------- /src/main/java/auth/AuthenticationException.java: -------------------------------------------------------------------------------- 1 | package auth; 2 | 3 | public class AuthenticationException extends RuntimeException { 4 | public AuthenticationException(Throwable cause) { 5 | super(cause); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/auth/Authenticator.java: -------------------------------------------------------------------------------- 1 | package auth; 2 | 3 | import java.net.URI; 4 | 5 | public interface Authenticator { 6 | URI getAuthenticateURI() throws AuthenticationException; 7 | 8 | User authenticate(String aouthToken, String oauthVerifier) throws AuthenticationException; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/templating/Layout.java: -------------------------------------------------------------------------------- 1 | package templating; 2 | 3 | public class Layout { 4 | private final String layout; 5 | 6 | public Layout(String layout) { 7 | this.layout = layout; 8 | } 9 | 10 | public String apply(String body) { 11 | return layout.replace("[[body]]", body); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/auth/FakeAuthenticator.java: -------------------------------------------------------------------------------- 1 | package auth; 2 | 3 | import java.net.URI; 4 | 5 | public class FakeAuthenticator implements Authenticator { 6 | @Override 7 | public URI getAuthenticateURI() { 8 | return URI.create("/user/fakeauthenticate"); 9 | } 10 | 11 | @Override 12 | public User authenticate(String oauthToken, String oauthVerifier) { 13 | return new User(42L, "arnold", "ring", "girl"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/test/java/templating/LayoutTest.java: -------------------------------------------------------------------------------- 1 | package templating; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.fest.assertions.Assertions.assertThat; 6 | 7 | public class LayoutTest { 8 | @Test 9 | public void should_apply_layout() { 10 | Layout layout = new Layout("header/[[body]]/footer"); 11 | 12 | String content = layout.apply("
Hello"); 13 | 14 | assertThat(content).isEqualTo("header/Hello/footer"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/templating/ContentWithVariables.java: -------------------------------------------------------------------------------- 1 | package templating; 2 | 3 | import java.util.Map; 4 | 5 | public class ContentWithVariables { 6 | private final String content; 7 | private final Map