simple_ams 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_ams/adapters/jsonapi.rb +2 -0
- data/lib/simple_ams/document.rb +0 -9
- data/lib/simple_ams/options.rb +12 -12
- data/lib/simple_ams/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef9b8092e7629e9a05ef20fb129e1015e333fb834f20c1464a65a0ef76179699
|
4
|
+
data.tar.gz: faf9eb9c43dc4201f7b6e213628cbd87554d2d22ce2729e2f6fcd4a25b2c096c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6282b4b170ce63387430464d4e421488505b8e8ab5de08faea87096d59358c15e968e3bd898abad9f07c31019ff7505777082072b6bebdc84c5020c24dd77037
|
7
|
+
data.tar.gz: cb2f96dd75b151527097d32198a20586254664238b6fef0a25db93e41a59d30890f36297201573f206b8c7f7e3122febfdbc9d8aea6d24915c846fdb227ff915
|
@@ -134,6 +134,8 @@ class SimpleAMS::Adapters::JSONAPI
|
|
134
134
|
return @included ||= [] if document.relations.available.empty?
|
135
135
|
|
136
136
|
@included ||= document.relations.available.inject([]){ |array, relation|
|
137
|
+
next array if relation.embedded.generics[:skip_data]&.value
|
138
|
+
|
137
139
|
if relation.folder?
|
138
140
|
array << relation.map{|doc| self.class.new(doc, options).as_json[:data]}
|
139
141
|
else
|
data/lib/simple_ams/document.rb
CHANGED
@@ -123,15 +123,6 @@ class SimpleAMS::Document
|
|
123
123
|
})
|
124
124
|
else
|
125
125
|
resource_options.with_resource(resource)
|
126
|
-
=begin
|
127
|
-
# we need to optimize that using tracked properties
|
128
|
-
SimpleAMS::Options.new(resource, {
|
129
|
-
injected_options: resource_options.injected_options.merge({
|
130
|
-
serializer: serializer_for(resource)
|
131
|
-
}),
|
132
|
-
allowed_options: serializer_for(resource).options
|
133
|
-
})
|
134
|
-
=end
|
135
126
|
end
|
136
127
|
end
|
137
128
|
|
data/lib/simple_ams/options.rb
CHANGED
@@ -32,15 +32,15 @@ module SimpleAMS
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def primary_id
|
35
|
-
return tracked(
|
35
|
+
return tracked(:primary_id).value if tracked(:primary_id).value
|
36
36
|
|
37
|
-
return tracked(
|
37
|
+
return tracked(:primary_id).value = array_of_value_hash_for(PrimaryId, :primary_id)
|
38
38
|
end
|
39
39
|
|
40
40
|
def type
|
41
|
-
return tracked(
|
41
|
+
return tracked(:type).value if tracked(:type).value
|
42
42
|
|
43
|
-
return tracked(
|
43
|
+
return tracked(:type).value = array_of_value_hash_for(Type, :type)
|
44
44
|
end
|
45
45
|
|
46
46
|
def name
|
@@ -71,27 +71,27 @@ module SimpleAMS
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def links
|
74
|
-
return tracked(
|
74
|
+
return tracked(:links).value if tracked(:links).value
|
75
75
|
|
76
|
-
return tracked(
|
76
|
+
return tracked(:links).value = array_of_name_value_hash_for(Links, Links::Link, :links)
|
77
77
|
end
|
78
78
|
|
79
79
|
def metas
|
80
|
-
return tracked(
|
80
|
+
return tracked(:metas).value if tracked(:metas).value
|
81
81
|
|
82
|
-
return tracked(
|
82
|
+
return tracked(:metas).value = array_of_name_value_hash_for(Metas, Metas::Meta, :metas)
|
83
83
|
end
|
84
84
|
|
85
85
|
def forms
|
86
|
-
return tracked(
|
86
|
+
return tracked(:forms).value if tracked(:forms).value
|
87
87
|
|
88
|
-
return tracked(
|
88
|
+
return tracked(:forms).value = array_of_name_value_hash_for(Forms, Forms::Form, :forms)
|
89
89
|
end
|
90
90
|
|
91
91
|
def generics
|
92
|
-
return tracked(
|
92
|
+
return tracked(:generics).value if tracked(:generics).value
|
93
93
|
|
94
|
-
return tracked(
|
94
|
+
return tracked(:generics).value = array_of_name_value_hash_for(
|
95
95
|
Generics, Generics::Option, :generics
|
96
96
|
)
|
97
97
|
end
|
data/lib/simple_ams/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_ams
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Filippos Vasilakis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|