lib/chamber/binary/runner.rb in chamber-2.10.2 vs lib/chamber/binary/runner.rb in chamber-2.11.0

- old
+ new

@@ -1,6 +1,7 @@ # frozen_string_literal: true + require 'thor' require 'chamber/rubinius_fix' require 'chamber/binary/travis' require 'chamber/binary/heroku' require 'chamber/commands/show' @@ -44,54 +45,65 @@ aliases: '-p', enum: %w{rails}, desc: 'Used to quickly assign a given scenario to the chamber ' \ 'command (eg Rails apps)' - class_option :decryption_key, - type: :string, - desc: 'The path to or contents of the private key associated with ' \ - 'the project (typically .chamber.pem)' + class_option :decryption_keys, + type: :array, + desc: 'The path to or contents of the private key (or keys) associated ' \ + 'with the project (typically .chamber.pem)' - class_option :encryption_key, - type: :string, - desc: 'The path to or contents of the public key associated with ' \ - 'the project (typically .chamber.pub.pem)' + class_option :encryption_keys, + type: :array, + desc: 'The path to or contents of the public key (or keys) associated ' \ + 'with the project (typically .chamber.pub.pem)' + ################################################################################ + desc 'travis SUBCOMMAND ...ARGS', 'For manipulating Travis CI environment variables' subcommand 'travis', Chamber::Binary::Travis + ################################################################################ + desc 'heroku SUBCOMMAND ...ARGS', 'For manipulating Heroku environment variables' subcommand 'heroku', Chamber::Binary::Heroku + ################################################################################ + desc 'show', 'Displays the list of settings and their values' method_option :as_env, type: :boolean, aliases: '-e', desc: 'Whether the displayed settings should be environment ' \ 'variable compatible' - desc 'only_sensitive', 'Only show secured/securable settings' - method_option :only_sensitive, type: :boolean, aliases: '-s', desc: 'Only displays the settings that are/should be secured. ' \ 'Useful for debugging.' def show puts Commands::Show.call(options.merge(shell: self)) end + ################################################################################ + desc 'files', 'Lists the settings files which are parsed with the given options' + def files puts Commands::Files.call(options.merge(shell: self)) end - desc 'compare', 'Displays the difference between what is currently stored in the ' \ - 'Heroku application\'s config and what Chamber knows about locally' + ################################################################################ + desc 'compare', 'Displays the difference between the settings in the first set ' \ + 'of namespaces and the settings in the second set. Useful for ' \ + 'tracking down why there may be issues in development versus test ' \ + 'or differences between staging and production.' + method_option :keys_only, type: :boolean, default: true, desc: 'Whether or not to only compare the keys but not the values ' \ 'of the two sets of settings' @@ -108,10 +120,12 @@ def compare Commands::Compare.call(options.merge(shell: self)) end + ################################################################################ + desc 'secure', 'Secures any values which appear to need to be encrypted in any of ' \ 'the settings files which match irrespective of namespaces' method_option :only_sensitive, type: :boolean, @@ -125,10 +139,12 @@ def secure Commands::Secure.call(options.merge(shell: self)) end - desc 'init', 'Sets Chamber up matching best practices for secure configuration ' \ + ################################################################################ + + desc 'init', 'Sets Chamber up using best practices for secure configuration ' \ 'management' def init Commands::Initialize.call(options.merge(shell: self)) end