Skip to content

Commit

Permalink
Update scalafmt (#372)
Browse files Browse the repository at this point in the history
* Update scalafmt to 0.5.4

* Reformat after scalafmt update

* Update coursier as recommended by scalafmt
  • Loading branch information
swsnr authored and MasseGuillaume committed Jan 31, 2017
1 parent 3d66d76 commit 3e6511e
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 52 deletions.
11 changes: 10 additions & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
project {
git = true
}

includeCurlyBraceInSelectChains = false
optIn {
breakChainOnFirstMethodDot = false
}

style = default
maxColumn = 100
project.git = true
5 changes: 1 addition & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import ScalaJSHelper._
import org.scalajs.sbtplugin.cross.CrossProject

scalafmtConfig in ThisBuild := Some(file(".scalafmt"))

lazy val akkaVersion = "2.4.11"
lazy val upickleVersion = "0.4.1"
lazy val scalatagsVersion = "0.6.1"
Expand Down Expand Up @@ -147,7 +145,6 @@ lazy val sbtScaladex = project
"-Dplugin.version=" + version.value),
scriptedBufferLog := false,
bintrayRepository := "sbt-plugins",
bintrayOrganization := None,
scalafmt := {}
bintrayOrganization := None
)
.enablePlugins(BintrayPlugin)
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,17 @@ class SeedElasticSearch(paths: DataPaths)(implicit val ec: ExecutionContext)
)

println("creating index")
Await.result(esClient.execute {
create
.index(indexName)
.mappings(
mapping(projectsCollection).fields(projectFields: _*),
mapping(releasesCollection).fields(releasesFields: _*)
)
}, Duration.Inf)
Await.result(
esClient.execute {
create
.index(indexName)
.mappings(
mapping(projectsCollection).fields(projectFields: _*),
mapping(releasesCollection).fields(releasesFields: _*)
)
},
Duration.Inf
)

println("loading update data")
val projectConverter = new ProjectConvert(paths)
Expand Down
3 changes: 2 additions & 1 deletion model/src/main/scala/ch.epfl.scala.index.model/License.scala
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ object License {
val TypesafeSubscriptionAgreement = License(
"Typesafe Subscription Agreement",
"Typesafe Subscription Agreement",
Some("http://downloads.typesafe.com/website/legal/TypesafeSubscriptionAgreement.pdf"))
Some("http://downloads.typesafe.com/website/legal/TypesafeSubscriptionAgreement.pdf")
)
val Unlicense = spdx("Unlicense", "The Unlicense")
val W3C = spdx("W3C", "W3C Software Notice and License")
val WTFPL = spdx("WTFPL", "Do What The F*ck You Want To Public License")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,35 +50,37 @@ object DefaultReleaseTests extends org.specs2.mutable.Specification {
val organization = "typelevel"
val repository = "cats"
val groupdId = "org.typelevel"
val releases = prepare(organization,
repository,
groupdId,
List(
("cats-core_2.11", "0.6.0"),
("cats-core_2.11", "0.6.0-M2"),
("cats-core_2.11", "0.6.0-M1"),
("cats-core_2.11", "0.5.0"),
("cats-core_2.11", "0.4.1"),
("cats-core_2.11", "0.4.0"),
("cats-core_2.10", "0.6.0"),
("cats-core_2.10", "0.6.0-M2"),
("cats-core_2.10", "0.6.0-M1"),
("cats-core_2.10", "0.5.0"),
("cats-core_2.10", "0.4.1"),
("cats-core_2.10", "0.4.0"),
("cats-core_sjs0.6_2.11", "0.6.0"),
("cats-core_sjs0.6_2.11", "0.6.0-M2"),
("cats-core_sjs0.6_2.11", "0.6.0-M1"),
("cats-core_sjs0.6_2.11", "0.5.0"),
("cats-core_sjs0.6_2.11", "0.4.1"),
("cats-core_sjs0.6_2.11", "0.4.0"),
("cats-core_sjs0.6_2.10", "0.6.0"),
("cats-core_sjs0.6_2.10", "0.6.0-M2"),
("cats-core_sjs0.6_2.10", "0.6.0-M1"),
("cats-core_sjs0.6_2.10", "0.5.0"),
("cats-core_sjs0.6_2.10", "0.4.1"),
("cats-core_sjs0.6_2.10", "0.4.0")
))
val releases = prepare(
organization,
repository,
groupdId,
List(
("cats-core_2.11", "0.6.0"),
("cats-core_2.11", "0.6.0-M2"),
("cats-core_2.11", "0.6.0-M1"),
("cats-core_2.11", "0.5.0"),
("cats-core_2.11", "0.4.1"),
("cats-core_2.11", "0.4.0"),
("cats-core_2.10", "0.6.0"),
("cats-core_2.10", "0.6.0-M2"),
("cats-core_2.10", "0.6.0-M1"),
("cats-core_2.10", "0.5.0"),
("cats-core_2.10", "0.4.1"),
("cats-core_2.10", "0.4.0"),
("cats-core_sjs0.6_2.11", "0.6.0"),
("cats-core_sjs0.6_2.11", "0.6.0-M2"),
("cats-core_sjs0.6_2.11", "0.6.0-M1"),
("cats-core_sjs0.6_2.11", "0.5.0"),
("cats-core_sjs0.6_2.11", "0.4.1"),
("cats-core_sjs0.6_2.11", "0.4.0"),
("cats-core_sjs0.6_2.10", "0.6.0"),
("cats-core_sjs0.6_2.10", "0.6.0-M2"),
("cats-core_sjs0.6_2.10", "0.6.0-M1"),
("cats-core_sjs0.6_2.10", "0.5.0"),
("cats-core_sjs0.6_2.10", "0.4.1"),
("cats-core_sjs0.6_2.10", "0.4.0")
)
)

val result =
DefaultRelease(repository, ReleaseSelection(None, None, None), releases, None, true)
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ addSbtPlugin("org.madoushi.sbt" % "sbt-sass" % "0.9.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.1.1")
addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.10")
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.2.11")
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M14")
addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.5.4")
addSbtPlugin("io.get-coursier" % "sbt-coursier" % "1.0.0-M15-1")

libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ class OAuth2(github: Github, session: GithubUserSession) {
get {
path("login") {
headerValueByType[Referer]() { referer =>
redirect(Uri("https://github.com/login/oauth/authorize").withQuery(
Query(
"client_id" -> github.clientId,
"scope" -> "read:org",
"state" -> referer.value
)),
TemporaryRedirect)
redirect(
Uri("https://github.com/login/oauth/authorize").withQuery(
Query(
"client_id" -> github.clientId,
"scope" -> "read:org",
"state" -> referer.value
)),
TemporaryRedirect
)
}
} ~
path("logout") {
Expand Down

0 comments on commit 3e6511e

Please sign in to comment.