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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e9a6bbc4ee5adfd199a3a3aa79ae6609e578e600e4ca1f93888efb2263f9b39
4
- data.tar.gz: 3d25a70ad671b9ca9b57e229070dcb029d5368bc7f503335628fe761ee325a30
3
+ metadata.gz: ef9b8092e7629e9a05ef20fb129e1015e333fb834f20c1464a65a0ef76179699
4
+ data.tar.gz: faf9eb9c43dc4201f7b6e213628cbd87554d2d22ce2729e2f6fcd4a25b2c096c
5
5
  SHA512:
6
- metadata.gz: 49f94ebf51efda1776abda3e7db9aa8a6a75b1ad25fe566a43a862e4bf4af6efc77c3d777138ba62c410d4be30ad5293eab0edf7eaf8729b775faff3ef0a1b84
7
- data.tar.gz: 2a287e0f5d6b368f509a95f10777ff8e41bf57bcde11588ede23a0132d4fc1d8b4493c8aebb7e1292ac6ccd179bb737fd9c10c59ba78240ce68112a6887fdf20
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
@@ -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
 
@@ -32,15 +32,15 @@ module SimpleAMS
32
32
  end
33
33
 
34
34
  def primary_id
35
- return tracked(__method__).value if tracked(__method__).value
35
+ return tracked(:primary_id).value if tracked(:primary_id).value
36
36
 
37
- return tracked(__method__).value = array_of_value_hash_for(PrimaryId, :primary_id)
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(__method__).value if tracked(__method__).value
41
+ return tracked(:type).value if tracked(:type).value
42
42
 
43
- return tracked(__method__).value = array_of_value_hash_for(Type, :type)
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(__method__).value if tracked(__method__).value
74
+ return tracked(:links).value if tracked(:links).value
75
75
 
76
- return tracked(__method__).value = array_of_name_value_hash_for(Links, Links::Link, :links)
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(__method__).value if tracked(__method__).value
80
+ return tracked(:metas).value if tracked(:metas).value
81
81
 
82
- return tracked(__method__).value = array_of_name_value_hash_for(Metas, Metas::Meta, :metas)
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(__method__).value if tracked(__method__).value
86
+ return tracked(:forms).value if tracked(:forms).value
87
87
 
88
- return tracked(__method__).value = array_of_name_value_hash_for(Forms, Forms::Form, :forms)
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(__method__).value if tracked(__method__).value
92
+ return tracked(:generics).value if tracked(:generics).value
93
93
 
94
- return tracked(__method__).value = array_of_name_value_hash_for(
94
+ return tracked(:generics).value = array_of_name_value_hash_for(
95
95
  Generics, Generics::Option, :generics
96
96
  )
97
97
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleAMS
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
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: 2019-12-02 00:00:00.000000000 Z
11
+ date: 2020-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler