module PartyFoul

Constants

VERSION

Attributes

additional_labels[RW]
api_endpoint[W]
blacklisted_exceptions[W]
branch[W]
comment_limit[RW]
github[RW]
oauth_token[RW]
owner[RW]
processor[W]
repo[RW]
title_prefix[RW]
web_url[W]

Public Class Methods

api_endpoint() click to toggle source

The api endpoint for GitHub. This is only interesting for Enterprise users

@return [String] Defaults to 'api.github.com' if not set

# File lib/party_foul.rb, line 30
def self.api_endpoint
  @api_endpoint ||= 'https://api.github.com'
end
blacklisted_exceptions() click to toggle source

The collection of exceptions that should not be captured. Members of the collection must be string representations of the exception. For example:

# This is good
['ActiveRecord::RecordNotFound']

# This is not
[ActiveRecord::RecordNotFound]

@return [Array]

# File lib/party_foul.rb, line 53
def self.blacklisted_exceptions
  @blacklisted_exceptions || []
end
branch() click to toggle source

The git branch that is used for linking in the stack trace

@return [String] Defaults to 'master' if not set

# File lib/party_foul.rb, line 14
def self.branch
  @branch ||= 'master'
end
configure() { |self| ... } click to toggle source

The configure block for PartyFoul. Use to initialize settings

PartyFoul.configure do |config|
  config.owner 'dockyard'
  config.repo  'test_app'
  config.oauth_token = ENV['oauth_token']
end

Will also setup for GitHub api connections

@param [Block]

# File lib/party_foul.rb, line 84
def self.configure
  yield self
  self.github = Octokit::Client.new access_token: oauth_token, api_endpoint: api_endpoint
end
processor() click to toggle source

The processor to be used when handling the exception. Defaults to a synchrons processor

@return [Class] Defaults to 'PartyFoul::Processors:Sync

# File lib/party_foul.rb, line 38
def self.processor
  @processor ||= PartyFoul::Processors::Sync
end
repo_path() click to toggle source

The GitHub path to the repo Built using {.owner} and {.repo}

@return [String]

# File lib/party_foul.rb, line 61
def self.repo_path
  "#{owner}/#{repo}"
end
repo_url() click to toggle source

The url of the repository. Built using the {.web_url} and {.repo_path} values

@return [String]

# File lib/party_foul.rb, line 69
def self.repo_url
  "#{web_url}/#{repo_path}"
end
web_url() click to toggle source

The web url for GitHub. This is only interesting for Enterprise users

@return [String] Defaults to 'github.com' if not set

# File lib/party_foul.rb, line 22
def self.web_url
  @web_url ||= 'https://github.com'
end