Skip to content

Commit

Permalink
updated scala 2.10 and shapeless to 2.1.0
Browse files Browse the repository at this point in the history
removed the dependency of specs2-core on shapeless
  • Loading branch information
etorreborre committed Mar 31, 2015
1 parent a61175c commit 0b08208
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
11 changes: 3 additions & 8 deletions gwt/src/main/scala/org/specs2/specification/script/GWT.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package script
import core.{Env, Fragment, Fragments}
import create.{FragmentFactory, FragmentsFactory}
import shapeless.{HList, HNil, ::}
import shapeless.ops.hlist.ToList
import shapeless.ops.hlist.{ToTraversable, ToList}
import execute._
import ResultLogicalCombinators._
import scalaz.syntax.std.list._
Expand Down Expand Up @@ -254,13 +254,8 @@ trait GWT extends StepParsers with Scripts { outer: FragmentsFactory =>

}

private implicit def toListAny[H <: HList]: ToList[H, Any] = new ToList[H, Any] {
def apply(l: H) = l match {
case head :: HNil => List(head)
case head :: tail => head :: tail.toList(toListAny)
case _ => List[Any]()
}
}
private implicit def toListAny[H <: HList]: ToList[H, Any] =
implicitly[ToTraversable.Aux[H, List, Any]]

private def value(r: Result) = r match {
case DecoratedResult(v, _) => v
Expand Down
3 changes: 1 addition & 2 deletions project/build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object build extends Build {
specs2ShellPrompt,
scalaVersion := "2.11.6",
scalazVersion := "7.1.1",
crossScalaVersions := Seq(scalaVersion.value, "2.10.4"))
crossScalaVersions := Seq(scalaVersion.value, "2.10.5"))

lazy val specs2Version = settingKey[String]("defines the current specs2 version")

Expand Down Expand Up @@ -82,7 +82,6 @@ object build extends Build {
lazy val core = Project(id = "core", base = file("core"),
settings = Seq(
libraryDependencies ++=
depends.shapeless(scalaVersion.value) ++
depends.reflect(scalaVersion.value) ++
depends.paradise(scalaVersion.value) ++
depends.testInterface.map(_ % "optional") ++
Expand Down
4 changes: 2 additions & 2 deletions project/depends.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ object depends {
lazy val hamcrest = Seq("org.hamcrest" % "hamcrest-core" % "1.3")

def shapeless(scalaVersion: String) =
if (scalaVersion.contains("2.11")) Seq("com.chuusai" %% "shapeless" % "2.0.0")
else Seq("com.chuusai" % ("shapeless_"+scalaVersion) % "2.0.0")
if (scalaVersion.contains("2.11")) Seq("com.chuusai" %% "shapeless" % "2.1.0")
else Seq("com.chuusai" % ("shapeless_"+scalaVersion) % "2.1.0")

lazy val pegdown = Seq("org.pegdown" % "pegdown" % "1.2.1")

Expand Down

0 comments on commit 0b08208

Please sign in to comment.