class TerraspaceBundler::Exporter::Copy

Public Class Methods

new(mod) click to toggle source
# File lib/terraspace_bundler/exporter/copy.rb, line 3
def initialize(mod)
  @mod = mod
end

Public Instance Methods

mod() click to toggle source
# File lib/terraspace_bundler/exporter/copy.rb, line 7
def mod
  FileUtils.rm_rf(mod_path)
  FileUtils.mkdir_p(File.dirname(mod_path))
  logger.debug "Copy: cp -r #{src_path} #{mod_path}"
  FileUtils.cp_r(src_path, mod_path)
  FileUtils.rm_rf("#{mod_path}/.git")
end
src_path() click to toggle source

src path is from the stage area

# File lib/terraspace_bundler/exporter/copy.rb, line 20
def src_path
  path = stage_path(rel_dest_dir)
  path = "#{path}/#{@mod.subfolder}" if @mod.subfolder
  path
end
stacks() click to toggle source
# File lib/terraspace_bundler/exporter/copy.rb, line 15
def stacks
  Stacks.new(@mod).export
end