Sha256: 62b9d1946c0f0a55492b28aa330f5300bcd0d4ae3eeadd5d7cec344db043e6bc

Contents?: true

Size: 580 Bytes

Versions: 6

Compression:

Stored size: 580 Bytes

Contents

class TerraspaceBundler::Exporter
  class Copy < Base
    def initialize(mod)
      @mod = mod
    end

    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

    def stacks
      Stacks.new(@mod).export
    end

    # src path is from the stage area
    def src_path
      path = stage_path(rel_dest_dir)
      path = "#{path}/#{@mod.subfolder}" if @mod.subfolder
      path
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
terraspace-bundler-0.5.0 lib/terraspace_bundler/exporter/copy.rb
terraspace-bundler-0.4.4 lib/terraspace_bundler/exporter/copy.rb
terraspace-bundler-0.4.3 lib/terraspace_bundler/exporter/copy.rb
terraspace-bundler-0.4.2 lib/terraspace_bundler/exporter/copy.rb
terraspace-bundler-0.4.1 lib/terraspace_bundler/exporter/copy.rb
terraspace-bundler-0.4.0 lib/terraspace_bundler/exporter/copy.rb