Commit 7a6b99b7 authored by Hugo Tunius's avatar Hugo Tunius

[Search][POD::UserInterface] Display pods which are deprecated in a grayed out…

[Search][POD::UserInterface] Display pods which are deprecated in a grayed out color with the pod it was deprecated in favor of if there is such a pod
parent 70c4f8aa
......@@ -5,6 +5,10 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
## Master
* Display indication for deprecated pods when searching for pods
[Hugo Tunius][k0nserv]
[#2180](https://github.com/CocoaPods/CocoaPods/issues/2180)
##### Bug Fixes
* Fixed pod repo push to first check if Specs directory exists and if so push there.
......@@ -2454,4 +2458,5 @@ allowing you to automate Xcode related tasks.
[irrationalfab]: https://github.com/irrationalfab
[kylef]: (https://github.com/kylef)
[neonichu]: (https://github.com/neonichu)
[k0nserv]: https://github.com/k0nserv
......@@ -7,7 +7,7 @@ GIT
GIT
remote: https://github.com/CocoaPods/Core.git
revision: 3b72760a736bd9733a42912882009d9e85838a6d
revision: b264007943718f32c314e72952d312e92f1626c3
branch: master
specs:
cocoapods-core (0.33.1)
......
......@@ -162,7 +162,15 @@ module Pod
puts_indented "#{set.name} #{set.versions.first.version}"
else
pod = Specification::Set::Presenter.new(set, statistics_provider)
title("\n-> #{pod.name} (#{pod.version})".green, '', 1) do
title = "\n-> #{pod.name} (#{pod.version})"
if pod.deprecated?
title += " #{pod.deprecation_description}"
colored_title = title.red
else
colored_title = title.green
end
title(colored_title, "", 1) do
puts_indented pod.summary
puts_indented "pod '#{pod.name}', '~> #{pod.version}'"
labeled('Homepage', pod.homepage)
......
......@@ -21,6 +21,25 @@ module Pod
output.should.include? 'https://github.com/CocoaLumberjack/CocoaLumberjack.git'
end
it "Presents information about deprecation if the pod is deprecated" do
specification = @set.specification
specification.deprecated = true
@set.expects(:specification).returns(specification)
UI.pod(@set)
output = UI.output
output.should.include? "[DEPRECATED]"
end
it "Presents information about the deprecation in favor of another pod" do
specification = @set.specification
specification.deprecated_in_favor_of = "NewMoreAwesomePod"
@set.expects(:specification).returns(specification)
UI.pod(@set)
output = UI.output
output.should.include? "[DEPRECATED in favor of NewMoreAwesomePod]"
end
it "presents the stats of a specification set" do
Specification::Set::Presenter.any_instance.expects(:github_last_activity).returns('more than a year ago')
Specification::Set::Presenter.any_instance.expects(:github_watchers).returns('318')
......
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