salestation 0.0.2 → 0.0.3
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 +2 -0
- data/lib/salestation/web/error_mapper.rb +3 -0
- data/lib/salestation/web/responses.rb +6 -0
- data/salestation.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b67337622a83b4ad9b150f3d6df7615463509c00
|
4
|
+
data.tar.gz: 0c0aabc2f0f90949c64bb40e4dc2109a0cb3476e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 783ea72b04713499291331e9318ff1391aee13c43bd8249e8196fb855653b864027210f37652421d531b333edd70d57fc82e88fb6429a240d18d9601a4ba1d6c
|
7
|
+
data.tar.gz: 83b5d7d942e45f8819b1b3de5996e8834309a13171d0e452bc0ab35c07ad060c574d92f1020675c9e08cb6ed288b8b671633a93449a8deb062247574d02c5145
|
@@ -9,6 +9,10 @@ module Salestation
|
|
9
9
|
-> (object) { Deterministic::Result::Success(Responses::Accepted.new(body: object)) }
|
10
10
|
end
|
11
11
|
|
12
|
+
def self.to_ok
|
13
|
+
-> (object) { Deterministic::Result::Success(Responses::OK.new(body: object)) }
|
14
|
+
end
|
15
|
+
|
12
16
|
module Response
|
13
17
|
def with_code(code)
|
14
18
|
Class.new(self) do
|
@@ -56,11 +60,13 @@ module Salestation
|
|
56
60
|
end
|
57
61
|
end
|
58
62
|
|
63
|
+
OK = Success.with_code(200)
|
59
64
|
Created = Success.with_code(201)
|
60
65
|
Accepted = Success.with_code(202)
|
61
66
|
|
62
67
|
Unauthorized = Error.with_code(401)
|
63
68
|
UnprocessableEntity = Error.with_code(422)
|
69
|
+
NotFound = Error.with_code(404)
|
64
70
|
|
65
71
|
InternalError = Error.with_code(500)
|
66
72
|
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: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SaleMove Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|