salestation 3.7.0 → 3.8.0
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 +4 -4
- data/lib/salestation/web/responses.rb +10 -2
- 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: 2fe9755ef3152c1d5e9821aa2a7be920245b35f7ee95f26fd1e0fe3fb5934468
|
4
|
+
data.tar.gz: f9b1e080731f605cfe7f3ccd2194b923fe70b668757198b105c5ee697ca29637
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5988265e60fdfa3f8dc7fe1915e38cd6d3afc1aabeca923de08bf9726c21db355d04ce6d9047bfda8d7b8fa4773104fdacbd169a12de6c75ce702aafbd5e6dd
|
7
|
+
data.tar.gz: 1f3351524846ddea69d54281ab5262ffaa138a4fdf83092614030ca7d60bcb99d44a4944aa1690c04ecf88e41e39cf1d3209588e6730bd92566cf25e66393cec
|
@@ -41,6 +41,14 @@ module Salestation
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
+
class UnprocessableEntityError < Error
|
45
|
+
attribute :form_errors, Types::Hash.default({}.freeze)
|
46
|
+
|
47
|
+
def body
|
48
|
+
super.merge(form_errors: errors)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
44
52
|
class Success < Response
|
45
53
|
attribute :status, Types::Strict::Integer
|
46
54
|
attribute :body, Types::Strict::Hash | Types::Strict::Array
|
@@ -52,7 +60,7 @@ module Salestation
|
|
52
60
|
message = parse_errors(errors)
|
53
61
|
debug_message = parse_hints(hints)
|
54
62
|
|
55
|
-
UnprocessableEntity.new(message: message, debug_message: debug_message)
|
63
|
+
UnprocessableEntity.new(message: message, debug_message: debug_message, form_errors: errors)
|
56
64
|
end
|
57
65
|
|
58
66
|
def self.parse_errors(errors)
|
@@ -99,7 +107,7 @@ module Salestation
|
|
99
107
|
Conflict = Error.with_code(409)
|
100
108
|
RequestEntityTooLarge = Error.with_code(413)
|
101
109
|
UnsupportedMediaType = Error.with_code(415)
|
102
|
-
UnprocessableEntity =
|
110
|
+
UnprocessableEntity = UnprocessableEntityError.with_code(422)
|
103
111
|
|
104
112
|
InternalError = Error.with_code(500)
|
105
113
|
ServiceUnavailable = Error.with_code(503)
|
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: 3.
|
4
|
+
version: 3.8.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: 2020-
|
11
|
+
date: 2020-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|