Module: PartyFoul

Defined in:
lib/party_foul.rb,
lib/party_foul/version.rb,
lib/party_foul/middleware.rb,
lib/generators/party_foul/install_generator.rb

Defined Under Namespace

Modules: IssueRenderers, Processors Classes: ExceptionHandler, InstallGenerator, Middleware, RacklessExceptionHandler

Constant Summary collapse

VERSION =
'1.5.4'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.additional_labelsObject

Returns the value of attribute additional_labels.



5
6
7
# File 'lib/party_foul.rb', line 5

def additional_labels
  @additional_labels
end

.api_endpointString

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

Returns:



27
28
29
# File 'lib/party_foul.rb', line 27

def api_endpoint
  @api_endpoint
end

.blacklisted_exceptionsArray

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]

Returns:

  • (Array)


50
51
52
# File 'lib/party_foul.rb', line 50

def blacklisted_exceptions
  @blacklisted_exceptions
end

.branchString

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

Returns:

  • (String)

    Defaults to ‘master’ if not set



11
12
13
# File 'lib/party_foul.rb', line 11

def branch
  @branch
end

.comment_limitObject

Returns the value of attribute comment_limit.



5
6
7
# File 'lib/party_foul.rb', line 5

def comment_limit
  @comment_limit
end

.githubObject

Returns the value of attribute github.



5
6
7
# File 'lib/party_foul.rb', line 5

def github
  @github
end

.oauth_tokenObject

Returns the value of attribute oauth_token.



5
6
7
# File 'lib/party_foul.rb', line 5

def oauth_token
  @oauth_token
end

.ownerObject

Returns the value of attribute owner.



5
6
7
# File 'lib/party_foul.rb', line 5

def owner
  @owner
end

.processorClass

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

Returns:

  • (Class)

    Defaults to ‘PartyFoul::Processors:Sync



35
36
37
# File 'lib/party_foul.rb', line 35

def processor
  @processor
end

.repoObject

Returns the value of attribute repo.



5
6
7
# File 'lib/party_foul.rb', line 5

def repo
  @repo
end

.title_prefixObject

Returns the value of attribute title_prefix.



5
6
7
# File 'lib/party_foul.rb', line 5

def title_prefix
  @title_prefix
end

.web_urlString

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

Returns:

  • (String)

    Defaults to ‘github.com’ if not set



19
20
21
# File 'lib/party_foul.rb', line 19

def web_url
  @web_url
end

.whitelisted_rack_variablesObject

Returns the value of attribute whitelisted_rack_variables.



5
6
7
# File 'lib/party_foul.rb', line 5

def whitelisted_rack_variables
  @whitelisted_rack_variables
end

Class Method Details

.configure {|_self| ... } ⇒ Object

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

Parameters:

  • (Block)

Yields:

  • (_self)

Yield Parameters:

  • _self (PartyFoul)

    the object that the method was called on



81
82
83
84
# File 'lib/party_foul.rb', line 81

def self.configure(&block)
  yield self
  self.github ||= Octokit::Client.new access_token: oauth_token, api_endpoint: api_endpoint
end

.repo_pathString

The GitHub path to the repo Built using owner and repo

Returns:

  • (String)


58
59
60
# File 'lib/party_foul.rb', line 58

def self.repo_path
  "#{owner}/#{repo}"
end

.repo_urlString

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

Returns:

  • (String)


66
67
68
# File 'lib/party_foul.rb', line 66

def self.repo_url
  "#{web_url}/#{repo_path}"
end