Sha256: 7babce3cbff7feeb6240d459329b7a9c6676b4bf5f4f5e26dbf415c9e17f8c4b

Contents?: true

Size: 626 Bytes

Versions: 3

Compression:

Stored size: 626 Bytes

Contents

class TerraspaceBundler::Mod
  module PathConcern
    def setup_tmp
      FileUtils.mkdir_p(cache_root)
      FileUtils.mkdir_p(stage_root)
    end

    def tmp_root
      "/tmp/terraspace/bundler"
    end

    def cache_root
      "#{tmp_root}/cache"
    end

    def stage_root
      "#{tmp_root}/stage"
    end

    def cache_path(name)
      "#{cache_root}/#{name}"
    end

    def stage_path(name)
      "#{stage_root}/#{name}"
    end

    def mod_path
      get_mod_path(@mod)
    end

    def get_mod_path(mod)
      export_to = mod.export_to || TB.config.export_to
      "#{export_to}/#{mod.name}"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
terraspace-bundler-0.3.4 lib/terraspace_bundler/mod/path_concern.rb
terraspace-bundler-0.3.3 lib/terraspace_bundler/mod/path_concern.rb
terraspace-bundler-0.3.2 lib/terraspace_bundler/mod/path_concern.rb