implicit.ly

Scala software, hot off the presses

scalatra 2.0.4

core

  • Allow pass from methodNotAllowed
  • In ScalatraFilter, the default methodNotAllowed handler now delegates to the filter chain to look for a matching route. To restore the previous behavior, call:

    doMethodNotAllowed = ScalatraKernel.sendMethodNotAllowed
  • Set cookie path to "/" by default in the root context. It was being omitted, which scoped the cookie to the request path.

scalate

  • Set response status to 500 on Scalate error page

Scalatra is a tiny, Sinatra-like web framework for Scala.

Filed under  //   Scala 2.8.1   Scala 2.8.2   Scala 2.9.0-1   Scala 2.9.1   org.scalatra   scalatra  

Unfiltered 0.6.0

Cookies changes

We've added support for the HttpOnly and Version, properties of cookies. This change affects the source of extraction of Cookies. Rather than delegating to HttpRequest, Cookies are now extracted directly from the headers of an HTTP request on demand. Since this change added two new properties to the Cookie case class, this affects any cookie extraction you may be doing.

We have removed the deprecated methods on Cookie: domain, path, maxAge, and secure in favor of using built-in support for named arguements provided by Scala case classes.

ResponseCookies has been deprecated in favor of SetCookies which is more in line with the Set-Cookie header it wraps.

The SetCookies response function also provides a convenience method to discard client cookies

SetCookies.discarding(name0, ..., nameN)

The method cookies on unfiltered.request.HttpRequest has been deprecated along with the cookies method implementations defined on unfiltered.filter.RequestBinding and unfiltered.netty.RequestBinding

Routes

Unfiltered now includes additional options for requests routing in unfiltered.kit.Routes. Applications that dispatch requests based on many different paths can use the provided kits to centralize and isolate their path routing.

Three different kinds of routing are provided, with examples in the test specifications. Routes.specify (specs) uses Rails-style route definitions, Routes.regex (specs) uses regular expressions, and Routes.startsWith (specs) performs a simple match against the beginning of the path.

unfiltered-library

Html5 ResponseFunction to prefix output with <!DOCTYPE html>, contributed by bblfish.

Dependencies Updates

  • Netty 3.3.1
  • Jetty 7.6.0.v20120127
  • lift-json 2.4 final

Unfiltered is a toolkit for servicing HTTP requests in Scala.

lmxml 0.1.1

Optional submodules were added:

  • lmxml-html includes html shortcuts when parsing LMXML
  • lmxml-template includes file base template inheritance when parsing LMXML
  • lmxml-json includes the ability to template JSON data
  • lmxml-cache includes an interface and serialization utilities for storing the compiled LMXML source.

The wiki has more information about each module located under Extending.

Some library changes:

  • JSON style attributes can be made strict for key transforms
  • Small changes to signatures in LmxmlParsers trait, adding extensibility
  • Transforms now work against attributes and text nodes
  • Added a CommentNode which can be converted now
  • The Lmxml object has been refactored to DefaultLmxml as users can now define their own Lmxml with included modules.

Light Markup to XML (LMXML) is a library for quickly creating recursive decent markup without the necessary obligation of opening or closing tags.

Curious? Try the command-line app, or the GAE web-app.

loglady 1.0.0

This is the first public release of loglady, a very simple logging trait with an API similar to Python's logging library.

Example:

class MyClass extends Logging {

  log.warn("We all float (%.4f) down here", 3.141592)
  log.debug("Some random stuff: %d %s %x", 42, List(0, 1, 1, 2, 3, 5), -559038737)
  log.error("Formatted date: %1$tm %1$te,%1$tY", new java.util.Date)

  try {
    throw new Exception("Oops!")
  } catch {
    case exc: Exception => {
      log.error(exc, "Something bad happened")
    }
  }
}

loglady is a crazy simple logging API for Scala, wrapping slf4j.

Filed under  //   Scala 2.8.1   Scala 2.8.2   Scala 2.9.0-1   Scala 2.9.1   loglady   org.eintr.loglady  
Posted January 23, 2012 by dln 

scalatra 2.0.3

  • Add support for Scala 2.8.2.

scalatra-auth

  • Fix crash in BasicAuthStrategy when no auth header is present. (GH-143)

scalatra-fileupload

  • Create hook to customize ServletFileUpload, for instance to set maximum upload size.

scalatra-tests

Scalatra is a tiny, Sinatra-like web framework for Scala.

Filed under  //   Scala 2.8.1   Scala 2.8.2   Scala 2.9.0   Scala 2.9.0-1   Scala 2.9.1   org.scalatra   scalatra  

Dispatch 0.8.7

Breaking Changes

