From f39ad6ea4a54ceabb78e4926109ca6a9a7821278 Mon Sep 17 00:00:00 2001 From: jamming Date: Thu, 29 Jan 2015 08:38:37 +0100 Subject: [PATCH] Documentation and infrastructure changes --- .travis.yml | 2 +- assets/{sabina-mono.png => sabina-black.png} | Bin build.gradle | 2 +- gradle.properties | 11 ---- readme.md | 51 +++++++++--------- site/assets/css/base.css | 9 ++-- site/content/download.md | 31 ----------- site/content/reference.md | 2 +- site/content/why.md | 6 +++ site/templates/index.gsp | 52 ++++++++++++------- site/templates/menu.gsp | 3 +- 11 files changed, 72 insertions(+), 97 deletions(-) rename assets/{sabina-mono.png => sabina-black.png} (100%) delete mode 100644 site/content/download.md diff --git a/.travis.yml b/.travis.yml index 201c119596..8f07cfdadb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,3 @@ language: java jdk: oraclejdk8 -after_success: gradle clean check jacocoTestReport coveralls +after_success: gradle/wrapper clean check jacocoTestReport coveralls diff --git a/assets/sabina-mono.png b/assets/sabina-black.png similarity index 100% rename from assets/sabina-mono.png rename to assets/sabina-black.png diff --git a/build.gradle b/build.gradle index 679378763f..4d2f0a9059 100644 --- a/build.gradle +++ b/build.gradle @@ -45,7 +45,7 @@ subprojects { apply plugin: 'com.github.kt3k.coveralls' group = 'sabina' - version = '2.0.1-SNAPSHOT' + version = '2.1.0-SNAPSHOT' description = 'A Sinatra inspired Java web framework' repositories { diff --git a/gradle.properties b/gradle.properties index d007f0f3ab..1fe647c1de 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,14 +1,3 @@ -#systemProp.http.proxyHost= -#systemProp.http.proxyPort= -#systemProp.http.proxyUser= -#systemProp.http.proxyPassword= -#systemProp.http.nonProxyHosts= - -#systemProp.https.proxyHost= -#systemProp.https.proxyPort= -#systemProp.https.proxyUser= -#systemProp.https.proxyPassword= -#systemProp.https.nonProxyHosts= org.gradle.daemon=true diff --git a/readme.md b/readme.md index 43366ca897..c37538d274 100755 --- a/readme.md +++ b/readme.md @@ -10,19 +10,25 @@ Sabina - a Sinatra inspired web framework ========================================= -Sabina 2.0.1 is now available on [JCenter]!!! (TODO Add JCenter link) +Sabina 2.1.0 is now available on [JCenter]!!! + +```groovy +dependencies { + compile 'sabina:http:2.1.0' +} +``` ```xml - com.sabina - sabina - 1.0.0 + sabina + http + 2.1.0 ``` -API Docs: [Core](http://there4.co/sabina/core/) [Extra](http://there4.co/sabina/core/) +API Docs: [Core](http://there4.co/sabina/http/) [Extra](http://there4.co/sabina/http/) -[JCenter]: +[JCenter]: TODO Add JCenter link Getting started @@ -31,12 +37,10 @@ Getting started ```java import static sabina.Sabina.*; -public class HelloWorld { - public static void main (String[] args) { - serve ( - get ("/hello", it -> "Hello World!") - ); - } +public class HiWorld { + public static void main (String[] args) { + get ("/hello", it -> "Hi World!").start (); + } } ``` @@ -55,29 +59,29 @@ Examples Check out and try the examples in the source code. Simple example showing some basic functionality ([SimpleExample.java][Simple]) -[Simple]: //github.com/jamming/sabina/tree/master/core/src/test/java/sabina/examples/SimpleExample.java +[Simple]: //github.com/jamming/sabina/tree/master/http/src/test/java/sabina/examples/SimpleExample.java A simple CRUD example showing howto create, get, update and delete book resources ([Books.java][Books]) -[Books]: //github.com/jamming/sabina/tree/master/core/src/test/java/sabina/examples/Books.java +[Books]: //github.com/jamming/sabina/tree/master/http/src/test/java/sabina/examples/Books.java Example showing a very simple (and stupid) authentication filter that is executed before all other resources ([FilterExample.java][Filter]) -[Filter]: //github.com/jamming/sabina/tree/master/core/src/test/java/sabina/examples/FilterExample.java +[Filter]: //github.com/jamming/sabina/tree/master/http/src/test/java/sabina/examples/FilterExample.java Example showing how to use attributes ([FilterExampleAttributes.java][FilterAttributes]) -[FilterAttributes]: //github.com/jamming/sabina/tree/master/core/src/test/java/sabina/examples/FilterExampleAttributes.java +[FilterAttributes]: //github.com/jamming/sabina/tree/master/http/src/test/java/sabina/examples/FilterExampleAttributes.java Example showing how to serve static resources ([StaticResources.java][StaticResources]) -[StaticResources]: //github.com/jamming/sabina/tree/master/core/src/test/java/sabina/examples/StaticResources.java +[StaticResources]: //github.com/jamming/sabina/tree/master/http/src/test/java/sabina/examples/StaticResources.java Example showing how to define content depending on accept type ([JsonAcceptTypeExample.java][JsonAcceptType]) -[JsonAcceptType]: //github.com/jamming/sabina/tree/master/core/src/test/java/sabina/examples/JsonAcceptTypeExample.java +[JsonAcceptType]: //github.com/jamming/sabina/tree/master/http/src/test/java/sabina/examples/JsonAcceptTypeExample.java Example showing how to render a view from a template ([FreeMarkerExample.java][FreeMarker]) -[FreeMarker]: //github.com/jamming/sabina/tree/master/core/src/test/java/sabina/examples/FreeMarkerExample.java +[FreeMarker]: //github.com/jamming/sabina/tree/master/http/src/test/java/sabina/examples/FreeMarkerExample.java Example of using Transformer. ([TransformerExample.java][Transformer]) -[Transformer]: //github.com/jamming/sabina/tree/master/core/src/test/java/sabina/examples/TransformerExample.java +[Transformer]: //github.com/jamming/sabina/tree/master/http/src/test/java/sabina/examples/TransformerExample.java LICENSE @@ -99,13 +103,11 @@ and limitations under the License. TODO ---- -* Add badges to site * Add social buttons to site * Fix documentation site styles and pages -* Add Travis links, huboard, issues, etc. +* Add Travis links, huboard, issues, etc. (in reference documentation) * Add optimize 'profile' -* Create unit tests * Integrate with: * http://jackson.codehaus.org @@ -118,7 +120,4 @@ TODO * Helper for JDBC * Example project (command to fetch and start, deployment heroku, building executable WAR) -* Start child processes (clones) of the microservice -* Manage versions * Deploy GH pages in Travis: after_success: ./gradlew cobertura coveralls jbake publishGhPages -* Create 'amqp' module for async queues communication (with producer and consumer) diff --git a/site/assets/css/base.css b/site/assets/css/base.css index 82812cd207..308d3b0c1a 100644 --- a/site/assets/css/base.css +++ b/site/assets/css/base.css @@ -16,8 +16,7 @@ div#wrap { margin-top: 100px; } p#header { text-align: center; } /* For the license */ -/* -dl { display: table; } -dt { display: table-row; } -dd { margin-left: 10px; } -*/ +dd { + margin-left: 2em; + margin-top: -1.35em; +} diff --git a/site/content/download.md b/site/content/download.md deleted file mode 100644 index e77df306df..0000000000 --- a/site/content/download.md +++ /dev/null @@ -1,31 +0,0 @@ -title=Download -date=2013-09-24 -type=page -status=published -~~~~~~ - - -Downloads -========= - -Sabina version 2.0.0 is now available on maven central! - -Latest version: 2.0.0 - -New features: ResponseTransformerRoutes and TemplateViewRoutes - - -Maven users ------------ - -Add the sabina dependency: - -```xml - - - com.sabina - sabina-core - 2.0.0 - - -``` diff --git a/site/content/reference.md b/site/content/reference.md index b4c11f602b..b48d3c7b8a 100644 --- a/site/content/reference.md +++ b/site/content/reference.md @@ -8,5 +8,5 @@ status=published API Documentation ================= -* [Core Javadoc](core/index.html) +* [HTTP Javadoc](http/index.html) * [Extra Javadoc](extra/index.html) diff --git a/site/content/why.md b/site/content/why.md index b666ff7a04..9ebc461aea 100755 --- a/site/content/why.md +++ b/site/content/why.md @@ -43,6 +43,12 @@ Why not use Spark? TODO +* Working tests +* All in one project (http, extra, documentation) +* Coverage and deployment +* Undertow backend +* Multiple servers + Okey, so why use Sabina? ------------------------ diff --git a/site/templates/index.gsp b/site/templates/index.gsp index ab3b53cb42..801fe72e96 100644 --- a/site/templates/index.gsp +++ b/site/templates/index.gsp @@ -1,34 +1,48 @@ <%include "header.gsp"%> <%include "menu.gsp"%> -
+
+ Project Logo +
+
+

Sabina

+

+ A Sinatra inspired micro web framework for quickly creating web applications in Java with + minimal effort +

+
+
+ +

+ Project Logo -

- A Sinatra inspired micro web framework for quickly creating web applications in Java with - minimal effort -

+ src="https://travis-ci.org/jamming/sabina.svg?branch=master" + alt="Build Img" + style="max-width:100%;"> + + + Coverage Img +

-

News

- -

Sabina 2.0.0 re-written for Java 8 and Lambdas available on Bintray and Maven central!

-

Quick start

-

Add the Sabina maven dependency and you're ready to go:

+

Add the Sabina dependency and you're ready to go:

-    
-import static sabina.Sabina.*;
+    import static sabina.Sabina.*;
 
-public class HelloWorld {
-    public static void main(String[] args) {
-        get("/hello", it -> "Hello World");
+public class HiWorld {
+    public static void main (String[] args) {
+        get("/hello", it -> "Hi World!").start ();
     }
-}
-    
+}
   

Ignite and view at

diff --git a/site/templates/menu.gsp b/site/templates/menu.gsp index 5d6aceed7f..859f193ccf 100644 --- a/site/templates/menu.gsp +++ b/site/templates/menu.gsp @@ -26,10 +26,9 @@