Top Level Namespace

Defined Under Namespace

Modules: CocoapodsRepoRsync, Pod

Instance Method Summary collapse

Instance Method Details

#name_for_url(url) ⇒ String

For now, this uses the host and the last component of the URL as the name So [email protected]:/home/spec will return my-server-com-spec

Parameters:

  • url (String)

    The URL of the RSYNC repository

Returns:

  • (String)

    a name for the repository



38
39
40
41
42
# File 'lib/cocoapods_plugin.rb', line 38

def name_for_url(url)
    host, path = url.split(":")
    path = path.split("/").last
    return path.gsub(".", "-").downcase
end