jsonapi-utils 0.5.2 → 0.6.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/jsonapi/utils/exceptions.rb +5 -1
- data/lib/jsonapi/utils/request.rb +6 -2
- data/lib/jsonapi/utils/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53c3ddcb7fbfb8b20eb1bb345d044a99b8e88c48
|
4
|
+
data.tar.gz: 6cf60b61e4d16acdbb22165a38c603809ae47689
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d0674d2ddd8e84d84eb190cfa4c2a93b447ed783e06598b46e139e6a6d0771cd246fab0fb3ad2005c9c06abe3336b7a45a12ddfd98d796c21705233cb20b9e5
|
7
|
+
data.tar.gz: d4fb458df88ddf11f719317e28c12387227313f20585325d2e33f858fb1f557a07938d8e57ae313a0d53006781053e7699a7213692a95877764327e4e9aa638a
|
data/README.md
CHANGED
@@ -76,10 +76,14 @@ module JSONAPI
|
|
76
76
|
message
|
77
77
|
else
|
78
78
|
resource_key = resource_key_for(key)
|
79
|
-
[resource_key
|
79
|
+
[translation_for(resource_key), message].join(' ')
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
+
def translation_for(key)
|
84
|
+
object.class.human_attribute_name(key)
|
85
|
+
end
|
86
|
+
|
83
87
|
def error_base
|
84
88
|
{
|
85
89
|
code: JSONAPI::VALIDATION_ERROR,
|
@@ -38,8 +38,12 @@ module JSONAPI::Utils
|
|
38
38
|
#
|
39
39
|
# @api public
|
40
40
|
def process_request
|
41
|
-
|
42
|
-
|
41
|
+
operations = @request.operations
|
42
|
+
unless JSONAPI.configuration.resource_cache.nil?
|
43
|
+
operations.each {|op| op.options[:cache_serializer] = resource_serializer }
|
44
|
+
end
|
45
|
+
results = process_operations(operations)
|
46
|
+
render_results(results)
|
43
47
|
rescue => e
|
44
48
|
handle_exceptions(e)
|
45
49
|
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
|
+
version: 0.6.0.beta
|
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: 2017-03-
|
12
|
+
date: 2017-03-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jsonapi-resources
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.
|
20
|
+
version: 0.9.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.
|
27
|
+
version: 0.9.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: bundler
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -193,9 +193,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
193
193
|
version: '0'
|
194
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
195
|
requirements:
|
196
|
-
- - "
|
196
|
+
- - ">"
|
197
197
|
- !ruby/object:Gem::Version
|
198
|
-
version:
|
198
|
+
version: 1.3.1
|
199
199
|
requirements: []
|
200
200
|
rubyforge_project:
|
201
201
|
rubygems_version: 2.6.7
|