Class: PartyFoul::IssueRenderers::Rack
- Defined in:
- lib/party_foul/issue_renderers/rack.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
#body, #env, #exception, #sha
Instance Method Summary collapse
- #comment_options ⇒ Object
-
#http_headers ⇒ Hash
HTTP Headers hash from the request.
-
#ip_address ⇒ String
IP address of the client who triggered the exception.
-
#params ⇒ Hash
Rack params.
- #request ⇒ Object
-
#session ⇒ Hash
The session hash for the client at the time of the exception.
- #url ⇒ Object
Methods inherited from Base
#body_options, #build_table_from_hash, #comment, #fingerprint, #initialize, #labels, #occurred_at, #rows_for_table_from_hash, #stack_trace, #title, #update_body
Constructor Details
This class inherits a constructor from PartyFoul::IssueRenderers::Base
Instance Method Details
#comment_options ⇒ Object
7 8 9 |
# File 'lib/party_foul/issue_renderers/rack.rb', line 7 def super.merge(URL: url, Params: params, Session: session, 'IP Address' => ip_address, 'HTTP Headers' => http_headers) end |
#http_headers ⇒ Hash
HTTP Headers hash from the request. Headers can be filtered out by adding matching key names to PartyFoul.blacklisted_headers
40 41 42 43 44 45 46 47 |
# File 'lib/party_foul/issue_renderers/rack.rb', line 40 def http_headers { Version: env['HTTP_VERSION'], 'User Agent' => request.user_agent, 'Accept Encoding' => env['HTTP_ACCEPT_ENCODING'], Accept: env['HTTP_ACCEPT'], } end |
#ip_address ⇒ String
IP address of the client who triggered the exception
21 22 23 |
# File 'lib/party_foul/issue_renderers/rack.rb', line 21 def ip_address request.ip end |
#params ⇒ Hash
Rack params
14 15 16 |
# File 'lib/party_foul/issue_renderers/rack.rb', line 14 def params request.params end |
#request ⇒ Object
3 4 5 |
# File 'lib/party_foul/issue_renderers/rack.rb', line 3 def request @request ||= ::Rack::Request.new(env) end |
#session ⇒ Hash
The session hash for the client at the time of the exception
32 33 34 |
# File 'lib/party_foul/issue_renderers/rack.rb', line 32 def session request.session end |
#url ⇒ Object
25 26 27 |
# File 'lib/party_foul/issue_renderers/rack.rb', line 25 def url "[#{request.request_method}] #{env['REQUEST_URI']}" end |