Commit 546557cc authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #3144 from CocoaPods/seg-fix-switching-to-path-source

[PathSource] Remove the stored lockfile checkout source when switching t...
parents 04c36b20 b70efb42
......@@ -48,6 +48,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Samuel Giddins](https://github.com/segiddins)
[#3136](https://github.com/CocoaPods/CocoaPods/issues/3136)
* Remove the stored lockfile checkout source when switching to a development
pod.
[Samuel Giddins][https://github.com/segiddins]
[#3141](https://github.com/CocoaPods/CocoaPods/issues/3141)
## 0.36.0.beta.2
......
......@@ -19,6 +19,7 @@ module Pod
store_podspec(sandbox, podspec, podspec.extname == '.json')
is_absolute = absolute?(declared_path)
sandbox.store_local_path(name, podspec.dirname, is_absolute)
sandbox.remove_checkout_source(name)
end
end
......
......@@ -354,6 +354,18 @@ module Pod
checkout_sources[root_name] = source
end
# Removes the checkout source of a Pod.
#
# @param [String] name
# The name of the Pod.
#
# @return [void]
#
def remove_checkout_source(name)
root_name = Specification.root_name(name)
checkout_sources.delete(root_name)
end
# @return [Hash{String=>Hash}] The options necessary to recreate the exact
# checkout of a given Pod grouped by its name.
#
......
......@@ -36,6 +36,12 @@ module Pod
}
end
it 'removes sandbox lockfile checkout options for the pod' do
config.sandbox.store_checkout_source('Reachability', :http => 'https://example.com')
@subject.fetch(config.sandbox)
config.sandbox.checkout_sources['pod'].should.be.nil
end
it 'raises if the podspec cannot be found' do
@subject.stubs(:params).returns(:path => temporary_directory)
should.raise Informative do
......
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