jsonapi_errors_handler 0.1.9 → 0.2.0

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: 19c98e76b745197faca1384efe3da8cbef28b72e2111fdaf61983096c1b78056
4
- data.tar.gz: 1f0955eeb19c9656fd2baffe6d37f6de10cf1fe5cbd9aed0f207698ac9726d4a
3
+ metadata.gz: b33f21143133b7108854ca72320fa5fec7d98bb3b327d8a20bc18396ac805146
4
+ data.tar.gz: 951de26ca4908740f885a3b63eebaebd5ee213a44d4063a37387172e2368e4d2
5
5
  SHA512:
6
- metadata.gz: a4f7d48166a29d60cbdba830eb4f154b46e1bdf3bb22878c5d598e62672552633a5538793898e6b2972d57d7c5a7f18d7c179576febd992c06d84bbc7d9d25f6
7
- data.tar.gz: 4ab0360f67a40f99e5a34c1f6f79f23c13fe6775c7a3ac7af40ae1a3939989a80919f1dc722781712c3614f1df111b1a7d209604b31ad4401a8988cc4dbfd8fb
6
+ metadata.gz: aadfe55f49f98e2ce8807ec0df6833d67f645e9de0c9cbe325c85112a68a9f553903cbc7c4210ea425c3c600fc6cc1ad24a350008e5ae40db238ee8ff5f27fe3
7
+ data.tar.gz: ab8c65e49f8117d14d276fb2d396204c59d4a6d6ff2cb794a2cb3c67a3725a88ecae8f9fbfe85a4e2a4366d062cac7d945dfa07e85c44cf8293f88760ff7604e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jsonapi_errors_handler (0.1.7)
4
+ jsonapi_errors_handler (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -36,7 +36,7 @@ From this point you'll have default html errors being serialized. JsonapiErrorsH
36
36
  * [JsonapiErrorsHandler::Errors::Invalid](https://github.com/driggl/jsonapi_errors_handler/blob/master/lib/jsonapi_errors_handler/errors/invalid.rb)
37
37
  * [JsonapiErrorsHandler::Errors::Forbidden](https://github.com/driggl/jsonapi_errors_handler/blob/master/lib/jsonapi_errors_handler/errors/forbidden.rb)
38
38
  * [JsonapiErrorsHandler::Errors::NotFound](https://github.com/driggl/jsonapi_errors_handler/blob/master/lib/jsonapi_errors_handler/errors/not_found.rb)
39
- * [JsonapiErrorsHandler::Errors::Unauthorized](https://github.com/driggl/jsonapi_errors_handler/blob/master/lib/jsonapi_errors_handler/errors/not_found.rb)
39
+ * [JsonapiErrorsHandler::Errors::Unauthorized](https://github.com/driggl/jsonapi_errors_handler/blob/master/lib/jsonapi_errors_handler/errors/unauthorized.rb)
40
40
 
41
41
  If you rise any of errors above in any place of your application, client gets the nicely formatted error message instead of 500
42
42
 
@@ -103,7 +103,7 @@ By default, we deliver hardcoded responses. You can check out the defined error
103
103
  * [JsonapiErrorsHandler::Errors::Invalid](https://github.com/driggl/jsonapi_errors_handler/blob/master/lib/jsonapi_errors_handler/errors/invalid.rb)
104
104
  * [JsonapiErrorsHandler::Errors::Forbidden](https://github.com/driggl/jsonapi_errors_handler/blob/master/lib/jsonapi_errors_handler/errors/forbidden.rb)
105
105
  * [JsonapiErrorsHandler::Errors::NotFound](https://github.com/driggl/jsonapi_errors_handler/blob/master/lib/jsonapi_errors_handler/errors/not_found.rb)
106
- * [JsonapiErrorsHandler::Errors::Unauthorized](https://github.com/driggl/jsonapi_errors_handler/blob/master/lib/jsonapi_errors_handler/errors/not_found.rb)
106
+ * [JsonapiErrorsHandler::Errors::Unauthorized](https://github.com/driggl/jsonapi_errors_handler/blob/master/lib/jsonapi_errors_handler/errors/unauthorized.rb)
107
107
 
108
108
  If you want to have custom error responses being delivered, just create your own `Api::Errors` that inherits from `JsonapiErrorsHandler::StandardError`
109
109
 
@@ -20,7 +20,7 @@ module JsonapiErrorsHandler
20
20
 
21
21
  def serializable_hash
22
22
  {
23
- errors: [error.serializable_hash]
23
+ errors: [error.serializable_hash].flatten
24
24
  }
25
25
  end
26
26
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JsonapiErrorsHandler
4
- VERSION = '0.1.9'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi_errors_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Wilgosz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-26 00:00:00.000000000 Z
11
+ date: 2020-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler