erratum 3.1.1 → 3.2.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
- SHA1:
3
- metadata.gz: 2e6074fbcedf4fa04b17bfc9d0d6ba752d439aba
4
- data.tar.gz: 9e1d754947525a95255e6b92f3e0f12d978b8810
2
+ SHA256:
3
+ metadata.gz: c76bbf3115824bc2de64891f8c012453a46f119ceb4498ef4c722b51e948d932
4
+ data.tar.gz: d443492c0e710868e19488c7768ad39ea20a4cc269d39c36673b562c419e6cbb
5
5
  SHA512:
6
- metadata.gz: aa962c11de842b20a25c052462df81cf3752221622993bae659d03d71b1fcfc1744377c8b39b382bbcd214cebabff4d15c71ed4f5a22968ea46be62837cca1a6
7
- data.tar.gz: 54c7214756466a41ccdc82293c7dc9e5fc1b62e8c3a7e1eba96852f136c98cb64f575ad519014e7642b43e302b097e9de78d3121ce663600985cf49bc4ab44a9
6
+ metadata.gz: 6054c25f3897dea55d85fd6a6b3f088ea9ea3f49f954bee46a5d0df3137a60990f0787995b1c142a754b967391b2b1b9eb9a94a81dc1aec4ca4ac0ca536ead56
7
+ data.tar.gz: fa36be44436bf1bbf22bc24915a05ef1ad0b2e00c1f3daec504a0d346fdbdf0306d366fce847b3c37143dccf3717cb8cadd385a1a28bac73394079dced7694ac
checksums.yaml.gz.sig CHANGED
Binary file
@@ -19,12 +19,24 @@ class ResourcePersistence < RuntimeError
19
19
  'ActiveRecord::RecordNotSaved'
20
20
 
21
21
  original_error.record.errors.each_with_object([]) do |(attribute, error), errors|
22
- initialization_parameters = {
23
- attribute: attribute.to_s.camelize(:lower),
24
- detail: "#{attribute.to_s.humanize} #{error}",
25
- pointer: "/data/attributes/#{attribute}",
26
- value: original_error.record.public_send(attribute).to_s,
27
- }
22
+ initialization_parameters = if attribute == :base
23
+ {
24
+ attribute: nil,
25
+ detail: error.to_s,
26
+ pointer: '/data/base',
27
+ value: nil,
28
+ }
29
+ else
30
+ {
31
+ attribute: attribute.to_s.camelize(:lower),
32
+ detail: "#{attribute.to_s.humanize} #{error}",
33
+ pointer: "/data/attributes/#{attribute}",
34
+ value: original_error
35
+ .record
36
+ .public_send(attribute)
37
+ .to_s,
38
+ }
39
+ end
28
40
 
29
41
  errors << new(initialization_parameters.merge(overrides))
30
42
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Erratum
4
- VERSION = '3.1.1'
4
+ VERSION = '3.2.0'
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erratum
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thegranddesign
@@ -31,7 +31,7 @@ cert_chain:
31
31
  Y2GAoHKstmfIVhc4XHOPpmTd2o/C29O9oaRgjrkfQEhF/KvJ/PhoV5hvokzsCyI5
32
32
  iUeXPfvrGD/itYIBCgk+fnzyQQ4QtE5hTQaWQ3o2
33
33
  -----END CERTIFICATE-----
34
- date: 2018-05-03 00:00:00.000000000 Z
34
+ date: 2018-05-22 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: apple_core
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  requirements: []
167
167
  rubyforge_project:
168
- rubygems_version: 2.6.14
168
+ rubygems_version: 2.7.6
169
169
  signing_key:
170
170
  specification_version: 4
171
171
  summary: Errors Need Love
metadata.gz.sig CHANGED
Binary file