15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/rncher/cli.rb', line 15
def setup
if !Credential.exists?
Credential.set_credentials({})
end
content = Credential.load_credentials
content[options[:name].to_sym] = {
access_key: options[:access_key],
secret_key: options[:secret_key],
host: options[:host],
env: options[:env]
}
content[:default] = {
access_key: options[:access_key],
secret_key: options[:secret_key],
host: options[:host],
env: options[:env]
} if options[:default]==true
Credential.set_credentials(content)
puts 'Done!'
end
|