14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/timber/cli/installers/config_file.rb', line 14
def run(app, path)
config_file = Timber::CLI::ConfigFile.new(path, file_helper)
if config_file.exists?
io.task_complete("#{config_file.path} already created")
return true
end
if lograge?
task_message = "Enabling logrageify in #{config_file.path}"
io.task(task_message) { config_file.logrageify! }
elsif action_view?
task_message = "Silencing template renders in #{config_file.path}"
io.task(task_message) { config_file.silence_template_renders! }
end
task_message = "Creating #{config_file.path}"
io.task(task_message) { config_file.create! }
end
|