isomorfeus-data 1.0.0.zeta10 → 1.0.0.zeta11
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 +4 -4
- data/lib/isomorfeus-data.rb +1 -24
- data/lib/isomorfeus/data/attribute_support.rb +27 -11
- data/lib/isomorfeus/data/generic_class_api.rb +33 -39
- data/lib/isomorfeus/data/generic_instance_api.rb +5 -5
- data/lib/isomorfeus/data/handler/generic.rb +72 -33
- data/lib/isomorfeus/data/version.rb +1 -1
- data/lib/isomorfeus_data/lucid_data/array/mixin.rb +32 -18
- data/lib/isomorfeus_data/lucid_data/collection/mixin.rb +44 -24
- data/lib/isomorfeus_data/lucid_data/composition/mixin.rb +50 -9
- data/lib/isomorfeus_data/lucid_data/edge/mixin.rb +18 -14
- data/lib/isomorfeus_data/lucid_data/edge_collection/mixin.rb +37 -24
- data/lib/isomorfeus_data/lucid_data/graph/finders.rb +18 -18
- data/lib/isomorfeus_data/lucid_data/graph/mixin.rb +98 -23
- data/lib/isomorfeus_data/lucid_data/hash/mixin.rb +43 -24
- data/lib/isomorfeus_data/lucid_data/node/mixin.rb +15 -10
- data/lib/isomorfeus_data/lucid_data/query_result.rb +93 -0
- data/lib/{isomorfeus_data/lucid_data → lucid_arango}/object/base.rb +0 -0
- data/lib/{isomorfeus_data/lucid_data → lucid_arango}/object/mixin.rb +3 -3
- data/lib/{isomorfeus_data/lucid_data → lucid_arango}/remote_object/base.rb +0 -0
- data/lib/{isomorfeus_data/lucid_data → lucid_arango}/remote_object/mixin.rb +0 -0
- metadata +15 -15
- data/lib/isomorfeus/data/props.rb +0 -95
File without changes
|
@@ -57,7 +57,7 @@ module LucidStorableObject
|
|
57
57
|
base.instance_exec do
|
58
58
|
def load(props_hash = {})
|
59
59
|
validate_props(props_hash)
|
60
|
-
instance = self.new(validated_props: Isomorfeus::Data::Props.new(props_hash))
|
60
|
+
# instance = self.new(validated_props: Isomorfeus::Data::Props.new(props_hash))
|
61
61
|
self.promise_load(props_hash, instance) unless instance.loaded?
|
62
62
|
instance
|
63
63
|
end
|
@@ -68,7 +68,7 @@ module LucidStorableObject
|
|
68
68
|
def promise_load(props_hash = {}, instance = nil)
|
69
69
|
unless instance
|
70
70
|
validate_props(props_hash)
|
71
|
-
instance = self.new(validated_props: Isomorfeus::Data::Props.new(props_hash))
|
71
|
+
# instance = self.new(validated_props: Isomorfeus::Data::Props.new(props_hash))
|
72
72
|
end
|
73
73
|
|
74
74
|
props_json = instance.instance_variable_get(:@props_json)
|
@@ -132,7 +132,7 @@ module LucidStorableObject
|
|
132
132
|
base.instance_exec do
|
133
133
|
def load(props_hash = {})
|
134
134
|
validate_props(props_hash)
|
135
|
-
instance = self.new(validated_props: Isomorfeus::Data::Props.new(props_hash))
|
135
|
+
# instance = self.new(validated_props: Isomorfeus::Data::Props.new(props_hash))
|
136
136
|
instance.instance_exec do
|
137
137
|
@data_array = self.class.load_query_block.call(props_hash)
|
138
138
|
@loaded = true
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.zeta11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 16.12.
|
89
|
+
version: 16.12.6
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 16.12.
|
96
|
+
version: 16.12.6
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: isomorfeus-redux
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,42 +114,42 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.0.0.
|
117
|
+
version: 1.0.0.zeta11
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.0.0.
|
124
|
+
version: 1.0.0.zeta11
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: isomorfeus
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - '='
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.0.0.
|
131
|
+
version: 1.0.0.zeta11
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - '='
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.0.0.
|
138
|
+
version: 1.0.0.zeta11
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: opal-webpack-loader
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.9.
|
145
|
+
version: 0.9.10
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.9.
|
152
|
+
version: 0.9.10
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rake
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -197,7 +197,6 @@ files:
|
|
197
197
|
- lib/isomorfeus/data/handler/generic.rb
|
198
198
|
- lib/isomorfeus/data/handler/object_call.rb
|
199
199
|
- lib/isomorfeus/data/handler/object_store.rb
|
200
|
-
- lib/isomorfeus/data/props.rb
|
201
200
|
- lib/isomorfeus/data/reducer.rb
|
202
201
|
- lib/isomorfeus/data/version.rb
|
203
202
|
- lib/isomorfeus_data/lucid_data/array/base.rb
|
@@ -225,10 +224,7 @@ files:
|
|
225
224
|
- lib/isomorfeus_data/lucid_data/link_collection/mixin.rb
|
226
225
|
- lib/isomorfeus_data/lucid_data/node/base.rb
|
227
226
|
- lib/isomorfeus_data/lucid_data/node/mixin.rb
|
228
|
-
- lib/isomorfeus_data/lucid_data/
|
229
|
-
- lib/isomorfeus_data/lucid_data/object/mixin.rb
|
230
|
-
- lib/isomorfeus_data/lucid_data/remote_object/base.rb
|
231
|
-
- lib/isomorfeus_data/lucid_data/remote_object/mixin.rb
|
227
|
+
- lib/isomorfeus_data/lucid_data/query_result.rb
|
232
228
|
- lib/isomorfeus_data/lucid_data/vertex/base.rb
|
233
229
|
- lib/isomorfeus_data/lucid_data/vertex/mixin.rb
|
234
230
|
- lib/lucid_arango/collection/base.rb
|
@@ -243,6 +239,10 @@ files:
|
|
243
239
|
- lib/lucid_arango/graph/mixin.rb
|
244
240
|
- lib/lucid_arango/node/base.rb
|
245
241
|
- lib/lucid_arango/node/mixin.rb
|
242
|
+
- lib/lucid_arango/object/base.rb
|
243
|
+
- lib/lucid_arango/object/mixin.rb
|
244
|
+
- lib/lucid_arango/remote_object/base.rb
|
245
|
+
- lib/lucid_arango/remote_object/mixin.rb
|
246
246
|
- lib/lucid_arango/vertex/base.rb
|
247
247
|
- lib/lucid_arango/vertex/mixin.rb
|
248
248
|
homepage: http://isomorfeus.com
|
@@ -1,95 +0,0 @@
|
|
1
|
-
module Isomorfeus
|
2
|
-
module Data
|
3
|
-
class Props
|
4
|
-
def initialize(props_hash)
|
5
|
-
props_hash = {} unless props_hash
|
6
|
-
@props_hash = props_hash
|
7
|
-
end
|
8
|
-
|
9
|
-
def any?
|
10
|
-
@props_hash.keys.size > 0
|
11
|
-
end
|
12
|
-
|
13
|
-
if RUBY_ENGINE == 'opal'
|
14
|
-
def [](prop_name)
|
15
|
-
@props_hash[prop_name]
|
16
|
-
end
|
17
|
-
|
18
|
-
def []=(prop_name, value)
|
19
|
-
@props_hash[prop_name] = value
|
20
|
-
end
|
21
|
-
|
22
|
-
def key?(prop_name)
|
23
|
-
@props_hash.key?(prop_name)
|
24
|
-
end
|
25
|
-
|
26
|
-
def keys
|
27
|
-
@props_hash.keys
|
28
|
-
end
|
29
|
-
|
30
|
-
def method_missing(prop_name, *args, &block)
|
31
|
-
return @props_hash[prop_name] if @props_hash.key?(prop_name)
|
32
|
-
super(prop_name, *args, &block)
|
33
|
-
end
|
34
|
-
|
35
|
-
def set(prop_name, value)
|
36
|
-
@props_hash[prop_name] = value
|
37
|
-
end
|
38
|
-
|
39
|
-
def to_json
|
40
|
-
JSON.dump(to_transport)
|
41
|
-
end
|
42
|
-
|
43
|
-
def to_transport
|
44
|
-
transport_hash = {}.merge(@props_hash)
|
45
|
-
transport_hash
|
46
|
-
end
|
47
|
-
else # RUBY_ENGINE
|
48
|
-
def [](prop_name)
|
49
|
-
name = prop_name.to_sym
|
50
|
-
return @props_hash[name] if @props_hash.key?(name)
|
51
|
-
name = prop_name.to_s
|
52
|
-
return @props_hash[name] if @props_hash.key?(name)
|
53
|
-
nil
|
54
|
-
end
|
55
|
-
|
56
|
-
def []=(prop_name, value)
|
57
|
-
@props_hash[prop_name.to_sym] = value
|
58
|
-
end
|
59
|
-
|
60
|
-
def key?(prop_name)
|
61
|
-
@props_hash.key?(prop_name.to_sym) || @props_hash.key?(prop_name.to_s)
|
62
|
-
end
|
63
|
-
|
64
|
-
def keys
|
65
|
-
@props_hash.keys.map(&:to_sym)
|
66
|
-
end
|
67
|
-
|
68
|
-
def method_missing(prop_name, *args, &block)
|
69
|
-
name = prop_name.to_sym
|
70
|
-
return @props_hash[name] if @props_hash.key?(name)
|
71
|
-
name = prop_name.to_s
|
72
|
-
return @props_hash[name] if @props_hash.key?(name)
|
73
|
-
super(prop_name, *args, &block)
|
74
|
-
end
|
75
|
-
|
76
|
-
def set(prop_name, value)
|
77
|
-
@props_hash[prop_name.to_sym] = value
|
78
|
-
end
|
79
|
-
|
80
|
-
def to_json
|
81
|
-
Oj.dump(to_transport, mode: :strict)
|
82
|
-
end
|
83
|
-
|
84
|
-
def to_transport
|
85
|
-
transport_hash = {}.merge(@props_hash)
|
86
|
-
transport_hash.delete(:pub_sub_client)
|
87
|
-
transport_hash.delete(:current_user)
|
88
|
-
transport_hash
|
89
|
-
end
|
90
|
-
end # RUBY_ENGINE
|
91
|
-
|
92
|
-
alias_method :has_key?, :key?
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|