Skip to content

Commit

Permalink
Shell: Implement -force for create-* YML commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Graeme Rocher authored and Graeme Rocher committed Feb 11, 2015
1 parent 2dd96b3 commit 2ff83e7
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 23 deletions.
6 changes: 4 additions & 2 deletions commands/create-controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ description:
- Creates a controller
- usage: 'create-controller [controller name]'
- completer: org.grails.cli.interactive.completers.DomainClassCompleter
- argument: "Controller Name"
description: "The name of the controller"
- argument: Controller Name
description: The name of the controller
- flag: force
description: Whether to override existing files
steps:
- command: render
template: templates/artifacts/Controller.groovy
Expand Down
7 changes: 5 additions & 2 deletions commands/create-integration-test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
description:
description:
- Creates an integration test
- usage: 'create-integration-test [test name]'
- completer: org.grails.cli.interactive.completers.AllClassCompleter
- argument: "Integration Test Name"
description: "The name of the integration test"
description: "The name of the integration test"
- flag: force
description: Whether to override existing files

steps:
- command: render
template: templates/testing/Integration.groovy
Expand Down
4 changes: 3 additions & 1 deletion commands/create-interceptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ description:
- completer: org.grails.cli.interactive.completers.DomainClassCompleter
- argument: "Interceptor name"
description: "The name of the interceptor"
- flag: force
description: Whether to override existing files

steps:
- command: render
template: templates/artifacts/Interceptor.groovy
Expand All @@ -13,4 +16,3 @@ steps:
template: templates/testing/Interceptor.groovy
convention: Interceptor
destination: src/test/groovy/@artifact.package.path@/@[email protected]

18 changes: 0 additions & 18 deletions commands/create-taglib.json

This file was deleted.

17 changes: 17 additions & 0 deletions commands/create-taglib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
description:
- Creates a Tag Library
- usage: 'create-taglib [taglib name]'
- completer: org.grails.cli.interactive.completers.DomainClassCompleter
- argument: Tag Library Name
description: The name of the tag library
- flag: force
description: Whether to override existing files
steps:
- command: render
template: templates/artifacts/TagLib.groovy
convention: TagLib
destination: grails-app/taglib/@artifact.package.path@/@[email protected]
- command: render
template: templates/testing/TagLib.groovy
convention: TagLib
destination: src/test/groovy/@artifact.package.path@/@[email protected]

0 comments on commit 2ff83e7

Please sign in to comment.