6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/ocean_kit/resources/config.rb', line 6
def setup
Dir.mkdir(File.expand_path("~/.ocean_kit")) unless File.directory?(File.expand_path("~/.ocean_kit"))
unless File.file?(File.expand_path("~/.ocean_kit/credentials.yml"))
File.write(File.expand_path("~/.ocean_kit/credentials.yml"), <<~YAML)
---
digital_ocean_token: <YOUR_DIGITAL_OCEAN_TOKEN>
YAML
end
puts pastel.green.bold("Successfully setup OceanKit environment.")
puts pastel.white.bold("Please add your Digital Ocean personal access token your credentials in ~/.ocean_kit/credentials.yml") if access_token.nil?
end
|