Skip to content

Commit

Permalink
Release v1.1.0 (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunvez committed Jul 30, 2021
1 parent 9f2a8cf commit 23f9071
Show file tree
Hide file tree
Showing 27 changed files with 265 additions and 155 deletions.
12 changes: 7 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Change log

## master (unreleased)

### New features

- [#113](https://github.com/rootstrap/exception_hunter/pull/113) Add configuration to turn on/off async logging using ActionJob. (
[@matteo95g][])
- [#119](https://github.com/rootstrap/exception_hunter/pull/119) Add support for tracking manual exceptions within transactions. ([@lalopsb][])

### Bug fixes

## 1.1.0 (2021-07-30)

### New features

- [#113](https://github.com/rootstrap/exception_hunter/pull/113) Add configuration to turn on/off async logging using ActionJob. (
[@matteo95g][])
- [#119](https://github.com/rootstrap/exception_hunter/pull/119) Add support for tracking manual exceptions within transactions. ([@lalopsb][])
### Others

- [#114](https://github.com/rootstrap/exception_hunter/pull/114) Fix development vulnerabilities ([@brunvez][])
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ GIT
PATH
remote: .
specs:
exception_hunter (1.0.2)
exception_hunter (1.1.0)
pagy (~> 3)
slack-notifier (~> 2.3)

Expand Down Expand Up @@ -160,7 +160,7 @@ GEM
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
orm_adapter (0.5.0)
pagy (3.13.0)
pagy (3.14.0)
parallel (1.20.1)
parser (2.7.2.0)
ast (~> 2.4.1)
Expand Down
8 changes: 4 additions & 4 deletions docs/ExceptionHunter.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>
Module: ExceptionHunter

&mdash; Documentation by YARD 0.9.25
&mdash; Documentation by YARD 0.9.26

</title>

Expand Down Expand Up @@ -132,7 +132,7 @@ <h2>

</div>
</dt>
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>1.0.1</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>1.1.0</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>

</dl>

Expand Down Expand Up @@ -465,9 +465,9 @@ <h3 class="signature " id="track-class_method">
</div>

<div id="footer">
Generated on Fri Dec 18 14:15:02 2020 by
Generated on Fri Jul 30 14:46:20 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.25 (ruby-2.6.5).
0.9.26 (ruby-2.6.5).
</div>

</div>
Expand Down
98 changes: 91 additions & 7 deletions docs/ExceptionHunter/Config.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>
Class: ExceptionHunter::Config

&mdash; Documentation by YARD 0.9.25
&mdash; Documentation by YARD 0.9.26

</title>

Expand Down Expand Up @@ -141,6 +141,33 @@ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collaps
<p>The name of the admin class (generally AdminUser).</p>
</div></span>

</li>


<li class="public ">
<span class="summary_signature">

<a href="#async_logging-instance_method" title="#async_logging (instance method)">#<strong>async_logging</strong> &#x21d2; Boolean </a>



</span>












<span class="summary_desc"><div class='inline'>
<p>Whether ExceptionHunter should log async or not.</p>
</div></span>

</li>


Expand Down Expand Up @@ -381,6 +408,63 @@ <h3 class="signature first" id="admin_user_class-instance_method">
</div>


<span id="async_logging=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="async_logging-instance_method">

#<strong>async_logging</strong> &#x21d2; <tt>Boolean</tt>





</h3><div class="docstring">
<div class="discussion">

<p>Returns whether ExceptionHunter should log async or not.</p>


</div>
</div>
<div class="tags">

<p class="tag_title">Returns:</p>
<ul class="return">

<li>


<span class='type'>(<tt>Boolean</tt>)</span>



&mdash;
<div class='inline'>
<p>whether ExceptionHunter should log async or not</p>
</div>

</li>

</ul>

</div><table class="source_code">
<tr>
<td>
<pre class="lines">


22</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/exception_hunter/config.rb', line 22</span>

<span class='id identifier rubyid_cattr_accessor'>cattr_accessor</span> <span class='symbol'>:async_logging</span><span class='comma'>,</span> <span class='label'>default:</span> <span class='kw'>false</span></pre>
</td>
</tr>
</table>
</div>


<span id="current_user_method=-instance_method"></span>
<div class="method_details ">
<h3 class="signature " id="current_user_method-instance_method">
Expand Down Expand Up @@ -545,12 +629,12 @@ <h3 class="signature first" id="auth_enabled?-class_method">
<pre class="lines">


25
26
27</pre>
28
29
30</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/exception_hunter/config.rb', line 25</span>
<pre class="code"><span class="info file"># File 'lib/exception_hunter/config.rb', line 28</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_auth_enabled?'>auth_enabled?</span>
<span class='id identifier rubyid_admin_user_class'>admin_user_class</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_admin_user_class'>admin_user_class</span><span class='period'>.</span><span class='id identifier rubyid_try'>try</span><span class='lparen'>(</span><span class='symbol'>:underscore</span><span class='rparen'>)</span>
Expand Down Expand Up @@ -736,9 +820,9 @@ <h3 class="signature " id="user_attributes-instance_method">
</div>

<div id="footer">
Generated on Fri Dec 18 14:15:02 2020 by
Generated on Fri Jul 30 14:46:20 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.25 (ruby-2.6.5).
0.9.26 (ruby-2.6.5).
</div>

</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/ExceptionHunter/DataRedacter.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>
Class: ExceptionHunter::DataRedacter

&mdash; Documentation by YARD 0.9.25
&mdash; Documentation by YARD 0.9.26

</title>

Expand Down Expand Up @@ -423,9 +423,9 @@ <h3 class="signature first" id="redact-instance_method">
</div>

<div id="footer">
Generated on Fri Dec 18 14:15:02 2020 by
Generated on Fri Jul 30 14:46:20 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.25 (ruby-2.6.5).
0.9.26 (ruby-2.6.5).
</div>

</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/ExceptionHunter/Devise.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>
Module: ExceptionHunter::Devise

&mdash; Documentation by YARD 0.9.25
&mdash; Documentation by YARD 0.9.26

</title>

Expand Down Expand Up @@ -114,9 +114,9 @@
</div>

<div id="footer">
Generated on Fri Dec 18 14:15:02 2020 by
Generated on Fri Jul 30 14:46:20 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.25 (ruby-2.6.5).
0.9.26 (ruby-2.6.5).
</div>

</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/ExceptionHunter/Devise/SessionsController.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>
Class: ExceptionHunter::Devise::SessionsController

&mdash; Documentation by YARD 0.9.25
&mdash; Documentation by YARD 0.9.26

</title>

Expand Down Expand Up @@ -264,9 +264,9 @@ <h3 class="signature " id="after_sign_out_path_for-instance_method">
</div>

<div id="footer">
Generated on Fri Dec 18 14:15:02 2020 by
Generated on Fri Jul 30 14:46:20 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.25 (ruby-2.6.5).
0.9.26 (ruby-2.6.5).
</div>

</div>
Expand Down
54 changes: 27 additions & 27 deletions docs/ExceptionHunter/ErrorCreator.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>
Class: ExceptionHunter::ErrorCreator

&mdash; Documentation by YARD 0.9.25
&mdash; Documentation by YARD 0.9.26

</title>

Expand Down Expand Up @@ -161,6 +161,20 @@ <h2>
</dt>
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Manual</span><span class='tstring_end'>&#39;</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>

<dt id="NOTIFICATION_DELAY-constant" class="">NOTIFICATION_DELAY =
<div class="docstring">
<div class="discussion">


</div>
</div>
<div class="tags">


</div>
</dt>
<dd><pre class="code"><span class='int'>1</span><span class='period'>.</span><span class='id identifier rubyid_minute'>minute</span></pre></dd>

</dl>


Expand All @@ -181,7 +195,7 @@ <h2>
<li class="public ">
<span class="summary_signature">

<a href="#call-class_method" title="call (class method)">.<strong>call</strong>(tag: nil, **error_attrs) &#x21d2; ExceptionHunter::Error, false </a>
<a href="#call-class_method" title="call (class method)">.<strong>call</strong>(async_logging: Config.async_logging, tag: nil, **error_attrs) &#x21d2; ExceptionHunter::Error, false </a>



Expand Down Expand Up @@ -214,7 +228,7 @@ <h2>Class Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="call-class_method">

.<strong>call</strong>(tag: nil, **error_attrs) &#x21d2; <tt>ExceptionHunter::Error</tt>, <tt>false</tt>
.<strong>call</strong>(async_logging: Config.async_logging, tag: nil, **error_attrs) &#x21d2; <tt>ExceptionHunter::Error</tt>, <tt>false</tt>



Expand Down Expand Up @@ -277,7 +291,6 @@ <h3 class="signature first" id="call-class_method">
<pre class="lines">


14
15
16
17
Expand All @@ -289,32 +302,19 @@ <h3 class="signature first" id="call-class_method">
23
24
25
26
27
28
29
30
31
32</pre>
26</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/exception_hunter/error_creator.rb', line 14</span>
<pre class="code"><span class="info file"># File 'lib/exception_hunter/error_creator.rb', line 15</span>

<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='label'>tag:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_error_attrs'>error_attrs</span><span class='rparen'>)</span>
<span class='kw'>def</span> <span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='label'>async_logging:</span> <span class='const'><span class='object_link'><a href="Config.html" title="ExceptionHunter::Config (class)">Config</a></span></span><span class='period'>.</span><span class='id identifier rubyid_async_logging'><span class='object_link'><a href="Config.html#async_logging-instance_method" title="ExceptionHunter::Config#async_logging (method)">async_logging</a></span></span><span class='comma'>,</span> <span class='label'>tag:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_error_attrs'>error_attrs</span><span class='rparen'>)</span>
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_should_create?'>should_create?</span>

<span class='const'>ActiveRecord</span><span class='op'>::</span><span class='const'>Base</span><span class='period'>.</span><span class='id identifier rubyid_transaction'>transaction</span> <span class='kw'>do</span>
<span class='id identifier rubyid_error_attrs'>error_attrs</span> <span class='op'>=</span> <span class='id identifier rubyid_extract_user_data'>extract_user_data</span><span class='lparen'>(</span><span class='id identifier rubyid_error_attrs'>error_attrs</span><span class='rparen'>)</span>
<span class='id identifier rubyid_error_attrs'>error_attrs</span> <span class='op'>=</span> <span class='id identifier rubyid_hide_sensitive_values'>hide_sensitive_values</span><span class='lparen'>(</span><span class='id identifier rubyid_error_attrs'>error_attrs</span><span class='rparen'>)</span>
<span class='id identifier rubyid_error'>error</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'><span class='object_link'><a href="../ExceptionHunter.html" title="ExceptionHunter (module)">ExceptionHunter</a></span></span><span class='op'>::</span><span class='const'>Error</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_error_attrs'>error_attrs</span><span class='rparen'>)</span>
<span class='id identifier rubyid_error_group'>error_group</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'><span class='object_link'><a href="../ExceptionHunter.html" title="ExceptionHunter (module)">ExceptionHunter</a></span></span><span class='op'>::</span><span class='const'>ErrorGroup</span><span class='period'>.</span><span class='id identifier rubyid_find_matching_group'>find_matching_group</span><span class='lparen'>(</span><span class='id identifier rubyid_error'>error</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='op'>::</span><span class='const'><span class='object_link'><a href="../ExceptionHunter.html" title="ExceptionHunter (module)">ExceptionHunter</a></span></span><span class='op'>::</span><span class='const'>ErrorGroup</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='id identifier rubyid_update_error_group'>update_error_group</span><span class='lparen'>(</span><span class='id identifier rubyid_error_group'>error_group</span><span class='comma'>,</span> <span class='id identifier rubyid_error'>error</span><span class='comma'>,</span> <span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
<span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_error_group'>error_group</span> <span class='op'>=</span> <span class='id identifier rubyid_error_group'>error_group</span>
<span class='id identifier rubyid_error'>error</span><span class='period'>.</span><span class='id identifier rubyid_save!'>save!</span>
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_error_group'>error_group</span><span class='period'>.</span><span class='id identifier rubyid_ignored?'>ignored?</span>

<span class='id identifier rubyid_notify'>notify</span><span class='lparen'>(</span><span class='id identifier rubyid_error'>error</span><span class='rparen'>)</span>
<span class='id identifier rubyid_error'>error</span>
<span class='kw'>if</span> <span class='id identifier rubyid_async_logging'>async_logging</span>
<span class='comment'># Time is sent in unix format and then converted to Time to avoid ActiveJob::SerializationError
</span> <span class='op'>::</span><span class='const'><span class='object_link'><a href="../ExceptionHunter.html" title="ExceptionHunter (module)">ExceptionHunter</a></span></span><span class='op'>::</span><span class='const'>AsyncLoggingJob</span><span class='period'>.</span><span class='id identifier rubyid_perform_later'>perform_later</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='comma'>,</span> <span class='id identifier rubyid_error_attrs'>error_attrs</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='label'>occurred_at:</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_create_error'>create_error</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='comma'>,</span> <span class='id identifier rubyid_error_attrs'>error_attrs</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>rescue</span> <span class='const'>ActiveRecord</span><span class='op'>::</span><span class='const'>RecordInvalid</span>
<span class='kw'>false</span>
Expand All @@ -329,9 +329,9 @@ <h3 class="signature first" id="call-class_method">
</div>

<div id="footer">
Generated on Fri Dec 18 14:15:02 2020 by
Generated on Fri Jul 30 14:46:20 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.25 (ruby-2.6.5).
0.9.26 (ruby-2.6.5).
</div>

</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/ExceptionHunter/ErrorReaper.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>
Class: ExceptionHunter::ErrorReaper

&mdash; Documentation by YARD 0.9.25
&mdash; Documentation by YARD 0.9.26

</title>

Expand Down Expand Up @@ -240,9 +240,9 @@ <h3 class="signature first" id="purge-class_method">
</div>

<div id="footer">
Generated on Fri Dec 18 14:15:02 2020 by
Generated on Fri Jul 30 14:46:20 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.25 (ruby-2.6.5).
0.9.26 (ruby-2.6.5).
</div>

</div>
Expand Down

0 comments on commit 23f9071

Please sign in to comment.