Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
066aac5d
Commit
066aac5d
authored
Nov 14, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[UI] Adaptation for Core extraction.
parent
1c129859
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
user_interface.rb
lib/cocoapods/user_interface.rb
+9
-6
user_interface_spec.rb
spec/functional/user_interface_spec.rb
+1
-1
No files found.
lib/cocoapods/user_interface.rb
View file @
066aac5d
module
Pod
require
'colored'
#
#
module
UserInterface
autoload
:UIPod
,
'cocoapods/user_interface/ui_po
d'
require
'colore
d'
@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:
r
efactor to title (for always visible titles like search)
# and sections (titles that rep
p
resent collapsible sections).
# TODO:
R
efactor 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
)
...
...
spec/functional/user_interface_spec.rb
View file @
066aac5d
...
...
@@ -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
::
S
et
::
S
tatistics
.
instance
.
cache_file
=
nil
end
it
"presents the name, version, description, homepage and source of a specification set"
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment