lib/cocoapods-core/dependency.rb
# Creates a string representation of the external source suitable for UI.
#
# @example  Output examples
#
#           "from `www.example.com/libPusher.git', tag `v0.0.1'"
#           "from `www.example.com/libPusher.podspec'"
#           "from `~/path/to/libPusher'"
#
# @todo     Improve the description for Mercurial and Subversion.
#
# @return   [String] the description of the external source.
#
Creates a string representation of the external source suitable for UI.
Creates a string representation of the external source suitable for UI .
def external_source_description(source)
      if source.key?(:git)
        desc =  "`#{source[:git]}`"
        desc << ", commit `#{source[:commit]}`" if source[:commit]
        desc << ", branch `#{source[:branch]}`" if source[:branch]
        desc << ", tag `#{source[:tag]}`"       if source[:tag]
      elsif source.key?(:hg)
        desc =  "`#{source[:hg]}`"
      elsif source.key?(:svn)
        desc =  "`#{source[:svn]}`"
      elsif source.key?(:podspec)
        desc = "`#{source[:podspec]}`"
      elsif source.key?(:local)
        desc = "`#{source[:local]}`"
      else
        desc = "`#{source.to_s}`"
      end
      "from #{desc}"
    end
def external_source_description ( source ) if source . key? ( :git ) desc = "`#{source[:git]}`" desc << ", commit `#{source[:commit]}`" if source [ :commit ] desc << ", branch `#{source[:branch]}`" if source [ :branch ] desc << ", tag `#{source[:tag]}`" if source [ :tag ] elsif source . key? ( :hg ) desc = "`#{source[:hg]}`" elsif source . key? ( :svn ) desc = "`#{source[:svn]}`" elsif source . key? ( :podspec ) desc = "`#{source[:podspec]}`" elsif source . key? ( :local ) desc = "`#{source[:local]}`" else desc = "`#{source.to_s}`" end "from #{desc}" end
Creates a string representation of the external source suitable for UI.
Creates a string representation of the external source suitable for UI .
the description of the external source.
the description of the external source .
String
source
example
None
todo
Improve the description for Mercurial and Subversion.
Improve the description for Mercurial and Subversion .