Commit b0d51847 authored by Samuel Giddins's avatar Samuel Giddins

Remove support for the deprecated :local option in Podfiles

parent 8479939a
......@@ -7,7 +7,7 @@ GIT
GIT
remote: https://github.com/CocoaPods/Core.git
revision: 9fd6c128f989655cf48b07f7145d73ad02ab0694
revision: e5b64946f634fec8c99ed82a4da198f9ba1031fc
branch: seg-podfile-refactor
specs:
cocoapods-core (0.39.0)
......
......@@ -46,10 +46,6 @@ module Pod
PodspecSource
elsif params.key?(:path)
PathSource
elsif params.key?(:local)
UI.warn 'The `:local` option of the Podfile has been ' \
'renamed to `:path` and it is deprecated.'
PathSource
elsif Downloader.strategy_from_options(params)
DownloaderSource
end
......
......@@ -24,7 +24,7 @@ module Pod
# @see AbstractExternalSource#description
#
def description
"from `#{params[:path] || params[:local]}`"
"from `#{declared_path}`"
end
private
......@@ -34,7 +34,7 @@ module Pod
# @return [String] The path as declared by the user.
#
def declared_path
result = params[:path] || params[:local]
result = params[:path]
result.to_s if result
end
......
......@@ -482,7 +482,6 @@ module Pod
deps_to_fetch_if_needed = deps_with_external_source.select { |dep| result.podfile_state.unchanged.include?(dep.name) }
deps_to_fetch += deps_to_fetch_if_needed.select do |dep|
sandbox.specification(dep.name).nil? ||
!dep.external_source[:local].nil? ||
!dep.external_source[:path].nil? ||
!sandbox.pod_dir(dep.root_name).directory? ||
checkout_requires_update?(dep)
......
......@@ -15,16 +15,6 @@ module Pod
path.should.exist?
end
it 'supports the deprecated local key' do
params = { :local => fixture('integration/Reachability') }
dependency = Dependency.new('Reachability', params)
podfile_path = fixture('integration/Podfile')
@subject = ExternalSources.from_dependency(dependency, podfile_path)
@subject.fetch(config.sandbox)
path = config.sandbox.specifications_root + 'Reachability.podspec.json'
path.should.exist?
end
it 'returns the description' do
@subject.description.should.match /from `.*integration\/Reachability`/
end
......
......@@ -19,12 +19,6 @@ module Pod
klass.should == @subject::PathSource
end
it 'supports a path source specified with the legacy :local key' do
dep = Dependency.new('Reachability', :local => '')
klass = @subject.from_dependency(dep, nil).class
klass.should == @subject::PathSource
end
it 'supports all the strategies implemented by the downloader' do
[:git, :svn, :hg, :bzr, :http].each do |strategy|
dep = Dependency.new('Reachability', strategy => '')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment