summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-11-30 15:48:02 -0600
committerSamuel Giddins <segiddins@segiddins.me>2016-11-30 16:19:09 -0600
commit926a79e2b376f304a5a8928385b81e5955482456 (patch)
treed971e46ac28c398cb94f60b9808666f668f5adec
parent4d6a5cbf1ca2648896d696ab97bc366cf07c7b01 (diff)
downloadbundler-seg-bundle-env-markdown.tar.gz
[FriendlyErrors] Prettify, taking into account formatting suggestionsseg-bundle-env-markdown
-rw-r--r--lib/bundler/env.rb6
-rw-r--r--lib/bundler/friendly_errors.rb20
2 files changed, 20 insertions, 6 deletions
diff --git a/lib/bundler/env.rb b/lib/bundler/env.rb
index 0b51c6c4a4..7e9bcc2866 100644
--- a/lib/bundler/env.rb
+++ b/lib/bundler/env.rb
@@ -42,10 +42,10 @@ module Bundler
if print_gemfile
out << "\n## Gemfile\n"
- out << "\n### `#{Bundler.default_gemfile.relative_path_from(SharedHelpers.pwd)}`\n\n"
+ out << "\n### #{Bundler.default_gemfile.relative_path_from(SharedHelpers.pwd)}\n\n"
out << "```ruby\n" << read_file(Bundler.default_gemfile).chomp << "\n```\n"
- out << "\n### `#{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}`\n\n"
+ out << "\n### #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)}\n\n"
out << "```\n" << read_file(Bundler.default_lockfile).chomp << "\n```\n"
end
@@ -53,7 +53,7 @@ module Bundler
dsl = Dsl.new.tap {|d| d.eval_gemfile(Bundler.default_gemfile) }
out << "\n## Gemspecs\n" unless dsl.gemspecs.empty?
dsl.gemspecs.each do |gs|
- out << "\n### `#{File.basename(gs.loaded_from)}`"
+ out << "\n### #{File.basename(gs.loaded_from)}"
out << "\n\n```ruby\n" << read_file(gs.loaded_from).chomp << "\n```\n"
end
end
diff --git a/lib/bundler/friendly_errors.rb b/lib/bundler/friendly_errors.rb
index 911c08f714..3a46473448 100644
--- a/lib/bundler/friendly_errors.rb
+++ b/lib/bundler/friendly_errors.rb
@@ -58,18 +58,32 @@ module Bundler
def request_issue_report_for(e)
Bundler.ui.info <<-EOS.gsub(/^ {8}/, "")
--- ERROR REPORT TEMPLATE -------------------------------------------------------
- - What did you do?
+ # Error Report
+
+ ## Questions
+
+ Please fill out answers to these questions, it'll help us figure out
+ why things are going wrong.
+
+ - **What did you do?**
I ran the command `#{$PROGRAM_NAME} #{ARGV.join(" ")}`
- - What did you expect to happen?
+ - **What did you expect to happen?**
I expected Bundler to...
- - What happened instead?
+ - **What happened instead?**
Instead, what happened was...
+ - **Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?**
+
+ I tried...
+
+ - **Have you read our issues document, https://github.com/bundler/bundler/blob/master/ISSUES.md?**
+
+ ...
## Backtrace