Class: SecretsFetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/renuo/cli/app/secrets_fetcher.rb

Instance Method Summary collapse

Instance Method Details

#runObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/renuo/cli/app/secrets_fetcher.rb', line 10

def run
  system("which op > /dev/null") || abort("op is not installed. Please install it (e.g. brew install 1password-cli).")

  abort("Config file #{CONFIG_FILE} not found.") unless File.exist?(CONFIG_FILE)
  config = YAML.load_file(CONFIG_FILE).deep_symbolize_keys

  config[:items].each do |item|
    elaborate_item(item)
  end
end