4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/feefi/setup.rb', line 4
def create_feefi_config()
puts "Setting up #{Feefi::FEEFI_CONFIG_FILE} ..."
unless Dir.exists? Feefi::FEEFI_CONFIG_PATH
Dir.mkdir(Feefi::FEEFI_CONFIG_PATH) end
if File.exist?(Feefi::FEEFI_CONFIG_FILE)
puts "Config file: #{Feefi::FEEFI_CONFIG_FILE} already exists!"
else
content =
{:apps => [{
:name => 'my_beanstalk_app',
:beanstalk_config => {},
:aws_id => 'ASADFADFSDF',
:aws_secret => '!@#$!@#!@$',
:environments => ['staging','production']},
{
:name => 'my_beanstalk_app2',
:beanstalk_config => {},
:aws_id => 'ASADFADFSDF',
:aws_secret => '!@#$!@#!@$',
:environments => ['staging','production']}
]
}.to_yaml
File.open(Feefi::FEEFI_CONFIG_FILE,'w') do |f|
f << content
end
end
end
|