Commit a7e87c23 authored by Samuel Giddins's avatar Samuel Giddins

[ErrorReport] Clean up generation of stack section

parent ac030a3a
...@@ -65,20 +65,31 @@ EOS ...@@ -65,20 +65,31 @@ EOS
end end
def stack def stack
<<-EOS parts = {
'CocoaPods' => Pod::VERSION,
'Ruby' => RUBY_DESCRIPTION,
'RubyGems' => Gem::VERSION,
'Host' => host_information,
'Xcode' => xcode_information,
'Git' => git_information,
'Ruby lib dir' => RbConfig::CONFIG['libdir'],
'Repositories' => repo_information,
}
justification = parts.keys.map(&:size).max
str = <<-EOS
### Stack ### Stack
```
CocoaPods : #{Pod::VERSION}
Ruby : #{RUBY_DESCRIPTION}
RubyGems : #{Gem::VERSION}
Host : #{host_information}
Xcode : #{xcode_information}
Git : #{git_information}
Ruby lib dir : #{RbConfig::CONFIG['libdir']}
Repositories : #{repo_information.join("\n ")}
``` ```
EOS EOS
parts.each do |name, value|
str << name.rjust(justification)
str << ' : '
str << Array(value).join("\n" << (' ' * (justification + 3)))
str << "\n"
end
str << "```\n"
end end
def plugins_string def plugins_string
......
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