-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add g8ScaffoldForce command to overwrite files
- Loading branch information
Showing
6 changed files
with
46 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...old/src/sbt-test/scaffold/simple/.g8/controller-forcing/app/controllers/$className$.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package controllers | ||
|
||
import play.api._ | ||
import play.api.mvc._ | ||
|
||
object $className$ extends Controller { | ||
|
||
// In the scripted test this file should overwrite the existing controlle file | ||
|
||
def index = Action { | ||
Ok(views.html.index("This application is awesome.")) | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
scaffold/src/sbt-test/scaffold/simple/.g8/controller-forcing/default.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
className=Application |
14 changes: 14 additions & 0 deletions
14
scaffold/src/sbt-test/scaffold/simple/Application_forced.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package controllers | ||
|
||
import play.api._ | ||
import play.api.mvc._ | ||
|
||
object Application extends Controller { | ||
|
||
// In the scripted test this file should overwrite the existing controlle file | ||
|
||
def index = Action { | ||
Ok(views.html.index("This application is awesome.")) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
> g8Scaffold controller --className=Application | ||
|
||
$exists app/controllers/Application.scala | ||
|
||
> g8Scaffold controller-forcing --force --className=Application | ||
|
||
# If files are identical then app/controllers/Application.scala was successfully overwritten | ||
$must-mirror app/controllers/Application.scala Application_forced.scala |