Skip to content

Commit 9046e2c

Browse files
Update scalafmt-core to 3.8.4 (#370)
Co-authored-by: scala-steward <scala-steward>
1 parent 4606413 commit 9046e2c

File tree

37 files changed

+361
-217
lines changed

37 files changed

+361
-217
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Scala Steward: Reformat with scalafmt 3.8.4
2+
f02d45a6f6abeed0724ab0224e05437fc58cbd56

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 3.8.3
1+
version = 3.8.4
22
maxColumn = 120
33
runner.dialect = scala213
44
fileOverride {

examples/play24/app/com/softwaremill/play24/AppApplicationLoader.scala

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ class AppApplicationLoader extends ApplicationLoader {
2424
}
2525

2626
trait AppComponents
27-
extends BuiltInComponents
28-
with NingWSComponents // for wsClient
29-
with DatabaseModule // Database injection
30-
with DaoModule
31-
with ControllerModule // Application controllers
32-
{
27+
extends BuiltInComponents
28+
with NingWSComponents // for wsClient
29+
with DatabaseModule // Database injection
30+
with DaoModule
31+
with ControllerModule // Application controllers
32+
{
3333
implicit val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global
3434

3535
lazy val assets: Assets = wire[Assets]
@@ -48,4 +48,3 @@ with ControllerModule // Application controllers
4848
}
4949

5050
class Z(as: ActorSystem)
51-

examples/play24/app/com/softwaremill/play24/Seed.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import scala.concurrent.duration._
1010
import scala.language.postfixOps
1111

1212
class Seed(
13-
val dbConfig: DatabaseConfig[JdbcProfile],
14-
val coffeeDao: CoffeeDao,
15-
val supplierDao: SupplierDao
13+
val dbConfig: DatabaseConfig[JdbcProfile],
14+
val coffeeDao: CoffeeDao,
15+
val supplierDao: SupplierDao
1616
) {
1717

1818
import dbConfig.driver.api._
@@ -26,17 +26,17 @@ class Seed(
2626

2727
// Insert some suppliers
2828
supplierDao.query += Supplier(101, "Acme, Inc.", "99 Market Street", "Groundsville", "CA", "95199"),
29-
supplierDao.query += Supplier( 49, "Superior Coffee", "1 Party Place", "Mendocino", "CA", "95460"),
30-
supplierDao.query += Supplier(150, "The High Ground", "100 Coffee Lane", "Meadows", "CA", "93966"),
29+
supplierDao.query += Supplier(49, "Superior Coffee", "1 Party Place", "Mendocino", "CA", "95460"),
30+
supplierDao.query += Supplier(150, "The High Ground", "100 Coffee Lane", "Meadows", "CA", "93966"),
3131
// Equivalent SQL code:
3232
// insert into SUPPLIERS(SUP_ID, SUP_NAME, STREET, CITY, STATE, ZIP) values (?,?,?,?,?,?)
3333

3434
// Insert some coffees (using JDBC's batch insert feature, if supported by the DB)
3535
coffeeDao.query ++= Seq(
36-
Coffee("Colombian", 101, 7.99, 0, 0),
37-
Coffee("French_Roast", 49, 8.99, 0, 0),
38-
Coffee("Espresso", 150, 9.99, 0, 0),
39-
Coffee("Colombian_Decaf", 101, 8.99, 0, 0),
36+
Coffee("Colombian", 101, 7.99, 0, 0),
37+
Coffee("French_Roast", 49, 8.99, 0, 0),
38+
Coffee("Espresso", 150, 9.99, 0, 0),
39+
Coffee("Colombian_Decaf", 101, 8.99, 0, 0),
4040
Coffee("French_Roast_Decaf", 49, 9.99, 0, 0)
4141
)
4242
// Equivalent SQL code:

examples/play24/app/com/softwaremill/play24/controllers/CoffeeController.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import play.api.mvc.{Action, Controller}
77
import scala.concurrent.ExecutionContext
88

99
class CoffeeController(
10-
coffeeDao: CoffeeDao
11-
)(implicit ec: ExecutionContext) extends Controller {
10+
coffeeDao: CoffeeDao
11+
)(implicit ec: ExecutionContext)
12+
extends Controller {
1213

1314
def fetchAll() = Action.async { request =>
1415
coffeeDao.all.map { coffees =>

examples/play24/app/com/softwaremill/play24/controllers/SupplierController.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import play.api.mvc.{Action, Controller}
77
import scala.concurrent.ExecutionContext
88

99
class SupplierController(
10-
supplierDao: SupplierDao
11-
)(implicit ec: ExecutionContext) extends Controller {
10+
supplierDao: SupplierDao
11+
)(implicit ec: ExecutionContext)
12+
extends Controller {
1213

1314
def fetchAll() = Action.async { request =>
1415
supplierDao.all.map { suppliers =>

examples/play24/app/com/softwaremill/play24/models/Coffee.scala

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@ package com.softwaremill.play24.models
33
import play.api.libs.json.Json
44
import slick.driver.H2Driver.api._
55

6-
case class Coffee (
7-
name: String,
8-
supId: Int,
9-
price: Double,
10-
sales: Int,
11-
total: Int
6+
case class Coffee(
7+
name: String,
8+
supId: Int,
9+
price: Double,
10+
sales: Int,
11+
total: Int
1212
)
1313

1414
object Coffee {
1515
implicit val format = Json.format[Coffee]
1616
}
1717

18-
1918
class CoffeeTable(tag: Tag) extends Table[Coffee](tag, "COFFEES") {
2019
def name = column[String]("COF_NAME", O.PrimaryKey)
2120
def supID = column[Int]("SUP_ID")
@@ -25,4 +24,4 @@ class CoffeeTable(tag: Tag) extends Table[Coffee](tag, "COFFEES") {
2524
def * = (name, supID, price, sales, total) <> ((Coffee.apply _).tupled, Coffee.unapply)
2625
// A reified foreign key relation that can be navigated to create a join
2726
def supplier = foreignKey("SUP_FK", supID, TableQuery[SupplierTable])(_.id)
28-
}
27+
}

examples/play24/app/com/softwaremill/play24/models/Supplier.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import play.api.libs.json.Json
44
import slick.driver.H2Driver.api._
55

66
case class Supplier(
7-
id: Int,
8-
name: String,
9-
street: String,
10-
city: String,
11-
state: String,
12-
zip: String
7+
id: Int,
8+
name: String,
9+
street: String,
10+
city: String,
11+
state: String,
12+
zip: String
1313
)
1414

1515
object Supplier {
@@ -24,5 +24,5 @@ class SupplierTable(tag: Tag) extends Table[Supplier](tag, "SUPPLIERS") {
2424
def state = column[String]("STATE")
2525
def zip = column[String]("ZIP")
2626
// Every table needs a * projection with the same type as the table's type parameter
27-
def * = (id, name, street, city, state, zip) <> ((Supplier.apply _).tupled, Supplier.unapply)
27+
def * = (id, name, street, city, state, zip) <> ((Supplier.apply _).tupled, Supplier.unapply)
2828
}

examples/play24/test/com/softwaremill/play24/controllers/CoffeeControllerSpec.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ import play.api.test.Helpers._
88

99
import scala.concurrent.Future
1010

11-
/**
12-
* Spec for testing controller logic, independent of external dependencies. Since our controllers don't really have any
13-
* logic, just testing the output
14-
*/
11+
/** Spec for testing controller logic, independent of external dependencies. Since our controllers don't really have any
12+
* logic, just testing the output
13+
*/
1514
class CoffeeControllerSpec extends Specification {
1615
"Coffee Controller" should {
1716
"return all" in new ControllerContext {

examples/play24/test/com/softwaremill/play24/controllers/ControllerContext.scala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ import org.specs2.specification.Scope
77
import scala.concurrent.ExecutionContext
88

99
trait ControllerContext
10-
extends ControllerModule
11-
with MockDaoModule
12-
with MockWsClient
13-
with Scope
14-
with MustThrownExpectations
15-
{
10+
extends ControllerModule
11+
with MockDaoModule
12+
with MockWsClient
13+
with Scope
14+
with MustThrownExpectations {
1615
implicit val ec: ExecutionContext = scala.concurrent.ExecutionContext.Implicits.global
1716
}

0 commit comments

Comments
 (0)