Top Level Namespace

Defined Under Namespace

Modules: CocoaPodsArt, Pod

Instance Method Summary collapse

Instance Method Details

#create_source_from_name(source_name) ⇒ ArtSource

Returns source of the local spec repo which corresponds to to the given name.

Parameters:

  • source_name

    > name of source incoming from the Podfile configuration

Returns:

  • (ArtSource)

    source of the local spec repo which corresponds to to the given name



27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/cocoapods_plugin.rb', line 27

def create_source_from_name(source_name)
    repos_dir = Pod::Config.instance.repos_dir
    repo = repos_dir + source_name
    if File.exist?("#{repo}/.artpodrc")
        url = File.read("#{repo}/.artpodrc")
        Pod::ArtSource.new(repo, url)
    elsif Dir.exist?("#{repo}")
        Pod::ArtSource.new(repo, '');
    else
     raise Pod::Informative.exception "repo #{source_name} does not exist."
    end
end

#update_source(source) ⇒ Object

Parameters:

  • source (Source)

    The source update



16
17
18
19
20
21
# File 'lib/cocoapods_plugin.rb', line 16

def update_source(source)
    name = source.name
    argv = CLAide::ARGV.new([name])
    cmd = Pod::Command::RepoArt::Update.new(argv)
    cmd.run
end