Skip to content

Commit

Permalink
add -t alias for backup generate:model --trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian D. Burns committed Mar 1, 2013
1 parent 752b4f4 commit 8dc7425
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/backup/cli.rb
Expand Up @@ -147,7 +147,7 @@ def perform
"\s\sThe model file will be created as '<config_path>/models/<trigger>.rb'\n\n" +
"\s\sDefault: #{Config.root_path}\n\n"

method_option :trigger, :type => :string, :required => true
method_option :trigger, :type => :string, :required => true, :aliases => '-t'
method_option :config_path, :type => :string,
:desc => 'Path to your Backup configuration directory'

Expand Down
24 changes: 12 additions & 12 deletions spec/cli_spec.rb
Expand Up @@ -461,19 +461,19 @@

it 'should generate the proper help output' do

expected_usage = "#{ File.basename($0) } generate:model --trigger=TRIGGER"
expected_usage = "#{ File.basename($0) } generate:model -t, --trigger=TRIGGER"
expected_options = <<-EOS
--trigger=TRIGGER
[--config-path=CONFIG_PATH] # Path to your Backup configuration directory
[--databases=DATABASES] # (mongodb, mysql, postgresql, redis, riak)
[--storages=STORAGES] # (cloud_files, dropbox, ftp, local, ninefold, rsync, s3, scp, sftp)
[--syncers=SYNCERS] # (cloud_files, rsync_local, rsync_pull, rsync_push, s3)
[--encryptors=ENCRYPTORS] # (gpg, openssl)
[--compressors=COMPRESSORS] # (bzip2, custom, gzip, lzma, pbzip2)
[--notifiers=NOTIFIERS] # (campfire, hipchat, mail, prowl, pushover, twitter)
[--archives]
[--splitter] # use `--no-splitter` to disable
# Default: true
-t, --trigger=TRIGGER
[--config-path=CONFIG_PATH] # Path to your Backup configuration directory
[--databases=DATABASES] # (mongodb, mysql, postgresql, redis, riak)
[--storages=STORAGES] # (cloud_files, dropbox, ftp, local, ninefold, rsync, s3, scp, sftp)
[--syncers=SYNCERS] # (cloud_files, rsync_local, rsync_pull, rsync_push, s3)
[--encryptors=ENCRYPTORS] # (gpg, openssl)
[--compressors=COMPRESSORS] # (bzip2, custom, gzip, lzma, pbzip2)
[--notifiers=NOTIFIERS] # (campfire, hipchat, mail, prowl, pushover, twitter)
[--archives]
[--splitter] # use `--no-splitter` to disable
# Default: true
EOS
expected_description = <<-EOS
Generates a Backup model file.
Expand Down

0 comments on commit 8dc7425

Please sign in to comment.