Class: Babushka::BugReporter

Inherits:
Object
  • Object
show all
Extended by:
LogHelpers, ShellHelpers
Defined in:
lib/babushka/bug_reporter.rb

Class Method Summary collapse

Methods included from LogHelpers

debug, deprecated!, log, log_block, log_error, log_ok, log_stderr, log_warn, removed!

Methods included from ShellHelpers

cmd_dir, current_username, log_shell, login_shell, raw_shell, shell, shell!, shell?, shell_cmd, sudo, which

Class Method Details

.report(dep) ⇒ Object

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