yabeda-rails 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/yabeda/rails/version.rb +1 -1
- data/lib/yabeda/rails.rb +9 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95166b3713d896663737aaf5fb6c485df43557d946c510f957fb3ab42e3e0d38
|
4
|
+
data.tar.gz: 0a8c2b72c450564b8fad46c1ac67c9895f342366d36d967611f576bd63275cea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 512a1d39088979606534b7de183e26aeed5aa2b7d4f2394b8b21cfb0b9ceec0735e35d34ef7a3a8a738468f4fc72d28a1825604f143a00b88e2649bcfd5b44dd
|
7
|
+
data.tar.gz: cc4b86dab98e360b4d5b481a593533f60f0d5af3d70a0acda3f45935968097eef02fef32ec6b65e57bc260a0d3d7f34561b2584f3f0a001da238e182b7bfd285
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## 0.8.1 - 2022-06-06
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
|
12
|
+
- Fill status codes for responses with unhandled exceptions. [@dks17][] in [#24](https://github.com/yabeda-rb/yabeda-rails/pull/24)
|
13
|
+
|
8
14
|
## 0.8.0 - 2022-05-30
|
9
15
|
|
10
16
|
### Added
|
@@ -78,3 +84,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
78
84
|
[@Envek]: https://github.com/Envek "Andrey Novikov"
|
79
85
|
[@liaden]: https://github.com/liaden "Joel Johnson"
|
80
86
|
[@lautis]: https://github.com/lautis "Ville Lautanala"
|
87
|
+
[@dks17]: https://github.com/dks17 "Konstantin"
|
data/lib/yabeda/rails/version.rb
CHANGED
data/lib/yabeda/rails.rb
CHANGED
@@ -58,7 +58,7 @@ module Yabeda
|
|
58
58
|
labels = {
|
59
59
|
controller: event.payload[:params]["controller"],
|
60
60
|
action: event.payload[:params]["action"],
|
61
|
-
status: event
|
61
|
+
status: Yabeda::Rails.event_status_code(event),
|
62
62
|
format: event.payload[:format],
|
63
63
|
method: event.payload[:method].downcase,
|
64
64
|
}
|
@@ -80,6 +80,14 @@ module Yabeda
|
|
80
80
|
def ms2s(milliseconds)
|
81
81
|
(milliseconds.to_f / 1000).round(3)
|
82
82
|
end
|
83
|
+
|
84
|
+
def event_status_code(event)
|
85
|
+
if event.payload[:status].nil? && event.payload[:exception].present?
|
86
|
+
ActionDispatch::ExceptionWrapper.status_code_for_exception(event.payload[:exception].first)
|
87
|
+
else
|
88
|
+
event.payload[:status]
|
89
|
+
end
|
90
|
+
end
|
83
91
|
end
|
84
92
|
end
|
85
93
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yabeda-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Novikov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|