Class: Chamber::Commands::Travis::Secure

Inherits:
Base
  • Object
show all
Includes:
Securable, Chamber::Commands::Travis
Defined in:
lib/chamber/commands/travis/secure.rb

Instance Method Summary collapse

Methods included from Securable

#initialize

Methods inherited from Base

call, #initialize

Instance Method Details

#callObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/chamber/commands/travis/secure.rb', line 12

def call
  securable_environment_variables.each do |key, value|
    if dry_run
      shell.say_status 'encrypt', key, :blue
    else
      command = first_environment_variable?(key) ? '--override' : '--append'

      shell.say_status 'encrypt', key, :green
      travis_encrypt("#{command} #{key}=#{value}")
    end
  end
end