jsonapi-utils 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: 768ad917f0e0006484fcca29a138f05c0b2f9a7b
4
- data.tar.gz: 8be72ed0a02e3e86f0b73edd822a0f791992cb36
3
+ metadata.gz: 4adff6c61b1c3f166099b6819c3de30bf3b3199d
4
+ data.tar.gz: c9f896c24d1b6d4efce89ec9807596e377f46790
5
5
  SHA512:
6
- metadata.gz: 3fd1c7fa5ca1e4c2d075be52fe75d058555a840fb0c70b43d94bf687f13fd7740d340f74f50fc6f64c4d90a171493c27425661ca26a6b7a99992472d697bc96a
7
- data.tar.gz: 3a31efa4514d307eaccaf1c244db587cafccbca885bd2eafbbd8c846829a0d5ed0e4f86697a4e31b5cf46429e8f38b16bf4b0d16e85487dd52d09751ce94f4bc
6
+ metadata.gz: 8904573999d64b34e6969529fbb9afeb50b3e7b6e5b04abeea63eaae7384527d80eddd3d039ab007f2c83bebb9e67e4322897d069bea38388d5b08f65833a9b1
7
+ data.tar.gz: 08fb3c7497a3fb367eafb2ae02c95ef946675d24af58a588da11cd525655559d062e2e17efb69e97b9dd21fd543713c68a4f91355c9bbdc7702f88c34643f07e
data/README.md CHANGED
@@ -3,9 +3,7 @@
3
3
  [![Code Climate](https://codeclimate.com/github/b2beauty/jsonapi-utils/badges/gpa.svg)](https://codeclimate.com/github/b2beauty/jsonapi-utils)
4
4
  [![Gem Version](https://badge.fury.io/rb/jsonapi-utils.svg)](https://badge.fury.io/rb/jsonapi-utils)
5
5
 
6
- JSON::Utils is a simple way to get a full-featured [JSON API](jsonapi.org) serialization in your
7
- controller's responses. This gem works on top of the awesome gem [jsonapi-resources](https://github.com/cerebris/jsonapi-resources),
8
- bringing to controllers a Rails-native way to render data.
6
+ `JSONAPI::Utils` works on top of the awesome [jsonapi-resources](https://github.com/cerebris/jsonapi-resources) gem bringing to your controllers a Rails way to render [JSON API](http://jsonapi.org)-compliant responses.
9
7
 
10
8
  ## Installation
11
9
 
@@ -22,7 +20,7 @@ And then execute:
22
20
  $ bundle
23
21
  ```
24
22
 
25
- ## Macros
23
+ ## Main Macros
26
24
 
27
25
  * `jsonapi_render`: it works like ActionController's `render` method, receiving model objects and
28
26
  rendering them into JSON API's data format.
data/lib/jsonapi/utils.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'jsonapi/utils/version'
2
2
  require 'active_support/concern'
3
3
  require 'jsonapi/utils/exceptions'
4
- require 'pry'
5
4
 
6
5
  module JSONAPI
7
6
  module Utils
@@ -43,6 +42,7 @@ module JSONAPI
43
42
  end
44
43
 
45
44
  def jsonapi_render_not_found
45
+ setup_request
46
46
  id = extract_ids(@request.params)
47
47
  jsonapi_render_errors(JSONAPI::Exceptions::RecordNotFound.new(id))
48
48
  end
@@ -1,5 +1,5 @@
1
1
  module JSONAPI
2
2
  module Utils
3
- VERSION = '0.4.0'
3
+ VERSION = '0.4.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi-utils
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
  - Tiago Guedes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-03-10 00:00:00.000000000 Z
12
+ date: 2016-03-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  version: '0'
195
195
  requirements: []
196
196
  rubyforge_project:
197
- rubygems_version: 2.4.5.1
197
+ rubygems_version: 2.6.2
198
198
  signing_key:
199
199
  specification_version: 4
200
200
  summary: JSON::Utils is a simple way to get a full-featured JSON API serialization