Sha256: f3016ead45bcfb2eef09bbebc5eec4208fee03a10092657e7f516f7f7d50d181
Contents?: true
Size: 900 Bytes
Versions: 5
Compression:
Stored size: 900 Bytes
Contents
require "thor" # Override thor's long_desc identation behavior # https://github.com/erikhuda/thor/issues/398 class Thor module Shell class Basic def print_wrapped(message, options = {}) message = "\n#{message}" unless message[0] == "\n" stdout.puts message end end end end module AwsRds class Command < Thor class << self def dispatch(m, args, options, config) # Allow calling for help via: # aws_rds command help # aws_rds command -h # aws_rds command --help # aws_rds command -D # # as well thor's normal way: # # aws_rds help command help_flags = Thor::HELP_MAPPINGS + ["help"] if args.length > 1 && !(args & help_flags).empty? args -= help_flags args.insert(-2, "help") end super end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
aws-rds-0.6.0 | lib/aws_rds/command.rb |
aws-rds-0.5.0 | lib/aws_rds/command.rb |
aws-rds-0.4.0 | lib/aws_rds/command.rb |
aws-rds-0.3.0 | lib/aws_rds/command.rb |
aws-rds-0.2.0 | lib/aws_rds/command.rb |