Sha256: 6fd96df19c169233c942cf6c0d0495ce73fed0f7f36fbd0a5aacb74e90ced1dc

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 KB

Contents

module S3Secure
  class CLI < Command
    class_option :verbose, type: :boolean
    class_option :noop, type: :boolean

    desc "encryption SUBCOMMAND", "encryption subcommands"
    long_desc Help.text(:encryption)
    subcommand "encryption", Encryption

    desc "policy SUBCOMMAND", "policy subcommands"
    long_desc Help.text(:policy)
    subcommand "policy", Policy

    desc "summary", "Summarize buckets"
    long_desc Help.text("summary")
    option :ssl, default: "any", desc: "filter for ssl enforcement. Examples: any, yes, no"
    option :encrypted, default: "any", desc: "filter for encryption enabled. Examples: any, yes, no"
    def summary
      Summary.new(options).run
    end

    desc "batch *PARAMS", "Batch wrapper method"
    long_desc Help.text(:batch)
    def batch(*params)
      Batch.new(*params).run
    end

    desc "completion *PARAMS", "Prints words for auto-completion."
    long_desc Help.text(:completion)
    def completion(*params)
      Completer.new(CLI, *params).run
    end

    desc "completion_script", "Generates a script that can be eval to setup auto-completion."
    long_desc Help.text(:completion_script)
    def completion_script
      Completer::Script.generate
    end

    desc "version", "prints version"
    def version
      puts VERSION
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
s3-secure-0.4.2 lib/s3_secure/cli.rb
s3-secure-0.4.1 lib/s3_secure/cli.rb
s3-secure-0.4.0 lib/s3_secure/cli.rb