diff --git a/.gitignore b/.gitignore index 51c156b..1580142 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ target/ +.bsp/ .idea/ .idea_modules/ atlassian-ide-plugin.xml diff --git a/README.md b/README.md new file mode 100644 index 0000000..9abf941 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +## Installation + +``` +resolvers += "Agilogy GitLab" at "https://gitlab.com/api/v4/groups/583742/-/packages/maven" + +libraryDependencies += "com.agilogy" %% "uris" % "0.3" +``` + +## Publishing + +To publish this package to Agilogy's Package Registry, set the `GITLAB_DEPLOY_TOKEN` environment variable and then run the following command in sbt: + +``` +sbt:uris> +publish +``` diff --git a/build.sbt b/build.sbt index a30543a..300691c 100644 --- a/build.sbt +++ b/build.sbt @@ -1,17 +1,17 @@ import com.typesafe.sbt.SbtScalariform.ScalariformKeys import scalariform.formatter.preferences._ +import com.gilcloud.sbt.gitlab.{GitlabCredentials,GitlabPlugin} organization := "com.agilogy" name := "uris" -scalaVersion := "2.12.6" +scalaVersion := "2.12.13" -crossScalaVersions := Seq("2.11.7", "2.12.6") +crossScalaVersions := Seq("2.12.13") libraryDependencies += "org.scalactic" %% "scalactic" % "3.0.1" libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.1" % "test" - libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.13.4" % "test" // --> Linters @@ -80,26 +80,24 @@ ScalariformKeys.preferences := ScalariformKeys.preferences.value Seq(preferences) -// --> bintray - -bintrayRepository := "scala" - -bintrayOrganization := Some("agilogy") +// --> gitlab -bintrayPackageLabels := Seq("scala") +GitlabPlugin.autoImport.gitlabGroupId := None +GitlabPlugin.autoImport.gitlabProjectId := Some(26236490) +GitlabPlugin.autoImport.gitlabDomain := "gitlab.com" -licenses += ("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0.html")) +GitlabPlugin.autoImport.gitlabCredentials := { + val token = sys.env.get("GITLAB_DEPLOY_TOKEN") match { + case Some(token) => token + case None => + sLog.value.warn(s"Environment variable GITLAB_DEPLOY_TOKEN is undefined, 'publish' will fail.") + "" + } + Some(GitlabCredentials("Deploy-Token", token)) +} -// <-- bintray +// <-- gitlab enablePlugins(GitVersioning) git.useGitDescribe := true - -publishMavenStyle := isSnapshot.value - -publishTo := { - val nexus = "http://188.166.95.201:8081/content/repositories/snapshots" - if (isSnapshot.value) Some("snapshots" at nexus) - else publishTo.value -} \ No newline at end of file diff --git a/project/bintray.sbt b/project/bintray.sbt deleted file mode 100644 index 7528176..0000000 --- a/project/bintray.sbt +++ /dev/null @@ -1,6 +0,0 @@ -resolvers += Resolver.url( - "bintray-sbt-plugin-releases", - url("http://dl.bintray.com/content/sbt/sbt-plugin-releases"))( - Resolver.ivyStylePatterns) - -addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.1") \ No newline at end of file diff --git a/project/build.properties b/project/build.properties index 406a7d2..dbae93b 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.16 \ No newline at end of file +sbt.version=1.4.9 diff --git a/project/plugins.sbt b/project/plugins.sbt index 3509945..44fda2d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,12 +2,14 @@ resolvers += Classpaths.sbtPluginReleases addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1") -addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.1.0") +addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.5") -addSbtPlugin("org.wartremover" % "sbt-wartremover" % "2.2.0") +addSbtPlugin("org.wartremover" % "sbt-wartremover" % "2.2.1") addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") -addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.0") +addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.3") -addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.3") \ No newline at end of file +addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0") + +addSbtPlugin("com.gilcloud" % "sbt-gitlab" % "0.0.6") diff --git a/src/main/scala/com/agilogy/uri/Authority.scala b/src/main/scala/com/agilogy/uri/Authority.scala index 0177b6d..5d1b97f 100644 --- a/src/main/scala/com/agilogy/uri/Authority.scala +++ b/src/main/scala/com/agilogy/uri/Authority.scala @@ -1,14 +1,14 @@ package com.agilogy.uri -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } -sealed abstract case class UserInfo private(stringValue: String) extends UriPart +sealed abstract case class UserInfo private (stringValue: String) extends UriPart object UserInfo { def apply(s: String): UserInfo = new UserInfo(Encoder.normalize(s)) {} } -abstract case class Port private(intValue: Int) { +abstract case class Port private (intValue: Int) { val stringValue: String = intValue.toString val asciiStringValue: String = stringValue } @@ -66,7 +66,7 @@ object Authority { } def parseTry(s: String): Try[Authority] = parse(s) match { - case Left(e) => Failure(AuthorityParseException(e)) + case Left(e) => Failure(AuthorityParseException(e)) case Right(r) => Success(r) } } diff --git a/src/main/scala/com/agilogy/uri/Encoder.scala b/src/main/scala/com/agilogy/uri/Encoder.scala index 8ec486b..796f868 100644 --- a/src/main/scala/com/agilogy/uri/Encoder.scala +++ b/src/main/scala/com/agilogy/uri/Encoder.scala @@ -2,7 +2,7 @@ package com.agilogy.uri import java.text.Normalizer -import scala.util.{Failure, Success, Try} +import scala.util.{ Failure, Success, Try } object Encoder { private val subDelims = "!$&'()*+,;=".toSet diff --git a/src/main/scala/com/agilogy/uri/Path.scala b/src/main/scala/com/agilogy/uri/Path.scala index a52acd8..392e41c 100644 --- a/src/main/scala/com/agilogy/uri/Path.scala +++ b/src/main/scala/com/agilogy/uri/Path.scala @@ -13,8 +13,8 @@ object PathType { } /** - * @see rfc3986#section-3.3 - */ + * @see rfc3986#section-3.3 + */ sealed trait Path extends UriPart { type PathWithSegmentsType <: Path with PathWithSegments @@ -46,13 +46,13 @@ object Path { def apply(s: NonEmptySegment) = RootlessSingleSegmentPath(s) def apply(s: String): PathRootlessEmpty = Segment(s) match { - case EmptySegment => Path.empty + case EmptySegment => Path.empty case s: NonEmptySegment => RootlessSingleSegmentPath(s) } def absoluteOrEmpty(s: Segment*): PathAbEmpty = { s match { - case Seq() => empty + case Seq() => empty case h +: tail => absolute(h, tail: _*) } } @@ -86,10 +86,10 @@ object Path { } /** - * A path that begins with "/" or is empty - * - * @see rfc3986#section-3.3 - */ + * A path that begins with "/" or is empty + * + * @see rfc3986#section-3.3 + */ sealed trait PathAbEmpty extends Path { type PathWithSegmentsType <: PathAbEmpty with PathWithSegments } @@ -101,12 +101,12 @@ sealed trait PathWithSegments { } /** - * A path that begins with "/" - *
- * Note that it does NOT correspond to rfc3986's path-absolute, since it may begin with "//" - * - * @see rfc3986#section-3.3 - */ + * A path that begins with "/" + *
+ * Note that it does NOT correspond to rfc3986's path-absolute, since it may begin with "//" + * + * @see rfc3986#section-3.3 + */ sealed trait AbsolutePath extends PathWithSegments with PathAbEmpty { type PathWithSegmentsType = NonEmptyAbsolutePath // def /(s:String): NonEmptyAbsolutePath = this / Segment(s) @@ -131,10 +131,10 @@ final case class NonEmptyAbsolutePath(parent: AbsolutePath, segment: Segment) ex } /** - * A path that begins with a non empty segment - * - * @see rfc3986#section-3.3 - */ + * A path that begins with a non empty segment + * + * @see rfc3986#section-3.3 + */ sealed trait RootlessPath extends PathRootlessEmpty { type PathWithSegmentsType = ConsRootlessPath @@ -155,8 +155,8 @@ object RootlessPath { } /** - * @see rfc3986#section-3.3 - */ + * @see rfc3986#section-3.3 + */ final case class ConsRootlessPath(parent: RootlessPath, segment: Segment) extends RootlessPath with PathWithSegments { def /(s: Segment): ConsRootlessPath = ConsRootlessPath(this, s) @@ -171,9 +171,9 @@ final case class AbsoluteSingleSegmentPath(segment: Segment) extends AbsolutePat } /** - * @see rfc3986#section-3.3 - */ -final case class RootlessSingleSegmentPath private[uri](segment: NonEmptySegment) extends RootlessPath with PathWithSegments { + * @see rfc3986#section-3.3 + */ +final case class RootlessSingleSegmentPath private[uri] (segment: NonEmptySegment) extends RootlessPath with PathWithSegments { override def segments: Seq[Segment] = Seq(segment) @@ -181,10 +181,10 @@ final case class RootlessSingleSegmentPath private[uri](segment: NonEmptySegment } /** - * The path with zero characters - * - * @see rfc3986#section-3.3 - */ + * The path with zero characters + * + * @see rfc3986#section-3.3 + */ case object EmptyPath extends PathAbEmpty with PathRootlessEmpty { type PathWithSegmentsType = AbsoluteSingleSegmentPath diff --git a/src/main/scala/com/agilogy/uri/RichUri.scala b/src/main/scala/com/agilogy/uri/RichUri.scala index d06b891..dc51db1 100644 --- a/src/main/scala/com/agilogy/uri/RichUri.scala +++ b/src/main/scala/com/agilogy/uri/RichUri.scala @@ -19,25 +19,25 @@ object RichUri { def apply(scheme: Scheme, authority: Authority, path: PathAbEmpty = Path.empty, query: Option[Query] = None, fragment: Option[Fragment] = None): AuthorityUri = { (path, query, fragment) match { - case (p: PathAbEmpty, None, None) => AuthorityPathUri(scheme, authority, p) - case (p: PathAbEmpty, Some(q), None) => AuthorityPathQUri(scheme, authority, p, q) - case (p: PathAbEmpty, None, Some(f)) => AuthorityPathFUri(scheme, authority, p, f) + case (p: PathAbEmpty, None, None) => AuthorityPathUri(scheme, authority, p) + case (p: PathAbEmpty, Some(q), None) => AuthorityPathQUri(scheme, authority, p, q) + case (p: PathAbEmpty, None, Some(f)) => AuthorityPathFUri(scheme, authority, p, f) case (p: PathAbEmpty, Some(q), Some(f)) => AuthorityPathQFUri(scheme, authority, p, q, f) } } def noAuthority(scheme: Scheme, segment: String): NoAuthorityPathUri = { Path(segment) match { - case Path.empty => NoAuthorityPathUri(scheme) + case Path.empty => NoAuthorityPathUri(scheme) case p: RootlessPath => NoAuthorityPathUri(scheme, p) } } def noAuthority(scheme: Scheme, path: Path, query: Option[Query] = None, fragment: Option[Fragment] = None): Either[PathStartsWithDoubleSlashInNoAuhtorityUri, NoAuthorityUri] = { (path, query, fragment) match { - case (_, None, None) => NoAuthorityPathUri(scheme, path) - case (_, Some(q), None) => Right(NoAuthorityPathQUri(scheme, path, q)) - case (_, None, Some(f)) => Right(NoAuthorityPathFUri(scheme, path, f)) + case (_, None, None) => NoAuthorityPathUri(scheme, path) + case (_, Some(q), None) => Right(NoAuthorityPathQUri(scheme, path, q)) + case (_, None, Some(f)) => Right(NoAuthorityPathFUri(scheme, path, f)) case (_, Some(q), Some(f)) => Right(NoAuthorityPathQFUri(scheme, path, q, f)) } } @@ -97,7 +97,7 @@ trait FragmentUri extends RichUri { override def fragment: Some[Fragment] = Some(theFragment) } -abstract case class NoAuthorityPathUri private(scheme: Scheme, path: Path) extends NoAuthorityUri with NoQueryFragmentUri[NoAuthorityUri] { +abstract case class NoAuthorityPathUri private (scheme: Scheme, path: Path) extends NoAuthorityUri with NoQueryFragmentUri[NoAuthorityUri] { override type UQ = NoAuthorityPathQUri override type UF = NoAuthorityPathFUri @@ -122,8 +122,7 @@ object NoAuthorityPathUri { // If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//"). if (path.stringValue.startsWith("//")) { Left(PathStartsWithDoubleSlashInNoAuhtorityUri(scheme, path)) - } - else { + } else { Right(new NoAuthorityPathUri(scheme, path) {}) } diff --git a/src/main/scala/com/agilogy/uri/Scheme.scala b/src/main/scala/com/agilogy/uri/Scheme.scala index 34ec92d..bc40eaa 100644 --- a/src/main/scala/com/agilogy/uri/Scheme.scala +++ b/src/main/scala/com/agilogy/uri/Scheme.scala @@ -1,6 +1,6 @@ package com.agilogy.uri -sealed abstract case class Scheme private(stringValue: String) extends UriPart { +sealed abstract case class Scheme private (stringValue: String) extends UriPart { override def asciiStringValue: String = stringValue } diff --git a/src/main/scala/com/agilogy/uri/Segment.scala b/src/main/scala/com/agilogy/uri/Segment.scala index 77d0a83..adee509 100644 --- a/src/main/scala/com/agilogy/uri/Segment.scala +++ b/src/main/scala/com/agilogy/uri/Segment.scala @@ -5,7 +5,7 @@ sealed trait Segment extends UriPart { } // TODO: Enforce segment constraints -sealed abstract case class NonEmptySegment private(stringValue: String) extends Segment +sealed abstract case class NonEmptySegment private (stringValue: String) extends Segment object NonEmptySegment { private[uri] def apply(stringValue: String): NonEmptySegment = new NonEmptySegment(Encoder.normalize(stringValue)) {} diff --git a/src/main/scala/com/agilogy/uri/Uri.scala b/src/main/scala/com/agilogy/uri/Uri.scala index 8b6f979..9b5d48f 100644 --- a/src/main/scala/com/agilogy/uri/Uri.scala +++ b/src/main/scala/com/agilogy/uri/Uri.scala @@ -25,7 +25,7 @@ trait Uri extends Any with UriReference with UriPart { override def equals(obj: Any): Boolean = obj match { case u: Uri => this.stringValue == u.stringValue - case _ => false + case _ => false } } @@ -49,8 +49,8 @@ object Uri { def of(scheme: Scheme, authority: Option[Authority], path: Path, query: Option[Query] = None, fragment: Option[Fragment] = None): Either[PathError, RichUri] = { (authority, path) match { case (Some(a), p: RootlessPath) => Left(RootlessPathInAuthorityUri(scheme, a, p)) - case (Some(a), p: PathAbEmpty) => Right(RichUri(scheme, a, p, query, fragment)) - case (None, _) => RichUri.noAuthority(scheme, path, query, fragment) + case (Some(a), p: PathAbEmpty) => Right(RichUri(scheme, a, p, query, fragment)) + case (None, _) => RichUri.noAuthority(scheme, path, query, fragment) } } diff --git a/src/main/scala/com/agilogy/uri/UriError.scala b/src/main/scala/com/agilogy/uri/UriError.scala index f6319fd..7d3fb2c 100644 --- a/src/main/scala/com/agilogy/uri/UriError.scala +++ b/src/main/scala/com/agilogy/uri/UriError.scala @@ -1,6 +1,6 @@ package com.agilogy.uri -abstract case class UriParseError private(scheme: Option[SchemeError], authority: Option[AuthorityParseError]) +abstract case class UriParseError private (scheme: Option[SchemeError], authority: Option[AuthorityParseError]) object UriParseError { def apply(scheme: Option[SchemeError] = None, authority: Option[AuthorityParseError] = None): UriParseError = { @@ -16,11 +16,11 @@ trait SchemeError case class MissingScheme(uri: String) extends SchemeError /** - * Scheme names consist of a sequence of characters beginning with a letter and followed by any combination of letters, - * digits, plus ("+"), period ("."), or hyphen ("-"). - * - * @param scheme The illegal scheme - */ + * Scheme names consist of a sequence of characters beginning with a letter and followed by any combination of letters, + * digits, plus ("+"), period ("."), or hyphen ("-"). + * + * @param scheme The illegal scheme + */ case class IllegalSchemeName(scheme: String) extends SchemeError case class AuthorityParseError(authority: String) diff --git a/src/main/scala/com/agilogy/uri/UriParser.scala b/src/main/scala/com/agilogy/uri/UriParser.scala index 7ad0f70..11c23dc 100644 --- a/src/main/scala/com/agilogy/uri/UriParser.scala +++ b/src/main/scala/com/agilogy/uri/UriParser.scala @@ -1,6 +1,6 @@ package com.agilogy.uri -import validation.Validation.{notNull, sequence} +import validation.Validation.{ notNull, sequence } object UriParser { @@ -101,5 +101,4 @@ object UriParser { Uri.of(s, a, path, query, fragment).right.get } - } diff --git a/src/main/scala/validation/Validation.scala b/src/main/scala/validation/Validation.scala index 8d3f648..38b7cea 100644 --- a/src/main/scala/validation/Validation.scala +++ b/src/main/scala/validation/Validation.scala @@ -1,6 +1,6 @@ package validation -import com.agilogy.uri.{NoAuthorityPathQUri, PathStartsWithDoubleSlashInNoAuhtorityUri, _} +import com.agilogy.uri.{ NoAuthorityPathQUri, PathStartsWithDoubleSlashInNoAuhtorityUri, _ } trait Validation { diff --git a/src/test/scala/com/agilogy/uri/AuthoritySpec.scala b/src/test/scala/com/agilogy/uri/AuthoritySpec.scala index 539c69e..9284921 100644 --- a/src/test/scala/com/agilogy/uri/AuthoritySpec.scala +++ b/src/test/scala/com/agilogy/uri/AuthoritySpec.scala @@ -1,6 +1,6 @@ package com.agilogy.uri -import org.scalatest.{EitherValues, FreeSpec, TryValues} +import org.scalatest.{ EitherValues, FreeSpec, TryValues } class AuthoritySpec extends FreeSpec with EitherValues with TryValues { diff --git a/src/test/scala/com/agilogy/uri/EncoderSpec.scala b/src/test/scala/com/agilogy/uri/EncoderSpec.scala index 3c52031..1257453 100644 --- a/src/test/scala/com/agilogy/uri/EncoderSpec.scala +++ b/src/test/scala/com/agilogy/uri/EncoderSpec.scala @@ -1,6 +1,6 @@ package com.agilogy.uri -import org.scalatest.{FlatSpec, PrivateMethodTester} +import org.scalatest.{ FlatSpec, PrivateMethodTester } class EncoderSpec extends FlatSpec with PrivateMethodTester { diff --git a/src/test/scala/com/agilogy/uri/PathSpec.scala b/src/test/scala/com/agilogy/uri/PathSpec.scala index c9df994..5b430f1 100644 --- a/src/test/scala/com/agilogy/uri/PathSpec.scala +++ b/src/test/scala/com/agilogy/uri/PathSpec.scala @@ -1,6 +1,6 @@ package com.agilogy.uri -import org.scalatest.{EitherValues, FreeSpec} +import org.scalatest.{ EitherValues, FreeSpec } //TODO: Test Path.parse //TODO: Test Path.parse("") diff --git a/src/test/scala/com/agilogy/uri/QuerySpec.scala b/src/test/scala/com/agilogy/uri/QuerySpec.scala index 50f0abf..1d523ab 100644 --- a/src/test/scala/com/agilogy/uri/QuerySpec.scala +++ b/src/test/scala/com/agilogy/uri/QuerySpec.scala @@ -9,15 +9,15 @@ class QuerySpec extends FreeSpec { |serves to identify a resource within the scope of the URI's scheme and naming authoritym (if any). """ .stripMargin - { - "Query components have a string representation" in { - assert(Query("name=John").stringValue === "name=John") - } + "Query components have a string representation" in { + assert(Query("name=John").stringValue === "name=John") + } - """Under normal circumstances, the only time when octets within a URI are percent-encoded is during the process of + """Under normal circumstances, the only time when octets within a URI are percent-encoded is during the process of |producing the URI from its component parts.""".stripMargin in { - assert(Query(":/?#%").stringValue === ":/?#%") - } + assert(Query(":/?#%").stringValue === ":/?#%") + } - } + } } diff --git a/src/test/scala/com/agilogy/uri/SchemeSpec.scala b/src/test/scala/com/agilogy/uri/SchemeSpec.scala index 689e39a..26a03f0 100644 --- a/src/test/scala/com/agilogy/uri/SchemeSpec.scala +++ b/src/test/scala/com/agilogy/uri/SchemeSpec.scala @@ -1,6 +1,6 @@ package com.agilogy.uri -import org.scalatest.{EitherValues, FreeSpec} +import org.scalatest.{ EitherValues, FreeSpec } class SchemeSpec extends FreeSpec with EitherValues { @@ -13,7 +13,6 @@ class SchemeSpec extends FreeSpec with EitherValues { assert(Scheme("http").right.value.stringValue === "http") } - """Although schemes are case-insensitive, the canonical form is lowercase and documents that specify schemes must do |so with lowercase letters. An implementation should accept uppercase letters as equivalent to lowercase in scheme |names (e.g., allow "HTTP" as well as "http") for the sake of robustness but should only produce lowercase scheme diff --git a/src/test/scala/com/agilogy/uri/UriGenerators.scala b/src/test/scala/com/agilogy/uri/UriGenerators.scala index 22ad434..44a2b88 100644 --- a/src/test/scala/com/agilogy/uri/UriGenerators.scala +++ b/src/test/scala/com/agilogy/uri/UriGenerators.scala @@ -1,6 +1,6 @@ package com.agilogy.uri -import org.scalacheck.{Arbitrary, Gen} +import org.scalacheck.{ Arbitrary, Gen } object UriGenerators { diff --git a/src/test/scala/com/agilogy/uri/UriJavaUriSpec.scala b/src/test/scala/com/agilogy/uri/UriJavaUriSpec.scala index 7923873..e64e1a7 100644 --- a/src/test/scala/com/agilogy/uri/UriJavaUriSpec.scala +++ b/src/test/scala/com/agilogy/uri/UriJavaUriSpec.scala @@ -2,11 +2,10 @@ package com.agilogy.uri import com.agilogy.uri.UriGenerators._ import org.scalatest.prop.GeneratorDrivenPropertyChecks -import org.scalatest.{FreeSpec, TryValues, _} +import org.scalatest.{ FreeSpec, TryValues, _ } class UriJavaUriSpec extends FreeSpec with GeneratorDrivenPropertyChecks with Matchers with TryValues with EitherValues { - """Single case""" in { val u = Uri.of(Scheme("r+").right.value, Some(Authority(Some(UserInfo("1gs")), Host("-$"), None)), Path.absolute(Segment("F;c"), Segment("𥳐L2*-2]¤S"), Segment("T=l"), Segment("_,齈wb/"), Segment("L,[")), None, None).right.value val ju = u.toJava diff --git a/src/test/scala/com/agilogy/uri/UriParseSpec.scala b/src/test/scala/com/agilogy/uri/UriParseSpec.scala index b099a56..fd9a7ce 100644 --- a/src/test/scala/com/agilogy/uri/UriParseSpec.scala +++ b/src/test/scala/com/agilogy/uri/UriParseSpec.scala @@ -2,7 +2,7 @@ package com.agilogy.uri import com.agilogy.uri.UriGenerators._ import org.scalatest.prop.GeneratorDrivenPropertyChecks -import org.scalatest.{EitherValues, FreeSpec, Matchers, TryValues} +import org.scalatest.{ EitherValues, FreeSpec, Matchers, TryValues } class UriParseSpec extends FreeSpec with GeneratorDrivenPropertyChecks with Matchers with TryValues with EitherValues { @@ -75,7 +75,6 @@ class UriParseSpec extends FreeSpec with GeneratorDrivenPropertyChecks with Matc assert(res.left.value === UriParseError(scheme = Some(IllegalSchemeName("&&")), authority = Some(AuthorityParseError("lo:a:b")))) } - } } diff --git a/src/test/scala/com/agilogy/uri/UriSpec.scala b/src/test/scala/com/agilogy/uri/UriSpec.scala index 0fc921b..ab678f3 100644 --- a/src/test/scala/com/agilogy/uri/UriSpec.scala +++ b/src/test/scala/com/agilogy/uri/UriSpec.scala @@ -1,6 +1,6 @@ package com.agilogy.uri -import org.scalatest.{EitherValues, FreeSpec, Matchers, OptionValues} +import org.scalatest.{ EitherValues, FreeSpec, Matchers, OptionValues } import validation.Validation._ class UriSpec extends FreeSpec with OptionValues with Matchers with EitherValues { diff --git a/src/test/scala/com/agilogy/uri/UriStringValueSpec.scala b/src/test/scala/com/agilogy/uri/UriStringValueSpec.scala index 49bec18..3137a24 100644 --- a/src/test/scala/com/agilogy/uri/UriStringValueSpec.scala +++ b/src/test/scala/com/agilogy/uri/UriStringValueSpec.scala @@ -1,6 +1,6 @@ package com.agilogy.uri -import org.scalatest.{EitherValues, FreeSpec} +import org.scalatest.{ EitherValues, FreeSpec } class UriStringValueSpec extends FreeSpec with EitherValues {