simple-json-api-serializer 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/json_api/object_serializer_definition.rb +6 -0
- data/lib/json_api/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: 1aacf5765126a76841c9539c101f1bf4b249d788
|
4
|
+
data.tar.gz: 4fe4c64426cc98f2e0765bd6bf9ebeeda20dabbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b0b30de6394fc0b0110349fa0020df1d657836663c3363758b632bd5314ee44355dc13c38bab9afca881fa4d743fd79daa1efb853f031a05e75f2cfe4b7ebdb
|
7
|
+
data.tar.gz: 6541806644aa03eb74f8b990f4055523865c618113e6bb5e732467ace9183193c91086143e1305b0f00e8c122a71c7f8bd8e3491eef1b9716317b844f176c7cb
|
data/Gemfile.lock
CHANGED
@@ -18,6 +18,7 @@ module JSONApi
|
|
18
18
|
specialization.relationships(*relationships)
|
19
19
|
specialization.id_attribute(id_attribute)
|
20
20
|
specialization.base_url(base_url)
|
21
|
+
specialization.type(type)
|
21
22
|
end
|
22
23
|
|
23
24
|
def attributes(*attrs)
|
@@ -33,6 +34,10 @@ module JSONApi
|
|
33
34
|
@base_url = url
|
34
35
|
end
|
35
36
|
|
37
|
+
def type(type = @type)
|
38
|
+
@type = type
|
39
|
+
end
|
40
|
+
|
36
41
|
def relationship(name, **config)
|
37
42
|
config[:name] = name
|
38
43
|
relationships(config)
|
@@ -59,6 +64,7 @@ module JSONApi
|
|
59
64
|
options[:id_attribute] ||= id_attribute
|
60
65
|
options[:attributes] ||= attributes
|
61
66
|
options[:relationships] ||= relationships
|
67
|
+
options[:type] ||= type
|
62
68
|
options
|
63
69
|
end
|
64
70
|
end
|
data/lib/json_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple-json-api-serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marten Schilstra
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.4.
|
115
|
+
rubygems_version: 2.4.6
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: An extremely simple JSON Api serializer
|