exception_hunter 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fe8c693b277f67a31d53a180173afc36b1f4686d7cb21a20b185eb7c6485ebc
4
- data.tar.gz: 056a56294bc861941067cc2584a7025bb64d54678fa656f371c382acc7bf563f
3
+ metadata.gz: 3cdc954e1b44cc37921b8ba178e55fb404bc6e49e67ae5a946e52e196ca3730e
4
+ data.tar.gz: d852ae798bc6a70543a3bf7a4541d26cdb5c1628e26a3f85decb536093275a1d
5
5
  SHA512:
6
- metadata.gz: 3dd23928e8042c200a394e6d3238d0a4fb3a1a27af09040720b19ec458ae6dde020fe5a5408fa8116cdb6902d80ab1e254687a1a6420830a1f8dc170bb941f0e
7
- data.tar.gz: 36e289b09d73aca46ff4f5d53f97fcf4b14205eaf379aaa162ed7a1024e842a876845e7c27e9ba4c14f334ff86bc03952308764703991c974ba6caebe3f1b67b
6
+ metadata.gz: 2d7e25d78109f69be6c37275e69b8300792f645a0a745e679d14c5ac8d2bb682ef60033646d28e6c6e85e937055e45a3e9d6c1fd04d2205092405eb55f9ab9e9
7
+ data.tar.gz: 8d3945a9c830adc7dbe195bb755990948746b46a3d2785b6993f6a6c7777d76d77d01074f134fa38eb2790300c68378dd29bfbf5166ba0a9420d4dc6d290b6ef
data/README.md CHANGED
@@ -25,7 +25,7 @@ project, and MVP or something else.
25
25
  Add Exception Hunter to your application's Gemfile:
26
26
 
27
27
  ```ruby
28
- gem 'exception_hunter', '~> 0.4.1'
28
+ gem 'exception_hunter', '~> 0.4.2'
29
29
  ```
30
30
 
31
31
  You may also need to add [Devise](https://github.com/heartcombo/devise) to your Gemfile
@@ -1,5 +1,5 @@
1
1
  module ExceptionHunter
2
- class Error < ApplicationRecord
2
+ class Error < ::ExceptionHunter::ApplicationRecord
3
3
  validates :class_name, presence: true
4
4
  validates :occurred_at, presence: true
5
5
 
@@ -1,5 +1,5 @@
1
1
  module ExceptionHunter
2
- class ErrorGroup < ApplicationRecord
2
+ class ErrorGroup < ::ExceptionHunter::ApplicationRecord
3
3
  SIMILARITY_THRESHOLD = 0.75
4
4
 
5
5
  validates :error_class_name, presence: true
@@ -10,7 +10,7 @@ module ExceptionHunter
10
10
  end
11
11
 
12
12
  def backtrace
13
- error.backtrace.map do |line|
13
+ (error.backtrace || []).map do |line|
14
14
  format_backtrace_line(line)
15
15
  end
16
16
  end
@@ -10,8 +10,8 @@ module ExceptionHunter
10
10
 
11
11
  ActiveRecord::Base.transaction do
12
12
  error_attrs = extract_user_data(error_attrs)
13
- error = Error.new(error_attrs)
14
- error_group = ErrorGroup.find_matching_group(error) || ErrorGroup.new
13
+ error = ::ExceptionHunter::Error.new(error_attrs)
14
+ error_group = ::ExceptionHunter::ErrorGroup.find_matching_group(error) || ::ExceptionHunter::ErrorGroup.new
15
15
  update_error_group(error_group, error, tag)
16
16
  error.error_group = error_group
17
17
  error.save!
@@ -7,7 +7,8 @@ module ExceptionHunter
7
7
  message: exception.message,
8
8
  backtrace: exception.backtrace,
9
9
  custom_data: custom_data,
10
- user: user
10
+ user: user,
11
+ environment_data: {}
11
12
  )
12
13
 
13
14
  nil
@@ -1,3 +1,3 @@
1
1
  module ExceptionHunter
2
- VERSION = '0.4.1'.freeze
2
+ VERSION = '0.4.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception_hunter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Vezoli
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-08-07 00:00:00.000000000 Z
12
+ date: 2020-09-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pagy