Commit 066aac5d authored by Fabio Pelosin's avatar Fabio Pelosin

[UI] Adaptation for Core extraction.

parent 1c129859
module Pod
require 'colored'
#
#
module UserInterface
autoload :UIPod, 'cocoapods/user_interface/ui_pod'
require 'colored'
@title_colors = %w|yellow green|
@title_level = 0
......@@ -10,6 +12,7 @@ module Pod
@treat_titles_as_messages = false
class << self
include Config::Mixin
attr_accessor :indentation_level, :title_level
......@@ -22,8 +25,8 @@ module Pod
# to their level. In normal mode titles are printed only if
# they have nesting level smaller than 2.
#
# TODO: refactor to title (for always visible titles like search)
# and sections (titles that reppresent collapsible sections).
# TODO: Refactor to title (for always visible titles like search)
# and sections (titles that represent collapsible sections).
#
def section(title, verbose_prefix = '', relative_indentation = 0)
if config.verbose?
......@@ -114,7 +117,7 @@ module Pod
#
# return [void]
#
def warn(message, actions)
def warn(message, actions = [])
puts("\n[!] #{message}".yellow)
actions.each do |action|
indented = wrap_string(action, " - ")
......@@ -140,7 +143,7 @@ module Pod
if mode == :name
puts_indented set.name
else
pod = UIPod.new(set)
pod = Specification::Set::Presenter.new(set)
title("\n-> #{pod.name} (#{pod.version})".green, '', 1) do
puts_indented pod.summary
labeled('Homepage', pod.homepage)
......
......@@ -6,7 +6,7 @@ describe Pod::UI do
before do
@set = Pod::Source.search(Pod::Dependency.new('CocoaLumberjack'))
Pod::Specification::Statistics.instance.cache_file = nil
Pod::Specification::Set::Statistics.instance.cache_file = nil
end
it "presents the name, version, description, homepage and source of a specification set" 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