alchemy-json_api 0.6.0 → 0.7.0

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
  SHA256:
3
- metadata.gz: bb04c3210449c9689cc5d5f0a187492b6de5e53ad88928e878f564dfd10f6615
4
- data.tar.gz: e856316ed3433935246e4fd1e33f37f5c9830bb6737fb37b02d55c441e66b91e
3
+ metadata.gz: 117c65c9f829b02d27cc3bc000c9a9f796816c4c7d5a99fb191752d3f0a4c6d2
4
+ data.tar.gz: 1a51fb6c7d8ed4987c2393f37acbf6f4d601ffa4e2c11a9a0af415624c17e938
5
5
  SHA512:
6
- metadata.gz: dbb2638d53afbb1ccb330d65b0b7f2baec33b619c55992accdb58c457d10192a28459ad7520543cfc2fdbc921ca4dea09f992bf8fd532dd85f0fbedcc52504d7
7
- data.tar.gz: a872add90f9bda24d3f0d3647ab01c0f2a5fd2707c3d83e596d21db66b9faf38bbfe587fe3179228fe9233ff921b22fe9e9c5c7954a2217c08354d5269e48668
6
+ metadata.gz: 448e55aac748eda835d9341b784e28907fa5159251974ff1a2cf12d365a7f1cdcd892d8565ef4c1fcdc0fa74ab27de0273e20d7fbf1dc0955f7009fd7f73c8c2
7
+ data.tar.gz: d6ede97400574f3e02aac76adb72923dc5aae7f1979dea08302d59d2c8ec6aa2500d972b26cf39daec98deb10f1ce8e2811f2b09060939260faa4f26a4e8992e
@@ -7,6 +7,23 @@ module Alchemy
7
7
  include JSONAPI::Errors
8
8
  include JSONAPI::Filtering
9
9
  include JSONAPI::Pagination
10
+
11
+ private
12
+
13
+ def render_jsonapi_internal_server_error(exception)
14
+ log_error(exception)
15
+ super
16
+ end
17
+
18
+ def log_error(exception)
19
+ logger = Rails.logger
20
+ return unless logger
21
+
22
+ message = +"\n#{exception.class} (#{exception.message}):\n"
23
+ message << exception.annotated_source_code.to_s if exception.respond_to?(:annotated_source_code)
24
+ message << " " << exception.backtrace.join("\n ")
25
+ logger.fatal("#{message}\n\n")
26
+ end
10
27
  end
11
28
  end
12
29
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Alchemy
3
3
  module JsonApi
4
- VERSION = "0.6.0"
4
+ VERSION = "0.7.0"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-json_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Meyerhoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-12 00:00:00.000000000 Z
11
+ date: 2020-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms
@@ -162,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  - !ruby/object:Gem::Version
163
163
  version: '0'
164
164
  requirements: []
165
- rubygems_version: 3.0.3
165
+ rubygems_version: 3.1.4
166
166
  signing_key:
167
167
  specification_version: 4
168
168
  summary: A JSONAPI compliant API for AlchemyCMS