Sha256: 74e7a576f0d5615dc9e37c1b90ed7848060727f003104f22cdacf61478c76d2d

Contents?: true

Size: 628 Bytes

Versions: 6

Compression:

Stored size: 628 Bytes

Contents

class Lono::Bundler::Exporter
  class Copy < Base
    def initialize(component)
      @component = component
    end

    def component
      FileUtils.rm_rf(@component.export_path)
      FileUtils.mkdir_p(File.dirname(@component.export_path))
      logger.debug "Copy: cp -r #{src_path} #{@component.export_path}"
      FileUtils.cp_r(src_path, @component.export_path)
      FileUtils.rm_rf("#{@component.export_path}/.git")
    end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lono-8.0.0.pre.rc6 lib/lono/bundler/exporter/copy.rb
lono-8.0.0.pre.rc5 lib/lono/bundler/exporter/copy.rb
lono-8.0.0.pre.rc4 lib/lono/bundler/exporter/copy.rb
lono-8.0.0.pre.rc3 lib/lono/bundler/exporter/copy.rb
lono-8.0.0.pre.rc2 lib/lono/bundler/exporter/copy.rb
lono-8.0.0.pre.rc1 lib/lono/bundler/exporter/copy.rb