solid_errors 0.3.2 → 0.3.4
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 +4 -4
- data/README.md +2 -0
- data/app/models/solid_errors/backtrace.rb +1 -0
- data/app/models/solid_errors/backtrace_line.rb +1 -0
- data/app/models/solid_errors/occurrence.rb +1 -1
- data/config/locales/en.yml +73 -0
- data/lib/generators/solid_errors/install/templates/create_solid_errors_tables.rb.erb +1 -1
- data/lib/solid_errors/version.rb +1 -1
- data/lib/solid_errors.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a034955a760c572f2e8e317e1120eed78d92a0fe1a55cae7f96e571c66ef00cd
|
4
|
+
data.tar.gz: 8d7490b0198ee2e899c712c749a9e907755df31c3a900a51f21db5d089267ea7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f674d6137d43517bc2c984c49bef87b521cc8fd72001f0d7fc6c14ac9072bd5a944af1f78ee06a74f10e0793db5187015d995915fda37bf5ed6f9e4f2314ea8
|
7
|
+
data.tar.gz: 39b0a00ec120b2d2a4c80b7602cacbc18ce97ad268cba8a62426d4c77c593ca7d10d7af18bb54c768530f2f7fe6999bdff76e533db74c7adc2680c2104d19f24
|
data/README.md
CHANGED
@@ -56,6 +56,8 @@ All exceptions are recorded automatically. No additional code required.
|
|
56
56
|
|
57
57
|
Please consult the [official guides](https://guides.rubyonrails.org/error_reporting.html) for an introduction to the error reporting API.
|
58
58
|
|
59
|
+
There are intentionally few features; you can view and resolve errors. That’s it. The goal is to provide a simple, lightweight, and performant solution for tracking exceptions in your Rails application. If you need more features, you should probably use a 3rd party service like [Honeybadger](https://www.honeybadger.io/), whose MIT-licensed [Ruby agent gem](https://github.com/honeybadger-io/honeybadger-ruby) provided a couple of critical pieces of code for this project.
|
60
|
+
|
59
61
|
### Configuration
|
60
62
|
|
61
63
|
You can configure Solid Errors via the Rails configuration object, under the `solid_errors` key. Currently, only 3 configuration options are available:
|
@@ -1,4 +1,5 @@
|
|
1
1
|
module SolidErrors
|
2
|
+
# adapted from: https://github.com/honeybadger-io/honeybadger-ruby/blob/master/lib/honeybadger/backtrace.rb
|
2
3
|
class BacktraceLine
|
3
4
|
# Backtrace line regexp (optionally allowing leading X: for windows support).
|
4
5
|
INPUT_FORMAT = %r{^((?:[a-zA-Z]:)?[^:]+):(\d+)(?::in `([^']+)')?$}.freeze
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module SolidErrors
|
2
2
|
class Occurrence < Record
|
3
|
-
belongs_to :
|
3
|
+
belongs_to :error, class_name: "SolidErrors::Error"
|
4
4
|
|
5
5
|
# The parsed exception backtrace. Lines in this backtrace that are from installed gems
|
6
6
|
# have the base path for gem installs replaced by "[GEM_ROOT]", while those in the project
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t "hello"
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t("hello") %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# The following keys must be escaped otherwise they will not be retrieved by
|
20
|
+
# the default I18n backend:
|
21
|
+
#
|
22
|
+
# true, false, on, off, yes, no
|
23
|
+
#
|
24
|
+
# Instead, surround them with single quotes.
|
25
|
+
#
|
26
|
+
# en:
|
27
|
+
# "true": "foo"
|
28
|
+
# en.stripe.individual.card_issuing.user_terms_acceptance.ip
|
29
|
+
# To learn more, please read the Rails Internationalization guide
|
30
|
+
# available at https://guides.rubyonrails.org/i18n.html.
|
31
|
+
# activerecord.errors.models.card.attributes.stripe_issuing_account.mismatched_accounts
|
32
|
+
|
33
|
+
en:
|
34
|
+
datetime:
|
35
|
+
distance_in_words:
|
36
|
+
short:
|
37
|
+
about_x_hours:
|
38
|
+
one: ~%{count}h
|
39
|
+
other: ~%{count}h
|
40
|
+
about_x_months:
|
41
|
+
one: ~%{count}mo
|
42
|
+
other: ~%{count}mo
|
43
|
+
about_x_years:
|
44
|
+
one: ~%{count}y
|
45
|
+
other: ~%{count}y
|
46
|
+
almost_x_years:
|
47
|
+
one: ~%{count}y
|
48
|
+
other: ~%{count}y
|
49
|
+
half_a_minute: .5m
|
50
|
+
less_than_x_seconds:
|
51
|
+
one: <%{count}s
|
52
|
+
other: <%{count}s
|
53
|
+
less_than_x_minutes:
|
54
|
+
one: <1m
|
55
|
+
other: <%{count}m
|
56
|
+
over_x_years:
|
57
|
+
one: ">%{count}y"
|
58
|
+
other: ">%{count}y"
|
59
|
+
x_seconds:
|
60
|
+
one: "%{count}s"
|
61
|
+
other: "%{count}s"
|
62
|
+
x_minutes:
|
63
|
+
one: "%{count}m"
|
64
|
+
other: "%{count}m"
|
65
|
+
x_days:
|
66
|
+
one: "%{count}d"
|
67
|
+
other: "%{count}d"
|
68
|
+
x_months:
|
69
|
+
one: "%{count}mo"
|
70
|
+
other: "%{count}mo"
|
71
|
+
x_years:
|
72
|
+
one: "%{count}y"
|
73
|
+
other: "%{count}y"
|
@@ -15,7 +15,7 @@ class CreateSolidErrorsTables < ActiveRecord::Migration<%= migration_version %>
|
|
15
15
|
end
|
16
16
|
|
17
17
|
create_table :solid_errors_occurrences do |t|
|
18
|
-
t.belongs_to :
|
18
|
+
t.belongs_to :error, null: false, foreign_key: { to_table: :solid_errors }
|
19
19
|
t.text :backtrace
|
20
20
|
t.json :context
|
21
21
|
|
data/lib/solid_errors/version.rb
CHANGED
data/lib/solid_errors.rb
CHANGED
@@ -14,13 +14,13 @@ module SolidErrors
|
|
14
14
|
# use method instead of attr_accessor to ensure
|
15
15
|
# this works if variable set after SolidErrors is loaded
|
16
16
|
def username
|
17
|
-
@username ||= ENV["SOLIDERRORS_USERNAME"]
|
17
|
+
@username ||= ENV["SOLIDERRORS_USERNAME"] || @@username
|
18
18
|
end
|
19
19
|
|
20
20
|
# use method instead of attr_accessor to ensure
|
21
21
|
# this works if variable set after SolidErrors is loaded
|
22
22
|
def password
|
23
|
-
@password ||= ENV["SOLIDERRORS_PASSWORD"]
|
23
|
+
@password ||= ENV["SOLIDERRORS_PASSWORD"] || @@password
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solid_errors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Margheim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- app/views/solid_errors/errors/show.html.erb
|
62
62
|
- app/views/solid_errors/occurrences/_collection.html.erb
|
63
63
|
- app/views/solid_errors/occurrences/_occurrence.html.erb
|
64
|
+
- config/locales/en.yml
|
64
65
|
- config/routes.rb
|
65
66
|
- lib/generators/solid_errors/install/USAGE
|
66
67
|
- lib/generators/solid_errors/install/install_generator.rb
|