class Sekrit::CLI

Public Instance Methods

pull() click to toggle source
# File lib/sekrit.rb, line 47
def pull
  configure_logger(verbose: options[:verbose])
  driver = lambda do |bundle_id, config, passphrase|
    Pull.new(
      bundle_id: bundle_id,
      config: config,
      passphrase: passphrase
    )
  end

  runner = Runner.new(name: 'Pull', options: options, driver: driver)
  runner.run
end
push() click to toggle source
# File lib/sekrit.rb, line 27
def push
  configure_logger(verbose: options[:verbose])
  driver = lambda do |bundle_id, config, passphrase|
    Push.new(
      bundle_id: bundle_id,
      config: config,
      passphrase: passphrase
    )
  end

  runner = Runner.new(name: 'Push', options: options, driver: driver)
  runner.run
end

Private Instance Methods

configure_logger(verbose: Boolean) click to toggle source
# File lib/sekrit.rb, line 63
def configure_logger(verbose: Boolean)
  log.level = verbose ? Logger::DEBUG : Logger::INFO
end