isomorfeus-data 1.0.0.epsilon1 → 1.0.0.epsilon2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isomorfeus/data/handler/array_load_handler.rb +13 -7
- data/lib/isomorfeus/data/handler/collection_load_handler.rb +14 -8
- data/lib/isomorfeus/data/handler/graph_load_handler.rb +14 -8
- data/lib/isomorfeus/data/handler/hash_load_handler.rb +13 -7
- data/lib/isomorfeus/data/props.rb +0 -1
- data/lib/isomorfeus/data/version.rb +1 -1
- data/lib/lucid_array/base.rb +0 -1
- data/lib/lucid_array/mixin.rb +0 -1
- data/lib/lucid_collection/base.rb +0 -1
- data/lib/lucid_collection/mixin.rb +0 -1
- data/lib/lucid_graph/base.rb +0 -1
- data/lib/lucid_graph/mixin.rb +0 -1
- data/lib/lucid_hash/base.rb +0 -1
- data/lib/lucid_hash/mixin.rb +0 -1
- metadata +34 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e3c0008c0b7a6498ba52310bfd8c72ddad9317f86b37a636ce587a4bd849a97
|
4
|
+
data.tar.gz: 4ff296d8cc02db814adf92d00cae08f202a2dd0d29926552393eb4e4213b1179
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd56a019dda4749778351430f28cfb8d46caf718ceeb068adc43e240b18d1f3b78a3a4d04465f8cd62080379719d6aedb82e97672cb4ed62d56ea428d8ee4706
|
7
|
+
data.tar.gz: d5e97819f76f229c9c320645cec97dd69570f54c4ce13b7a6d21e3a95563597a8f2cd82b87a744c47284a9591fb148140f14304a97ea7469faab54088fbe17e2
|
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Isomorfeus
|
2
4
|
module Data
|
3
5
|
module Handler
|
4
6
|
class ArrayLoadHandler < LucidHandler::Base
|
5
|
-
on_request do |pub_sub_client,
|
7
|
+
on_request do |pub_sub_client, current_user, request, response|
|
6
8
|
result = { error: 'No such thing' }
|
7
9
|
# promise_send_path('Isomorfeus::Data::Handler::CollectionLoadHandler', self.to_s, props_hash)
|
8
10
|
request.each_key do |array_class_name|
|
@@ -12,13 +14,17 @@ module Isomorfeus
|
|
12
14
|
props_json = request[array_class_name]
|
13
15
|
begin
|
14
16
|
props = Oj.load(props_json, mode: :strict)
|
15
|
-
props.merge!({pub_sub_client: pub_sub_client,
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
props.merge!({pub_sub_client: pub_sub_client, current_user: current_user})
|
18
|
+
if current_user.authorized?(array_class, :load, *props)
|
19
|
+
array = array_class.load(props)
|
20
|
+
array.instance_exec do
|
21
|
+
array_class.on_load_block.call(pub_sub_client, current_user) if array_class.on_load_block
|
22
|
+
end
|
23
|
+
response.deep_merge!(data: array.to_transport)
|
24
|
+
result = { success: 'ok' }
|
25
|
+
else
|
26
|
+
result = { error: 'Access denied!' }
|
19
27
|
end
|
20
|
-
response.deep_merge!(data: array.to_transport)
|
21
|
-
result = { success: 'ok' }
|
22
28
|
rescue Exception => e
|
23
29
|
result = if Isomorfeus.production?
|
24
30
|
{ error: { array_class_name => 'No such thing!' }}
|
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Isomorfeus
|
2
4
|
module Data
|
3
5
|
module Handler
|
4
6
|
class CollectionLoadHandler < LucidHandler::Base
|
5
|
-
on_request do |pub_sub_client,
|
7
|
+
on_request do |pub_sub_client, current_user, request, response|
|
6
8
|
result = { error: 'No such thing' }
|
7
9
|
# promise_send_path('Isomorfeus::Data::Handler::CollectionLoadHandler', self.to_s, props_hash)
|
8
10
|
request.each_key do |collection_class_name|
|
@@ -12,14 +14,18 @@ module Isomorfeus
|
|
12
14
|
props_json = request[collection_class_name]
|
13
15
|
begin
|
14
16
|
props = Oj.load(props_json, mode: :strict)
|
15
|
-
props.merge!({pub_sub_client: pub_sub_client,
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
props.merge!({pub_sub_client: pub_sub_client, current_user: current_user})
|
18
|
+
if current_user.authorized?(collection_class, :load, *props)
|
19
|
+
collection = collection_class.load(props)
|
20
|
+
collection.instance_exec do
|
21
|
+
collection_class.on_load_block.call(pub_sub_client, current_user) if collection_class.on_load_block
|
22
|
+
end
|
23
|
+
response.deep_merge!(data: collection.to_transport)
|
24
|
+
response.deep_merge!(data: collection.included_items_to_transport)
|
25
|
+
result = { success: 'ok' }
|
26
|
+
else
|
27
|
+
result = { error: 'Access denied!' }
|
19
28
|
end
|
20
|
-
response.deep_merge!(data: collection.to_transport)
|
21
|
-
response.deep_merge!(data: collection.included_items_to_transport)
|
22
|
-
result = { success: 'ok' }
|
23
29
|
rescue Exception => e
|
24
30
|
result = if Isomorfeus.production?
|
25
31
|
{ error: { collection_class_name => 'No such thing!' }}
|
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Isomorfeus
|
2
4
|
module Data
|
3
5
|
module Handler
|
4
6
|
class GraphLoadHandler < LucidHandler::Base
|
5
|
-
on_request do |pub_sub_client,
|
7
|
+
on_request do |pub_sub_client, current_user, request, response|
|
6
8
|
result = { error: 'No such thing' }
|
7
9
|
# promise_send_path('Isomorfeus::Data::Handler::GraphLoadHandler', self.to_s, props_hash)
|
8
10
|
request.each_key do |graph_class_name|
|
@@ -12,14 +14,18 @@ module Isomorfeus
|
|
12
14
|
props_json = request[graph_class_name]
|
13
15
|
begin
|
14
16
|
props = Oj.load(props_json, mode: :strict)
|
15
|
-
props.merge!({pub_sub_client: pub_sub_client,
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
props.merge!({pub_sub_client: pub_sub_client, current_user: current_user})
|
18
|
+
if current_user.authorized?(graph_class, :load, *props)
|
19
|
+
graph = graph_class.load(props)
|
20
|
+
graph.instance_exec do
|
21
|
+
graph_class.on_load_block.call(pub_sub_client, current_user) if graph_class.on_load_block
|
22
|
+
end
|
23
|
+
response.deep_merge!(data: graph.to_transport)
|
24
|
+
response.deep_merge!(data: graph.included_items_to_transport)
|
25
|
+
result = { success: 'ok' }
|
26
|
+
else
|
27
|
+
result = { error: 'Access denied!' }
|
19
28
|
end
|
20
|
-
response.deep_merge!(data: graph.to_transport)
|
21
|
-
response.deep_merge!(data: graph.included_items_to_transport)
|
22
|
-
result = { success: 'ok' }
|
23
29
|
rescue Exception => e
|
24
30
|
result = if Isomorfeus.production?
|
25
31
|
{ error: { graph_class_name => 'No such thing!' }}
|
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Isomorfeus
|
2
4
|
module Data
|
3
5
|
module Handler
|
4
6
|
class HashLoadHandler < LucidHandler::Base
|
5
|
-
on_request do |pub_sub_client,
|
7
|
+
on_request do |pub_sub_client, current_user, request, response|
|
6
8
|
result = { error: 'No such thing' }
|
7
9
|
# promise_send_path('Isomorfeus::Data::Handler::HashLoadHandler', self.to_s, props_hash)
|
8
10
|
request.each_key do |hash_class_name|
|
@@ -12,13 +14,17 @@ module Isomorfeus
|
|
12
14
|
props_json = request[hash_class_name]
|
13
15
|
begin
|
14
16
|
props = Oj.load(props_json, mode: :strict)
|
15
|
-
props.merge!({pub_sub_client: pub_sub_client,
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
props.merge!({pub_sub_client: pub_sub_client, current_user: current_user})
|
18
|
+
if current_user.authorized?(hash_class, :load, *props)
|
19
|
+
hash = hash_class.load(props)
|
20
|
+
hash.instance_exec do
|
21
|
+
hash_class.on_load_block.call(pub_sub_client, current_user) if hash_class.on_load_block
|
22
|
+
end
|
23
|
+
response.deep_merge!(data: hash.to_transport)
|
24
|
+
result = { success: 'ok' }
|
25
|
+
else
|
26
|
+
result = { error: 'Access denied!' }
|
19
27
|
end
|
20
|
-
response.deep_merge!(data: hash.to_transport)
|
21
|
-
result = { success: 'ok' }
|
22
28
|
rescue Exception => e
|
23
29
|
result = if Isomorfeus.production?
|
24
30
|
{ error: { hash_class_name => 'No such thing!' }}
|
data/lib/lucid_array/base.rb
CHANGED
data/lib/lucid_array/mixin.rb
CHANGED
data/lib/lucid_graph/base.rb
CHANGED
data/lib/lucid_graph/mixin.rb
CHANGED
data/lib/lucid_hash/base.rb
CHANGED
data/lib/lucid_hash/mixin.rb
CHANGED
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.epsilon2
|
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-08-
|
11
|
+
date: 2019-08-18 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.9.
|
89
|
+
version: 16.9.4
|
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.9.
|
96
|
+
version: 16.9.4
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: isomorfeus-redux
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,14 +114,42 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.0.0.
|
117
|
+
version: 1.0.0.epsilon2
|
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.epsilon2
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: isomorfeus-installer
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 1.0.0.epsilon2
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - '='
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 1.0.0.epsilon2
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: opal-webpack-loader
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.9.4
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.9.4
|
125
153
|
- !ruby/object:Gem::Dependency
|
126
154
|
name: rake
|
127
155
|
requirement: !ruby/object:Gem::Requirement
|