salestation 3.9.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/salestation/web/responses.rb +9 -4
- data/salestation.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56ea14b7773dbb2fa0af6c7c9cfacfb9e83da5d01df35b01ba8fb8b02658a95d
|
4
|
+
data.tar.gz: bb76fa431b6a680bb05cb0c5b251bc26b1c524472ce016bae0f90d39ba87a2cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5609d652f5235ae824cf4f218db431aa4f4a71782f45e641915aeeef1a7dcd95d15abb67d233a36b953a453abe990bec451c12049fc7a4b072fb1733c526db44
|
7
|
+
data.tar.gz: 1ef99f606062c630da5ae971fab61c8f23bf1881c2a3b356c5f4bf0b765db7456fe4d9728dc1554e703f19fd73382d0de88fc2864bf01967e350168fab3b1fb8
|
@@ -44,10 +44,10 @@ module Salestation
|
|
44
44
|
end
|
45
45
|
|
46
46
|
class UnprocessableEntityError < Error
|
47
|
-
attribute :form_errors, Types::Hash.
|
47
|
+
attribute? :form_errors, Types::Coercible::Hash.optional
|
48
48
|
|
49
49
|
def body
|
50
|
-
super.merge(form_errors: form_errors)
|
50
|
+
super.merge({form_errors: form_errors}.compact)
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
@@ -58,11 +58,16 @@ module Salestation
|
|
58
58
|
end
|
59
59
|
|
60
60
|
class UnprocessableEntityFromSchemaErrors
|
61
|
-
def self.create(errors:, hints:, base_error: nil)
|
61
|
+
def self.create(errors:, hints:, base_error: nil, form_errors: false)
|
62
62
|
message = parse_errors(errors)
|
63
63
|
debug_message = parse_hints(hints)
|
64
64
|
|
65
|
-
UnprocessableEntity.new(
|
65
|
+
UnprocessableEntity.new(
|
66
|
+
message: message,
|
67
|
+
debug_message: debug_message,
|
68
|
+
form_errors: form_errors ? errors : nil,
|
69
|
+
base_error: base_error
|
70
|
+
)
|
66
71
|
end
|
67
72
|
|
68
73
|
def self.parse_errors(errors)
|
data/salestation.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: salestation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Glia TechMovers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|