hyper-resource 1.0.0.lap53 → 1.0.0.lap55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f0ff6a1a9ad1ecd8ed92b3d96cab2fbe6965fcd86dfd41d0b9ffa4173f47f90
|
4
|
+
data.tar.gz: e7cc3aadbcc04ca3942c6f1550562ca063cd1e53943febe573277f8d8edf507d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bae29ddaf1e2fa9b5e48071cbeaa3cb4431a36bc0cb1681e8493d5f5a04c833d249550fb314f0f69a939c24e08048fe1b213a2cc98b976420c842a53ac9679c
|
7
|
+
data.tar.gz: 413c863a6c1c88e2a2dc69a4cc54a84b6269551ef7360b1d3e8bd532278ad522f6f83383b8f973c679990e20d90259c48ec62bb2ae1eb6503283054674a47ab0
|
@@ -14,11 +14,17 @@ module HyperRecord
|
|
14
14
|
|
15
15
|
def all
|
16
16
|
_register_class_observer
|
17
|
-
if _class_fetch_states[:all]
|
17
|
+
if _class_fetch_states.has_key?(:all) && 'fi'.include?(_class_fetch_states[:all]) # if f_etched or i_n progress of fetching
|
18
18
|
collection = HyperRecord::Collection.new
|
19
19
|
_record_cache.each_value { |record| collection.push(record) }
|
20
20
|
return collection
|
21
21
|
end
|
22
|
+
promise_all
|
23
|
+
HyperRecord::Collection.new
|
24
|
+
end
|
25
|
+
|
26
|
+
def promise_all
|
27
|
+
_class_fetch_states[:all] = 'i'
|
22
28
|
_promise_get("#{resource_base_uri}.json").then do |response|
|
23
29
|
collection = _convert_array_to_collection(response.json[self.to_s.underscore.pluralize])
|
24
30
|
_class_fetch_states[:all] = 'f'
|
@@ -29,7 +35,6 @@ module HyperRecord
|
|
29
35
|
`console.error(error_message)`
|
30
36
|
response
|
31
37
|
end
|
32
|
-
HyperRecord::Collection.new
|
33
38
|
end
|
34
39
|
|
35
40
|
def belongs_to(direction, name = nil, options = { type: nil })
|
@@ -44,21 +49,25 @@ module HyperRecord
|
|
44
49
|
name = direction
|
45
50
|
end
|
46
51
|
reflections[name] = { direction: direction, type: options[:type], kind: :belongs_to }
|
52
|
+
define_method("promise_#{name}") do
|
53
|
+
@fetch_states[name] = 'i'
|
54
|
+
self.class._promise_get("#{self.class.resource_base_uri}/#{self.id}/relations/#{name}.json").then do |response|
|
55
|
+
@relations[name] = self.class._convert_json_hash_to_record(response.json[self.class.to_s.underscore][name])
|
56
|
+
@fetch_states[name] = 'f'
|
57
|
+
_notify_observers
|
58
|
+
@relations[name]
|
59
|
+
end.fail do |response|
|
60
|
+
error_message = "#{self.class.to_s}[#{self.id}].#{name}, a belongs_to association, failed to fetch records!"
|
61
|
+
`console.error(error_message)`
|
62
|
+
response
|
63
|
+
end
|
64
|
+
end
|
47
65
|
define_method(name) do
|
48
66
|
_register_observer
|
49
|
-
if @fetch_states[name]
|
67
|
+
if 'fi'.include?(@fetch_states[name])
|
50
68
|
@relations[name]
|
51
69
|
elsif self.id
|
52
|
-
|
53
|
-
@relations[name] = self.class._convert_json_hash_to_record(response.json[self.class.to_s.underscore][name])
|
54
|
-
@fetch_states[name] = 'f'
|
55
|
-
_notify_observers
|
56
|
-
@relations[name]
|
57
|
-
end.fail do |response|
|
58
|
-
error_message = "#{self.class.to_s}[#{self.id}].#{name}, a belongs_to association, failed to fetch records!"
|
59
|
-
`console.error(error_message)`
|
60
|
-
response
|
61
|
-
end
|
70
|
+
send("promise_#{name}")
|
62
71
|
@relations[name]
|
63
72
|
else
|
64
73
|
@relations[name]
|
@@ -67,12 +76,13 @@ module HyperRecord
|
|
67
76
|
define_method("update_#{name}") do
|
68
77
|
@fetch_states[name] = 'u'
|
69
78
|
end
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
79
|
+
# TODO
|
80
|
+
# define_method("#{name}=") do |arg|
|
81
|
+
# _register_observer
|
82
|
+
# @relations[name] = arg
|
83
|
+
# @fetch_states[name] = 'f'
|
84
|
+
# @relations[name]
|
85
|
+
# end
|
76
86
|
end
|
77
87
|
|
78
88
|
def create(record_hash = {})
|
@@ -80,9 +90,9 @@ module HyperRecord
|
|
80
90
|
record.save
|
81
91
|
end
|
82
92
|
|
83
|
-
def
|
93
|
+
def promise_create(record_hash = {})
|
84
94
|
record = new(record_hash)
|
85
|
-
record.
|
95
|
+
record.promise_save
|
86
96
|
end
|
87
97
|
|
88
98
|
def find(id)
|
@@ -97,39 +107,40 @@ module HyperRecord
|
|
97
107
|
record_in_progress_key = "#{self.to_s}_#{record_in_progress.object_id}"
|
98
108
|
React::State.get_state(observer, record_in_progress_key) if observer
|
99
109
|
return _record_cache[sid] if _record_cache.has_key?(sid) && _class_fetch_states["record_#{id}"] == 'i'
|
100
|
-
|
110
|
+
_promise_find(id, record_in_progress).then do
|
101
111
|
React::State.set_state(observer, record_in_progress_key, `Date.now() + Math.random()`) if observer
|
102
112
|
end
|
103
113
|
record_in_progress
|
104
114
|
end
|
105
115
|
|
106
|
-
def
|
116
|
+
def promise_find(id)
|
107
117
|
sid = id.to_s
|
108
118
|
record_in_progress = if _record_cache.has_key?(sid)
|
109
119
|
_record_cache[sid]
|
110
120
|
else
|
111
121
|
self.new(id: id)
|
112
122
|
end
|
113
|
-
|
114
|
-
end
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
end
|
123
|
+
_promise_find(id, record_in_progress)
|
124
|
+
end
|
125
|
+
|
126
|
+
# TODO find_by
|
127
|
+
# def promise_find_by(hash)
|
128
|
+
# if hash.has_key?[:id] && _record_cache.has_key?(hash[:id].to_s)
|
129
|
+
# record = _record_cache[hash[:id].to_s]
|
130
|
+
# found = true
|
131
|
+
# hash.each do |k,v|
|
132
|
+
# if record.send(k) != v
|
133
|
+
# found = false
|
134
|
+
# break
|
135
|
+
# end
|
136
|
+
# end
|
137
|
+
# return record if found
|
138
|
+
# end
|
139
|
+
# # TODO needs clarification about how to call the endpoint
|
140
|
+
# _promise_get("#{resource_base_uri}/#{id}.json").then do |response|
|
141
|
+
# self.new(response.json[self.to_s.underscore])
|
142
|
+
# end
|
143
|
+
# end
|
133
144
|
|
134
145
|
def has_and_belongs_to_many(direction, name = nil, options = { type: nil })
|
135
146
|
if name.is_a?(Hash)
|
@@ -143,22 +154,26 @@ module HyperRecord
|
|
143
154
|
name = direction
|
144
155
|
end
|
145
156
|
reflections[name] = { direction: direction, type: options[:type], kind: :has_and_belongs_to_many }
|
157
|
+
define_method("promise_#{name}") do
|
158
|
+
@fetch_states[name] = 'i'
|
159
|
+
self.class._promise_get("#{self.class.resource_base_uri}/#{self.id}/relations/#{name}.json").then do |response|
|
160
|
+
collection = self.class._convert_array_to_collection(response.json[self.class.to_s.underscore][name], self, name)
|
161
|
+
@relations[name] = collection
|
162
|
+
@fetch_states[name] = 'f'
|
163
|
+
_notify_observers
|
164
|
+
@relations[name]
|
165
|
+
end.fail do |response|
|
166
|
+
error_message = "#{self.class.to_s}[#{self.id}].#{name}, a has_and_belongs_to_many association, failed to fetch records!"
|
167
|
+
`console.error(error_message)`
|
168
|
+
response
|
169
|
+
end
|
170
|
+
end
|
146
171
|
define_method(name) do
|
147
172
|
_register_observer
|
148
|
-
if @fetch_states
|
173
|
+
if @fetch_states.has_key?(name) && 'fi'.include?(@fetch_states[name])
|
149
174
|
@relations[name]
|
150
175
|
elsif self.id
|
151
|
-
|
152
|
-
collection = self.class._convert_array_to_collection(response.json[self.class.to_s.underscore][name], self, name)
|
153
|
-
@relations[name] = collection
|
154
|
-
@fetch_states[name] = 'f'
|
155
|
-
_notify_observers
|
156
|
-
@relations[name]
|
157
|
-
end.fail do |response|
|
158
|
-
error_message = "#{self.class.to_s}[#{self.id}].#{name}, a has_and_belongs_to_many association, failed to fetch records!"
|
159
|
-
`console.error(error_message)`
|
160
|
-
response
|
161
|
-
end
|
176
|
+
send("promise_#{name}")
|
162
177
|
@relations[name]
|
163
178
|
else
|
164
179
|
@relations[name]
|
@@ -167,19 +182,20 @@ module HyperRecord
|
|
167
182
|
define_method("update_#{name}") do
|
168
183
|
@fetch_states[name] = 'u'
|
169
184
|
end
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
185
|
+
# TODO
|
186
|
+
# define_method("#{name}=") do |arg|
|
187
|
+
# _register_observer
|
188
|
+
# collection = if arg.is_a?(Array)
|
189
|
+
# HyperRecord::Collection.new(arg, self, name)
|
190
|
+
# elsif arg.is_a?(HyperRecord::Collection)
|
191
|
+
# arg
|
192
|
+
# else
|
193
|
+
# raise "Argument must be a HyperRecord::Collection or a Array"
|
194
|
+
# end
|
195
|
+
# @relations[name] = collection
|
196
|
+
# @fetch_states[name] = 'f'
|
197
|
+
# @relations[name]
|
198
|
+
# end
|
183
199
|
end
|
184
200
|
|
185
201
|
def has_many(direction, name = nil, options = { type: nil })
|
@@ -194,22 +210,26 @@ module HyperRecord
|
|
194
210
|
name = direction
|
195
211
|
end
|
196
212
|
reflections[name] = { direction: direction, type: options[:type], kind: :has_many }
|
213
|
+
define_method("promise_#{name}") do
|
214
|
+
@fetch_states[name] = 'i'
|
215
|
+
self.class._promise_get("#{self.class.resource_base_uri}/#{self.id}/relations/#{name}.json").then do |response|
|
216
|
+
collection = self.class._convert_array_to_collection(response.json[self.class.to_s.underscore][name], self, name)
|
217
|
+
@relations[name] = collection
|
218
|
+
@fetch_states[name] = 'f'
|
219
|
+
_notify_observers
|
220
|
+
@relations[name]
|
221
|
+
end.fail do |response|
|
222
|
+
error_message = "#{self.class.to_s}[#{self.id}].#{name}, a has_many association, failed to fetch records!"
|
223
|
+
`console.error(error_message)`
|
224
|
+
response
|
225
|
+
end
|
226
|
+
end
|
197
227
|
define_method(name) do
|
198
228
|
_register_observer
|
199
|
-
if @fetch_states
|
229
|
+
if @fetch_states.has_key?(name) && 'fi'.include?(@fetch_states[name])
|
200
230
|
@relations[name]
|
201
231
|
elsif self.id
|
202
|
-
|
203
|
-
collection = self.class._convert_array_to_collection(response.json[self.class.to_s.underscore][name], self, name)
|
204
|
-
@relations[name] = collection
|
205
|
-
@fetch_states[name] = 'f'
|
206
|
-
_notify_observers
|
207
|
-
@relations[name]
|
208
|
-
end.fail do |response|
|
209
|
-
error_message = "#{self.class.to_s}[#{self.id}].#{name}, a has_many association, failed to fetch records!"
|
210
|
-
`console.error(error_message)`
|
211
|
-
response
|
212
|
-
end
|
232
|
+
send("promise_#{name}")
|
213
233
|
@relations[name]
|
214
234
|
else
|
215
235
|
@relations[name]
|
@@ -218,19 +238,19 @@ module HyperRecord
|
|
218
238
|
define_method("update_#{name}") do
|
219
239
|
@fetch_states[name] = 'u'
|
220
240
|
end
|
221
|
-
define_method("#{name}=") do |arg|
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
end
|
241
|
+
# define_method("#{name}=") do |arg|
|
242
|
+
# _register_observer
|
243
|
+
# collection = if arg.is_a?(Array)
|
244
|
+
# HyperRecord::Collection.new(arg, self, name)
|
245
|
+
# elsif arg.is_a?(HyperRecord::Collection)
|
246
|
+
# arg
|
247
|
+
# else
|
248
|
+
# raise "Argument must be a HyperRecord::Collection or a Array"
|
249
|
+
# end
|
250
|
+
# @relations[name] = collection
|
251
|
+
# @fetch_states[name] = 'f'
|
252
|
+
# @relations[name]
|
253
|
+
# end
|
234
254
|
end
|
235
255
|
|
236
256
|
def has_one(direction, name, options = { type: nil })
|
@@ -245,21 +265,25 @@ module HyperRecord
|
|
245
265
|
name = direction
|
246
266
|
end
|
247
267
|
reflections[name] = { direction: direction, type: options[:type], kind: :has_one }
|
268
|
+
define_method("promise_#{name}") do
|
269
|
+
@fetch_states[name] = 'i'
|
270
|
+
self.class._promise_get("#{self.class.resource_base_uri}/#{self.id}/relations/#{name}.json").then do |response|
|
271
|
+
@relations[name] = self.class._convert_json_hash_to_record(response.json[self.class.to_s.underscore][name])
|
272
|
+
@fetch_states[name] = 'f'
|
273
|
+
_notify_observers
|
274
|
+
@relations[name]
|
275
|
+
end.fail do |response|
|
276
|
+
error_message = "#{self.class.to_s}[#{self.id}].#{name}, a has_one association, failed to fetch records!"
|
277
|
+
`console.error(error_message)`
|
278
|
+
response
|
279
|
+
end
|
280
|
+
end
|
248
281
|
define_method(name) do
|
249
282
|
_register_observer
|
250
|
-
if @fetch_states
|
283
|
+
if @fetch_states.has_key?(name) && 'fi'.include?(@fetch_states[name])
|
251
284
|
@relations[name]
|
252
285
|
elsif self.id
|
253
|
-
|
254
|
-
@relations[name] = self.class._convert_json_hash_to_record(response.json[self.class.to_s.underscore][name])
|
255
|
-
@fetch_states[name] = 'f'
|
256
|
-
_notify_observers
|
257
|
-
@relations[name]
|
258
|
-
end.fail do |response|
|
259
|
-
error_message = "#{self.class.to_s}[#{self.id}].#{name}, a has_one association, failed to fetch records!"
|
260
|
-
`console.error(error_message)`
|
261
|
-
response
|
262
|
-
end
|
286
|
+
send("promise_#{name}")
|
263
287
|
@relations[name]
|
264
288
|
else
|
265
289
|
@relations[name]
|
@@ -268,12 +292,12 @@ module HyperRecord
|
|
268
292
|
define_method("update_#{name}") do
|
269
293
|
@fetch_states[name] = 'u'
|
270
294
|
end
|
271
|
-
define_method("#{name}=") do |arg|
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
end
|
295
|
+
# define_method("#{name}=") do |arg|
|
296
|
+
# _register_observer
|
297
|
+
# @relations[name] = arg
|
298
|
+
# @fetch_states[name] = 'f'
|
299
|
+
# @relations[name]
|
300
|
+
# end
|
277
301
|
end
|
278
302
|
|
279
303
|
def record_cached?(id)
|
@@ -393,6 +417,7 @@ module HyperRecord
|
|
393
417
|
else
|
394
418
|
name
|
395
419
|
end
|
420
|
+
_class_fetch_states[name_args] = 'i'
|
396
421
|
self._promise_get_or_patch("#{resource_base_uri}/scopes/#{name}.json", *args).then do |response_json|
|
397
422
|
scopes[name_args] = _convert_array_to_collection(response_json[self.to_s.underscore][name])
|
398
423
|
_class_fetch_states[name_args] = 'f'
|
@@ -411,7 +436,7 @@ module HyperRecord
|
|
411
436
|
name
|
412
437
|
end
|
413
438
|
scopes[name_args] = HyperRecord::Collection.new unless scopes.has_key?(name_args)
|
414
|
-
if _class_fetch_states
|
439
|
+
if _class_fetch_states.has_key?(name_args) && 'fi'.include?(_class_fetch_states[name_args])
|
415
440
|
scopes[name_args]
|
416
441
|
else
|
417
442
|
_register_class_observer
|
@@ -477,7 +502,7 @@ module HyperRecord
|
|
477
502
|
@_class_state_key
|
478
503
|
end
|
479
504
|
|
480
|
-
def
|
505
|
+
def _promise_find(id, record_in_progress)
|
481
506
|
_class_fetch_states["record_#{id}"] = 'i'
|
482
507
|
_promise_get("#{resource_base_uri}/#{id}.json").then do |response|
|
483
508
|
klass_key = self.to_s.underscore
|
@@ -70,7 +70,7 @@ module HyperRecord
|
|
70
70
|
|
71
71
|
def link(other_record)
|
72
72
|
_register_observer
|
73
|
-
|
73
|
+
promise_link(other_record).then do
|
74
74
|
_notify_observers
|
75
75
|
end
|
76
76
|
self
|
@@ -112,7 +112,7 @@ module HyperRecord
|
|
112
112
|
|
113
113
|
def save
|
114
114
|
_register_observer
|
115
|
-
|
115
|
+
promise_save.then do
|
116
116
|
_notify_observers
|
117
117
|
end
|
118
118
|
self
|
@@ -132,7 +132,7 @@ module HyperRecord
|
|
132
132
|
|
133
133
|
def unlink(other_record)
|
134
134
|
_register_observer
|
135
|
-
|
135
|
+
promise_unlink(other_record).then do
|
136
136
|
_notify_observers
|
137
137
|
end
|
138
138
|
self
|
@@ -151,7 +151,7 @@ module HyperRecord
|
|
151
151
|
end
|
152
152
|
end
|
153
153
|
|
154
|
-
def
|
154
|
+
def promise_link(other_record, relation_name = nil)
|
155
155
|
called_from_collection = relation_name ? true : false
|
156
156
|
relation_name = other_record.class.to_s.underscore.pluralize unless relation_name
|
157
157
|
if reflections.has_key?(relation_name)
|
@@ -172,7 +172,7 @@ module HyperRecord
|
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
175
|
-
def
|
175
|
+
def promise_save
|
176
176
|
payload_hash = @properties_hash.merge(@changed_properties_hash) # copy hash, because we need to delete some keys
|
177
177
|
(%i[id created_at updated_at] + reflections.keys).each do |key|
|
178
178
|
payload_hash.delete(key)
|
@@ -200,7 +200,7 @@ module HyperRecord
|
|
200
200
|
end
|
201
201
|
end
|
202
202
|
|
203
|
-
def
|
203
|
+
def promise_unlink(other_record, relation_name = nil)
|
204
204
|
called_from_collection = collection_name ? true : false
|
205
205
|
relation_name = other_record.class.to_s.underscore.pluralize unless relation_name
|
206
206
|
raise "No relation for record of type #{other_record.class}" unless reflections.has_key?(relation_name)
|
@@ -254,27 +254,24 @@ module HyperRecord
|
|
254
254
|
|
255
255
|
def _update_record(data)
|
256
256
|
if data.has_key?(:relation)
|
257
|
-
if data.has_key?(:cause)
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
end
|
273
|
-
|
274
|
-
|
275
|
-
@fetch_states[data[:relation]] = 'u'
|
276
|
-
send(data[:relation])
|
277
|
-
end
|
257
|
+
# if data.has_key?(:cause)
|
258
|
+
# # this creation of variables for things that could be done in one line
|
259
|
+
# # are a workaround for safari, to get it updating correctly
|
260
|
+
# klass_name = data[:cause][:record_type]
|
261
|
+
# c_record_class = Object.const_get(klass_name)
|
262
|
+
# if c_record_class._record_cache.has_key?(data[:cause][:id].to_s)
|
263
|
+
# c_record = c_record_class.find(data[:cause][:id])
|
264
|
+
# if `Date.parse(#{c_record.updated_at}) >= Date.parse(#{data[:cause][:updated_at]})`
|
265
|
+
# if @fetch_states[data[:relation]] == 'f'
|
266
|
+
# if send(data[:relation]).include?(c_record)
|
267
|
+
# return
|
268
|
+
# end
|
269
|
+
# end
|
270
|
+
# end
|
271
|
+
# end
|
272
|
+
# end
|
273
|
+
@fetch_states[data[:relation]] = 'u'
|
274
|
+
send(data[:relation])
|
278
275
|
return
|
279
276
|
end
|
280
277
|
if data[:destroyed]
|
@@ -14,7 +14,7 @@ module HyperRecord
|
|
14
14
|
|
15
15
|
def <<(other_record)
|
16
16
|
if @record && @relation_name
|
17
|
-
@record.
|
17
|
+
@record.promise_link(other_record, @relation_name)
|
18
18
|
end
|
19
19
|
other_record._register_collection(self)
|
20
20
|
@record._notify_observers if @record
|
@@ -23,7 +23,7 @@ module HyperRecord
|
|
23
23
|
|
24
24
|
def delete(other_record)
|
25
25
|
if @record && @relation_name && !other_record.instance_variable_get(:@remotely_destroyed)
|
26
|
-
@record.
|
26
|
+
@record.promise_unlink(other_record, @relation_name)
|
27
27
|
end
|
28
28
|
other_record._unregister_collection(self)
|
29
29
|
@record._notify_observers if @record
|
@@ -93,16 +93,14 @@ module Hyperloop
|
|
93
93
|
def self.process_notification(data)
|
94
94
|
record_class = Object.const_get(data[:record_type])
|
95
95
|
if data[:scope]
|
96
|
-
|
97
|
-
if
|
96
|
+
scope_name, scope_params = data[:scope].split('_[')
|
97
|
+
if scope_params
|
98
|
+
scope_params = '[' + scope_params
|
98
99
|
record_class._class_fetch_states[data[:scope]] = 'u'
|
99
|
-
scope_name,
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
else
|
104
|
-
record_class.send(data[:scope])
|
105
|
-
end
|
100
|
+
record_class.send(scope_name, JSON.parse(scope_params))
|
101
|
+
else
|
102
|
+
record_class._class_fetch_states[data[:scope]] = 'u'
|
103
|
+
record_class.send(data[:scope])
|
106
104
|
end
|
107
105
|
elsif record_class.record_cached?(data[:id])
|
108
106
|
record = record_class.find(data[:id])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyper-resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.lap55
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|