json_api_toolbox 0.4.0 → 0.4.1

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
  SHA1:
3
- metadata.gz: 2121491b78188c63d80c9d89fc39ad0198aaaede
4
- data.tar.gz: 4f8d1c1deb6cc68e490bc69f2886c95430a5f8ec
3
+ metadata.gz: f8facb9cd80698b20d8a3a58cb4b34aaec28ff6f
4
+ data.tar.gz: d51ca3c9e37b4ce22ebe4703c5f373d6811f2e46
5
5
  SHA512:
6
- metadata.gz: 94e0a7fdbf2eb3913d23521b08d30d7c9ca1019924bf9c4b04164372ad198483749830bad5004a112ea1d2ce11e7c6783bb8d8c9b267c5847675d31add6ba53a
7
- data.tar.gz: c02b2a1df450aa008e0212400954ae3a93046d5b9c3a7b9b6f407cdedcb8575dcc0c70b1189f11224e509b27b0ecb13ac4c122259073ca7e44358de32f2f66aa
6
+ metadata.gz: 94509c5f8beb39aac143b022648c4475e76dceb586bdf32c6d7c651f44cfc69b07848d9e61e1fd9e57933771f42afe6a4cc1299c63b0901fd104babe7ae53389
7
+ data.tar.gz: f20282df0ce822425c0699ff54be36eb9ff10c5079f61d490d2a6b03d6aa9d0b718b29f6d24fb818beb7b07354847c17a736aeb4a45e2b05ad524206096b81c5
@@ -10,6 +10,12 @@ module JsonApiToolbox
10
10
  end
11
11
  end
12
12
 
13
+ RSpec.shared_examples 'a post with status 422 Unprocessable Entity' do
14
+ it 'returns http code 422 Unprocessable Entity' do
15
+ expect(response).to have_http_status(422)
16
+ end
17
+ end
18
+
13
19
  RSpec.shared_examples 'a get method' do
14
20
  it_behaves_like 'a http method'
15
21
 
@@ -1,3 +1,3 @@
1
1
  module JsonApiToolbox
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
data/lib/renderizable.rb CHANGED
@@ -9,7 +9,7 @@ module JsonApiToolbox
9
9
  end
10
10
  end
11
11
 
12
- render json: { errors: errors }
12
+ render json: { errors: errors }, status: 422
13
13
  end
14
14
 
15
15
  def render_object(object)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_api_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adriano Bacha
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-15 00:00:00.000000000 Z
11
+ date: 2017-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport