Class: TerraspaceBundler::Runner
Instance Method Summary
collapse
Methods inherited from CLI::Base
#initialize, #set_config!
Instance Method Details
#export_paths ⇒ Object
21
22
23
24
25
|
# File 'lib/terraspace_bundler/runner.rb', line 21
def export_paths
export_paths = Terrafile.instance.mods.map(&:export_to).compact.uniq
export_paths << TB.config.export_to
export_paths
end
|
#finish_message ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/terraspace_bundler/runner.rb', line 9
def finish_message
no_modules_found = true
export_paths.each do |path|
found = Dir.exist?(path) && !Dir.empty?(path)
next unless found
logger.info "Modules saved to #{path}"
no_modules_found = false
end
logger.info("No modules were found.") if no_modules_found
end
|
#run ⇒ Object
3
4
5
6
7
|
# File 'lib/terraspace_bundler/runner.rb', line 3
def run
Syncer.new(@options).run
Exporter.new(@options).run
finish_message
end
|