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 +4 -4
- data/README.md +2 -4
- data/lib/jsonapi/utils.rb +1 -1
- data/lib/jsonapi/utils/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4adff6c61b1c3f166099b6819c3de30bf3b3199d
|
4
|
+
data.tar.gz: c9f896c24d1b6d4efce89ec9807596e377f46790
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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.
|
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-
|
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.
|
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
|