hal_api-rails 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8029fa25346fb276a6bc2c06d866a7a6e89c8ad
4
- data.tar.gz: 61d932fd883eda182f9a249676e82003589befd3
3
+ metadata.gz: 15982e33c4d09491cb189781a603c263d5cc784e
4
+ data.tar.gz: 1349cbbaddd9e80ce1485e5d938cee23d5b00b68
5
5
  SHA512:
6
- metadata.gz: 0db583727abe49cd38cdd1903ea16fccc8594cbc23064eaab2e3cb57ec76ef4b316ffd8ce22aa39757e23955adee778b1c551a4d4c5f8266c02d50e630805ec1
7
- data.tar.gz: d9d0e09088b887833bd1aa39a2d809fa332f66f0d3bed8a178e1af8917f538fba6a9495ac644c9cfd0058c6ed5d1a4ead55c7abf696e6ee46bce81e66240acea
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|
@@ -1,5 +1,5 @@
1
1
  module HalApi
2
2
  module Rails
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
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.2
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: 2017-10-30 00:00:00.000000000 Z
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.2
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