!htt #19514 Update RouterSettings to be non case class

This commit is contained in:
Johan Andrén 2016-01-25 14:03:04 +01:00
parent 379a3a85b4
commit 61b375cec8
26 changed files with 188 additions and 64 deletions

View file

@ -6,6 +6,9 @@ package akka.http.scaladsl.server
package directives
import java.io.File
import akka.http.scaladsl.settings.RoutingSettings
import scala.concurrent.duration._
import scala.concurrent.{ ExecutionContext, Future }
import scala.util.Properties
@ -229,7 +232,7 @@ class FileAndResourceDirectivesSpec extends RoutingSpec with Inspectors with Ins
val base = new File(getClass.getClassLoader.getResource("").toURI).getPath
new File(base, "subDirectory/emptySub").mkdir()
def eraseDateTime(s: String) = s.replaceAll("""\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d""", "xxxx-xx-xx xx:xx:xx")
implicit val settings = RoutingSettingsImpl.default.copy(renderVanityFooter = false)
implicit val settings = RoutingSettings.default.withRenderVanityFooter(false)
"properly render a simple directory" in {
Get() ~> listDirectoryContents(base + "/someDir") ~> check {

View file

@ -17,7 +17,7 @@ import org.scalatest.{ Inside, Inspectors }
class RangeDirectivesSpec extends RoutingSpec with Inspectors with Inside {
lazy val wrs =
mapSettings(_.copy(rangeCountLimit = 10, rangeCoalescingThreshold = 1L)) &
mapSettings(_.withRangeCountLimit(10).withRangeCoalescingThreshold(1L)) &
withRangeSupport
def bytes(length: Byte) = Array.tabulate[Byte](length)(_.toByte)