Skip to content

Commit

Permalink
Merge pull request #58 from ilya-murzinov/versions-update
Browse files Browse the repository at this point in the history
Update scala and dependencies versions
  • Loading branch information
jeremyrsmith authored and tomjadams committed May 9, 2017
2 parents 46a50bf + ccff261 commit c707cf0
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 23 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
sudo: false
language: scala
scala:
- 2.11.8
- 2.11.11
- 2.12.2
jdk:
- oraclejdk8

Expand Down
34 changes: 23 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ name := "featherbed"
import sbtunidoc.Plugin.UnidocKeys._
import com.typesafe.sbt.SbtGhPages.GhPagesKeys._

enablePlugins(TutPlugin)

lazy val buildSettings = Seq(
organization := "io.github.finagle",
version := "0.2.1-SNAPSHOT",
scalaVersion := "2.11.8"
version := "0.3.0-SNAPSHOT",
scalaVersion := "2.12.2",
crossScalaVersions := Seq("2.11.11", "2.12.2")
)

val finagleVersion = "6.41.0"
val finagleVersion = "6.44.0"
val shapelessVersion = "2.3.2"
val catsVersion = "0.9.0"

Expand All @@ -22,10 +25,12 @@ lazy val baseSettings = docSettings ++ Seq(
"com.twitter" %% "finagle-http" % finagleVersion,
"com.chuusai" %% "shapeless" % shapelessVersion,
"org.typelevel" %% "cats" % catsVersion,
"org.scalamock" %% "scalamock-scalatest-support" % "3.2.2" % "test",
"org.scalatest" %% "scalatest" % "2.2.6" % "test"
"org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" % "test",
"org.scalatest" %% "scalatest" % "3.0.3" % "test"
),
resolvers += Resolver.sonatypeRepo("snapshots")
resolvers += Resolver.sonatypeRepo("snapshots"),
dependencyUpdatesFailBuild := true,
dependencyUpdatesExclusions := moduleFilter("org.scala-lang")
)

lazy val publishSettings = Seq(
Expand Down Expand Up @@ -67,7 +72,7 @@ lazy val noPublish = Seq(
lazy val allSettings = publishSettings ++ baseSettings ++ buildSettings

lazy val `featherbed-core` = project
.settings(allSettings ++ tutSettings)
.settings(allSettings)

lazy val `featherbed-circe` = project
.settings(allSettings)
Expand All @@ -84,18 +89,24 @@ lazy val docs: Project = project
scaladocLatestPath := (if (isSnapshot.value) "api/latest-snapshot" else "api/latest"),
tutPath := "doc",
includeFilter in makeSite := (includeFilter in makeSite).value || "*.md" || "*.yml",
addMappingsToSiteDir(tut in `featherbed-core`, tutPath),
addMappingsToSiteDir(tut, tutPath),
addMappingsToSiteDir(mappings in (featherbed, ScalaUnidoc, packageDoc), scaladocLatestPath),
addMappingsToSiteDir(mappings in (featherbed, ScalaUnidoc, packageDoc), scaladocVersionPath),
ghpagesNoJekyll := false,
git.remoteRepo := "git@github.com:finagle/featherbed"
git.remoteRepo := "git@github.com:finagle/featherbed",
scalacOptions in Tut := (
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, p)) if p >= 12 => Seq("-Yrepl-class-based")
case _ => Nil
}
)
)
).dependsOn(`featherbed-core`, `featherbed-circe`)


lazy val featherbed = project
.in(file("."))
.settings(unidocSettings ++ tutSettings ++ baseSettings ++ buildSettings)
.settings(unidocSettings ++ baseSettings ++ buildSettings)
.aggregate(`featherbed-core`, `featherbed-circe`)
.dependsOn(`featherbed-core`, `featherbed-circe`)
.settings(
Expand All @@ -113,14 +124,15 @@ lazy val featherbed = project
)

val validateCommands = List(
"dependencyUpdates",
"clean",
"scalastyle",
"test:scalastyle",
"compile",
"test:compile",
"coverage",
"test",
"tut",
"docs/tut",
"coverageReport"
)
addCommandAlias("validate", validateCommands.mkString(";", ";", ""))
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Look at that! The JSON that came back was automatically decoded into a `Foo`!
thing around it? As we're about to see, when you're interacting with a server, you can't be sure that
you'll get what you expect. The server might send malformed JSON, or might not send JSON at all. To
handle this in an idiomatic way, the `Future` returned by `send[K]` will fail with `InvalidResponse` if
the response can't be decoded. The `InvalidResponse` contains a message about why the response was invalid,
the response can't be decoded. The `InvalidResponse` contains a message about why the response was invalid,
as well as the `Response` itself (so you can process it further if you like).

Let's see what that looks like:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ val server = Http.serve(new InetSocketAddress(8768), new Service[Request, Respon
rep.contentType = "application/json"
Future.value(rep)
}
def apply(request: Request): Future[Response] = request.uri match {
case "/api/success" => response(Status.Ok, """{"foo": "bar"}""")
case "/api/not/found" => response(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ And we can define a class for our API client:

```tut:book
class JSONPlaceholderAPI(baseUrl: URL) {
import featherbed.circe._
import io.circe.generic.auto._
private val client = new featherbed.Client(baseUrl)
Expand Down Expand Up @@ -62,5 +64,3 @@ Await.result(apiClient.posts.get(1))
```


File renamed without changes.
3 changes: 1 addition & 2 deletions docs/src/site/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ baseurl: "/featherbed"
# About/contact
author:
name: Jeremy Smith
url: http://jeremyrsmith.github.io
url: http://jeremyrsmith.github.io

# Gems
gems:
Expand All @@ -22,4 +22,3 @@ kramdown:
input: GFM
syntax_highlighter: rouge
highlighter: rouge

2 changes: 1 addition & 1 deletion docs/src/site/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To get started with featherbed, check out the [Guide](doc/). Detailed API docume
Featherbed aims to have a minimal set of dependencies. Besides `finagle-http`, the core project is
dependent only on [shapeless](https://github.com/milessabin/shapeless) and [cats](https://github.com/typelevel/cats).

featherbed-circe depends additionall on [circe](https://github.com/travisbrown/circe)
featherbed-circe depends additional on [circe](https://github.com/travisbrown/circe)

## License

Expand Down
2 changes: 1 addition & 1 deletion featherbed-circe/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := "featherbed-circe"

val circeVersion = "0.7.0"
val circeVersion = "0.7.1"

libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % circeVersion,
Expand Down
2 changes: 1 addition & 1 deletion featherbed-core/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name := "featherbed-core"

//featherbed-circe is duplicated in featherbed-core for testing
val circeVersion = "0.7.0"
val circeVersion = "0.7.1"

libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % circeVersion % "test",
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ resolvers ++= Seq(
Resolver.url("scoverage-bintray", url("https://dl.bintray.com/sksamuel/sbt-plugins/"))(Resolver.ivyStylePatterns)
)

addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.4.1")
addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.5.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "1.1")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.2.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.0")

resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")
Expand Down

0 comments on commit c707cf0

Please sign in to comment.