Browse files

Merge branch 'master' of github.com:dispatch/reboot

  • Loading branch information...
2 parents e485edb + bcf6d25 commit c40c8caa724aa2a07c1f3e72575861c60554ecf7 @n8han n8han committed Jan 6, 2013
View
10 core/build.sbt
@@ -4,7 +4,15 @@ description :=
"Core Dispatch module wrapping sonatype/async-http-client"
libraryDependencies ++= Seq(
- "com.ning" % "async-http-client" % "1.7.5"
+ "com.ning" % "async-http-client" % "1.7.9"
)
seq(lsSettings :_*)
+
+seq(buildInfoSettings:_*)
+
+sourceGenerators in Compile <+= buildInfo
+
+buildInfoKeys := Seq[BuildInfoKey](version)
+
+buildInfoPackage := "dispatch"
View
1 core/src/main/scala/execution.scala
@@ -48,6 +48,7 @@ private [dispatch] object Defaults {
lazy val client = new AsyncHttpClient(config)
lazy val timeout = Duration.None
lazy val config = new AsyncHttpClientConfig.Builder()
+ .setUserAgent("Dispatch/%s" format BuildInfo.version)
.setAsyncHttpClientProviderConfig(
new NettyAsyncHttpProviderConfig().addProperty(
NettyAsyncHttpProviderConfig.BOSS_EXECUTOR_SERVICE, bossExecutor
View
10 core/src/test/scala/basic.scala
@@ -20,6 +20,8 @@ with DispatchCleanup {
PlainTextContent ~> ResponseString(req.method + URLDecoder.decode(echo, "utf-8"))
case req @ Path(Seg("echopath" :: Nil)) =>
PlainTextContent ~> ResponseString(req.method)
+ case Path(Seg("agent" :: Nil)) & UserAgent(agent) =>
+ PlainTextContent ~> ResponseString(agent)
}).start()
}
@@ -71,4 +73,12 @@ with DispatchCleanup {
)
res() =? ("OPTIONS" + sample)
}
+
+ property("Send Dispatch/%s User-Agent" format BuildInfo.version) = forAll(Gen.alphaStr) { (sample: String) =>
+ val res = Http(
+ localhost / "agent" > as.String
+ )
+ res() =? ("Dispatch/%s" format BuildInfo.version)
+ }
+
}
View
2 json4sjackson/build.sbt
@@ -7,6 +7,6 @@ seq(lsSettings :_*)
libraryDependencies ++= Seq(
"org.json4s" %% "json4s-jackson" % "3.0.0",
- "net.databinder" %% "unfiltered-netty" % "0.6.1" % "test"
+ "net.databinder" %% "unfiltered-netty" % "0.6.4" % "test"
)
View
2 json4snative/build.sbt
@@ -8,6 +8,6 @@ seq(lsSettings :_*)
libraryDependencies ++= Seq(
"org.json4s" %% "json4s-core" % "3.0.0",
"org.json4s" %% "json4s-native" % "3.0.0",
- "net.databinder" %% "unfiltered-netty" % "0.6.1" % "test"
+ "net.databinder" %% "unfiltered-netty" % "0.6.4" % "test"
)
View
2 liftjson/build.sbt
@@ -10,5 +10,5 @@ libraryDependencies <++= scalaVersion( sv =>
case "2" :: "9" :: _ =>
"net.liftweb" % "lift-json_2.9.1" % "2.4"
case _ => "net.liftweb" %% "lift-json" % "2.4"
- }, "net.databinder" %% "unfiltered-json" % "0.6.1" % "test")
+ }, "net.databinder" %% "unfiltered-json" % "0.6.4" % "test")
)
View
4 project/plugins.sbt
@@ -2,9 +2,11 @@ addSbtPlugin("me.lessis" % "ls-sbt" % "0.1.2")
addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
+addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.2.0")
+
resolvers ++= Seq(
"less is" at "http://repo.lessis.me",
"coda" at "http://repo.codahale.com"
)
-resolvers += Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
+resolvers += Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)

0 comments on commit c40c8ca

Please sign in to comment.