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.6.0'
Class Attribute Summary collapse
-
.additional_labels ⇒ Object
Returns the value of attribute additional_labels.
-
.api_endpoint ⇒ String
The api endpoint for GitHub.
-
.blacklisted_exceptions ⇒ Array
The collection of exceptions that should not be captured.
-
.branch ⇒ String
The git branch that is used for linking in the stack trace.
-
.comment_limit ⇒ Object
Returns the value of attribute comment_limit.
-
.github ⇒ Object
Returns the value of attribute github.
-
.oauth_token ⇒ Object
Returns the value of attribute oauth_token.
-
.owner ⇒ Object
Returns the value of attribute owner.
-
.processor ⇒ Class
The processor to be used when handling the exception.
-
.repo ⇒ Object
Returns the value of attribute repo.
-
.title_prefix ⇒ Object
Returns the value of attribute title_prefix.
-
.web_url ⇒ String
The web url for GitHub.
Class Method Summary collapse
-
.configure {|_self| ... } ⇒ Object
The configure block for PartyFoul.
-
.repo_path ⇒ String
The GitHub path to the repo Built using PartyFoul.owner and PartyFoul.repo.
-
.repo_url ⇒ String
The url of the repository.
Class Attribute Details
.additional_labels ⇒ Object
Returns the value of attribute additional_labels.
7 8 9 |
# File 'lib/party_foul.rb', line 7 def additional_labels @additional_labels end |
.api_endpoint ⇒ String
The api endpoint for GitHub. This is only interesting for Enterprise users
30 31 32 |
# File 'lib/party_foul.rb', line 30 def self.api_endpoint @api_endpoint ||= 'https://api.github.com' end |
.blacklisted_exceptions ⇒ Array
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]
53 54 55 |
# File 'lib/party_foul.rb', line 53 def self.blacklisted_exceptions @blacklisted_exceptions || [] end |
.branch ⇒ String
The git branch that is used for linking in the stack trace
14 15 16 |
# File 'lib/party_foul.rb', line 14 def self.branch @branch ||= 'master' end |
.comment_limit ⇒ Object
Returns the value of attribute comment_limit.
7 8 9 |
# File 'lib/party_foul.rb', line 7 def comment_limit @comment_limit end |
.github ⇒ Object
Returns the value of attribute github.
7 8 9 |
# File 'lib/party_foul.rb', line 7 def github @github end |
.oauth_token ⇒ Object
Returns the value of attribute oauth_token.
7 8 9 |
# File 'lib/party_foul.rb', line 7 def oauth_token @oauth_token end |
.owner ⇒ Object
Returns the value of attribute owner.
7 8 9 |
# File 'lib/party_foul.rb', line 7 def owner @owner end |
.processor ⇒ Class
The processor to be used when handling the exception. Defaults to a synchrons processor
38 39 40 |
# File 'lib/party_foul.rb', line 38 def self.processor @processor ||= PartyFoul::Processors::Sync end |
.repo ⇒ Object
Returns the value of attribute repo.
7 8 9 |
# File 'lib/party_foul.rb', line 7 def repo @repo end |
.title_prefix ⇒ Object
Returns the value of attribute title_prefix.
7 8 9 |
# File 'lib/party_foul.rb', line 7 def title_prefix @title_prefix end |
.web_url ⇒ String
The web url for GitHub. This is only interesting for Enterprise users
22 23 24 |
# File 'lib/party_foul.rb', line 22 def self.web_url @web_url ||= 'https://github.com' 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
84 85 86 87 |
# 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 |
.repo_path ⇒ String
61 62 63 |
# File 'lib/party_foul.rb', line 61 def self.repo_path "#{owner}/#{repo}" end |