Class: Pod::Downloader::Mercurial

Inherits:
Base
  • Object
show all
Defined in:
lib/cocoapods-downloader/mercurial.rb

Instance Attribute Summary

Attributes inherited from Base

#options, #target_path, #url

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#download, #download_head, executable, #head_supported?, #initialize, #name, preprocess_options, user_agent_string

Methods included from APIExposable

#expose_api

Constructor Details

This class inherits a constructor from Pod::Downloader::Base

Class Method Details

.optionsObject



4
5
6
# File 'lib/cocoapods-downloader/mercurial.rb', line 4

def self.options
  [:revision, :tag, :branch]
end

Instance Method Details

#checkout_optionsObject



12
13
14
15
16
17
18
19
# File 'lib/cocoapods-downloader/mercurial.rb', line 12

def checkout_options
  Dir.chdir(target_path) do
    options = {}
    options[:hg] = url
    options[:revision] = `hg --debug id -i`.chomp
    options
  end
end

#options_specific?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/cocoapods-downloader/mercurial.rb', line 8

def options_specific?
  !(options[:revision] || options[:tag]).nil?
end