isomorfeus-transport 23.6.0.rc4 → 23.6.0.rc5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71c4133dbd6db3a7ec68fd33734724492990159ac0930baec3de275f5690a3ef
|
4
|
+
data.tar.gz: 4a7136266a220ebf889e0b51ad201adc5df1e5fbf79322ccc10281e3752cb7bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a9de85ee25d6581ddc4380f5305288e07dbb7db7df37ff1d0c85ea15826cbb6b7bde3ace5037cd44893d94b76258c60b7491aacdd24b9c1a09cd4a34dabbbd6
|
7
|
+
data.tar.gz: e05b34fd3c4a762b5287801f946a5fcff29360a7d8b130c88fdba3ac0752d7396c8f771786bcab27ad39f021d83307ea70a5301a5ae24f285b4588def56f66d9
|
@@ -1,24 +1,12 @@
|
|
1
1
|
module Kernel
|
2
|
-
def promise(&block)
|
3
|
-
p = Promise.new
|
4
|
-
|
2
|
+
def promise(p = Promise.new, &block)
|
5
3
|
begin
|
6
4
|
result = block.call
|
7
5
|
return p.resolve(result) if result
|
6
|
+
after(10) { promise(p, &block) }
|
8
7
|
rescue => e
|
9
8
|
return p.reject(e)
|
10
9
|
end
|
11
|
-
|
12
|
-
pr = proc do
|
13
|
-
begin
|
14
|
-
res = block.call
|
15
|
-
res ? p.resolve(res) : after(10, &pr)
|
16
|
-
rescue => e
|
17
|
-
p.reject(e)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
after(10, &pr)
|
22
10
|
p
|
23
11
|
end
|
24
12
|
|
@@ -33,13 +21,6 @@ module Kernel
|
|
33
21
|
def after(time_ms, &block)
|
34
22
|
`setTimeout(#{block.to_n}, time_ms)`
|
35
23
|
end
|
36
|
-
|
37
|
-
# TODO remove before release
|
38
|
-
%x{
|
39
|
-
Opal.s = function() {
|
40
|
-
return Opal.Isomorfeus.store.$get_state().$to_n();
|
41
|
-
}
|
42
|
-
}
|
43
24
|
else
|
44
25
|
def on_browser?; false; end
|
45
26
|
def on_desktop?; false; end
|
@@ -22,7 +22,7 @@ module Isomorfeus
|
|
22
22
|
response_agent.error = { error: { handler_class_name => 'No such handler!'}}
|
23
23
|
end
|
24
24
|
rescue Exception => e
|
25
|
-
response_agent.error = {
|
25
|
+
response_agent.error = { error: { handler_class_name => "#{e.message}\n#{e.backtrace.join("\n")}" }}
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -34,20 +34,22 @@ module Isomorfeus
|
|
34
34
|
end
|
35
35
|
Thread.current[:isomorfeus_user] = user
|
36
36
|
request_hash = Oj.load(data, mode: :strict)
|
37
|
-
unless request_hash.key?(
|
37
|
+
unless request_hash.key?("iso_ping")
|
38
38
|
handler_instance_cache = {}
|
39
39
|
response_agent_array = []
|
40
40
|
Thread.current[:isomorfeus_pub_sub_client] = client
|
41
41
|
process_request(request_hash, handler_instance_cache, response_agent_array)
|
42
|
-
handler_instance_cache.each_value do |handler|
|
43
|
-
|
44
|
-
end
|
42
|
+
# handler_instance_cache.each_value do |handler|
|
43
|
+
# handler.resolve if handler.resolving?
|
44
|
+
# end
|
45
45
|
result = {}
|
46
46
|
response_agent_array.each do |response_agent|
|
47
47
|
result.deep_merge!(response_agent.result)
|
48
48
|
end
|
49
49
|
client.write Oj.dump(result, mode: :strict) unless result.empty?
|
50
50
|
end
|
51
|
+
rescue => e
|
52
|
+
STDERR.puts "#{e.message}#{e.backtrace&.join("\n")}"
|
51
53
|
ensure
|
52
54
|
Thread.current[:isomorfeus_user] = nil
|
53
55
|
Thread.current[:isomorfeus_pub_sub_client] = nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-transport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 23.6.0.
|
4
|
+
version: 23.6.0.rc5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -190,14 +190,14 @@ dependencies:
|
|
190
190
|
requirements:
|
191
191
|
- - '='
|
192
192
|
- !ruby/object:Gem::Version
|
193
|
-
version: 23.6.0.
|
193
|
+
version: 23.6.0.rc5
|
194
194
|
type: :development
|
195
195
|
prerelease: false
|
196
196
|
version_requirements: !ruby/object:Gem::Requirement
|
197
197
|
requirements:
|
198
198
|
- - '='
|
199
199
|
- !ruby/object:Gem::Version
|
200
|
-
version: 23.6.0.
|
200
|
+
version: 23.6.0.rc5
|
201
201
|
- !ruby/object:Gem::Dependency
|
202
202
|
name: rake
|
203
203
|
requirement: !ruby/object:Gem::Requirement
|