Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' into origin/develop

  • Loading branch information...
commit dcc623274fb12b52047090d19c36672e3210bd5a 2 parents b389e8d + 4cbf8de
@rossabaker rossabaker authored
View
1  project/build.properties
@@ -0,0 +1 @@
+sbt.version=0.11.2
View
2  project/plugins/build.sbt
@@ -1 +1 @@
-addSbtPlugin("net.databinder" %% "giter8-plugin" % "0.3.0")
+addSbtPlugin("net.databinder" %% "giter8-plugin" % "0.3.2")
View
3  src/main/g8/default.properties
@@ -1,6 +1,7 @@
organization=com.example
name=scalatra-sbt-prototype
version=0.1.0-SNAPSHOT
-scala_version=2.9.1
servlet_name=MyScalatraServlet
+package=com.example.app
+scala_version=2.9.1
View
2  src/main/g8/src/main/scala/$servlet_name$.scala → .../g8/src/main/scala/$package$/$servlet_name$.scala
@@ -1,3 +1,5 @@
+package $package$
+
import org.scalatra._
import scalate.ScalateSupport
View
12 src/main/g8/src/main/webapp/WEB-INF/web.xml
@@ -5,7 +5,7 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns
<servlet>
<servlet-name>scalatra</servlet-name>
<servlet-class>
- $servlet_name$
+ $package$.$servlet_name$
</servlet-class>
</servlet>
@@ -13,4 +13,14 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns
<servlet-name>scalatra</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
+
+ <!-- Static Asset Serving Example -->
+ <!--
+ <servlet-mapping>
+ <servlet-name>default</servlet-name>
+ <url-pattern>/img/*</url-pattern>
+ <url-pattern>/css/*</url-pattern>
+ <url-pattern>/js/*</url-pattern>
+ </servlet-mapping>
+ -->
</web-app>
View
16 src/main/g8/src/test/scala/$package$/$servlet_name$Spec.scala
@@ -0,0 +1,16 @@
+package $package$
+
+import org.scalatra.test.specs2._
+
+// For more on Specs2, see http://etorreborre.github.com/specs2/guide/org.specs2.guide.QuickStart.html
+class $servlet_name$Spec extends ScalatraSpec { def is =
+ "GET / on $servlet_name$" ^
+ "should return status 200" ! root200^
+ end
+
+ addServlet(classOf[$servlet_name$], "/*")
+
+ def root200 = get("/") {
+ status must_== 200
+ }
+}
View
13 src/test/scala/MyScalatraFilterSuite.scala
@@ -1,13 +0,0 @@
-import org.scalatra._
-import org.scalatra.test.scalatest._
-import org.scalatest.matchers._
-
-class MyScalatraFilterSuite extends ScalatraFunSuite with ShouldMatchers {
- addFilter(classOf[$servlet_name$], "/*")
-
- test("GET / returns status 200") {
- get("/") {
- status should equal (200)
- }
- }
-}
Please sign in to comment.
Something went wrong with that request. Please try again.