Class: Chamber::Commands::Unsecure

Inherits:
Base
  • Object
show all
Includes:
Securable
Defined in:
lib/chamber/commands/unsecure.rb

Instance Attribute Summary

Attributes inherited from Base

#chamber, #dry_run, #rootpath, #shell

Instance Method Summary collapse

Methods inherited from Base

call

Constructor Details

#initialize(**args) ⇒ Unsecure

Returns a new instance of Unsecure.



11
12
13
# File 'lib/chamber/commands/unsecure.rb', line 11

def initialize(**args)
  super(**args.merge(namespaces: ['*']))
end

Instance Method Details

#callObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/chamber/commands/unsecure.rb', line 15

def call
  disable_warnings do
    current_settings.secure.to_environment.each_key do |key|
      color = dry_run ? :blue : :green

      shell.say_status 'decrypt', key, color
    end
  end

  chamber.unsecure unless dry_run
end