Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove buildInfo plugin, add spray.version managed resource generation

  • Loading branch information...
commit 4c1570e29c6628d2da8648bffb2a9b163efb7762 1 parent 376aaca
Mathias sirthias authored
2  project/Build.scala
View
@@ -73,7 +73,7 @@ object Build extends Build {
lazy val sprayUtil = Project("spray-util", file("spray-util"))
.settings(moduleSettings: _*)
- .settings(buildInfoSettings: _*)
+ .settings(sprayVersionConfGeneration: _*)
.settings(libraryDependencies ++=
provided(akkaActor) ++
test(akkaTestKit, specs2)
15 project/BuildSettings.scala
View
@@ -1,7 +1,6 @@
import sbt._
import Keys._
import com.github.siasia.WebPlugin._
-import sbtbuildinfo.Plugin._
import ls.Plugin._
object BuildSettings {
@@ -50,10 +49,16 @@ object BuildSettings {
publishLocal := ()
)
- lazy val buildInfoSettings = sbtbuildinfo.Plugin.buildInfoSettings ++ seq(
- sourceGenerators in Compile <+= buildInfo,
- buildInfoKeys := Seq[Scoped](name, version, scalaVersion, sbtVersion),
- buildInfoPackage := "cc.spray"
+ lazy val generateSprayVersionConf = TaskKey[Seq[File]]("generate-spray-version-conf",
+ "Create a reference.conf file in the managed resources folder that contains a spray.version = ... setting")
+
+ lazy val sprayVersionConfGeneration = seq(
+ resourceGenerators in Compile <+= generateSprayVersionConf,
+ generateSprayVersionConf <<= (resourceManaged in Compile, version) map { (dir, v) =>
+ val file = dir / "reference.conf"
+ IO.write(file, """spray.version = "%s"""" format v)
+ Seq(file)
+ }
)
lazy val exampleSettings = basicSettings ++ noPublishing
6 project/plugins.sbt
View
@@ -2,11 +2,7 @@ libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin"
addSbtPlugin("me.lessis" % "ls-sbt" % "0.1.1")
-addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.1.0")
-
resolvers ++= Seq(
"less is" at "http://repo.lessis.me",
- "coda" at "http://repo.codahale.com",
- Resolver.url("sbt-plugin-releases",
- new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
+ "coda" at "http://repo.codahale.com"
)
259 spray-can/src/main/resources/reference.conf
View
@@ -5,139 +5,132 @@
# This is the reference config file that contains all the default settings.
# Make your edits/overrides in your application.conf.
-spray {
-
- # the spray version, referenced from the spray-can server-header / user-agent-header definitions
- version = "1.0-SNAPSHOT"
-
- can {
- server {
- # the value of the server header to produce
- # Set to the empty string to disable rendering of the server header.
- server-header = spray-can/${spray.version}
-
- # the maximum number of requests that are accepted (and dispatched to the application)
- # on one single connection before the first request has to be completed
- # Incoming requests that would cause the pipelining limit to be exceeded are not read
- # from the connections socket so as to build up "back-pressure" to the client via TCP flow control.
- # The default setting of 1 disables HTTP pipelining, since only one request per connection can be
- # "open" (i.e. being processed by the application) at any time.
- # Set to higher values to enable HTTP pipelining.
- # Set to zero for unbounded pipelining (not recommended due to DoS attack vulnerability).
- pipelining-limit = 1
-
- # the time after which an idle connection will be automatically closed
- # Set to zero to completely disable idle timeouts
- idle-timeout = 10 s
-
- # If a request hasn't been responded to after the time period set here
- # a RequestTimeout message will be sent to the timeout handler.
- # Set to zero to completely disable request timeouts.
- request-timeout = 5 s
-
- # After a Timeout message has been sent to the timeout handler and the
- # request still hasn't been completed after the time period set here
- # the server will complete the request itself with an error response.
- timeout-timeout = 500 ms
-
- # the "granularity" of timeout checking for both idle connections timeouts
- # as well as request timeouts, should rarely be needed to modify
- reaping-cycle = 100 ms
-
- # By enabling this setting all responses from the request handler
- # will got directly to "the wire" thereby circumventing response ordering, validation
- # and request timeout checking. This can result in a minor performance increase but
- # requires that the application upholds the correct response ordering in a
- # pipelined scenario as well as request timeout checking itself.
- direct-responding = off
-
- # Enables/disables support for statistics collection and querying.
- stats-support = on
-
- # the path of the actor to send RequestTimeout messages to
- # If empty all RequestTimeout messages will go to the "regular" request handling actor.
- timeout-handler = ""
-
- # Enables/disables an alternative response streaming mode that doesn't
- # use "Transfer-Encoding: chunked" but rather renders the individual MessageChunks
- # coming in from the application as parts of the original response entity.
- # Enabling this mode causes all connections to be closed after a streaming response
- # has been finished since there is no other way to signal the response end to the client.
- # Note that chunkless-streaming is implicitly enabled when response streaming to
- # HTTP/1.0 clients (since they don't support "Transfer-Encoding: chunked")
- chunkless-streaming = off
-
- # When this setting is enabled the server will send SendCompleted confirmation messages
- # (if not disabled via the spray.io.confirm-sends setting) to the sender of the
- # response (part) rather than the "regular" request handler. If the connection
- # is closed before the response (part) was successfully handed over to the network stack
- # the respective `Closed` message signaling the error will also be dispatched to the
- # response (part) sender rather than the "regular" request handler.
- # It is recommended to leave this setting enabled unless your application specifically
- # requires otherwise.
- confirm-to-sender = on
-
- # If this setting is non-zero the HttpServer automatically aggregates incoming
- # request chunks into full HttpRequests before dispatching them to the application.
- # If the size of the aggregated requests surpasses the specified limit the server
- # will respond with a '413 Request Entity Too Large# error response before closing
- # the connection. Set to zero to disable automatic request chunk aggregation and
- # have ChunkedRequestStart, MessageChunk and ChunkedMessageEnd messages be dispatched
- # to the application.
- request-chunk-aggregation-limit = 1m
-
- # the initial size if the buffer to render the response in
- # can be used for fine-tuning response rendering performance but probably doesn't
- # have to be fiddled with in most applications
- response-size-hint = 1k
- }
-
- client {
- # the value of the user-agent header to produce, set to the empty string
- # to disable rendering of the user-agent header
- user-agent-header = spray-can/${spray.version}
-
- # the time after which an idle connection will be automatically closed
- # set to zero to completely disable idle timeouts
- idle-timeout = 10 s
-
- # if a request hasn't been responded to after the time period set here
- # a Timeout message will be sent to the timeout handler
- # set to zero to completely disable request timeouts
- request-timeout = 5 s
-
- # the "granularity" of timeout checking for both idle connections timeouts
- # as well as request timeouts, should rarely be needed to modify
- reaping-cycle = 100 ms
-
- # If this setting is non-zero the HttpServer automatically aggregates incoming
- # request chunks into full HttpRequests before dispatching them to the application.
- # If the size of the aggregated requests surpasses the specified limit the server
- # will respond with a '413 Request Entity Too Large# error response before closing
- # the connection. Set to zero to disable automatic request chunk aggregation and
- # have ChunkedRequestStart, MessageChunk and ChunkedMessageEnd messages be dispatched
- # to the application.
- response-chunk-aggregation-limit = 1m
-
- # the initial size if the buffer to render the request in
- # can be used for fine-tuning request rendering performance but probably doesn't
- # have to be fiddled with in most applications
- request-size-hint = 512
- }
-
- # The configuration of the HTTP message parser used by the server and the client
- parsing {
- max-uri-length = 2k
- max-response-reason-length = 64
- max-header-name-length = 64
- max-header-value-length = 8k
- max-header-count = 64
- max-content-length = 8m
- max-chunk-ext-name-length = 64
- max-chunk-ext-value-length = 256
- max-chunk-ext-count = 16
- max-chunk-size = 1m
- }
+spray.can {
+ server {
+ # the value of the server header to produce
+ # Set to the empty string to disable rendering of the server header.
+ server-header = spray-can/${spray.version}
+
+ # the maximum number of requests that are accepted (and dispatched to the application)
+ # on one single connection before the first request has to be completed
+ # Incoming requests that would cause the pipelining limit to be exceeded are not read
+ # from the connections socket so as to build up "back-pressure" to the client via TCP flow control.
+ # The default setting of 1 disables HTTP pipelining, since only one request per connection can be
+ # "open" (i.e. being processed by the application) at any time.
+ # Set to higher values to enable HTTP pipelining.
+ # Set to zero for unbounded pipelining (not recommended due to DoS attack vulnerability).
+ pipelining-limit = 1
+
+ # the time after which an idle connection will be automatically closed
+ # Set to zero to completely disable idle timeouts
+ idle-timeout = 10 s
+
+ # If a request hasn't been responded to after the time period set here
+ # a RequestTimeout message will be sent to the timeout handler.
+ # Set to zero to completely disable request timeouts.
+ request-timeout = 5 s
+
+ # After a Timeout message has been sent to the timeout handler and the
+ # request still hasn't been completed after the time period set here
+ # the server will complete the request itself with an error response.
+ timeout-timeout = 500 ms
+
+ # the "granularity" of timeout checking for both idle connections timeouts
+ # as well as request timeouts, should rarely be needed to modify
+ reaping-cycle = 100 ms
+
+ # By enabling this setting all responses from the request handler
+ # will got directly to "the wire" thereby circumventing response ordering, validation
+ # and request timeout checking. This can result in a minor performance increase but
+ # requires that the application upholds the correct response ordering in a
+ # pipelined scenario as well as request timeout checking itself.
+ direct-responding = off
+
+ # Enables/disables support for statistics collection and querying.
+ stats-support = on
+
+ # the path of the actor to send RequestTimeout messages to
+ # If empty all RequestTimeout messages will go to the "regular" request handling actor.
+ timeout-handler = ""
+
+ # Enables/disables an alternative response streaming mode that doesn't
+ # use "Transfer-Encoding: chunked" but rather renders the individual MessageChunks
+ # coming in from the application as parts of the original response entity.
+ # Enabling this mode causes all connections to be closed after a streaming response
+ # has been finished since there is no other way to signal the response end to the client.
+ # Note that chunkless-streaming is implicitly enabled when response streaming to
+ # HTTP/1.0 clients (since they don't support "Transfer-Encoding: chunked")
+ chunkless-streaming = off
+
+ # When this setting is enabled the server will send SendCompleted confirmation messages
+ # (if not disabled via the spray.io.confirm-sends setting) to the sender of the
+ # response (part) rather than the "regular" request handler. If the connection
+ # is closed before the response (part) was successfully handed over to the network stack
+ # the respective `Closed` message signaling the error will also be dispatched to the
+ # response (part) sender rather than the "regular" request handler.
+ # It is recommended to leave this setting enabled unless your application specifically
+ # requires otherwise.
+ confirm-to-sender = on
+
+ # If this setting is non-zero the HttpServer automatically aggregates incoming
+ # request chunks into full HttpRequests before dispatching them to the application.
+ # If the size of the aggregated requests surpasses the specified limit the server
+ # will respond with a '413 Request Entity Too Large# error response before closing
+ # the connection. Set to zero to disable automatic request chunk aggregation and
+ # have ChunkedRequestStart, MessageChunk and ChunkedMessageEnd messages be dispatched
+ # to the application.
+ request-chunk-aggregation-limit = 1m
+
+ # the initial size if the buffer to render the response in
+ # can be used for fine-tuning response rendering performance but probably doesn't
+ # have to be fiddled with in most applications
+ response-size-hint = 1k
}
+ client {
+ # the value of the user-agent header to produce, set to the empty string
+ # to disable rendering of the user-agent header
+ user-agent-header = spray-can/${spray.version}
+
+ # the time after which an idle connection will be automatically closed
+ # set to zero to completely disable idle timeouts
+ idle-timeout = 10 s
+
+ # if a request hasn't been responded to after the time period set here
+ # a Timeout message will be sent to the timeout handler
+ # set to zero to completely disable request timeouts
+ request-timeout = 5 s
+
+ # the "granularity" of timeout checking for both idle connections timeouts
+ # as well as request timeouts, should rarely be needed to modify
+ reaping-cycle = 100 ms
+
+ # If this setting is non-zero the HttpServer automatically aggregates incoming
+ # request chunks into full HttpRequests before dispatching them to the application.
+ # If the size of the aggregated requests surpasses the specified limit the server
+ # will respond with a '413 Request Entity Too Large# error response before closing
+ # the connection. Set to zero to disable automatic request chunk aggregation and
+ # have ChunkedRequestStart, MessageChunk and ChunkedMessageEnd messages be dispatched
+ # to the application.
+ response-chunk-aggregation-limit = 1m
+
+ # the initial size if the buffer to render the request in
+ # can be used for fine-tuning request rendering performance but probably doesn't
+ # have to be fiddled with in most applications
+ request-size-hint = 512
+ }
+
+ # The configuration of the HTTP message parser used by the server and the client
+ parsing {
+ max-uri-length = 2k
+ max-response-reason-length = 64
+ max-header-name-length = 64
+ max-header-value-length = 8k
+ max-header-count = 64
+ max-content-length = 8m
+ max-chunk-ext-name-length = 64
+ max-chunk-ext-value-length = 256
+ max-chunk-ext-count = 16
+ max-chunk-size = 1m
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.