beamly / playpen

playpen: A way to Play! safely

Version Matrix

Playpen: A way to Play! safely

Latest Version License Scaladoc

Build Status Dependency Status Repo Size

A general suite of utilities and other common code when building Play apps.

How to Use

Add playpen to your build system.

For sbt:

"com.beamly.playpen" %% "playpen" % "0.3.0"

For maven:

<dependency>
  <groupId>com.beamly.playpen</groupId>
  <artifactId>playpen_${scala.binary}</artifactId>
  <version>0.3.0</version>
</dependency>

(where scala.binary is defined somewhere as 2.11)

Configure playpen.HttpAccessLoggingFilter

Add HttpAccessLoggingFilter to the list of http filters.

If you are using runtime dependency injection, follow the Play documentation https://www.playframework.com/documentation/2.4.0/ScalaHttpFilters#Using-filters.

If you are using compile time dependency injection, add the HttpAccessLoggingFilter to httpFilters as in:

import playpen.HttpAccessLoggingFilter

class MyComponents(context: Context) extends BuiltInComponentsFromContext(context) {
  lazy val router = Router.empty
  override lazy val httpFilters = Seq(HttpAccessLoggingFilter)
}

Dependencies

  • Scala 2.11.x
  • JodaTime 2.x
  • Play 2.4.x
  • Slf4J 1.7.x

How to Release

  • Bump version in README
  • sbt release, responding to prompt as such (for example): Release (relative) version: 3 Next release series [0.1]: [CTRL-D] [info] Not bumping release series Next (relative) version: 4-SNAPSHOT
  • sbt sonatypeRelease
  • git push --follow-tags
  • git checkout the tag again
  • sbt ghpagesPushSite