@@ -55,11 +55,16 @@ class Application @Inject() (
5555
5656 }
5757 .orElse {
58- if (version.isEmpty ||
58+ if (
59+ version.isEmpty ||
5960 (version.exists(_.startsWith(" 2." )) && ! version.contains(releases.latest2.version)) ||
60- (version.exists(_.startsWith(" 3." )) && ! version.contains(releases.latest3.version))) {
61+ (version.exists(_.startsWith(" 3." )) && ! version.contains(releases.latest3.version))
62+ ) {
6163 Some (
62- s """ Play framework ${if (version.isEmpty || version.exists(_.startsWith(" 3." ))) releases.latest3.version else releases.latest2.version} is out! Check it out <a href=" ${routes.Application .download}">here</a>. """ ,
64+ s """ Play framework ${
65+ if (version.isEmpty || version.exists(_.startsWith(" 3." ))) releases.latest3.version
66+ else releases.latest2.version
67+ } is out! Check it out <a href=" ${routes.Application .download}">here</a>. """ ,
6368 )
6469 } else {
6570 None
@@ -76,15 +81,15 @@ class Application @Inject() (
7681
7782 def widget (version : Option [String ]) = Action .async { request =>
7883 Future .successful(
79- Ok (views.html.widget(news(version)))
84+ Ok (views.html.widget(news(version))),
8085 )
8186 }
8287
8388 // This used to be the download/getting-started page. We are keeping
8489 // the URL for SEO purposes only.
8590 def download = Action .async { implicit request =>
8691 Future .successful(
87- MovedPermanently (routes.Application .gettingStarted.path)
92+ MovedPermanently (routes.Application .gettingStarted.path),
8893 )
8994 }
9095
@@ -106,7 +111,7 @@ class Application @Inject() (
106111 def allreleases (platform : Option [String ] = None ) = Action .async { implicit request =>
107112 val selectedPlatform = Platform (platform.orElse(request.headers.get(" User-Agent" )))
108113 Future .successful(
109- Ok (html.allreleases(releases, selectedPlatform))
114+ Ok (html.allreleases(releases, selectedPlatform)),
110115 )
111116 }
112117
@@ -161,24 +166,24 @@ class Application @Inject() (
161166 page match {
162167 case Some (content) =>
163168 Future .successful(
164- Ok (template(request)(Html (content))).withHeaders(CACHE_CONTROL -> " max-age=10000" )
169+ Ok (template(request)(Html (content))).withHeaders(CACHE_CONTROL -> " max-age=10000" ),
165170 )
166171 case None =>
167172 Future .successful(
168- notFound
173+ notFound,
169174 )
170175 }
171176 }
172177
173178 def getInvolved = Action .async { implicit request =>
174179 Future .successful(
175- Ok (html.getInvolved())
180+ Ok (html.getInvolved()),
176181 )
177182 }
178183
179184 def sponsors = Action .async { implicit request =>
180185 Future .successful(
181- Ok (html.sponsors())
186+ Ok (html.sponsors()),
182187 )
183188 }
184189
@@ -197,15 +202,15 @@ class Application @Inject() (
197202 .replace(" -released" , " " )
198203 .replace(" -" , " ." )
199204 Future .successful(
200- MovedPermanently (s " https://github.com/playframework/playframework/releases/tag/ $version" )
205+ MovedPermanently (s " https://github.com/playframework/playframework/releases/tag/ $version" ),
201206 )
202207 } else if (route.endsWith(" /" )) {
203208 Future .successful(
204- MovedPermanently (" /" + request.path.take(request.path.length - 1 ).dropWhile(_ == '/' ))
209+ MovedPermanently (" /" + request.path.take(request.path.length - 1 ).dropWhile(_ == '/' )),
205210 )
206211 } else {
207212 Future .successful(
208- notFound
213+ notFound,
209214 )
210215 }
211216 }
@@ -244,7 +249,7 @@ class Application @Inject() (
244249 val sections = byVersion.map { case (v, p) =>
245250 val TutorialKeyword = " tutorial" // this MUST be in the project keywords for this to work
246251 val SeedKeyword = " seed"
247- val tutorials = p
252+ val tutorials = p
248253 .filter(e => e.keywords.contains(TutorialKeyword ) && ! e.hasParams)
249254 .groupBy(byLanguage)
250255 .view
0 commit comments