Skip to content

Commit

Permalink
GRAILS-9714 Add usage descriptions to several scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderzeillinger authored and Jeff Brown committed Jan 4, 2013
1 parent 2074227 commit 22c9ebd
Show file tree
Hide file tree
Showing 13 changed files with 102 additions and 11 deletions.
8 changes: 8 additions & 0 deletions scripts/CreateController.groovy
Expand Up @@ -43,3 +43,11 @@ target ('default': "Creates a new controller") {
} }


} }

USAGE = """
create-controller [NAME]
where
NAME = The name of the controller. If not provided, this
command will ask you for the name.
"""
8 changes: 8 additions & 0 deletions scripts/CreateDomainClass.groovy
Expand Up @@ -35,3 +35,11 @@ target ('default': "Creates a new domain class") {
createUnitTest(name: name, suffix: "") createUnitTest(name: name, suffix: "")
} }
} }

USAGE = """
create-domain-class [NAME]
where
NAME = The name of the domain class. If not provided, this
command will ask you for the name.
"""
8 changes: 8 additions & 0 deletions scripts/CreateFilters.groovy
Expand Up @@ -39,3 +39,11 @@ target ('default': "Creates a new filters class") {
createUnitTest(name: name, suffix: type) createUnitTest(name: name, suffix: type)
} }
} }

USAGE = """
create-filters [NAME]
where
NAME = The name of the filters class. If not provided, this
command will ask you for the name.
"""
8 changes: 8 additions & 0 deletions scripts/CreateIntegrationTest.groovy
Expand Up @@ -35,3 +35,11 @@ target ('default': "Creates a new Grails integration test which loads the whole
createIntegrationTest(name: name, suffix: "", testType:"Generic") createIntegrationTest(name: name, suffix: "", testType:"Generic")
} }
} }

USAGE = """
create-integration-test [NAME]
where
NAME = The name of the controller. If not provided, this
command will ask you for the name.
"""
7 changes: 4 additions & 3 deletions scripts/CreatePlugin_.groovy
Expand Up @@ -28,8 +28,9 @@ includeTargets << grailsScript("_GrailsCreateProject")
setDefaultTarget("createPlugin") setDefaultTarget("createPlugin")


USAGE = """ USAGE = """
create-plugin <pluginName> create-plugin [NAME]
where where
pluginName = the name of the new plugin NAME = The name of the plugin. If not provided, this
""" command will ask you for the name.
"""
17 changes: 9 additions & 8 deletions scripts/CreateScaffoldController.groovy
Expand Up @@ -26,14 +26,6 @@
includeTargets << grailsScript("_GrailsInit") includeTargets << grailsScript("_GrailsInit")
includeTargets << grailsScript("_GrailsCreateArtifacts") includeTargets << grailsScript("_GrailsCreateArtifacts")


USAGE = """
create-scaffold-controller [DOMAIN ...]
where
DOMAIN = The name, including package, of a domain class to create
a scaffolding controller for. (default: prompts for a name)
"""

target (default: "Creates a new scaffolding controller for a domain class") { target (default: "Creates a new scaffolding controller for a domain class") {
depends(checkVersion, parseArguments) depends(checkVersion, parseArguments)


Expand Down Expand Up @@ -65,3 +57,12 @@ target (default: "Creates a new scaffolding controller for a domain class") {
} }


} }

USAGE = """
create-scaffold-controller [NAME]
where
NAME = The name, including package, of the domain class to create
a scaffolded controller for. If not provided, this
command will ask you for the name.
"""
8 changes: 8 additions & 0 deletions scripts/CreateScript.groovy
Expand Up @@ -36,3 +36,11 @@ target ('default': "Creates a Grails Gant Script") {
path: "scripts", skipPackagePrompt: true) path: "scripts", skipPackagePrompt: true)
} }
} }

USAGE = """
create-script [NAME]
where
NAME = The name of the script. If not provided, this
command will ask you for the name.
"""
8 changes: 8 additions & 0 deletions scripts/CreateService.groovy
Expand Up @@ -39,3 +39,11 @@ target ('default': "Creates a new service class") {
createUnitTest(name: name, suffix: type) createUnitTest(name: name, suffix: type)
} }
} }

USAGE = """
create-service [NAME]
where
NAME = The name of the service. If not provided, this
command will ask you for the name.
"""
8 changes: 8 additions & 0 deletions scripts/CreateTagLib.groovy
Expand Up @@ -37,3 +37,11 @@ target ('default': "Creates a new tag library") {
createUnitTest(name: name, suffix: type, superClass: "TagLibUnitTestCase") createUnitTest(name: name, suffix: type, superClass: "TagLibUnitTestCase")
} }
} }

USAGE = """
create-tab-lib [NAME]
where
NAME = The name of the tag library. If not provided, this
command will ask you for the name.
"""
8 changes: 8 additions & 0 deletions scripts/CreateUnitTest.groovy
Expand Up @@ -36,3 +36,11 @@ target ('default': "Creates a new Grails unit test. A unit test requires that yo
createUnitTest(name: name, suffix: "", testType:"UnitTest") createUnitTest(name: name, suffix: "", testType:"UnitTest")
} }
} }

USAGE = """
create-unit-test [NAME]
where
NAME = The name of the controller. If not provided, this
command will ask you for the name.
"""
9 changes: 9 additions & 0 deletions scripts/GenerateController.groovy
Expand Up @@ -37,3 +37,12 @@ target ('default': "Generates the CRUD controller for a specified domain class")
generateForOne() generateForOne()
} }
} }

USAGE = """
generate-controller [NAME]
where
NAME = Either a domain class name (case-sensitive) or a
wildcard (*). If you specify the wildcard then
controllers will be generated for all domain classes.
"""
9 changes: 9 additions & 0 deletions scripts/GenerateViews.groovy
Expand Up @@ -37,3 +37,12 @@ target ('default': "Generates the CRUD views for a specified domain class") {
generateForOne() generateForOne()
} }
} }

USAGE = """
generate-views [NAME]
where
NAME = Either a domain class name (case-sensitive) or a
wildcard (*). If you specify the wildcard then
views will be generated for all domain classes.
"""
7 changes: 7 additions & 0 deletions scripts/SetVersion.groovy
Expand Up @@ -83,3 +83,10 @@ target ('default': "Sets the current application version") {
event("StatusFinal", [ "Application version updated to $newVersion"]) event("StatusFinal", [ "Application version updated to $newVersion"])
} }
} }

USAGE = """
set-version [NUMBER]
where
NUMBER = The number to set the current application version to.
"""

0 comments on commit 22c9ebd

Please sign in to comment.