forked from gkossakowski/build-play20
-
Notifications
You must be signed in to change notification settings - Fork 0
/
specs2.diff
137 lines (118 loc) · 6.58 KB
/
specs2.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
diff --git a/build.sbt b/build.sbt
index b292c8c..d4548ab 100644
--- a/build.sbt
+++ b/build.sbt
@@ -9,7 +9,9 @@ version := "1.9"
organization := "org.specs2"
-scalaVersion := "2.9.1"
+scalaVersion := "2.10.0-virtualized-SNAPSHOT"
+
+publishArtifact in (Compile, packageDoc) := false
crossScalaVersions := Seq("2.9.1-1", "2.9.2-RC2", "2.10.0-M2")
@@ -19,12 +21,13 @@ shellPrompt := { state => System.getProperty("user.name") + "> " }
shellPrompt in ThisBuild := { state => Project.extract(state).currentRef.project + "> " }
/** Dependencies */
+resolvers += "Local Maven Repository" at Path.userHome.asURL + "/.m2/repository"
+
resolvers ++= Seq("releases" at "http://oss.sonatype.org/content/repositories/releases",
"snapshots" at "http://oss.sonatype.org/content/repositories/snapshots")
libraryDependencies <<= scalaVersion { scala_version => Seq(
- "org.specs2" %% "specs2-scalaz-core" % "6.0.1",
- "net.rosien" %% "sniff" % "0.2" % "test",
+ "org.specs2" % "specs2-scalaz-core_2.10.0-M2" % "6.0.1",
"org.scala-lang" % "scala-compiler" % scala_version % "optional",
"org.scala-tools.testing" %% "scalacheck" % "1.9" % "optional",
"org.scala-tools.testing" % "test-interface" % "0.5" % "optional",
@@ -105,14 +108,14 @@ releaseProcess <<= thisProjectRef apply { ref =>
Seq[ReleasePart](
initialGitChecks,
checkSnapshotDependencies,
- releaseTask(check in Posterous in ref),
+ //releaseTask(check in Posterous in ref),
inquireVersions,
setReleaseVersion,
runTest,
commitReleaseVersion,
tagRelease,
releaseTask(publish in Global in ref),
- releaseTask(publish in Posterous in ref),
+ //releaseTask(publish in Posterous in ref),
setNextVersion,
commitNextVersion
)
diff --git a/project/build.properties b/project/build.properties
new file mode 100644
index 0000000..390c1af
--- /dev/null
+++ b/project/build.properties
@@ -0,0 +1 @@
+sbt.version=0.11.3
\ No newline at end of file
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 0015c98..790d04a 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -2,13 +2,13 @@ resolvers += Resolver.url("scalasbt", new URL("http://scalasbt.artifactoryonline
resolvers += Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)
-addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.5")
+//addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.5")
resolvers ++= Seq("less is" at "http://repo.lessis.me", "coda" at "http://repo.codahale.com")
addSbtPlugin("me.lessis" % "ls-sbt" % "0.1.1")
-addSbtPlugin("net.databinder" % "posterous-sbt" % "0.3.2")
+//addSbtPlugin("net.databinder" % "posterous-sbt" % "0.3.2")
resolvers += "gseitz@github.com" at "http://gseitz.github.com/maven/"
@@ -16,6 +16,6 @@ addSbtPlugin("com.github.gseitz" % "sbt-release" % "0.4")
resolvers += Classpaths.typesafeResolver
-addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse" % "1.5.0")
+//addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse" % "1.5.0")
diff --git a/src/main/scala/org/specs2/reporter/HtmlPrinter.scala b/src/main/scala/org/specs2/reporter/HtmlPrinter.scala
index 27c04db..f41a253 100644
--- a/src/main/scala/org/specs2/reporter/HtmlPrinter.scala
+++ b/src/main/scala/org/specs2/reporter/HtmlPrinter.scala
@@ -125,7 +125,7 @@ trait HtmlPrinter {
implicit object HtmlReducer extends Reducer[ExecutedFragment, Seq[HtmlLine]] {
implicit override def unit(fragment: ExecutedFragment) = Seq(print(fragment))
/** print an ExecutedFragment and its associated statistics */
- def print(fragment: ExecutedFragment) = fragment match {
+ def print(fragment: ExecutedFragment): HtmlLine = fragment match {
case start @ ExecutedSpecStart(_,_,_) => HtmlSpecStart(start)
case result @ ExecutedResult(_,_,_,_,_) => HtmlResult(result)
case text @ ExecutedText(s, _) => HtmlText(text)
@@ -152,4 +152,4 @@ case class TreeToc(rootCode: SpecId, toc: NodeSeq) {
<script>{"""$(function () { $('#tree').jstree({'core':{'initially_open':['"""+rootCode+"','"+currentCode+"""'], 'animation':200}, 'plugins':['themes', 'html_data']}); });"""}</script>
</div>
-}
\ No newline at end of file
+}
diff --git a/src/main/scala/org/specs2/runner/JUnitRunner.scala b/src/main/scala/org/specs2/runner/JUnitRunner.scala
index f6fb36c..b2d83e1 100644
--- a/src/main/scala/org/specs2/runner/JUnitRunner.scala
+++ b/src/main/scala/org/specs2/runner/JUnitRunner.scala
@@ -122,7 +122,7 @@ object JUnitRunner {
def apply[T <: SpecificationStructure](f: Fragments, props: SystemProperties, console: TextExporting, html: HtmlExporting)(implicit m: ClassManifest[T]) = new JUnitRunner(m.erasure) {
override protected lazy val specification = new Specification { def is = f }
override protected lazy val properties = props
- override def exporters(accept: String => Boolean)(implicit arguments: Arguments): Seq[Exporting] = Seq(console, html)
+ override def exporters(accept: String => Boolean)(implicit arguments: Arguments): Seq[Exporting] = Seq(console: Exporting, html: Exporting)
}
}
/**
@@ -159,4 +159,4 @@ class JUnitDescriptionsFragments(className: String) extends JUnitDescriptions[Fr
case Action(action) => Some(createDescription(className, label=nodeLabel.toString, testName="action") -> f)
case other => None
}
- }
\ No newline at end of file
+ }
diff --git a/src/main/scala/org/specs2/specification/Fragments.scala b/src/main/scala/org/specs2/specification/Fragments.scala
index 69d2adc..6765c88 100644
--- a/src/main/scala/org/specs2/specification/Fragments.scala
+++ b/src/main/scala/org/specs2/specification/Fragments.scala
@@ -9,7 +9,7 @@ import Fragments._
/**
* A Fragments object is a list of fragments with a SpecStart and a SpecEnd
*/
-case class Fragments(private val title: Option[SpecName] = None, middle: Seq[Fragment] = Vector(), arguments: Arguments = Arguments(), link: Option[HtmlLink] = None, seeOnly: Boolean = false) {
+case class Fragments(title: Option[SpecName] = None, middle: Seq[Fragment] = Vector(), arguments: Arguments = Arguments(), link: Option[HtmlLink] = None, seeOnly: Boolean = false) {
def fragments: Seq[Fragment] = if (middle.isEmpty && !link.isDefined) Vector() else (start +: middle :+ end)
private def append(e: Fragment) = copy(middle = middle :+ e)