solid_errors 0.2.8 → 0.2.10
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1c9029bc8c5276a99554deef068a88762065cd253da50d5f21829d77a194fd0
|
4
|
+
data.tar.gz: 85a4febc8cf45b4ed68016f9bfa86e20bcd3e7faea814d8a3fe7d3d43a41820f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f744e2fc5a1c74010ba87f61a07f3c78fb640fe9d3f15df4446767c9c5d019bbf1b07dd35d574b77d51283e61a1d3a94077ec03f154256707cff1d4883968ea
|
7
|
+
data.tar.gz: 323bc750873ab6b797a9d14f737ee95d5d69a9a86f44b58016d856dc4dce26f6af40b87c8f2d067cbf029c46e13fc829f1530fe9bca578c14c0d7ba2b053262a
|
@@ -7,6 +7,11 @@ module SolidErrors
|
|
7
7
|
warning: "⚠️",
|
8
8
|
info: "ℹ️"
|
9
9
|
}
|
10
|
+
SEVERITY_TO_BADGE_CLASSES = {
|
11
|
+
error: "bg-red-100 text-red-800",
|
12
|
+
warning: "bg-yellow-100 text-yellow-800",
|
13
|
+
info: "bg-blue-100 text-blue-800"
|
14
|
+
}
|
10
15
|
|
11
16
|
has_many :occurrences, class_name: "SolidErrors::Occurrence", dependent: :destroy
|
12
17
|
|
@@ -20,5 +25,9 @@ module SolidErrors
|
|
20
25
|
def emoji
|
21
26
|
SEVERITY_TO_EMOJI[severity.to_sym]
|
22
27
|
end
|
28
|
+
|
29
|
+
def badge_classes
|
30
|
+
"px-2 inline-flex text-[.75em] font-semibold rounded-md #{SEVERITY_TO_BADGE_CLASSES[severity.to_sym]}"
|
31
|
+
end
|
23
32
|
end
|
24
33
|
end
|
data/lib/solid_errors/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solid_errors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Margheim
|
@@ -38,7 +38,7 @@ files:
|
|
38
38
|
- app/models/solid_errors/error.rb
|
39
39
|
- app/models/solid_errors/occurrence.rb
|
40
40
|
- app/models/solid_errors/record.rb
|
41
|
-
- app/views/layouts/application.html.erb
|
41
|
+
- app/views/layouts/solid_errors/application.html.erb
|
42
42
|
- app/views/solid_errors/errors/_actions.html.erb
|
43
43
|
- app/views/solid_errors/errors/_error.html.erb
|
44
44
|
- app/views/solid_errors/errors/index.html.erb
|
File without changes
|