Commit 70a3378d authored by Samuel E. Giddins's avatar Samuel E. Giddins

[PathSource] Remove the stored lockfile checkout source when switching to a development pod.

parent d054c8a6
...@@ -44,6 +44,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -44,6 +44,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Samuel Giddins](https://github.com/segiddins) [Samuel Giddins](https://github.com/segiddins)
[#3136](https://github.com/CocoaPods/CocoaPods/issues/3136) [#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 ## 0.36.0.beta.2
......
...@@ -19,6 +19,7 @@ module Pod ...@@ -19,6 +19,7 @@ module Pod
store_podspec(sandbox, podspec, podspec.extname == '.json') store_podspec(sandbox, podspec, podspec.extname == '.json')
is_absolute = absolute?(declared_path) is_absolute = absolute?(declared_path)
sandbox.store_local_path(name, podspec.dirname, is_absolute) sandbox.store_local_path(name, podspec.dirname, is_absolute)
sandbox.remove_checkout_source(name)
end end
end end
......
...@@ -354,6 +354,18 @@ module Pod ...@@ -354,6 +354,18 @@ module Pod
checkout_sources[root_name] = source checkout_sources[root_name] = source
end 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 # @return [Hash{String=>Hash}] The options necessary to recreate the exact
# checkout of a given Pod grouped by its name. # checkout of a given Pod grouped by its name.
# #
......
...@@ -36,6 +36,12 @@ module Pod ...@@ -36,6 +36,12 @@ module Pod
} }
end 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 it 'raises if the podspec cannot be found' do
@subject.stubs(:params).returns(:path => temporary_directory) @subject.stubs(:params).returns(:path => temporary_directory)
should.raise Informative do 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