lib/cocoapods-core/source/acceptor.rb
# Checks whether the source of the proposed specification is different
# from the one of the reference specification.
#
# @note   HTTP Sources are ignored as they change per version.
#
# @return [void]
#
Checks whether the source of the proposed specification is different
from the one of the reference specification.
Checks whether the source of the proposed specification is different from the one of the reference specification .
def check_spec_source_change(spec, errors)
        require 'cocoapods-core/http'
        return unless spec
        return if spec.source[:http]
        return unless reference_spec(spec)
        keys = Spec::DSL::SOURCE_KEYS.keys
        source = spec.source.values_at(*keys).compact.first
        old_source = reference_spec(spec).source.values_at(*keys).compact.first
        unless source == old_source
          source = HTTP.get_actual_url(source)
          old_source = HTTP.get_actual_url(old_source)
          unless source == old_source
            message = "The source of the spec doesn't match with the recorded "
            message << "ones. Source: `#{source}`. Previous: `#{old_source}`.\n "
            message << 'Please contact the specs repo maintainers if the '
            message << 'library changed location.'
            errors << message
          end
        end
      end
def check_spec_source_change ( spec , errors ) require 'cocoapods-core/http' return unless spec return if spec . source [ :http ] return unless reference_spec ( spec ) keys = Spec :: DSL :: SOURCE_KEYS . keys source = spec . source . values_at ( * keys ) . compact . first old_source = reference_spec ( spec ) . source . values_at ( * keys ) . compact . first unless source == old_source source = HTTP . get_actual_url ( source ) old_source = HTTP . get_actual_url ( old_source ) unless source == old_source message = "The source of the spec doesn't match with the recorded " message << "ones. Source: `#{source}`. Previous: `#{old_source}`.\n " message << 'Please contact the specs repo maintainers if the ' message << 'library changed location.' errors << message end end end
Checks whether the source of the proposed specification is different
from the one of the reference specification.
Checks whether the source of the proposed specification is different from the one of the reference specification .
None
void
spec
<not_specific>
errors
<not_specific>
note
HTTP Sources are ignored as they change per version.
HTTP Sources are ignored as they change per version .