11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/poli/generators/config.rb', line 11
def copy_config
file_path = path
unless file_path
file_path = File.join(Dir.pwd, 'config')
if File.directory?(file_path)
say("Seems like there is a /config folder, do you want Poli to generate configuration file to this folder?")
y = ask("Yes to generate to /config folder, others to generate to current folder. (Y|N): ")
unless "Y".casecmp(y) == 0
file_path = Dir.pwd
end
else
file_path = Dir.pwd
end
end
template "poli.yml", File.join(file_path, 'poli.yml')
end
|