Commit 1abf727b authored by Fabio Pelosin's avatar Fabio Pelosin

[pod-list] added pod authors

parent 6c9c347a
......@@ -56,7 +56,7 @@ module Pod
days.reverse.each do |d|
sets = groups[d]
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]})
end
end
......
......@@ -23,6 +23,8 @@ module Pod
result << wrap_string(pod.summary)
result << detail('Homepage', pod.homepage)
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('License', pod.license) if @stats
result << detail('Watchers', pod.github_watchers) if @stats
......
......@@ -6,10 +6,7 @@ module Pod
@set = set
end
def spec
@spec ||= @set.specification.part_of_other_pod? ? @set.specification.part_of_specification : @set.specification
end
# set information
def name
@set.name
end
......@@ -22,6 +19,15 @@ module Pod
@set.versions.reverse.join(", ")
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
spec.homepage
end
......@@ -46,6 +52,7 @@ module Pod
spec.license[:type] if spec.license
end
# Statistics information
def creation_date
Pod::Specification::Statistics.instance.creation_date(@set)
end
......@@ -55,7 +62,16 @@ module Pod
end
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
......
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