Class: PodPrebuild::CacheFetcher

Inherits:
CommandExecutor show all
Defined in:
lib/command/executor/fetcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from CommandExecutor

#git, #git_clone, #installer, #prepare_cache_dir, #use_local_cache?

Constructor Details

#initialize(options) ⇒ CacheFetcher

Returns a new instance of CacheFetcher.



9
10
11
12
# File 'lib/command/executor/fetcher.rb', line 9

def initialize(options)
  super(options)
  @cache_branch = options[:cache_branch]
end

Instance Attribute Details

#cache_branchObject (readonly)

Returns the value of attribute cache_branch.



7
8
9
# File 'lib/command/executor/fetcher.rb', line 7

def cache_branch
  @cache_branch
end

Instance Method Details

#runObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/command/executor/fetcher.rb', line 14

def run
  Pod::UI.step("Fetching cache") do
    if @config.local_cache?
      print_message_for_local_cache(@config.cache_path)
    else
      fetch_remote_cache(@config.cache_repo, @cache_branch, @config.cache_path)
    end
    unzip_cache
  end
end