1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Default the application name to Application when using --apply-to

git-svn-id: http://svn.rubyonrails.org/rails/tools/switchtower@2118 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jamis Buck 2005-09-03 15:27:26 +00:00
parent 1fcaf4e065
commit fb5144ca96
2 changed files with 5 additions and 6 deletions

View file

@ -1,5 +1,7 @@
*SVN* *SVN*
* Default the application name to "Application" when using --apply-to
* Show the help screen instead of an error when no arguments are given * Show the help screen instead of an error when no arguments are given
* Make SwitchTower easier to invoke programmatically via SwitchTower::CLI * Make SwitchTower easier to invoke programmatically via SwitchTower::CLI

View file

@ -72,7 +72,7 @@ module SwitchTower
opts.separator "Framework Integration Options --------" opts.separator "Framework Integration Options --------"
opts.separator "" opts.separator ""
opts.on("-A", "--apply-to [DIRECTORY]", opts.on("-A", "--apply-to DIRECTORY",
"Create a minimal set of scripts and recipes to use", "Create a minimal set of scripts and recipes to use",
"switchtower with the application at the given", "switchtower with the application at the given",
"directory. (Currently only works with Rails apps.)" "directory. (Currently only works with Rails apps.)"
@ -112,10 +112,9 @@ module SwitchTower
opts.separator <<DETAIL.split(/\n/) opts.separator <<DETAIL.split(/\n/)
You can use the --apply-to switch to generate a minimal set of switchtower You can use the --apply-to switch to generate a minimal set of switchtower
scripts and recipes for an application. Just specify the path to the application scripts and recipes for an application. Just specify the path to the application
as the argument to --apply-to, and then specify the name of your application, as the argument to --apply-to, like this:
like this:
switchtower --apply-to ~/projects/myapp MyApplication switchtower --apply-to ~/projects/myapp
You'll wind up with a sample deployment recipe in config/deploy.rb, some new You'll wind up with a sample deployment recipe in config/deploy.rb, some new
rake tasks in config/tasks, and a switchtower script in your script directory. rake tasks in config/tasks, and a switchtower script in your script directory.
@ -197,8 +196,6 @@ DETAIL
else else
@options[:application] = args.shift @options[:application] = args.shift
@options[:recipe_file] = args.shift @options[:recipe_file] = args.shift
abort "You must specify the name of the application" if @options[:application].nil?
end end
end end
end end