Sha256: 912a75e6b3237440229ffed270b75f69e8bc436ee86fcdda355e7554858f27ba

Contents?: true

Size: 544 Bytes

Versions: 5

Compression:

Stored size: 544 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))
      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(@mod.full_repo) # from PathConcern
      path = "#{path}/#{@mod.subfolder}" if @mod.subfolder
      path
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
terraspace-bundler-0.3.4 lib/terraspace_bundler/exporter/copy.rb
terraspace-bundler-0.3.3 lib/terraspace_bundler/exporter/copy.rb
terraspace-bundler-0.3.2 lib/terraspace_bundler/exporter/copy.rb
terraspace-bundler-0.3.1 lib/terraspace_bundler/exporter/copy.rb
terraspace-bundler-0.3.0 lib/terraspace_bundler/exporter/copy.rb