carioca 2.1.7 → 2.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/carioca/services/finisher.rb +2 -0
- data/samples/test.rb +6 -0
- 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: 5d835f54ee7bbeee2d8536aa2baaee5ea96800e6c044b52ba15a5f9c711dad72
|
4
|
+
data.tar.gz: 3bed4c3fbe420f22f3e4949b5b9c9eae874475f941f9c6ede40c8b72a801f9bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da28ddf9bc986db91af0ed59825e42753dbe8c1dd86dbf6a0412faa5af64b917624c7a0b12648fadf12f11e8b42b7c81aa74a4e70e4c4c8e50b0a6adbf919304
|
7
|
+
data.tar.gz: b487f45e3a31842aa06994721e5856ba14c0406f2267c08a5184915b737444508bf97031c94d4f0864ef1abf6697e14f887ad594c746b6fa704759c8d3554623
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.8
|
@@ -112,6 +112,8 @@ module Carioca
|
|
112
112
|
result = do_return(return_case: e.error_case, more: e.message)
|
113
113
|
elsif e.respond_to?(:return_case)
|
114
114
|
result = structured ? do_return(return_case: e.return_case, more: e.message).merge({ data: e.data}) : e.data
|
115
|
+
else
|
116
|
+
result = do_return(return_case: :status_ko, more: "#{e.class.to_s} : #{e.message}")
|
115
117
|
end
|
116
118
|
end
|
117
119
|
if status && structured && json
|
data/samples/test.rb
CHANGED
@@ -221,6 +221,12 @@ test = finisher.secure_api_return(return_case: :status_ok, structured: true, jso
|
|
221
221
|
end
|
222
222
|
puts test
|
223
223
|
|
224
|
+
output.item 'api return, json, structured but raising unknown case'
|
225
|
+
test = finisher.secure_api_return(return_case: :status_ok, structured: true, json: true, status: false) do
|
226
|
+
raise "Boom"
|
227
|
+
end
|
228
|
+
puts test
|
229
|
+
|
224
230
|
puts "\nTest 18 : Service finisher : exit case in success"
|
225
231
|
i18n.locale = :fr
|
226
232
|
finisher.secure_execute! exit_case: :success_exit do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carioca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Romain GEORGES
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deep_merge
|