115
116
117
118
119
120
121
122
123
124
125
126
|
# File 'lib/berkshelf/cached_cookbook.rb', line 115
def pretty_print
[].tap do |a|
a.push " Name: #{cookbook_name}" if name && name =~ /\S/
a.push " Version: #{version}" if version && version =~ /\S/
a.push " Description: #{metadata.description}" if metadata.description && metadata.description =~ /\S/
a.push " Author: #{metadata.maintainer}" if metadata.maintainer && metadata.maintainer =~ /\S/
a.push " Email: #{metadata.maintainer_email}" if metadata.maintainer_email && metadata.maintainer_email =~ /\S/
a.push " License: #{metadata.license}" if metadata.license && metadata.license =~ /\S/
a.push " Platforms: #{pretty_map(metadata.platforms, 14)}" if metadata.platforms && !metadata.platforms.empty?
a.push "Dependencies: #{pretty_map(dependencies, 14)}" if dependencies && !dependencies.empty?
end.join("\n")
end
|