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
1abf727b
Commit
1abf727b
authored
Apr 12, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[pod-list] added pod authors
parent
6c9c347a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
6 deletions
+24
-6
list.rb
lib/cocoapods/command/list.rb
+1
-1
presenter.rb
lib/cocoapods/command/presenter.rb
+2
-0
cocoa_pod.rb
lib/cocoapods/command/presenter/cocoa_pod.rb
+21
-5
No files found.
lib/cocoapods/command/list.rb
View file @
1abf727b
...
@@ -56,7 +56,7 @@ module Pod
...
@@ -56,7 +56,7 @@ module Pod
days
.
reverse
.
each
do
|
d
|
days
.
reverse
.
each
do
|
d
|
sets
=
groups
[
d
]
sets
=
groups
[
d
]
next
unless
sets
next
unless
sets
puts
"Pods added in the last
#{
d
==
1
?
'
1
day'
:
"
#{
d
}
days"
}
"
.
yellow
puts
"Pods added in the last
#{
d
==
1
?
'day'
:
"
#{
d
}
days"
}
"
.
yellow
puts
@presenter
.
render
(
sets
.
sort_by
{
|
set
|
creation_dates
[
set
.
name
]})
puts
@presenter
.
render
(
sets
.
sort_by
{
|
set
|
creation_dates
[
set
.
name
]})
end
end
end
end
...
...
lib/cocoapods/command/presenter.rb
View file @
1abf727b
...
@@ -23,6 +23,8 @@ module Pod
...
@@ -23,6 +23,8 @@ module Pod
result
<<
wrap_string
(
pod
.
summary
)
result
<<
wrap_string
(
pod
.
summary
)
result
<<
detail
(
'Homepage'
,
pod
.
homepage
)
result
<<
detail
(
'Homepage'
,
pod
.
homepage
)
result
<<
detail
(
'Source'
,
pod
.
source_url
)
result
<<
detail
(
'Source'
,
pod
.
source_url
)
result
<<
detail
(
'Authors'
,
pod
.
authors
)
if
@stats
&&
pod
.
authors
=~
/,/
result
<<
detail
(
'Author'
,
pod
.
authors
)
if
@stats
&&
pod
.
authors
!~
/,/
result
<<
detail
(
'Platform'
,
pod
.
platform
)
if
@stats
result
<<
detail
(
'Platform'
,
pod
.
platform
)
if
@stats
result
<<
detail
(
'License'
,
pod
.
license
)
if
@stats
result
<<
detail
(
'License'
,
pod
.
license
)
if
@stats
result
<<
detail
(
'Watchers'
,
pod
.
github_watchers
)
if
@stats
result
<<
detail
(
'Watchers'
,
pod
.
github_watchers
)
if
@stats
...
...
lib/cocoapods/command/presenter/cocoa_pod.rb
View file @
1abf727b
...
@@ -6,10 +6,7 @@ module Pod
...
@@ -6,10 +6,7 @@ module Pod
@set
=
set
@set
=
set
end
end
def
spec
# set information
@spec
||=
@set
.
specification
.
part_of_other_pod?
?
@set
.
specification
.
part_of_specification
:
@set
.
specification
end
def
name
def
name
@set
.
name
@set
.
name
end
end
...
@@ -22,6 +19,15 @@ module Pod
...
@@ -22,6 +19,15 @@ module Pod
@set
.
versions
.
reverse
.
join
(
", "
)
@set
.
versions
.
reverse
.
join
(
", "
)
end
end
# specification information
def
spec
@spec
||=
@set
.
specification
.
part_of_other_pod?
?
@set
.
specification
.
part_of_specification
:
@set
.
specification
end
def
authors
oxfordify
spec
.
authors
.
keys
end
def
homepage
def
homepage
spec
.
homepage
spec
.
homepage
end
end
...
@@ -46,6 +52,7 @@ module Pod
...
@@ -46,6 +52,7 @@ module Pod
spec
.
license
[
:type
]
if
spec
.
license
spec
.
license
[
:type
]
if
spec
.
license
end
end
# Statistics information
def
creation_date
def
creation_date
Pod
::
Specification
::
Statistics
.
instance
.
creation_date
(
@set
)
Pod
::
Specification
::
Statistics
.
instance
.
creation_date
(
@set
)
end
end
...
@@ -55,7 +62,16 @@ module Pod
...
@@ -55,7 +62,16 @@ module Pod
end
end
def
github_forks
def
github_forks
Pod
::
Specification
::
Statistics
.
instance
.
github_watchers
(
@set
)
Pod
::
Specification
::
Statistics
.
instance
.
github_forks
(
@set
)
end
private
def
oxfordify
words
if
words
.
size
<
3
words
.
join
' and '
else
"
#{
words
[
0
..-
2
].
join
(
', '
)
}
, and
#{
words
.
last
}
"
end
end
end
end
end
end
end
...
...
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