Commit f535dff6 authored by Fabio Pelosin's avatar Fabio Pelosin

Merge branch 'master' of https://github.com/andreamazz/CocoaPods into andreamazz-master

* 'master' of https://github.com/andreamazz/CocoaPods:
  Removed useless comment
  Added spec and updated CHANGELOG
  Trimmed line length
  Fixed indentation
  Pod update displays the previous version of a pod

Conflicts:
	CHANGELOG.md
parents be4f2d63 73f5fa7d
......@@ -33,6 +33,10 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Samuel Ford](https://github.com/samuelwford)
[#1042](https://github.com/CocoaPods/CocoaPods/issues/1042)
* `pod update` prints the previous version of the updated pods.
[Andrea Mazzini](https://github.com/andreamazz)
[#2008](https://github.com/CocoaPods/CocoaPods/issues/2008)
##### Bug Fixes
* Support HTTP redirects when linting homepage and screenshots.
......
......@@ -236,7 +236,13 @@ module Pod
title_options = { :verbose_prefix => "-> ".green }
root_specs.sort_by(&:name).each do |spec|
if pods_to_install.include?(spec.name)
UI.titled_section("Installing #{spec}".green, title_options) do
if sandbox_state.changed.include?(spec.name) && sandbox.manifest
previous = sandbox.manifest.version(spec.name)
title = "Installing #{spec.name} #{spec.version} (was #{previous})"
else
title = "Installing #{spec}"
end
UI.titled_section(title.green, title_options) do
install_source_of_pod(spec.name)
end
else
......
......@@ -204,6 +204,22 @@ module Pod
@installer.installed_specs.should == [spec]
end
it "prints the previous version of a pod while updating the spec" do
spec = Spec.new
spec.name = 'RestKit'
spec.version = '2.0'
manifest = Lockfile.new({})
manifest.stubs(:version).with('RestKit').returns('1.0')
@installer.sandbox.stubs(:manifest).returns(manifest)
@installer.stubs(:root_specs).returns([spec])
sandbox_state = Installer::Analyzer::SpecsState.new
sandbox_state.changed << 'RestKit'
@installer.stubs(:sandbox_state).returns(sandbox_state)
@installer.expects(:install_source_of_pod).with('RestKit')
@installer.send(:install_pod_sources)
UI.output.should.include 'was 1.0'
end
#--------------------------------------#
describe "#clean" 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