Commit d5749465 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Fix the updating of `:git`, `:svn`, and `:hg` dependencies when updating all pods.

Closes https://github.com/CocoaPods/CocoaPods/issues/2859.
parent 7696ac99
...@@ -64,6 +64,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -64,6 +64,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Samuel Giddins](https://github.com/segiddins) [Samuel Giddins](https://github.com/segiddins)
[#2875](https://github.com/CocoaPods/CocoaPods/issues/2875) [#2875](https://github.com/CocoaPods/CocoaPods/issues/2875)
* Fix the updating of `:git`, `:svn`, and `:hg` dependencies when updating all
pods.
[Samuel Giddins](https://github.com/CocoaPods/CocoaPods/issues/2859)
[#2859](https://github.com/CocoaPods/CocoaPods/issues/2859)
## 0.35.0 ## 0.35.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.34.4...0.35.0) [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.34.4...0.35.0)
......
...@@ -331,6 +331,8 @@ module Pod ...@@ -331,6 +331,8 @@ module Pod
pods_to_fetch = result.podfile_state.added + result.podfile_state.changed pods_to_fetch = result.podfile_state.added + result.podfile_state.changed
if update_mode == :selected if update_mode == :selected
pods_to_fetch += update[:pods] pods_to_fetch += update[:pods]
elsif update_mode == :all
pods_to_fetch += result.podfile_state.unchanged + result.podfile_state.deleted
end end
pods_to_fetch pods_to_fetch
end end
......
...@@ -722,6 +722,28 @@ module Pod ...@@ -722,6 +722,28 @@ module Pod
@analyzer.send(:fetch_external_sources) @analyzer.send(:fetch_external_sources)
end end
it 'ignores lockfile checkout options when updating selected pods' do
@analyzer.result.podfile_state.unchanged << 'BananaLib'
@analyzer.stubs(:update).returns(:pods => %w(BananaLib))
downloader = stub('DownloaderSource')
ExternalSources.stubs(:from_params).with(@dependency.external_source, @dependency, @podfile.defined_in_file).returns(downloader)
downloader.expects(:fetch)
@analyzer.send(:fetch_external_sources)
end
it 'ignores lockfile checkout options when updating all pods' do
@analyzer.result.podfile_state.unchanged << 'BananaLib'
@analyzer.stubs(:update).returns(true)
downloader = stub('DownloaderSource')
ExternalSources.stubs(:from_params).with(@dependency.external_source, @dependency, @podfile.defined_in_file).returns(downloader)
downloader.expects(:fetch)
@analyzer.send(:fetch_external_sources)
end
it 'does not re-fetch the external source when the sandbox has the correct revision of the source' do it 'does not re-fetch the external source when the sandbox has the correct revision of the source' do
@analyzer.result.podfile_state.unchanged << 'BananaLib' @analyzer.result.podfile_state.unchanged << 'BananaLib'
......
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