Sha256: fd63797fc6c82d6ece326c6b22f2bbcfd54497cbf1daf38bcde7d87f89c11b8a

Contents?: true

Size: 873 Bytes

Versions: 3

Compression:

Stored size: 873 Bytes

Contents

require_relative "../cocoapods-binary-cache/helper/json"

module PodPrebuild
  class Config
    attr_reader :cache_repo, :cache_path, :prebuild_path

    def initialize(path)
      @data = PodPrebuild::JSONFile.new(path)
      @cache_repo = @data["cache_repo"] || @data["prebuilt_cache_repo"]
      @cache_path = File.expand_path(@data["cache_path"])
      @prebuild_path = @data["prebuild_path"] || "Pods/_Prebuild"
    end

    def manifest_path(in_cache: false)
      root_dir(in_cache) + "/Manifest.lock"
    end

    def root_dir(in_cache)
      in_cache ? @cache_path : @prebuild_path
    end

    def generated_frameworks_dir(in_cache: false)
      root_dir(in_cache) + "/GeneratedFrameworks"
    end

    def delta_file_path
      # TODO (thuyen): Unify this path with PodPrebuild::Output#delta_file_path
      "Pods/_Prebuild_delta/changes.json"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cocoapods-binary-cache-0.1.3 lib/command/config.rb
cocoapods-binary-cache-0.1.2 lib/command/config.rb
cocoapods-binary-cache-0.1.1 lib/command/config.rb