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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 000312fa89e07fae328f829c0fc917ac7aac1d4741447c60346be8b35555973e
4
- data.tar.gz: 4126612f810bbdd6ab47615b070e62751f9f957a77e894cdc1a6def4b2e6bc84
3
+ metadata.gz: 5d835f54ee7bbeee2d8536aa2baaee5ea96800e6c044b52ba15a5f9c711dad72
4
+ data.tar.gz: 3bed4c3fbe420f22f3e4949b5b9c9eae874475f941f9c6ede40c8b72a801f9bc
5
5
  SHA512:
6
- metadata.gz: bd7cb77316e8932226c3089e32e2fb1e8d6edf9b8c6647517643cc7216356ecf8ae4445ad7e6bf02a34f00e3d220a8c77744ca829d03277db584b6c82aa5dc2f
7
- data.tar.gz: 9134d7609f2ac948dfe667f6e200091ce693983a8ce6df2394cae7047d23bb06064984dfa8cd92ea6919bb12c719de36a9b45fcbfbf829c53f54b019031bf4b0
6
+ metadata.gz: da28ddf9bc986db91af0ed59825e42753dbe8c1dd86dbf6a0412faa5af64b917624c7a0b12648fadf12f11e8b42b7c81aa74a4e70e4c4c8e50b0a6adbf919304
7
+ data.tar.gz: b487f45e3a31842aa06994721e5856ba14c0406f2267c08a5184915b737444508bf97031c94d4f0864ef1abf6697e14f887ad594c746b6fa704759c8d3554623
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.7
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.7
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-26 00:00:00.000000000 Z
11
+ date: 2024-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge