From 118d02aafff7d325d97f9d0f0ef9d53ed1197083 Mon Sep 17 00:00:00 2001 From: Nick Wilson Date: Thu, 21 Dec 2017 11:18:48 +0000 Subject: [PATCH 1/3] Fix hardcoded name in options model --- src/main/scaffolds/optionsPage/app/models/$className$.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scaffolds/optionsPage/app/models/$className$.scala b/src/main/scaffolds/optionsPage/app/models/$className$.scala index 1bbe28ee..28ca89c4 100644 --- a/src/main/scaffolds/optionsPage/app/models/$className$.scala +++ b/src/main/scaffolds/optionsPage/app/models/$className$.scala @@ -15,7 +15,7 @@ object $className$ { val options: Set[RadioOption] = values.map { value => - RadioOption("myOptionsPage", value.toString) + RadioOption("$className;format="decap"$", value.toString) } implicit val enumerable: Enumerable[$className$] = From b02d34009ef725df3f7b9eee1d3633ee84072e30 Mon Sep 17 00:00:00 2001 From: Nick Wilson Date: Thu, 21 Dec 2017 11:31:41 +0000 Subject: [PATCH 2/3] Remove redundant imports in page scaffold --- .../page/app/controllers/$className$Controller.scala | 5 ----- .../page/app/views/$className__decap$.scala.html | 4 ---- .../controllers/$className$ControllerSpec.scala | 7 ------- .../page/generated-test/views/$className$ViewSpec.scala | 8 ++------ 4 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/main/scaffolds/page/app/controllers/$className$Controller.scala b/src/main/scaffolds/page/app/controllers/$className$Controller.scala index eadb1656..62ec758c 100644 --- a/src/main/scaffolds/page/app/controllers/$className$Controller.scala +++ b/src/main/scaffolds/page/app/controllers/$className$Controller.scala @@ -2,15 +2,10 @@ package controllers import javax.inject.Inject -import play.api.data.Form import play.api.i18n.{I18nSupport, MessagesApi} import uk.gov.hmrc.play.bootstrap.controller.FrontendController -import connectors.DataCacheConnector import controllers.actions._ import config.FrontendAppConfig -import forms.BooleanForm -import models.Mode -import utils.{Navigator, UserAnswers} import views.html.$className;format="decap"$ import scala.concurrent.Future diff --git a/src/main/scaffolds/page/app/views/$className__decap$.scala.html b/src/main/scaffolds/page/app/views/$className__decap$.scala.html index 332ab1cf..4262965b 100644 --- a/src/main/scaffolds/page/app/views/$className__decap$.scala.html +++ b/src/main/scaffolds/page/app/views/$className__decap$.scala.html @@ -1,8 +1,4 @@ @import config.FrontendAppConfig -@import uk.gov.hmrc.play.views.html._ -@import controllers.routes._ -@import models.Mode -@import utils.FormHelpers @(appConfig: FrontendAppConfig)(implicit request: Request[_], messages: Messages) diff --git a/src/main/scaffolds/page/generated-test/controllers/$className$ControllerSpec.scala b/src/main/scaffolds/page/generated-test/controllers/$className$ControllerSpec.scala index fd96016e..81983640 100644 --- a/src/main/scaffolds/page/generated-test/controllers/$className$ControllerSpec.scala +++ b/src/main/scaffolds/page/generated-test/controllers/$className$ControllerSpec.scala @@ -1,14 +1,7 @@ package controllers -import play.api.data.Form -import play.api.libs.json.JsBoolean -import uk.gov.hmrc.http.cache.client.CacheMap -import utils.FakeNavigator -import connectors.FakeDataCacheConnector import controllers.actions._ import play.api.test.Helpers._ -import forms.BooleanForm -import models.NormalMode import views.html.$className;format="decap"$ class $className$ControllerSpec extends ControllerSpecBase { diff --git a/src/main/scaffolds/page/generated-test/views/$className$ViewSpec.scala b/src/main/scaffolds/page/generated-test/views/$className$ViewSpec.scala index d866c013..71e102ca 100644 --- a/src/main/scaffolds/page/generated-test/views/$className$ViewSpec.scala +++ b/src/main/scaffolds/page/generated-test/views/$className$ViewSpec.scala @@ -1,13 +1,9 @@ package views -import play.api.data.Form -import controllers.routes -import forms.BooleanForm -import views.behaviours.YesNoViewBehaviours -import models.NormalMode +import views.behaviours.ViewBehaviours import views.html.$className;format="decap"$ -class $className$ViewSpec extends YesNoViewBehaviours { +class $className$ViewSpec extends ViewBehaviours { val messageKeyPrefix = "$className;format="decap"$" From 71d6430a63bec8c73cd7b2c5cd6c0962974535ad Mon Sep 17 00:00:00 2001 From: Nick Wilson Date: Thu, 21 Dec 2017 12:14:12 +0000 Subject: [PATCH 3/3] Prepare v0.4.1 --- CHANGELOG.md | 6 ++++++ src/main/g8/project/build.properties | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0062e01..b4f07c94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). +## v0.4.1 - 2017-12-21 + +### Fixed +* Hardcoded name in options model +* Unnecessary imports + ## v0.4.0 - 2017-12-21 ### Changed diff --git a/src/main/g8/project/build.properties b/src/main/g8/project/build.properties index 12174b28..2217d383 100644 --- a/src/main/g8/project/build.properties +++ b/src/main/g8/project/build.properties @@ -1,2 +1,2 @@ sbt.version=0.13.15 -hmrc-frontend-scaffold.version=0.4.0 +hmrc-frontend-scaffold.version=0.4.1