Sha256: ddbb4fba6632d74df90de43ec8ae84aca1fdb2106c4e27b5de1b1434287bd8e5

Contents?: true

Size: 630 Bytes

Versions: 2

Compression:

Stored size: 630 Bytes

Contents

namespace :bugsnag do
  desc "Extract exception event user names from bugsnag error url"
  task :error_users, [:error_url] => :environment do |t, args|
    unless bugsnag_token_present?
      puts "Aborting! Bugsnag::Api.configuration.auth_token must be set. See the bugsnag-error-users README."
      abort
    end

    fetcher = BugsnagErrorUsers::Fetcher.new(args.error_url)
    user_names = fetcher.fetch

    user_names.each do |user_name|
      puts user_name
    end
    puts "\nFetched #{user_names.size} results"
  end

  private

  def bugsnag_token_present?
    Bugsnag::Api.configuration.auth_token.present?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bugsnag-error-users-0.1.2 lib/tasks/bugsnag-error-users.rake
bugsnag-error-users-0.1.1 lib/tasks/bugsnag-error-users.rake