hal_api-rails 0.3.2 → 0.3.3
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/lib/hal_api/controller/exceptions.rb +8 -0
- data/lib/hal_api/rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 15982e33c4d09491cb189781a603c263d5cc784e
|
|
4
|
+
data.tar.gz: 1349cbbaddd9e80ce1485e5d938cee23d5b00b68
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ab8c8de5b3649f72095e8ac8aa6f96cb4911e8f4d4f6215416460f9a1e1ea01ed221cdd4d07e9427386632945edbcdef2c497f9fa2821010e89d893c6c1f16a
|
|
7
|
+
data.tar.gz: d6df7bf54cba7ee6bb963208581c3e9f65de060b104f87e58fc6de74abb53407734491629f790137468739878e51c870c45c0f4c2d5495e6a50ac2ce1da69b9e
|
|
@@ -17,6 +17,8 @@ module HalApi::Controller::Exceptions
|
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
+
notice_error(exception) if error.status >= 500
|
|
21
|
+
|
|
20
22
|
respond_with(
|
|
21
23
|
error,
|
|
22
24
|
status: error.status,
|
|
@@ -42,6 +44,12 @@ module HalApi::Controller::Exceptions
|
|
|
42
44
|
end
|
|
43
45
|
end
|
|
44
46
|
|
|
47
|
+
def notice_error(error)
|
|
48
|
+
if defined?(::NewRelic::Agent) && ::NewRelic::Agent.respond_to?(:notice_error)
|
|
49
|
+
::NewRelic::Agent.notice_error(error)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
45
53
|
module ClassMethods
|
|
46
54
|
def hal_rescue_standard_errors
|
|
47
55
|
rescue_from StandardError do |error|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hal_api-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Rhoden
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2018-07-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activemodel
|
|
@@ -252,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
252
252
|
version: '0'
|
|
253
253
|
requirements: []
|
|
254
254
|
rubyforge_project:
|
|
255
|
-
rubygems_version: 2.4.5
|
|
255
|
+
rubygems_version: 2.4.5
|
|
256
256
|
signing_key:
|
|
257
257
|
specification_version: 4
|
|
258
258
|
summary: JSON HAL APIs on Rails in the style of PRX
|