Skip to content

Commit

Permalink
Updated scala, sbt and more (#716)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixoi authored Dec 5, 2018
1 parent afdff49 commit bdbe5a1
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jdk:
- openjdk8

scala:
- 2.12.6
- 2.12.8

services: postgresql

Expand Down
4 changes: 1 addition & 3 deletions app/controllers/Organizations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ class Organizations @Inject()(forms: OreForms)(
* @return Json response with errors if any
*/
def updateAvatar(organization: String): Action[AnyContent] = EditOrganizationAction(organization) {
implicit request =>
// TODO implement me
Ok
Ok
}

/**
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/Users.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Users @Inject()(
*
* @return Logged in page
*/
def signUp(): Action[AnyContent] = Action.asyncF { implicit request =>
def signUp(): Action[AnyContent] = Action.asyncF {
val nonce = SingleSignOnConsumer.nonce
this.signOns.add(SignOn(nonce = nonce)) *> redirectToSso(this.sso.getSignupUrl(this.baseUrl + "/login", nonce))
}
Expand Down Expand Up @@ -114,7 +114,7 @@ class Users @Inject()(
* @param returnPath Verified action to perform
* @return Redirect to verification
*/
def verify(returnPath: Option[String]): Action[AnyContent] = Authenticated.asyncF { implicit request =>
def verify(returnPath: Option[String]): Action[AnyContent] = Authenticated.asyncF {
val nonce = SingleSignOnConsumer.nonce
this.signOns
.add(SignOn(nonce = nonce)) *> redirectToSso(
Expand All @@ -135,7 +135,7 @@ class Users @Inject()(
*
* @return Home page
*/
def logOut(): Action[AnyContent] = Action { implicit request =>
def logOut(): Action[AnyContent] = Action {
Redirect(config.security.api.url + "/accounts/logout/")
.clearingSession()
.flashing("noRedirect" -> "true")
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/project/Projects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class Projects @Inject()(stats: StatTracker, forms: OreForms, factory: ProjectFa
* @param slug Project slug
* @return Project icon
*/
def showIcon(author: String, slug: String): Action[AnyContent] = Action.asyncF { implicit request =>
def showIcon(author: String, slug: String): Action[AnyContent] = Action.asyncF {
// TODO maybe instead of redirect cache this on ore?
projects
.withSlug(author, slug)
Expand Down
2 changes: 1 addition & 1 deletion app/views/projects/view.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ <h1>
@if(!noButtons) {
<div class="pull-right project-controls">

@flash.get("reported").map { r =>
@flash.get("reported").map { _ =>
<span class="flag-msg">
<i class="fa fa-thumbs-up"></i> Flag submitted for review
</span>
Expand Down
6 changes: 3 additions & 3 deletions app/views/users/admin/userAdmin.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ <h1>@prefix<a href="@routes.Users.showProjects(user.user.name, None)">@user.user
<div class="row">
@if(!user.isOrga) {
@panel("Organizations") {
@roleTable[Organization, OrganizationUserRole]("Organization", "orgRole", withOwner = true, user.orgas.map(t => (t._1, t._3, t._4.name)).toSet, orgRoles) { (org, role) =>
@roleTable[Organization, OrganizationUserRole]("Organization", "orgRole", withOwner = true, user.orgas.map(t => (t._1, t._3, t._4.name)).toSet, orgRoles) { (org, _) =>
<a href="@routes.Application.userAdmin(org.name)">
@org.name
</a>
}
}
} else {
@panel("Members") {
@roleTable[User, OrganizationUserRole]("User", "memberRole", withOwner = false, orga.get.members.map(t => (t._2, t._1, null)).toSet, orgRoles) { (user, role) =>
@roleTable[User, OrganizationUserRole]("User", "memberRole", withOwner = false, orga.get.members.map(t => (t._2, t._1, null)).toSet, orgRoles) { (user, _) =>
<a href="@routes.Application.userAdmin(user.name)">
@user.name
</a>
Expand All @@ -87,7 +87,7 @@ <h1>@prefix<a href="@routes.Users.showProjects(user.user.name, None)">@user.user
@if(!user.isOrga) {
<div class="row">
@panel("Projects") {
@roleTable[Project, ProjectUserRole]("Project", "projectRole", withOwner = true, userProjectRoles.map(t => (t._1, t._2, t._1.ownerName)).toSet, projectRoles) { (project, role) =>
@roleTable[Project, ProjectUserRole]("Project", "projectRole", withOwner = true, userProjectRoles.map(t => (t._1, t._2, t._1.ownerName)).toSet, projectRoles) { (project, _) =>
<a href="@controllers.project.routes.Projects.show(project.ownerName, project.slug)">
@project.name
</a>
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/view.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

@alert("error")

@flash.get("pgp-updated").map { updated =>
@flash.get("pgp-updated").map { _ =>
<script nonce="@nonce">
$(function() {
$('#modal-pgp-edit').modal('show');
Expand Down
17 changes: 8 additions & 9 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version := "1.6.20"

lazy val `ore` = (project in file(".")).enablePlugins(PlayScala)

scalaVersion := "2.12.6"
scalaVersion := "2.12.8"
scalacOptions ++= Seq(
"-deprecation",
"-encoding",
Expand Down Expand Up @@ -39,13 +39,12 @@ scalacOptions ++= Seq(
"-Ywarn-nullary-unit",
"-Ywarn-unused:implicits",
"-Ywarn-unused:locals",
"-Ywarn-unused:params",
"-Ywarn-unused:patvars",
"-Ywarn-unused:privates",
"-Ywarn-value-discard"
)
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.8")
addCompilerPlugin(("org.scalamacros" % "paradise" % "2.1.0").cross(CrossVersion.full))
addCompilerPlugin("org.spire-math" %% "kind-projector" % "0.9.9")
addCompilerPlugin(("org.scalamacros" % "paradise" % "2.1.1").cross(CrossVersion.full))

routesGenerator := InjectedRoutesGenerator
routesImport ++= Seq(
Expand All @@ -67,7 +66,7 @@ lazy val doobieVersion = "0.6.0"

libraryDependencies ++= Seq(ehcache, ws, guice)

lazy val flexmarkVersion = "0.34.52"
lazy val flexmarkVersion = "0.34.58"
lazy val bouncycastleVersion = "1.60"
lazy val playSlickVersion = "3.0.3"
lazy val slickPgVersion = "0.16.3"
Expand All @@ -80,16 +79,16 @@ libraryDependencies ++= Seq(
"org.postgresql" % "postgresql" % "42.2.5",
"com.github.tminglei" %% "slick-pg" % slickPgVersion,
"com.github.tminglei" %% "slick-pg_play-json" % slickPgVersion,
"com.fasterxml.jackson.core" % "jackson-databind" % "2.8.11.2",
"io.sentry" % "sentry-logback" % "1.7.12",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.8.11.3",
"io.sentry" % "sentry-logback" % "1.7.15",
"org.bouncycastle" % "bcprov-jdk15on" % bouncycastleVersion,
"org.bouncycastle" % "bcpkix-jdk15on" % bouncycastleVersion,
"org.bouncycastle" % "bcpg-jdk15on" % bouncycastleVersion,
"javax.mail" % "mail" % "1.4.7",
"com.beachape" %% "enumeratum" % "1.5.13",
"com.beachape" %% "enumeratum-slick" % "1.5.15",
"com.chuusai" %% "shapeless" % "2.3.3",
"org.typelevel" %% "cats-core" % "1.4.0",
"org.typelevel" %% "cats-core" % "1.5.0",
"com.github.mpilquist" %% "simulacrum" % "0.14.0",
"org.tpolecat" %% "doobie-core" % doobieVersion,
"org.tpolecat" %% "doobie-postgres" % doobieVersion,
Expand All @@ -106,7 +105,7 @@ libraryDependencies ++= Seq(
"org.webjars.npm" % "filesize" % "3.6.1",
"org.webjars.npm" % "moment" % "2.22.2",
"org.webjars.npm" % "clipboard" % "2.0.1",
"org.webjars.npm" % "chart.js" % "2.7.2"
"org.webjars.npm" % "chart.js" % "2.7.3"
)

libraryDependencies ++= Seq(
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.1
sbt.version=1.2.7

0 comments on commit bdbe5a1

Please sign in to comment.