iknow_view_models 3.0.2 → 3.0.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e468d13031e18589144a941463c993e5f10bf4588ef0b69f412fa7498f54a339
|
|
4
|
+
data.tar.gz: 6366dfda3ef8869fcab34111394fb4c35f10f1e469b2c800dc02ff2bd83e3542
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82cf736f4fd3d28a88a565c9c9d3bb2952804846429c4a3487f6594e9d42fee24345441de65195932923adcdda9c3d17e584baff74f060b7eb925f68be3f8b23
|
|
7
|
+
data.tar.gz: 951ca783e17c738a7ca742aaaa5e8cd7342d526a59ea3ee4726b130f8e55add82ff50ec431cf7c27997354ea0987e82b1c929268771aa146792f7cff8329bf87
|
|
@@ -25,11 +25,10 @@ class ViewModel::ErrorView < ViewModel::Record
|
|
|
25
25
|
|
|
26
26
|
# Ruby exceptions should never be serialized in production
|
|
27
27
|
def serialize_exception(json, serialize_context:)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
super if model.aggregation?
|
|
28
|
+
if ViewModel::Config.show_cause_in_error_view
|
|
29
|
+
super
|
|
30
|
+
else
|
|
31
|
+
json.exception nil
|
|
32
|
+
end
|
|
34
33
|
end
|
|
35
34
|
end
|
|
@@ -207,7 +207,9 @@ class ViewModel::ActiveRecord::ControllerTest < ActiveSupport::TestCase
|
|
|
207
207
|
'detail' => "Couldn't find Parent(s) with id(s)=[9999]",
|
|
208
208
|
'title' => nil,
|
|
209
209
|
'code' => "DeserializationError.NotFound",
|
|
210
|
-
'meta' => { 'nodes' => [{ '_type' => "Parent", 'id' => 9999 }]}
|
|
210
|
+
'meta' => { 'nodes' => [{ '_type' => "Parent", 'id' => 9999 }]},
|
|
211
|
+
'exception' => nil,
|
|
212
|
+
'causes' => nil }},
|
|
211
213
|
parentcontroller.hash_response)
|
|
212
214
|
end
|
|
213
215
|
|
|
@@ -229,7 +231,9 @@ class ViewModel::ActiveRecord::ControllerTest < ActiveSupport::TestCase
|
|
|
229
231
|
'meta' => { 'nodes' => [{ '_type' => "Child", 'id' => nil }],
|
|
230
232
|
'attribute' => 'age',
|
|
231
233
|
'message' => 'must be less than 42',
|
|
232
|
-
'details' => { 'error' => 'less_than', 'value' => 42, 'count' => 42 }}
|
|
234
|
+
'details' => { 'error' => 'less_than', 'value' => 42, 'count' => 42 }},
|
|
235
|
+
'exception' => nil,
|
|
236
|
+
'causes' => nil }},
|
|
233
237
|
parentcontroller.hash_response)
|
|
234
238
|
end
|
|
235
239
|
|
|
@@ -257,7 +261,9 @@ class ViewModel::ActiveRecord::ControllerTest < ActiveSupport::TestCase
|
|
|
257
261
|
'detail' => "Couldn't find Parent(s) with id(s)=[9999]",
|
|
258
262
|
'title' => nil,
|
|
259
263
|
'code' => "DeserializationError.NotFound",
|
|
260
|
-
'meta' => { "nodes" => [{"_type" => "Parent", "id" => 9999}]
|
|
264
|
+
'meta' => { "nodes" => [{"_type" => "Parent", "id" => 9999 }] },
|
|
265
|
+
'exception' => nil,
|
|
266
|
+
'causes' => nil } },
|
|
261
267
|
parentcontroller.hash_response)
|
|
262
268
|
assert_equal(404, parentcontroller.status)
|
|
263
269
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iknow_view_models
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- iKnow Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-08-
|
|
11
|
+
date: 2019-08-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|