Sha256: 10e65d43416cf402db38e827b08411267735926488865560568f47b2a380af77
Contents?: true
Size: 743 Bytes
Versions: 50
Compression:
Stored size: 743 Bytes
Contents
class Terraspace::CLI class Fmt include Concerns::SourceDirs include Terraspace::Util::Logging def initialize(options={}) @options = options @mod_name = options[:mod] end def run logger.info "Formating terraform files" dirs.each do |dir| format(dir) end end def format(dir) Runner.new(dir).format! end private def dirs if @mod_name type_dirs.select { |p| p.include?(@mod_name) } else type_dirs end end def type_dirs type = @options[:type] if type && type != "all" app_source_dirs.select { |p| p.include?("/#{type.pluralize}/") } else app_source_dirs end end end end
Version data entries
50 entries across 50 versions & 1 rubygems