Class: Babushka::BugReporter
- Inherits:
-
Object
- Object
- Babushka::BugReporter
- Extended by:
- LogHelpers, ShellHelpers
- Defined in:
- lib/babushka/bug_reporter.rb
Class Method Summary (collapse)
-
+ (Object) report(dep)
This method creates a bug report for dep, by reading the debug log and vars associated with it and posting them as a gist.
Methods included from ShellHelpers
cmd_dir, failable_shell, log_shell, login_shell, raw_shell, shell, shell!, shell?, sudo, which
Methods included from LogHelpers
debug, log, log_block, log_error, log_ok, log_verbose, log_warn
Class Method Details
+ (Object) report(dep)
This method creates a bug report for dep, by reading the debug log and vars associated with it and posting them as a gist. If the github user is set in the git config, it's marked as from that user, otherwise it's anonymous.
10 11 12 13 14 15 16 17 |
# File 'lib/babushka/bug_reporter.rb', line 10 def self.report dep Prompt.confirm "I can file a bug report for that now, if you like.", :default => 'n', :otherwise => "OK, you're on your own :)" do post_report dep, (which('git') && shell('git config github.user')) || 'anonymous', Base.task.var_path_for(dep).read, Base.task.log_path_for(dep).read end end |