salestation 0.8.0 → 0.9.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/app/errors.rb +14 -0
- data/lib/salestation/web/error_mapper.rb +6 -0
- data/lib/salestation/web/responses.rb +2 -0
- data/salestation.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c347b95089dd314515600ece2b76c2dd8a90c813
|
4
|
+
data.tar.gz: b268fc27b2083f7d9c43c39c644bb32a80abe4bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 602b44e3284ce3888929b23e40f71ecb4dac73fc0792413bc5ab908d5fa4bbf89e199b93af3c82bbfc2624b7547c3073a1baa8750889916773403d2d653f7350
|
7
|
+
data.tar.gz: 70d6fbebb3bde4004da511b14879c89fa286b30433e5944ebb6b84d0d54886fe3f54ad9cadcf870a7a2158098a4c04d7fd27f35cb110a97cbaa9419bf5778c1f
|
@@ -32,6 +32,20 @@ module Salestation
|
|
32
32
|
attribute :message, Types::Strict::String
|
33
33
|
attribute :debug_message, Types::Strict::String
|
34
34
|
end
|
35
|
+
|
36
|
+
class NotAcceptable < Dry::Struct
|
37
|
+
constructor_type :strict
|
38
|
+
|
39
|
+
attribute :message, Types::Strict::String
|
40
|
+
attribute :debug_message, Types::Strict::String
|
41
|
+
end
|
42
|
+
|
43
|
+
class UnsupportedMediaType < Dry::Struct
|
44
|
+
constructor_type :strict
|
45
|
+
|
46
|
+
attribute :message, Types::Strict::String
|
47
|
+
attribute :debug_message, Types::Strict::String
|
48
|
+
end
|
35
49
|
end
|
36
50
|
end
|
37
51
|
end
|
@@ -21,6 +21,12 @@ module Salestation
|
|
21
21
|
},
|
22
22
|
App::Errors::Conflict => -> (error) {
|
23
23
|
Responses::Conflict.new(message: error.message, debug_message: error.debug_message)
|
24
|
+
},
|
25
|
+
App::Errors::NotAcceptable => -> (error) {
|
26
|
+
Responses::NotAcceptable.new(message: error.message, debug_message: error.debug_message)
|
27
|
+
},
|
28
|
+
App::Errors::UnsupportedMediaType => -> (error) {
|
29
|
+
Responses::UnsupportedMediaType.new(message: error.message, debug_message: error.debug_message)
|
24
30
|
}
|
25
31
|
}.freeze
|
26
32
|
|
@@ -97,7 +97,9 @@ module Salestation
|
|
97
97
|
Unauthorized = Error.with_code(401)
|
98
98
|
Forbidden = Error.with_code(403)
|
99
99
|
NotFound = Error.with_code(404)
|
100
|
+
NotAcceptable = Error.with_code(406)
|
100
101
|
Conflict = Error.with_code(409)
|
102
|
+
UnsupportedMediaType = Error.with_code(415)
|
101
103
|
UnprocessableEntity = Error.with_code(422)
|
102
104
|
|
103
105
|
InternalError = Error.with_code(500)
|
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: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SaleMove TechMovers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
158
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.6.
|
159
|
+
rubygems_version: 2.6.13
|
160
160
|
signing_key:
|
161
161
|
specification_version: 4
|
162
162
|
summary: ''
|