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

- old
+ new

@@ -5,10 +5,12 @@ require 'chamber/binary/travis' require 'chamber/binary/heroku' require 'chamber/commands/show' require 'chamber/commands/files' require 'chamber/commands/secure' +require 'chamber/commands/sign' +require 'chamber/commands/verify' require 'chamber/commands/compare' require 'chamber/commands/initialize' module Chamber module Binary @@ -141,11 +143,32 @@ Commands::Secure.call(options.merge(shell: self)) end ################################################################################ + desc 'sign', 'Creates or verifies signatures for all current settings files using ' \ + 'the signature private key.' + + method_option :verify, + type: :boolean, + default: false + + def sign + if options[:verify] + Commands::Verify.call(options.merge(shell: self)) + else + Commands::Sign.call(options.merge(shell: self)) + end + end + + ################################################################################ + desc 'init', 'Sets Chamber up using best practices for secure configuration ' \ 'management' + + method_option :signature, + type: :boolean, + default: false def init Commands::Initialize.call(options.merge(shell: self)) end end