If using the </> verb to parse XML, you must now bring it into scope explicitly:

import dispatch.XhtmlParsing._

There's a good reason for this! (See below.)

JSoup and TagSoup modules

Thanks to a big contribution from daros, Dispatch now integrates with parsers that can handle real-world HTML. The handler verb </> is used across all HTML parsers, resolved by its imported implicit conversions. For usage instructions and examples, see the Dispatch documentation for TagSoup and JSoup.

Support byte arrays for POST

This contribution by dyross (no relation?) adds

def << (contents: Array[Byte])

to the standard set of request verbs.

Databinder Dispatch is a library for HTTP interaction, from asynchronous GETs to multi-part OAuth-enticated POSTs.

Filed under  //   Dispatch   Scala 2.8.0   Scala 2.8.1   Scala 2.8.2   Scala 2.9.0   Scala 2.9.0-1   Scala 2.9.1   net.databinder  

Unfiltered 0.5.3

  • Fix for regression introduced in 0.5.2 in the resources handler of unfiltered-netty-server. Unique instances of the ChunkedWriteHandler were not created for each request, causing bad responses.
  • Fix for issue #100 (woot?), Sec-WebSocket-Location (WSLocation) is hard-coded to ws:// protocol { romusz }

Unfiltered is a toolkit for servicing HTTP requests in Scala.

Unfiltered 0.5.2

Intent chaining

Applications that internally chain intent functions are now recommended to use Pass.onPass rather than the orElse method defined on PartialFunction.

Pass.onPass is aware of the explicit Pass object that may be returned by intents and it is also more efficient than orElse for many chained intent functions. There are two ways to use onPass:

import unfiltered.request._
val combined1 = Pass.onPass(intent1, intent2)
val combined2 = intent1.onPass(intent2)

These two produce the same combined intent function; the second uses an implicit conversion imported from the package object.

unfiltered-netty-server

In recent releases plan and handler took a by-name parameter to support the case where new instances of Netty handlers are required for each request. This lead to unexpected behavior for some more common use cases, where the caller passed in a new handler thinking it would be shared for all requests.

To avoid confusion, we've restored the previous parameter types to plan and handler methods. If you need to pass in a plan "factory", such as for a chunk aggregator, there is a new method makePlan that takes a by-name parameter. The new chunked(maxContentLength: Int) convenience method also provides this behavior directly.

unfiltered-netty-websockets

Fixed issue #99, error when decoding large web socket messages.

unfiltered-scalatest

Corrected scala-test dependencies for different versions of Scala. { dwestheide }

unfiltered-jetty

Updated dependency to 7.5.4.v20111024 { max-l }

Fixed issue #89, use of deprecated Jetty keystore methods.

ls.implicit.ly

Added ls plugin to the build and metadata to the repository, so that Unfiltered releases are recorded at ls/unfiltered. Also, FYI! The ls server is built with Unfiltered.

Unfiltered is a toolkit for servicing HTTP requests in Scala.

Dispatch 0.8.6

Features

Fixes

  • Explicit return type for make_client to fix override problem, contributed by ostewart
  • Avoid slow stream reader usage in json parsing, contributed by pomu0325

Dependencies

News

The Dispatch repository has moved: https://github.com/dispatch/dispatch

Databinder Dispatch is a library for HTTP interaction, from asynchronous GETs to multi-part OAuth-enticated POSTs.

Filed under  //   Dispatch   Scala 2.8.0   Scala 2.8.1   Scala 2.8.2   Scala 2.9.0   Scala 2.9.0-1   Scala 2.9.1   net.databinder  

scalariform 0.1.1

  • FIX: Leave PCDATA whitespace untouched inside a single-line XML tag (issue #27)
  • FIX: indent for indentLocalDefs on first line of function block (issue #24)
  • ParenExpr now allows newline after opening paren (issue #18)
  • FIX: spurious indentation in staggered dot expressions (issue #25)
  • Preserve newline before annotations (issue #28)
  • Add option to support CompactControlReadability style (issue #22) (thanks to by Owein Reese (https://github.com/wheaties) and Rose Toomey (https://github.com/rktoomey) for the patch
  • Preserve newline before anonymous function argument (issue #21)
  • Allow one-line anonymous function blocks
  • Fix parser crash on argument-less constructor annotations
  • Add PlaceScaladocAsterisksBeneathSecondAsterisk preference to conform to recommended Scaladoc style (issue #30)
  • FIX: Removal of space causing token merge in varargs and unary ops (http://scala-ide-portfolio.assembla.com/spaces/scala-ide/tickets/1000601)
  • Switch to sbt 0.11 build

Scalariform is a source code formatter for Scala.