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
-
.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.
-
.whitelisted_rack_variables ⇒ Object
Returns the value of attribute whitelisted_rack_variables.
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.
5 6 7 |
# File 'lib/party_foul.rb', line 5 def additional_labels @additional_labels end |
.api_endpoint ⇒ String
The api endpoint for GitHub. This is only interesting for Enterprise users
27 28 29 |
# File 'lib/party_foul.rb', line 27 def api_endpoint @api_endpoint 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]
50 51 52 |
# File 'lib/party_foul.rb', line 50 def blacklisted_exceptions @blacklisted_exceptions end |
.branch ⇒ String
The git branch that is used for linking in the stack trace
11 12 13 |
# File 'lib/party_foul.rb', line 11 def branch @branch end |
.comment_limit ⇒ Object
Returns the value of attribute comment_limit.
5 6 7 |
# File 'lib/party_foul.rb', line 5 def comment_limit @comment_limit end |
.github ⇒ Object
Returns the value of attribute github.
5 6 7 |
# File 'lib/party_foul.rb', line 5 def github @github end |
.oauth_token ⇒ Object
Returns the value of attribute oauth_token.
5 6 7 |
# File 'lib/party_foul.rb', line 5 def oauth_token @oauth_token end |
.owner ⇒ Object
Returns the value of attribute owner.
5 6 7 |
# File 'lib/party_foul.rb', line 5 def owner @owner end |
.processor ⇒ Class
The processor to be used when handling the exception. Defaults to a synchrons processor
35 36 37 |
# File 'lib/party_foul.rb', line 35 def processor @processor end |
.repo ⇒ Object
Returns the value of attribute repo.
5 6 7 |
# File 'lib/party_foul.rb', line 5 def repo @repo end |
.title_prefix ⇒ Object
Returns the value of attribute title_prefix.
5 6 7 |
# File 'lib/party_foul.rb', line 5 def title_prefix @title_prefix end |
.web_url ⇒ String
The web url for GitHub. This is only interesting for Enterprise users
19 20 21 |
# File 'lib/party_foul.rb', line 19 def web_url @web_url end |
.whitelisted_rack_variables ⇒ Object
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
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_path ⇒ String
58 59 60 |
# File 'lib/party_foul.rb', line 58 def self.repo_path "#{owner}/#{repo}" end |